DMAP.Db

g DMAP.Db DMAP.Db GObject.GInterface GObject.GInterface GObject.GInterface->DMAP.Db

Implementations:
 None

Methods

  add (record)
  add_path (path)
  add_with_id (record, id)
  count ()
  lookup_id_by_location (location)

Virtual Methods

  do_add (record)
  do_add_path (path)
  do_add_with_id (record, id)
  do_count ()
  do_lookup_id_by_location (location)

Properties

None

Signals

None

Fields

None

Class Details

class DMAP.Db
Bases:GObject.GInterface
Structure:DMAP.DbIface
add(record)
Parameters:record (DMAP.Record) – A database record.
Returns:The ID for the newly added record. A reference to the record will be retained by the database (if required; an adapter-type implementation may not want to retain a reference as the record data may be placed elsewhere). In all cases, the record should be unrefed by the calling code.
Return type:int

Add a record to the database.

add_path(path)
Parameters:path (str) – A path to an appropriate media file.
Returns:The ID for the newly added record.

See also the notes for DMAP.Db.add regarding reference counting.

Return type:int

Create a record and add it to the database.

add_with_id(record, id)
Parameters:
  • record (DMAP.Record) – A database record.
  • id (int) – A database record ID.
Returns:

The ID for the newly added record.

See also the notes for DMAP.Db.add regarding reference counting.

Return type:

int

Add a record to the database and assign it the given ID.

count()
Returns:the number of records in the database.
Return type:int
lookup_id_by_location(location)
Parameters:location (str) – A record location.
Returns:the database id for the record corresponding to path or 0 if such a record does not exist.
Return type:int
do_add(record) virtual
Parameters:record (DMAP.Record) – A database record.
Returns:The ID for the newly added record. A reference to the record will be retained by the database (if required; an adapter-type implementation may not want to retain a reference as the record data may be placed elsewhere). In all cases, the record should be unrefed by the calling code.
Return type:int

Add a record to the database.

do_add_path(path) virtual
Parameters:path (str) – A path to an appropriate media file.
Returns:The ID for the newly added record.

See also the notes for DMAP.Db.add regarding reference counting.

Return type:int

Create a record and add it to the database.

do_add_with_id(record, id) virtual
Parameters:
  • record (DMAP.Record) – A database record.
  • id (int) – A database record ID.
Returns:

The ID for the newly added record.

See also the notes for DMAP.Db.add regarding reference counting.

Return type:

int

Add a record to the database and assign it the given ID.

do_count() virtual
Return type:int
do_lookup_id_by_location(location) virtual
Parameters:location (str) – A record location.
Returns:the database id for the record corresponding to path or 0 if such a record does not exist.
Return type:int