![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
enum RhythmDBEntryCategory; RhythmDBEntryType; RhythmDBEntryTypeClass; const char * rhythmdb_entry_type_get_name (RhythmDBEntryType *etype
); char * rhythmdb_entry_get_playback_uri (RhythmDBEntry *entry
); void rhythmdb_entry_created (RhythmDBEntry *entry
); void rhythmdb_entry_pre_destroy (RhythmDBEntry *entry
); gboolean rhythmdb_entry_can_sync_metadata (RhythmDBEntry *entry
); void rhythmdb_entry_sync_metadata (RhythmDBEntry *entry
,GSList *changes
,GError **error
);
"category" RhythmDBEntryCategory : Read / Write / Construct Only "db" RhythmDB* : Read / Write / Construct Only "has-playlists" gboolean : Read / Write "name" gchar* : Read / Write / Construct Only "save-to-disk" gboolean : Read / Write / Construct Only "type-data-size" guint : Read / Write / Construct Only
This is the base class for database entry type classes, which provide some aspects of the behaviour of database entry types. There are different entry types for songs, radio streams, podcast feeds and episodes, and so on.
Plugins written in Python or Vala can create new entry types by subclassing and overriding any methods required. Plugins written in C can create a new instance of the RhythmDBEntryType base class and use its function pointer members rather than subclassing.
typedef enum { RHYTHMDB_ENTRY_NORMAL, RHYTHMDB_ENTRY_STREAM, RHYTHMDB_ENTRY_CONTAINER, RHYTHMDB_ENTRY_VIRTUAL } RhythmDBEntryCategory;
Categories used to group entry types. These are used in a few places to control handling of entries.
typedef struct { GObjectClass parent_class; /* methods */ void (*entry_created) (RhythmDBEntryType *etype, RhythmDBEntry *entry); void (*destroy_entry) (RhythmDBEntryType *etype, RhythmDBEntry *entry); char * (*get_playback_uri) (RhythmDBEntryType *etype, RhythmDBEntry *entry); void (*update_availability) (RhythmDBEntryType *etype, RhythmDBEntry *entry, RhythmDBEntryAvailability avail); gboolean (*can_sync_metadata) (RhythmDBEntryType *etype, RhythmDBEntry *entry); void (*sync_metadata) (RhythmDBEntryType *etype, RhythmDBEntry *entry, GSList *changes, GError **error); } RhythmDBEntryTypeClass;
const char * rhythmdb_entry_type_get_name (RhythmDBEntryType *etype
);
Returns the name of the entry type
|
a RhythmDBEntryType |
Returns : |
entry type name |
char * rhythmdb_entry_get_playback_uri (RhythmDBEntry *entry
);
Returns an allocated string containing the playback URI for entry
,
or NULL if the entry cannot be played.
|
a RhythmDBEntry |
Returns : |
playback URI or NULL |
void rhythmdb_entry_created (RhythmDBEntry *entry
);
Calls the entry type's post-creation method for entry
.
|
a newly created RhythmDBEntry |
void rhythmdb_entry_pre_destroy (RhythmDBEntry *entry
);
Calls the entry type's pre-deletion method for entry
.
|
a RhythmDBEntry |
gboolean rhythmdb_entry_can_sync_metadata (RhythmDBEntry *entry
);
Calls the entry type's method to check if it can sync metadata for entry
.
Usually this is only true for entries backed by files, where tag-writing is
enabled, and the appropriate tag-writing facilities are available.
|
a RhythmDBEntry |
Returns : |
TRUE if the entry can be synced
|
void rhythmdb_entry_sync_metadata (RhythmDBEntry *entry
,GSList *changes
,GError **error
);
Calls the entry type's method to sync metadata changes for entry
.
|
a RhythmDBEntry |
|
a list of RhythmDBEntryChange structures |
|
returns error information |
"category"
property"category" RhythmDBEntryCategory : Read / Write / Construct Only
The RhythmDBEntryCategory that this entry type fits into.
Default value: RHYTHMDB_ENTRY_NORMAL
"has-playlists"
property "has-playlists" gboolean : Read / Write
If TRUE
, entries of this type can be added to playlists.
Default value: FALSE
"name"
property "name" gchar* : Read / Write / Construct Only
Entry type name. This must be unique.
Default value: NULL
"save-to-disk"
property "save-to-disk" gboolean : Read / Write / Construct Only
If TRUE
, entries of this type should be written to the
on-disk database.
Default value: FALSE