Creates and returns a new #RBAsyncCopy instance.
#RBAsyncCopy instance
Cancels the loading operation, ensuring that the callback
will not be called again.
If an error has occurred that prevents the copy from proceeding,
this function will return a #GError, otherwise NULL.
copy error or NULL
Starts copying @src to @dest, calling @callback on completion or error.
source URI
destination URI
completion callback
data for completion callback
destroy function for user_data
Creates a new automatic playlist source, initially with an empty query.
the new source
the #RBShell instance
the name of the new playlist
if TRUE, the playlist will be considered local
Creates a new auto playlist source by parsing an XML-encoded query.
the new source
the #RBShell instance
libxml node containing the playlist
Extracts the current query, playlist limit, and sorting settings for the playlist.
returns the database query for the playlist
returns the playlist limit type
returns the playlist limit value
returns the playlist sorting key
returns the playlist sorting direction (as a #GtkSortType)
Sets the database query used to populate the playlist, and also the limit on
playlist size, and the sorting type used.
the new database query
the playlist limit type
the playlist limit value
the sorting key
the sorting direction (as a #GtkSortType)
This is a virtual method that should be implemented by subclasses. It returns %TRUE
if drag and drop target support for the source should be activated.
%TRUE if drop support should be activated
This is a virtual method that should be implemented by subclasses. It returns %TRUE
if drag and drop target support for the source should be activated.
%TRUE if drop support should be activated
%TRUE if drop support should be activated
Creates a new #RBCellRendererPixbuf.
the new cell renderer
Emitted when the user clicks on the pixbuf cell.
the #GtkTreePath to the row that was clicked
create a cell renderer that will
display some pixbufs for representing the rating of a song.
It is also able to update the rating.
the new cell renderer
The rating displayed by the renderer, as a floating point value
between 0.0 and 5.0.
Emitted when the user changes the rating.
the new rating
string form of the #GtkTreePath to the row that was changed
Creates and returns a new #RBChunkLoader instance.
#RBChunkLoader instance
Cancels the loading operation, ensuring that the callback
will not be called again.
If an error has occurred that prevents the loader from providing
any further data, this function will return a #GError, otherwise
NULL.
loader error or NULL
Sets the loader data callback. This will be called with each
chunk of data read, or with NULL to indicate the end of the file
or that an error has occurred. To determine which of these is
the case, call @rb_chunk_loader_get_error.
This must be called before @rb_chunk_loader_start.
the data/error callback
data to pass to the callback
function to call to destroy user_data
Starts loading data from the specified URI, passing it in chunks
of at most @chunk_size to the callback.
the uri to load
maximum chunk size
Ejects the device that the source represents.
Ejects the device that the source represents.
Sets the icon and display name for a device-based source.
The details come from the mount and/or volume. This should
be called in the source's constructed method.
Returns %TRUE if @uri matches @source. This should be
used to implement the impl_uri_is_source #RBSource method.
%TRUE if @uri matches @source
a URI to check
Checks whether @uri identifies a path underneath the
device's mount point. Should be used to implement
the #RBSource impl_want_uri method.
URI match strength
a URI to consider
Called when the page is activated (double clicked, etc.) in the page tree.
This is called when the page should delete itself.
The 'deleted' signal will be emitted, which removes the page
from the page model. This will not actually dispose of the
page object, so reference counting must still be handled
correctly.
Called when the page is deselected in the page tree.
Source implementations can use this to return an optional
configuration widget. The widget will be displayed in a
page in the preferences dialog.
configuration widget
the #RBShellPreferences object
Retrieves the details to display in the status bar for the page.
If the progress value returned is less than zero, the progress bar
will pulse. If the progress value is greater than or equal to 1,
the progress bar will be hidden.
holds the returned status text
holds the returned text for the progress bar
holds the progress value
Checks if @page can be selected
Called when the page is selected in the page tree.
Called when the user performs an action (such as right-clicking)
that should result in a popup menu being displayed for the page.
TRUE if the page managed to display a popup
Called when the page is activated (double clicked, etc.) in the page tree.
This is called when the page should delete itself.
The 'deleted' signal will be emitted, which removes the page
from the page model. This will not actually dispose of the
page object, so reference counting must still be handled
correctly.
Called when the page is deselected in the page tree.
Source implementations can use this to return an optional
configuration widget. The widget will be displayed in a
page in the preferences dialog.
configuration widget
the #RBShellPreferences object
Retrieves the details to display in the status bar for the page.
If the progress value returned is less than zero, the progress bar
will pulse. If the progress value is greater than or equal to 1,
the progress bar will be hidden.
holds the returned status text
holds the returned text for the progress bar
holds the progress value
Page implementations call this when their status bar information
changes.
Checks if @page can be selected
Called when the page is selected in the page tree.
Called when the user performs an action (such as right-clicking)
that should result in a popup menu being displayed for the page.
TRUE if the page managed to display a popup
Page name as displayed in the tree
The parent page in the tree (may be NULL)
Pixbuf to display in the page tree
The plugin that created this page.
TRUE when the page is selected in the page tree.
The rhythmbox shell object
The Gtk UIManager object
If FALSE, the page will not be displayed in the tree
Emitted when the page is being deleted.
Emitted when the page's status changes.
configuration widget
the #RBShellPreferences object
holds the returned status text
holds the returned text for the progress bar
holds the progress value
TRUE if the page managed to display a popup
Creates a new page group object. The group will be registered
before it is returned.
new page group
the #RBShell
name of the page group (untranslated, used in code)
display name of the page group (translated)
category for the page group
Registers core page groups.
the #RBShell
the #RBDisplayPageModel
Locates a page group by name. If the page group has not been registered yet,
returns NULL instead.
existing page group, or NULL.
name of page group to find
Called when the page group is fully loaded, that is, all initial pages have
been added.
Page group category that the group falls into
Internal (untranslated) name for the page group
Predefined categories of page group. The order they're defined here is the order they
appear in the page tree.
This constructs both the GtkTreeStore holding the display page
data and the filter model that hides invisible pages.
the #RBDisplayPageModel
Adds a page to the model, either below a specified page (if it's a source or
something else) or at the top level (if it's a group)
the #RBDisplayPage to add
the parent under which to add @page
Finds a #GtkTreeIter for a specified page in the model. This will only
find pages that are currently visible. The returned #GtkTreeIter can be used
with the #RBDisplayPageModel.
%TRUE if the page was found
the #RBDisplayPage to find
returns a #GtkTreeIter for the page
Removes a page from the model.
the #RBDisplayPage to remove
Sets up the drag and drop targets for the display page tree.
the sourcel ist #GtkTreeView
Updates the model with the new playing source.
the new playing #RBSource (as a #RBDisplayPage)
Emitted when a drag and drop operation to the display page tree completes.
the #RBSource receiving the drop
the drop position
the drop data
Emitted when a new page is inserted into the model.
Use this instead of GtkTreeModel::row-inserted as this
doesn't get complicated by visibility filtering.
the #RBDisplayPage that was inserted
a #GtkTreeIter indicating the page position
Columns present in the display page model.
Creates the display page tree widget.
the display page tree widget.
the #RBShell instance
Initiates editing of the name of the specified source. The row for the source
is selected and given input focus, allowing the user to edit the name.
source_name_edited_cb is called when the user finishes editing.
the #RBSource to edit
Selects the specified page in the tree. This will result in the 'selected'
signal being emitted.
the #RBDisplayPage to select
If @page is expanded (children visible), collapses it, otherwise expands it.
the #RBDisplayPage to toggle
The #GtkTreeModel for the display page tree
The #RBShell instance
Emitted when a drag and drop to the tree completes.
the #RBDisplagePage receiving the drop
the drop data
Emitted when a page is selected from the tree
the newly selected #RBDisplayPage
Creates a new #RBEncoder instance.
the new #RBEncoder
Attempts to cancel any in progress encoding. The encoder should
delete the destination file, if it created one, and emit the
'completed' signal.
Initiates encoding, transcoding to the specified profile if specified.
Encoding and error reporting takes place asynchronously. The caller should wait
for the 'completed' signal which indicates it has either completed or failed.
the #RhythmDBEntry to transcode
destination file URI
if %TRUE, overwrite @dest if it already exists
encoding profile to use, or NULL to just copy
Retrieves the plugin installer detail strings and descriptions
for any missing plugins required to use the specified encoding profile.
%TRUE if some detail strings are returned, %FALSE otherwise
an encoding profile
returns plugin installer detail strings
returns plugin descriptions
Attempts to cancel any in progress encoding. The encoder should
delete the destination file, if it created one, and emit the
'completed' signal.
Initiates encoding, transcoding to the specified profile if specified.
Encoding and error reporting takes place asynchronously. The caller should wait
for the 'completed' signal which indicates it has either completed or failed.
the #RhythmDBEntry to transcode
destination file URI
if %TRUE, overwrite @dest if it already exists
encoding profile to use, or NULL to just copy
Retrieves the plugin installer detail strings and descriptions
for any missing plugins required to use the specified encoding profile.
%TRUE if some detail strings are returned, %FALSE otherwise
an encoding profile
returns plugin installer detail strings
returns plugin descriptions
Emitted when the encoding process is complete, or when a fatal error
has occurred. The destination file, if one exists, will be closed
and flushed to disk before this signal is emitted.
size of the output file
output media type
encoding error, or NULL if successful
Emitted regularly during the encoding process to provide progress updates.
progress as a fraction (0..1)
Returns the #RBEncoderFactory instance.
the #RBEncoderFactory
Emitted when creating a sink to write to the specified URI.
Plugins can use this when just creating a GStreamer element from the URI
isn't enough. Typically this happens when there's no way to pass device
information through the URI format.
the URI for the sink
the sink object (a GstElement in fact)
Emitted when creating a source to read the specified URI.
Plugins can use this when just creating a GStreamer element from the URI
isn't enough. Typically this happens when there's no way to pass device
information through the URI format.
the URI for the source
the source object (a GstElement in fact)
the #RhythmDBEntry to transcode
destination file URI
if %TRUE, overwrite @dest if it already exists
encoding profile to use, or NULL to just copy
%TRUE if some detail strings are returned, %FALSE otherwise
an encoding profile
returns plugin installer detail strings
returns plugin descriptions
Creates a new entry view. If it makes sense to allow the user to drag entries
from this entry view to other sources, @is_drag_source should be TRUE. If it
makes sense to allow the user to drag entries from other sources to this view,
@is_drag_dest should be TRUE. Drag and drop in this sense is used for two purposes:
to transfer tracks between the filesystem and removable devices, and to add tracks
to playlists.
the new entry view
the #RhythmDB instance
the #RBShellPlayer instance
if TRUE, the view should act as a drag and drop data source
if TRUE, the view should act as a drag and drop destination
Returns a sample string for use in columns displaying times
and dates in 'friendly' form (see @rb_utf_friendly_time).
For use with @rb_entry_view_set_fixed_column_width.
sample date string
Appends a predefined column type to the set of columns already present
in the entry view. If @always_visible is TRUE, the column will ignore
the user's coulmn visibility settings and will always be visible.
This should only be used when it is vital for the purpose of the
source that the column be visible.
type of column to append
if TRUE, ignore the user's column visibility settings
Appends a custom column to the entry view.
a #GtkTreeViewColumn to append
title for the column (translated)
sort key for the column (not translated)
comparison function to use for sorting on the column
data to pass to the sort function
function to use to destroy the sort data
Enables the entry view to act as a data source for drag an drop operations,
using a specified set of data targets.
an array of #GtkTargetEntry structures defining the drag data targets
the number of entries in the target array
Retrieves a predefined column from the entry view. This can be used
to insert additional cell renderers into the column.
a #GtkTreeViewColumn instance, or NULL
type of column to retrieve
Determines whether a specified entry is present in the view.
TRUE if the entry is present in the view
a #RhythmDBEntry to check
Determines whether a specified entry is present in the view
and is currently visible.
TRUE if the entry is visible
a #RhythmDBEntry to check
Gathers the selected entries from the view.
selected entries in the view.
a #GList of
Retrieves the sort settings for the view.
returns the sort column name
(out) (allow-none) returns the sort ordering as a #GtkSortType value
Constructs a string that describes the sort settings for the entry view.
This consists of a column name and an order ('ascending' or 'descending')
separated by a comma.
sort order description
Determines whether all entries in the view are selected.
TRUE if all rows in the view are selected
Determines whether there is an active selection in the view.
TRUE if one or more rows are selected
Inserts a custom column at the specified position.
a #GtkTreeViewColumn to append
title for the column (translated)
sort key for the column (not translated)
comparison function to use for sorting on the column
data to pass to the sort function
function to use to destroy the sort data
position at which to insert the column (-1 to insert at the end)
Resorts the entries in the entry view. Mostly to be used
when a new model is associated with the view.
If the specified entry is present in the view, the view will be
scrolled so that the entry is visible.
a #RhythmDBEntry to scroll to
Selects all rows in the view
If the specified entry is present in the view, it is added
to the selection.
a #RhythmDBEntry to select
Deselects all rows in the view.
Enables in-place editing of the values in a column.
The underlying %RhythmDBEntry is updated when editing is complete.
a #RBEntryViewColumn to update
%TRUE to make the column editable, %FALSE otherwise
Makes the headers for sortable columns (those for which a sort function was
provided) clickable, so the user can set the sort order.
if TRUE, sortable columns will be made clickable
Helper function for calling @rb_set_tree_view_column_fixed_width on
a column. This is important for performance reasons, as having the
tree view measure the strings in each of 20000 rows is very slow.
the column to set the width for
a temporary cell renderer to use
a NULL-terminated array of strings that will be displayed in the column
Replaces the model backing the entry view.
the new #RhythmDBQueryModel to use for the view
Sets the sort order for the entry view.
name of the column to sort on
order to sort in, as a #GtkSortType
Changes the sort order for the entry view. The sort order
description must be a column name, followed by a comma, followed
by an order description ('ascending' or 'descending').
sort order description
Sets the icon to be drawn in the 'playing' column next to the
current playing entry. RB_ENTRY_VIEW_PLAYING and RB_ENTRY_VIEW_PAUSED
should be used when the source containing the entry view is playing,
and RB_ENTRY_VIEW_NOT_PLAYING otherwise.
the new playing entry state
#RhythmDB instance
If TRUE, the view acts as a destination for drag and drop operations.
If TRUE, the view acts as a data source for drag and drop operations.
The #RhythmDBQueryModel backing the view
Determines the icon to show in the 'playing' column next to the current
playing entry.
#RBShellPlayer instance
The sort order for the track listing.
An array containing the names of the visible columns.
Emitted when the model backing the entry view is replaced.
Emitted when an entry in the view is activated (by double clicking
or by various key presses)
the #RhythmDBEntry that was activated
Emitted when an entry is added to the view
the #RhythmDBEntry that was added
Emitted when an entry has been removed from the view
the #RhythmDBEntry that was removed
Emitted when the user first selects a row, or when no rows are selected
any more.
TRUE if one or more rows are selected
Emitted when the set of selected entries changes
Emitted when the user performs an action that should result in a
popup menu appearing. If the action was a mouse button click,
over_entry is FALSE if the mouse pointer was in the blank space after
the last row in the view. If the action was a key press, over_entry
is FALSE if no rows in the view are selected.
if TRUE, the popup request was made while pointing at an entry in the view
Predefined column types to use in #RBEntryView<!-- -->s. Use
#rb_entry_view_append_column to add these to an entry view.
The predefined column names map directly to the #RhythmDBEntry properties
the columns display.
Provides access to a metadata store instance.
named metadata store instance
name of the metadata store
Looks up a cached metadata item.
name of the file storing the cached metadata item
metadata lookup key
Requests a metadata item. If the item is cached, the callback will be called
synchronously. Otherwise, metadata providers will provide results asynchronously.
%TRUE if results may be provided after returning
metadata lookup key
callback to call with results
user data to pass to the callback
destroy function for @user_data
Stores an item in the metadata store so that lookups matching @key will
return it. @data should contain an object that must be transformed using
the RBExtDB::store signal before being stored. For example,
the album art cache expects #GdkPixbuf objects here, rather than buffers
containing JPEG encoded files.
metadata storage key
metadata source type
data to store
Stores an item in the metadata store so that lookpus matching @key
will return it. @data should contain the data to be written to the
store, either as a string or as a #GByteArray.
metadata storage key
metadata source type
data to store
Stores an item identified by @uri in the metadata store so that
lookups matching @key will return it.
metadata storage key
metadata source type
URI of the item to store
Name of the metadata store. Used to locate instances.
Emitted when metadata is added to the store. Metadata consumers
can use this to process metadata they did not specifically
request, for example to update album art stored on an attached
media player.
Emitted when loading a metadata item from a local file or from a
URI.
Emitted when a metadata request cannot be satisfied from the local
store. Metadata providers initiate searches in response to this
signal.
Emitted when a metadata item needs to be written to a local file.
This only needs to be used for metadata that needs to be encoded
or compressed, such as images.
Adds a field to the key, or an additional value to an existing field.
name of the field to add
field value
Adds an information field to the key.
name of the field to add
field value
Copies a key.
copied key
Checks whether a specified field in @key matches a value.
This can be used to match keys against other types of data.
To match keys against each other, use @rb_ext_db_key_matches.
%TRUE if the field matches the value
a field to check
a value to match against
Frees a key
Extracts the value for a single-valued field.
field value, or NULL
field to retrieve
Returns a NULL-terminated array containing the names of the fields
present in the key.
array of field names
Extracts the values for the specified field.
field values, or NULL
field to retrieve
Extracts the value for the specified info field.
field value, or NULL
info field to retrieve
Returns a NULL-terminated array containing the names of the info
fields * present in the key.
array of info field names
Returns %TRUE if the key is a lookup key
whether the key is a lookup key
Generates the set of possible lookup keys for @key and
passes them to @callback in order. If the callback returns
%FALSE, processing will stop.
This should only be used by the metadata store itself.
Metadata providers and consumers shouldn't need to do this.
a callback to process lookup keys
data to pass to @callback
Checks whether the fields specified in @a match @b.
For keys to match, they must have the same set of required fields,
and the values for all must match. Optional fields must have the
same values if present in both. Informational fields are ignored.
%TRUE if the keys match
second #RBExtDBKey
Generates the storage key for @key. This is the value that should
be used to store an item identified by this key in the store.
The storage key includes all optional fields, so keys passed to
this function should be constructed using only the optional fields
that were used to locate the item. The caller must free the data
pointer inside @data.
This should only be used by the metadata store itself.
Metadata providers and consumers shouldn't need to do this.
TDB_DATA structure containing storage key
Creates a new metadata lookup key with a single field.
Use @rb_ext_db_key_add_field to add more.
the new key
required field name
value for field
Creates a new metadata storage key with a single field.
Use @rb_ext_db_key_add_field to add more.
the new key
required field name
value for field
Creates a new history instance.
a new #RBHistory
Whether rb_history_set_playing() should truncate the history
function to call when removing an entry from the history
data to pass to @destroyer
Adds a new entry to the end of the history list.
If a size limit is set, an entry may be removed from the start to
keep the history list within the limit.
a #RhythmDBEntry to append
Empties the history list.
Returns %TRUE if the entry is present in the history list.
%TRUE if found
a #RhythmDBEntry to check for
Returns the current #RhythmDBEntry, or NULL if there is no current position
current entry or NULL
Constructs a copy of the whole history in order. Caller must free the result.
The caller does not own any references on the entries in the returned array.
Takes O(Nlog(N)) time.
a copy of the history list
Returns the first entry in the history.
first entry
Gets the index of the current entry. This is guaranteed to be < the
history's size, so if the history is empty, it returns -1.
index of the current entry
Moves the current position to the first entry in the history
Moves the current position to the last entry in the history
Moves the current position to the next entry. If the current position is
already at the end of the history, nothing happens.
Moves the current position to the previous entry. If the current position is
already at the start of the history, nothing happens.
Inserts @entry at @index within the history list. 0<=@index<=size
a #RhythmDBEntry to insert
position at which to insert @entry
Returns the last #RhythmDBEntry in the history
last entry
Returns the number of entries in the history.
number of entries
Returns the #RhythmDBEntry after the current position
next entry
Returns the #RhythmDBEntry before the current position.
previous entry
Removes the specified entry from the history list.
the #RhythmDBEntry to remove
Sets a new function to call when removing entries from the history.
function to call when removing an entry from the history
data to pass to @destroyer
Sets the maximum-size property
new maximum size of the history (or 0 for no limit)
Updates the current position to point to the specified entry.
If the truncate-on-play property is set, this will remove all entries
after that.
the new playing #RhythmDBEntry
Sets the 'truncate-on-play' property.
Whether rb_history_set_playing() should truncate the history
Maximum number of entries to store in the history. If 0, no limit is applied.
If set, rb_history_set_playing() truncates the rest of the history
Creates a new library browser.
a new RBLibraryBrowser
the #RhythmDB instance
the entry type to use in the browser
Constructs a #RhythmDBQuery from the current selections in the browser.
a #RhythmDBQuery constructed from the current selection.
Retrieves the property view widget for the specified property,
if there is one.
#RBPropertyView widget, or NULL
the property
Retrieves the property view widgets from the browser.
containing the #RBPropertyView widgets in the browser.
a #GList
Determines whether the browser has an active selection.
TRUE if any items in the browser are selected.
Clears all selections in the browser.
TRUE if anything was changed
Specifies a new input query model for the browser.
This should be the query model constructed from the
current search text, or the basic query model for the
source if there is no search text.
the new input #RhythmDBQueryModel
if TRUE, the caller promises to run a query to populate the input query model.
Replaces any current selection for the specified property.
the property for which to set the selection
a list of strings to select
The set of browsers to display.
#RhythmDB instance
The type of entries to use in the browser.
This #RhythmDBQueryModel defines the set of entries that
the browser filters. This property is not writeable.
To set a new input query model, use
#rb_library_browser_set_model.
This #RhythmDBQueryModel contains the filtered set of
entries. It is a subset of the entries contained in the
input model. This should be used as the model backing
the source's entry view.
Sources using this widget should connect to the notify
signal for this property, updating their entry view when
it changes.
list of entries to delete
callback to call on completion
data for callback
callback to free the callback data
the sync category name
map to hold the entries
The #GstEncodingTarget for this device
Creates a new metadata backend instance.
new #RBMetaData instance
Checks if the metadata writer is capable of updating file metadata
for a given media type.
TRUE if the file metadata for the given media type can be updated
the media type string to check
Retrieves the value of a metadata field extracted from the target URI.
If the target URI contained no value for the field, returns FALSE.
TRUE if a value was returned
the #RBMetaDataField to retrieve
returns the field value
Returns the type of the file from which metadata was read.
This may look like a MIME type, but it isn't.
media type string
This function returns the information used to request automatic
installation of media framework plugins required to decode the target URI.
Use g_strfreev() to free the returned information arrays.
TRUE if missing plugin information was returned
returns machine-readable missing plugin information
returns human-readable missing plugin descriptions
Constructs a list of the media types for which the metadata backend
implements tag saving.
array of media type strings. Use g_strfreev to free it.
a NULL-terminated
If the metadata reader could not decode the file it was asked to
because one or more media framework plugins (specifically, for the
existing implementations, GStreamer plugins) required are missing,
this will return TRUE.
TRUE if required plugins are missing
Reads metadata information from the specified URI.
Once this has returned successfully (with *error == NULL),
rb_metadata_get, rb_metadata_get_media_type, rb_metadata_has_missing_plugins,
and rb_metadata_get_missing_plugins can usefully be called.
URI from which to load metadata
Resets the state of the metadata interface. Call this before
setting tags to be written to a file.
Saves all metadata changes made with rb_metadata_set to the
target URI.
the target URI
Sets a metadata field value. The value is only stored inside the
#RBMetaData object until rb_metadata_save is called.
TRUE if the field is valid
the #RBMetaDataField to set
the value to set
Returns the next entry in the play order, or the first if not currently playing.
next entry to play
Returns the previous entry in the play order, or NULL if not currently playing.
previous entry
Moves to the next entry in the play order. If not currently playing, sets the
first entry in the play order as the playing entry.
Moves to the previous entry in the play order. If not currently playing, does nothing.
If there is no current playing entry, returns true if the play order is non-empty.
true if there is an entry after the current playing entry in the play order.
Returns %TRUE if there is an entry before the current entry in the play order.
If not currently playing, returns %FALSE.
%TRUE if previous entry exists
Updates the #RhythmDBQueryModel instance for the play order.
Called from the #RBSource notify signal handler, and also from
#rb_play_order_source_changed. Subclasses should implement
query_model_changed() to make any necessary adjustments if they
store any state based on the contents of the #RhythmDBQueryModel.
Only for use by #RBPlayOrder subclasses.
the #RhythmDB instance.
Returns the next entry in the play order, or the first if not currently playing.
next entry to play
Only for use by #RBPlayOrder subclasses.
#RBShellPlayer instance
Returns the current playing entry in the play order.
(transfer full) playing entry
Returns the previous entry in the play order, or NULL if not currently playing.
previous entry
Only for use by #RBPlayOrder subclasses.
the active #RhythmDBQueryModel for the playing source.
Only for use by #RBPlayOrder subclasses.
the playing #RBSource instance.
Moves to the next entry in the play order. If not currently playing, sets the
first entry in the play order as the playing entry.
Moves to the previous entry in the play order. If not currently playing, does nothing.
If there is no current playing entry, returns true if the play order is non-empty.
true if there is an entry after the current playing entry in the play order.
Returns %TRUE if there is an entry before the current entry in the play order.
If not currently playing, returns %FALSE.
%TRUE if previous entry exists
Returns %TRUE if the #RhythmDBQueryModel is not empty.
Can be used to implement has_next and has_previous for play orders
that have no beginning or end.
%TRUE if not empty
Returns %TRUE if there is a current playing entry in the play order.
%TRUE if playing
Sets the playing #RBSource for the play order. Should be called
by #RBShellPlayer when the active source changes. Subclasses
should implement playing_source_changed() to make any necessary
changes.
New playing #RBSource
Updates the #RhythmDBQueryModel instance for the play order.
Called from the #RBSource notify signal handler, and also from
#rb_play_order_source_changed. Subclasses should implement
query_model_changed() to make any necessary adjustments if they
store any state based on the contents of the #RhythmDBQueryModel.
Sets the playing entry in the play order.
The new playing entry (or NULL for none)
The #RBShellPlayer instance
The current playing #RhythmDBEntry
Emitted as a hint to suggest that the sensitivity of next/previous
buttons may need to be updated.
if %TRUE, the play order has at least one more entry
if %TRUE, the play order has at least one entry before the current entry
true if there is an entry after the current playing entry in the play order.
next entry to play
%TRUE if previous entry exists
previous entry
Creates a new player object.
new player object.
if TRUE, try to use a backend that supports crossfading and other track transitions.
If a URI is specified, this will close the stream corresponding
to that URI and free any resources related resources. If @uri
is NULL, this will close all streams.
If no streams remain open after this call, the audio device will
be released.
TRUE if a stream was found and closed
Returns the current playback for the current stream in nanoseconds.
playback position
Returns the current volume level, between 0.0 and 1.0.
current output volume level
Determines whether the player supports multiple open streams.
TRUE if multiple open is supported
Prepares a stream for playback. Depending on the player
implementation, this may stop any existing stream being
played. The stream preparation process may continue
asynchronously, in which case errors may be reported from
#rb_player_play or using the 'error' signal.
TRUE if the stream preparation was not unsuccessful
arbitrary data to associate with the stream
function to call to destroy the stream data
Determines whether a stream has been prepared for playback.
TRUE if a stream is prepared for playback
Pauses playback of the most recently started stream. Any
streams being faded out may continue until the fade is
complete.
Starts playback of the most recently opened stream.
if @play_type is #RB_PLAYER_PLAY_CROSSFADE, the player
may attempt to crossfade the new stream with any existing
streams. If it does this, the it will use @crossfade as the
duration of the fade.
If @play_type is #RB_PLAYER_PLAY_AFTER_EOS, the player may
attempt to start the stream immediately after the current
playing stream reaches EOS. This may or may not result in
the phenomemon known as 'gapless playback'.
If @play_type is #RB_PLAYER_PLAY_REPLACE, the player will stop any
existing stream before starting the new stream. It may do
this anyway, regardless of the value of @play_type.
The 'playing-stream' signal will be emitted when the new stream
is actually playing. This may be before or after control returns
to the caller.
%TRUE if playback started successfully
requested playback start type
Determines whether the player is currently playing a stream.
A stream is playing if it's not paused or being faded out.
TRUE if playing
Determines whether seeking is supported for the current stream.
TRUE if the current stream is seekable
Attempts to seek in the current stream. The player
may ignore this if the stream is not seekable.
The seek may take place asynchronously.
Adjusts the output volume level. This affects all streams.
The player may use a hardware volume control to implement
this volume adjustment.
If a URI is specified, this will close the stream corresponding
to that URI and free any resources related resources. If @uri
is NULL, this will close all streams.
If no streams remain open after this call, the audio device will
be released.
TRUE if a stream was found and closed
Returns the current playback for the current stream in nanoseconds.
playback position
Returns the current volume level, between 0.0 and 1.0.
current output volume level
Determines whether the player supports multiple open streams.
TRUE if multiple open is supported
Prepares a stream for playback. Depending on the player
implementation, this may stop any existing stream being
played. The stream preparation process may continue
asynchronously, in which case errors may be reported from
#rb_player_play or using the 'error' signal.
TRUE if the stream preparation was not unsuccessful
arbitrary data to associate with the stream
function to call to destroy the stream data
Determines whether a stream has been prepared for playback.
TRUE if a stream is prepared for playback
Pauses playback of the most recently started stream. Any
streams being faded out may continue until the fade is
complete.
Starts playback of the most recently opened stream.
if @play_type is #RB_PLAYER_PLAY_CROSSFADE, the player
may attempt to crossfade the new stream with any existing
streams. If it does this, the it will use @crossfade as the
duration of the fade.
If @play_type is #RB_PLAYER_PLAY_AFTER_EOS, the player may
attempt to start the stream immediately after the current
playing stream reaches EOS. This may or may not result in
the phenomemon known as 'gapless playback'.
If @play_type is #RB_PLAYER_PLAY_REPLACE, the player will stop any
existing stream before starting the new stream. It may do
this anyway, regardless of the value of @play_type.
The 'playing-stream' signal will be emitted when the new stream
is actually playing. This may be before or after control returns
to the caller.
%TRUE if playback started successfully
requested playback start type
Determines whether the player is currently playing a stream.
A stream is playing if it's not paused or being faded out.
TRUE if playing
Determines whether seeking is supported for the current stream.
TRUE if the current stream is seekable
Attempts to seek in the current stream. The player
may ignore this if the stream is not seekable.
The seek may take place asynchronously.
Adjusts the output volume level. This affects all streams.
The player may use a hardware volume control to implement
this volume adjustment.
The 'buffering' signal is emitted while a stream is paused so
that a buffer can be filled. The progress value typically varies
from 0 to 100, and once it reaches 100, playback resumes.
the data associated with the buffering stream
buffering percentage
The 'eos' signal is emitted when a stream finishes, or in some cases, when it
is about to finish (with @early set to %TRUE) to allow for a new track to be
played immediately afterwards.
the data associated with the stream that finished
if %TRUE, the EOS notification should only be used for track changes.
The 'error' signal is emitted when an error is encountered
while opening or playing a stream.
the data associated with the stream
description of the error
The 'event' signal provides a means for custom GStreamer
elements to communicate events back to the rest of the
application. The GStreamer element posts an application
message on the GStreamer bus, which is translated into an
event signal with the detail of the signal set to the name
of the structure found in the message.
data associated with the stream
event data
The 'image' signal is emitted to provide access to images extracted
from the stream.
data associated with the stream
the image extracted from the stream
The 'info' signal is emitted when a metadata value is found in
the stream.
the data associated with the stream
the #RBMetaDataField corresponding to the stream info
the value of the stream info field
The 'playing-stream' signal is emitted when the main playing stream
changes. It should be used to update the UI to show the new
stream. It can either be emitted before or after #rb_player_play returns,
depending on the player backend.
data associated with the stream
The 'redirect' signal is emitted to indicate when a stream has change URI.
data associated with the stream
URI to redirect to
The 'tick' signal is emitted repeatedly while the stream is
playing. Signal handlers can use this to update UI and to
prepare new streams for crossfade or gapless playback.
the data associated with the stream
playback position in the stream (in nanoseconds)
current estimate of the duration of the stream (in nanoseconds)
The 'volume-changed' signal is emitted when the output stream volume is
changed externally.
the new volume level
Adds a new filter to the playback pipeline. The filter may not be
inserted immediately. The 'filter-inserted' signal will be emitted
when this actually happens.
TRUE if the filter will be added
new filter element (or bin) to add
Removes a filter from the playback pipeline. The filter may not be
removed immediately. The 'filter-pre-remove' signal will be emitted
immediately before this actually happens.
TRUE if the filter was found and will be removed
the filter element (or bin) to remove
Adds a new filter to the playback pipeline. The filter may not be
inserted immediately. The 'filter-inserted' signal will be emitted
when this actually happens.
TRUE if the filter will be added
new filter element (or bin) to add
Removes a filter from the playback pipeline. The filter may not be
removed immediately. The 'filter-pre-remove' signal will be emitted
immediately before this actually happens.
TRUE if the filter was found and will be removed
the filter element (or bin) to remove
The 'filter-inserted' signal is emitted when the tee element has been
inserted into the pipeline and fully linked
the element which has been inserted
The 'filter-pre-remove' signal is emitted immediately before the element
is unlinked and removed from the pipeline
the element which is about to be removed
TRUE if the filter will be added
new filter element (or bin) to add
TRUE if the filter was found and will be removed
the filter element (or bin) to remove
Adds a new sink to the playback pipeline. The sink may not be
inserted immediately. The 'tee-inserted' signal will be emitted
when this actually happens.
TRUE if the sink will be added
new sink element (or bin) to add
Removes a sink from the playback pipeline. The sink may not be
removed immediately. The 'tee-pre-remove' signal will be emitted
immediately before this actually happens.
TRUE if the sink was found and will be removed
the sink element (or bin) to remove
Adds a new sink to the playback pipeline. The sink may not be
inserted immediately. The 'tee-inserted' signal will be emitted
when this actually happens.
TRUE if the sink will be added
new sink element (or bin) to add
Removes a sink from the playback pipeline. The sink may not be
removed immediately. The 'tee-pre-remove' signal will be emitted
immediately before this actually happens.
TRUE if the sink was found and will be removed
the sink element (or bin) to remove
The 'tee-inserted' signal is emitted when the tee element has been
inserted into the pipeline and fully linked
the element which has been inserted
The 'tee-pre-remove' signal is emitted immediately before the element
is unlinked and removed from the pipeline
the element which is about to be removed
TRUE if the sink will be added
new sink element (or bin) to add
TRUE if the sink was found and will be removed
the sink element (or bin) to remove
TRUE if the stream preparation was not unsuccessful
arbitrary data to associate with the stream
function to call to destroy the stream data
TRUE if a stream is prepared for playback
TRUE if a stream was found and closed
%TRUE if playback started successfully
requested playback start type
TRUE if playing
current output volume level
TRUE if the current stream is seekable
playback position
TRUE if multiple open is supported
Creates the #RBPlaylistManager instance
the #RBPlaylistManager
the #RBShell
the #RBDisplayPageModel
the #RBDisplayPageTree
the full path to the playlist file to load
Adds an entry to the specified playlist.
Fails if no playlist with that name exists.
This is part of the playlist manager dbus interface.
TRUE if successful.
name of the playlist to add to
URI of the entry to add to the playlist
Creates a new static playlist source with the given name.
Will fail if a playlist with that name already exists.
This is part of the playlist manager dbus interface.
TRUE if successful.
name of the new playlist
Deletes the specified playlist. Will fail if no playlist with
that name exists. This is part of the playlist manager dbus interface.
TRUE if successful.
name of the playlist to delete
Saves the specified playlist to a file in either M3U or PLS format.
This is part of the playlist manager dbus interface.
TRUE if successful.
name of the playlist to export
playlist save location
if TRUE, save in M3U format, otherwise save in PLS format
Allocates and returns an array containing the names of all local
playlists. This is part of the playlist manager dbus interface.
TRUE if successful.
holds the array of playlist names on reutrn
Returns a #GList containing all local playlist source objects.
list of playlists
Loads the user's playlists, or if the playlist file does not exists,
reads the default playlist file. Should be called only once on startup.
Creates a new playlist and adds it to the source list.
the new playlist object.
optional name to use for the new playlist
if TRUE, create an auto playlist
Creates a new playlist based on selection data from gtk.
Used to implement playlist creation through drag and drop
to the source list.
the new playlist.
the #GtkSelectionData from which to create a playlist
Parses a playlist file, adding entries to the database and to a new
static playlist. If the playlist file includes a title, the static
playlist created will have the same title.
TRUE on success
URI of the playlist to load
Removes an entry from the specified playlist.
Fails if no playlist with that name exists.
This is part of the playlist manager dbus interface.
TRUE if successful.
name of the playlist to remove from
URI of the entry to remove from the playlist
Saves the user's playlists. If the force flag is
TRUE, the playlists will always be saved. Otherwise, the playlists
will only be saved if a playlist has been created, modified, or deleted
since the last time the playlists were saved, and no save operation is
currently taking place.
TRUE if a playlist save operation has been started
if TRUE, save playlists synchronously and unconditionally
Shuts down the playlist manager, making sure any outstanding playlist save
operation finishes.
Emitted when the playlist manager finishes loading the user's
playlist file.
Emitted when the playlist manager starts loading the user's
playlist file.
Emitted when a playlist is added, including when being loaded
from the user's playlist file.
the new #RBSource
Emitted when a new playlist is created.
the newly created playlist #RBSource
Constructs a playlist source instance from the XML serialized
format. This function knows about all the playlist types that
can be saved to disk, and it hands off the XML node to the
appropriate constructor based on the 'type' attribute of
the root node of the playlist.
the playlist
the #RBShell instance
libxml node containing the playlist
Adds a URI to the playlist's entry map. This is useful when the
URI is being added to the database, but no entry exists for it yet.
When the entry is created, it will be added to the query model.
FALSE if it was already there.
TRUE if the URI was added to the entry map,
a URI to add
Returns the #RhythmDB instance. The caller must not
unref the object once finished with it.
the #RhythmDB instance
Returns the current #RhythmDBQueryModel for the playlist.
The caller must not unref the object once finished with it.
the current #RhythmDBQueryModel
Returns TRUE if the specified URI is in the playlist entry map
%TRUE if the URI is present
a URI to check
Marks the playlist dirty. This generally means that the playlist
will be saved to disk fairly soon, but the exact meaning can vary
between playlist types.
Saves the playlist to an external file in a standard
format (M3U, PLS, or XSPF).
destination URI
format to save in
Converts the playlist to XML format, below the specified
parent node.
libxml node below which to save the playlist
Sets a new query model for the playlist. This updates the
entry view to use the new query model and also updates the
source query-model property.
This needs to be called when the playlist subclass
creates a new query model.
the new #RhythmDBQueryModel
Connects signal handlers and sets up drag and drop support for
an entry view to be used by a playlist source. This only needs
to be called if the playlist subclass is creating a new entry view.
the new #RBEntryView to set up
The #RhythmDB instance
Whether the playlist has been changed since it was last saved
to disk.
Whether the playlist is attached to the local library.
Remote DAAP playlists, for example, are not local.
Produces debug output for the profiler instance,
showing the elapsed time.
Frees the memory associated with a profiler instance.
Resets the elapsed time for the profiler
Creates a new profiler instance. This can be used to
time certain sections of code.
profiler instance
profiler name
Creates a new #RBPropertyView displaying the specified property.
new property view instance
#RhythmDB instance
property ID to be displayed in the property view
title of the property view
Appends a custom created column to the view.
a #GtkTreeViewColumn to append to the view
Returns the #RhythmDBPropertyModel backing the view; no reference is taken
property model
Returns the number of property values present in the view.
number of properties
Returns a #GList containing the selected property values. The list must
be freed by the caller.
list of selected values
Clears the selection in the property view.
Replaces the model backing the property view.
the new #RhythmDBPropertyModel for the property view
Sets the compare function for the interactive search capabilities.
The function must return FALSE when the search key string matches
the row it is passed.
tree view search function to use for this view
data to pass to the search function
function to call to dispose of the data
Replaces the selection in the property view. All values in the list
that are present in the view will be selected, and the view will be
scrolled to show the last value selected.
the values to be selected
Sets the selection mode (single or multiple) for the property view>
The default selection mode is single.
the new #GtkSelectionMode for the property view
#RhythmDB instance
Whether the property view acts as a data source for drag and drop operations.
The property that is displayed in this view
The #RhythmDBPropertyModel backing the view.
The title displayed in the header of the property view
Emitted when the set of selected property values changes. This is only
emitted for multiple selection property views. For single-selection views,
use the property-selected signal.
a list containing the selected property values
Emitted when a row in a property view is activated by double clicking.
the property value that was activated
Emitted when an individual property value becomes selected. This is only
emitted for single-selection property views. For multiple-selection views,
use the properties-selected signal.
the property value that has been selected
Emitted when the selection is reset. At this point, no property values
are selected.
Emitted when a popup menu should be displayed for the property view.
The source containing the property view should connect a handler to
this signal that * displays an appropriate popup.
Creates a new rating widget
a new #RBRating widget.
The rating displayed in the widget, as a floating point value
between 0.0 and 5.0.
Action signal used to make a relative adjustment to the
rating.
value to add to the rating
Emitted when the user changes the rating.
the new rating
Action signal used to change the rating.
the new rating
Returns an #RBRefString for the specified string.
If one already exists, its reference count is incremented and it is
returned. Otherwise, a new #RBRefString is created and returned.
#RBRefString for @init
string to intern
Returns the actual string for a #RBRefString.
underlying string, must not be freed
Returns the case-folded version of the string underlying @val.
The case-folded string is cached inside the #RBRefString for
speed. See @rb_search_fold for information on case-folding
strings.
case-folded string, must not be freed
Returns the sort key version of the string underlying @val.
The sort key string is cached inside the #RBRefString for speed.
Sort key strings are not generally human readable, so don't display
them anywhere. See @g_utf8_collate_key_for_filename for information
on sort keys.
sort key string, must not be freed.
Increases the reference count for an existing #RBRefString.
The refstring is returned for convenience.
the same refstring
Drops a reference to an #RBRefString. If this is the last
reference, the string will be freed.
Key equality function suitable for use with #GHashTable.
Equality checks for #RBRefString are just pointer comparisons,
since there can only be one refstring for a given string.
%TRUE if the strings are the same
an #RBRefString
another #RBRefstring
Returns an existing #RBRefString for @init if one exists,
otherwise returns NULL. If an existing refstring is found,
its reference count is increased.
existing #RBRefString, or NULL
string to find
Hash function suitable for use with @GHashTable.
hash value for the string underlying @p
an #RBRefString
Sets up the refstring system. Called on startup.
Frees all data associated with the refstring system.
Only called on shutdown.
Creates the #RBRemovableMediaManager instance.
the #RBRemovableMediaManager
the #RBShell
Initiates a new scan of all attached media. Newly activated plugins that use
the create-source-volume or create-source-mount signals should call this if
the 'scanned' property is %TRUE. Otherwise, the first scan will catch any
existing volumes or mounts that the plugin is interested in.
This is set to TRUE when the removable media manager has scanned
all existing volumes and mounts. When a plugin that handles removable
media is activated, it should request a new scan if this property is
already set to TRUE.
The #RBShell instance.
The current selected source.
Emitted when a new device is detected to allow plugins to create a
corresponding #RBSource. The first signal handler that returns a
source wins. Plugins should only use this signal if there will be
no #GVolume or #GMount created for the device.
a source for the device, or NULL
the device (actually a #GUdevDevice)
Emitted when a new mount is added to allow plugins to create a
corresponding #RBSource. The first signal handler that returns
a source wins. If a source was created for the #GVolume
for a mount, then this signal will not be emitted.
a source for the mount, or NULL
a #MPIDDevice containing information on the device
the #GMount
Emitted when a new volume is added to allow plugins to create a
corresponding #RBSource. The first signal handler that returns
a source wins. A plugin should only use this signal if it
doesn't require the volume to be mounted. If the volume must be
mounted to be useful, use the create-source-mount signal instead.
a source for the volume, or NULL
the #GVolume
Emitted when a new source is added for a removable medium.
the newly added #RBSource
RhythmDB is an in-memory database containing #RhythmDBEntry items. It
runs queries represented as #GPtrArray<!-- -->s containing query criteria,
feeding the results into #RhythmDBQueryResults implementations such as
#RhythmDBQueryModel. From there, entries are grouped by particular property
values to form #RhythmDBPropertyModel<!-- -->s.
#RhythmDBEntry contains a fixed set of properties, defined by #RhythmDBPropType,
Creates a string containing the "status" information about a list of tracks.
The singular and plural strings must be used in a direct ngettext call
elsewhere in order for them to be marked for translation correctly.
the string, which should be freed with g_free.
the number of tracks.
the total duration of the tracks.
the total size of the tracks.
singular form of the format string to use for entries (eg "%d song")
plural form of the format string to use for entries (eg "%d songs")
Returns the #GQuark used for #RhythmDBError information
error quark
Returns the #RhythmDBEntryType for import errors
the entry type for import errors
Returns the #RhythmDBEntryType for ignored files
the entry type for ignored files
Returns the #RhythmDBEntryType for normal songs.
the entry type for normal songs
Appends @query2 to @query1.
query to append to
query to append
Creates a copy of a query.
It must be freed with rhythmdb_query_free()
a copy of the passed query.
the query to copy.
Frees the query @query
a query.
Adds the file(s) pointed to by @uri to the database, as entries of type
RHYTHMDB_ENTRY_TYPE_SONG. If the URI is that of a file, it will be added.
If the URI is that of a directory, everything under it will be added recursively.
the URI to add an entry/entries for
Adds the file(s) pointed to by @uri to the database, as entries
of the specified type. If the URI points to a file, it will be added.
The the URI identifies a directory, everything under it will be added
recursively.
the URI to add
the #RhythmDBEntryType to use for new entries
the #RhythmDBEntryType to use for ignored files
the #RhythmDBEntryType to use for import errors
Apply all database changes, and send notification of changes and new entries.
This needs to be called after any changes have been made, such as a group of
rhythmdb_entry_set() calls, or a new entry has been added.
Synchronously evaluates @query, feeding results to @results in
chunks. Does not return until the query is complete.
This can only be called from the main thread.
FIXME: example
a #RhythmDBQueryResults instance to feed results to
Asynchronously runs a query specified in the function arguments
across the database, feeding matching entries to @results in chunks.
This can only be called from the main thread.
Since @results is always a @RhythmDBQueryModel,
use the RhythmDBQueryModel::complete signal to identify when the
query is complete.
FIXME: example
a #RhythmDBQueryResults to feed results to
Asynchronously runs a parsed query across the database, feeding matching
entries to @results in chunks. This can only be called from the
main thread.
Since @results is always a @RhythmDBQueryModel,
use the RhythmDBQueryModel::complete signal to identify when the
query is complete.
a #RhythmDBQueryResults instance to feed results to
the query to run
Synchronously evaluates the parsed query @query, feeding results
to @results in chunks. Does not return until the query is complete.
a #RhythmDBQueryResults instance to feed results to
a parsed query
Emits a signal describing extra metadata for the @entry. The @property_name
argument is emitted as the ::detail part of the
"entry_extra_metadata_notify" signal and as the 'field' parameter. Handlers
can ensure they only get metadata they are interested in by supplying an
appropriate ::detail part when connecting to the signal. If handlers are
interested in the metadata they should ref or copy the contents of @metadata
and unref or free it when they are finished with it.
a #RhythmDBEntry
the metadata predicate
a #GValue
Returns the number of entries in the database.
number of entries
Returns the number of entries in the database of a particular type.
entry count
a #RhythmDBEntryType.
Delete entry @entry from the database, sending notification of its deletion.
This is usually used by sources where entries can disappear randomly, such
as a network source.
a #RhythmDBEntry.
Delete all entries from the database of the given type.
This is usually used by non-permanent sources when they disappear, such as
removable media being removed, or a network share becoming unavailable.
type of entried to delete.
Calls the given function for each of the entries in the database.
the function to call with each entry.
user data to pass to the function.
Calls the given function for each of the entries in the database
of a given type.
the type of entry to retrieve
the function to call with each entry
user data to pass to the function.
Gathers all metadata for the @entry. The returned GHashTable maps property
names and extra metadata names (described under
@rhythmdb_entry_request_extra_metadata) to GValues. Anything wanting to
provide extra metadata should connect to the "entry_extra_metadata_gather"
signal.
This must be freed using g_object_unref.
a RBStringValueMap containing metadata for the entry.
a #RhythmDBEntry
Gets a property of an entry, storing it in the given #GValue.
a #RhythmDBEntry.
the id of the property to get.
return location for the property value.
Adds a keyword to an entry.
whether the keyword was already on the entry
a #RhythmDBEntry.
the keyword to add.
Checks whether a keyword is has been added to an entry.
whether the keyword had been added to the entry.
a #RhythmDBEntry.
the keyword to check for.
Removed a keyword from an entry.
whether the keyword had previously been added to the entry.
a #RhythmDBEntry.
the keyword to remove.
Gets the list ofkeywords that have been added to an entry.
that have been added to the entry.
the list of keywords
a #RhythmDBEntry.
Looks up the entry with id @id.
the entry with id @id, or NULL if no such entry exists.
entry ID
Looks up the entry with location @uri.
the entry with location @uri, or NULL if no such entry exists.
the URI of the entry to lookup.
Locates an entry using a string containing either an entry ID
or a location.
the entry matching the string, or NULL if no such entry exists.
string
whether the string is an entry ID or a location.
Checks whether @key matches @entry.
%TRUE if the key matches the entry
a #RhythmDBEntry
a #RBExtDBKey
Trashes the file represented by #entry. If possible, the file is
moved to the user's trash directory and the entry is set to hidden,
otherwise the error will be stored as the playback error for the entry.
#RhythmDBEntry to trash
Emits a request for extra metadata for the @entry.
The @property_name argument is emitted as the ::detail part of the
"entry_extra_metadata_request" signal. It should be a namespaced RDF
predicate e.g. from Dublin Core, MusicBrainz, or internal to Rhythmbox
(namespace "rb:"). Suitable predicates would be those that are expensive to
acquire or only apply to a limited range of entries.
Handlers capable of providing a particular predicate may ensure they only
see appropriate requests by supplying an appropriate ::detail part when
connecting to the signal. Upon a handler returning a non-%NULL value,
emission will be stopped and the value returned to the caller; if no
handlers return a non-%NULL value, the caller will receive %NULL. Priority
is determined by signal connection order, with %G_CONNECT_AFTER providing a
second, lower rank of priority.
A handler returning a value should do so in a #GValue allocated on the heap;
the accumulator will take ownership. The caller should unset and free the
#GValue if non-%NULL when finished with it.
an allocated, initialised, set #GValue, or NULL
a #RhythmDBEntry
the metadata predicate
This function can be called by any code which wishes to change a
song property and send a notification. It may be called when the
database is read-only; in this case the change will be queued for
an unspecified time in the future. The implication of this is that
rhythmdb_entry_get() may not reflect the changes immediately. However,
if this property is exposed in the user interface, you should still
make the change in the widget. Then when the database returns to a
writable state, your change will take effect in the database too,
and a notification will be sent at that point.
Note that you must call rhythmdb_commit() at some point after invoking
this function, and that even after the commit, your change may not
have taken effect.
a #RhythmDBEntry.
the id of the property to set.
the property value.
Locates a #RhythmDBEntryType by name. Returns NULL if no entry
type is registered with the specified name.
the #RhythmDBEntryType
name of the type to look for
This can be called from a #RhythmDBEntryType sync_metadata function
when the appropriate action is to write the metadata changes
to the file at the entry's location.
the #RhythmDBEntry to update
a list of changes to write
Evaluates the given entry against the given query.
whether the given entry matches the criteria of the given query.
a query.
a @RhythmDBEntry.
Provides progress information for rhythmdb operations, if any are running.
used to return progress text
used to return progress fraction
Returns the #GType for the value of the property.
property value type
a property ID (#RhythmDBPropType)
Checks if the database has events to process. This probably isn't
very useful.
whether the #RhythmDB has events to process.
Load the database from disk.
Returns a short non-translated name for the property #propid.
This name is suitable for use as an XML tag name, for example.
property ID name, must not be freed
property ID
Converts a property name returned by @rhythmdb_propid_from_nice_elt_name
back to a #RhythmDBPropType. If the name does not match a property ID,
-1 will be returned instead.
a #RhythmDBPropType, or -1
a property ID name
Appends new criteria to the query @query.
The list of criteria must be in the same format as for rhythmdb_query_parse,
and ended by RHYTHMDB_QUERY_END.
a query.
Appends a new query term to @query.
the query to append to
query type
query property
query value
Appends a set of criteria to a query to match against any of the values
listed in @items.
the query to append to
property ID to match
#GList of values to match against
Converts a serialized query back into a @GPtrArray query.
deserialized query.
parent XML node of serialized query
Checks if a query contains any time-relative criteria.
%TRUE if time-relative criteria found
the query to check
Creates a query from a list of criteria.
Most criteria consists of an operator (#RhythmDBQueryType),
a property (#RhythmDBPropType) and the data to compare with. An entry
matches a criteria if the operator returns true with the value of the
entries property as the first argument, and the given data as the second
argument.
Three types criteria are special. Passing RHYTHMDB_QUERY_END indicates the
end of the list of criteria, and must be the last passes parameter.
The second special criteria is a subquery which is defined by passing
RHYTHMDB_QUERY_SUBQUERY, followed by a query (#GPtrArray). An entry will
match a subquery criteria if it matches all criteria in the subquery.
The third special criteria is a disjunction which is defined by passing
RHYTHMDB_QUERY_DISJUNCTION, which will make an entry match the query if
it matches the criteria before the disjunction, the criteria after the
disjunction, or both.
Example:
rhythmdb_query_parse (db,
RHYTHMDB_QUERY_SUBQUERY, subquery,
RHYTHMDB_QUERY_DISJUNCTION
RHYTHMDB_QUERY_PROP_LIKE, RHYTHMDB_PROP_TITLE, "cat",
RHYTHMDB_QUERY_DISJUNCTION
RHYTHMDB_QUERY_PROP_GREATER, RHYTHMDB_PROP_RATING, 2.5,
RHYTHMDB_QUERY_PROP_LESS, RHYTHMDB_PROP_PLAY_COUNT, 10,
RHYTHMDB_QUERY_END);
will create a query that matches entries:
a) that match the query "subquery", or
b) that have "cat" in their title, or
c) have a rating of at least 2.5, and a play count of at most 10
It must be freed with rhythmdb_query_free()
a the newly created query.
Preprocesses a query to prepare it for execution. This has two main
roles: to perform expensive data transformations once per query, rather
than once per entry, and converting criteria to lower-level forms that
are implemented by the database backend.
For RHYTHMDB_PROP_SEARCH_MATCH, this converts the search terms into
an array of case-folded words.
When matching against case-folded properties such as
#RHYTHMDB_PROP_TITLE_FOLDED, this case-folds the query value.
When performing year-based criteria such as #RHYTHMDB_QUERY_PROP_YEAR_LESS,
it converts the year into the Julian date such that a simple numeric
comparison will work.
query to preprocess
Converts @query into XML form as a child of @parent. It can be converted
back into a query by passing @parent to @rhythmdb_query_deserialize.
query to serialize
XML node to attach the query to
Returns a supposedly human-readable form of the query.
This is only intended for debug usage.
allocated string form of the query
a query.
Registers a new entry type. An entry type must be registered before
any entries can be created for it.
the new entry type to register
Save the database to disk, not returning until it has been saved.
Save the database to disk, asynchronously.
Ceases all #RhythmDB operations, including stopping all directory monitoring, and
removing all actions and events currently queued.
Starts the #RhythmDB processing thread. Needs to be called during startup.
If %TRUE, no metadata changes will be written back to media fies.
Database name. Not sure whta this is used for.
If %TRUE, the database will not be updated.
Emitted to request creation of a #GMountOperation to use to mount a volume.
a #GMountOperation (usually actually a #GtkMountOperation)
Emitted when a new entry is added to the database.
the newly added #RhythmDBEntry
Emitted when a database entry is modified. The @changes list
contains a structure for each entry property that has been modified.
the changed #RhythmDBEntry
a #GValueArray of #RhythmDBEntryChange structures describing the changes
Emitted when an entry is deleted from the database.
the deleted #RhythmDBEntry
Emitted to gather all available extra metadata for a database entry.
Handlers for this signal should insert any metadata they can provide
into the string-value map. Only immediately available metadata
items should be returned. If one or more metadata items is not
immediately available, the handler should not initiate an attempt to
retrieve them.
the #RhythmDBEntry for which to gather metadata
a #RBStringValueMap to hold the gathered metadata
This signal is emitted when an extra metadata value is provided for a specific
entry independantly of an extra metadata request.
the #RhythmDBEntry for which extra metadata has been supplied
the extra metadata field being supplied
the extra metadata value
This signal is emitted to allow extra (transient) metadata to be supplied
for the given entry. The detail of the signal invocation describes the
specific metadata value being requested. If the object handling the signal
can provide the requested item, but it isn't immediately available, it can
initiate an attempt to retrieve it. If successful, it would call
@rhythmdb_emit_entry_extra_metadata_notify when the metadata is available.
the extra metadata value
the #RhythmDBEntry for which extra metadata is being requested
Emitted when a keyword is added to an entry.
the #RhythmDBEntry to which a keyword has been added
the keyword that was added
Emitted when a keyword is removed from an entry.
the #RhythmDBEntry from which a keyword has been removed
the keyword that was removed
Emitted when the database is fully loaded.
Emitted when the database becomes temporarily read-only, or becomes
writeable after being read-only.
%TRUE if the database is read-only
Emitted when the database has been saved.
Emitted when an error occurs while saving the database.
URI of the database file
the error that occurred
Creates a new sample entry of type @type and location @uri, it does not insert
it into the database. This is indended for use as a example entry.
This may return NULL if entry creation fails.
the newly created #RhythmDBEntry
a #RhythmDB.
type of entry to create
the location of the entry, this be unique amongst all entries.
Creates a new entry of type @type and location @uri, and inserts
it into the database. You must call rhythmdb_commit() at some point
after invoking this function.
This may return NULL if entry creation fails. This can occur if there is
already an entry with the given uri.
the newly created #RhythmDBEntry
a #RhythmDB.
type of entry to create
the location of the entry, this be unique amongst all entries.
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.
%TRUE if the entry can be synced
Creates a #RBExtDBKey for finding external metadata
for a given property. This is mostly useful for finding album or
track related data.
the new #RBExtDBKey
the primary #RhythmDBPropType for metadata lookups
Calls the entry type's post-creation method for @entry.
Returns the value of a boolean property of @entry.
property value
property to return
Returns the value of a double-precision floating point property of @value.
property value
the property to return
Returns the #RhythmDBEntryType for @entry. This is used to access
entry type properties, to check that entries are of the same type,
and to call entry type methods.
the #RhythmDBEntryType for @entry
Returns the value of an object property of @entry.
property value
the property to return
Returns an allocated string containing the playback URI for @entry,
or NULL if the entry cannot be played.
playback URI or NULL
Returns an #RBRefString containing a string property of @entry.
a #RBRefString, must be unreffed by caller.
the property to return
Returns the value of a string property of #entry.
property value, must not be freed
the #RhythmDBPropType to return
Retrieves a pointer to the entry's type-specific data, checking that
the size of the data structure matches what is expected.
Callers should use the RHYTHMDB_ENTRY_GET_TYPE_DATA macro for
a slightly more friendly interface to this functionality.
type-specific data pointer
expected size of the type-specific data.
Returns the value of a 64bit unsigned integer property.
property value
property to return
Returns the value of an unsigned long integer property of @entry.
property value
property to return
Checks if @entry represents a file that is losslessly encoded.
An entry is considered lossless if it has no bitrate value and
its media type is "audio/x-flac". Other lossless encoding types
may be added in the future.
%TRUE if @entry is lossless
Calls the entry type's pre-deletion method for @entry.
Increase the reference count of the entry.
the entry
Calls the entry type's method to sync metadata changes for @entry.
a list of #RhythmDBEntryChange structures
Decrease the reference count of the entry, and destroys it if there are
no references left.
Updates @entry to reflect its new availability.
an availability event
Various events that can result in changes to the entry's availability.
Categories used to group entry types. These are used in a few places to control
handling of entries.
Returns the name of the entry type
entry type name
The #RhythmDBEntryCategory that this entry type fits into.
If %TRUE, entries of this type can be added to playlists.
Entry type name. This must be unique.
If %TRUE, entries of this type should be written to the
on-disk database.
The size of the type-specific data structure to allocate for each
entry of this type.
Creates a new import job with the specified entry types.
Before starting the job, the caller must add one or more
paths to import.
new #RhythmDBImportJob object.
the #RhythmDB object
the #RhythmDBEntryType to use for normal entries
the #RhythmDBEntryType to use for ignored files (or NULL to not create ignore entries)
the #RhythmDBEntryType to use for import error entries (or NULL for none)
Adds a URI to import. All files under the specified
URI will be imported.
the URI to import
Cancels the import job. The job will cease as soon
as possible. More directories may be scanned and
more files may be imported before the job actually
ceases.
Returns whether the import job is complete.
TRUE if complete.
Returns the number of files processed by the import job so far.
file count
Returns the total number of files that will be processed by
this import job. This increases as the import directories are
scanned.
the total number of files to be processed
Returns whether the directory scan phase of the import job is complete.
TRUE if complete
Starts the import job. After this method has been called,
no more URIs may be added to the import job. May only be
called once for a given import job.
Emitted when the whole import job is complete.
Emitted when an entry has been added to the database by the
import job.
the newly added #RhythmDBEntry
Emitted when the directory scan is complete. Once
the scan is complete, the total number of files to
be processed will not change.
Emitted when the status of the import job has changed.
the current total number of files to process
the current count of files imported
Creates a new property model for the specified property ID.
the new #RhythmDBPropertyModel
the #RhythmDB object
the property to index
Enables drag and drop from a specified #GtkTreeView that is
backed by the #RhythmDBPropertyModel. Drag targets are
determined by the indexed property.
the #GtkTreeView from which to enable drag and drop
Locates the row in the model for a property value.
TRUE if the value was found.
the property value to find
a #GtkTreeIter to point to the row
The #RhythmDB object the model is associated with.
The property that this property model indexes.
The query model that this property model indexes.
Emitted just before a row is deleted from the model.
Constructs a new #RhythmDBQueryModel with the specified query and sorting
parameters.
the newly constructed query model
the #RhythmDB
the query for the new model
the sort function for the new model
data to pass to the sort function
function to call when destroying the sort data
if %TRUE, reverse the sort order
Constructs a new empty query model with no query or sorting parameters.
This should only be used when the query model will be populated by
explicitly adding entries.
the newly constructed query model
the #RhythmDB
Sort function for sorting by album. Sorts by album, then
disc number, then track number, then title.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
nothing
Sort function for sorting by artist. Sorts by artist, then
album, then disc number, then track number, then title.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
nothing
Sort function for sorting by bitrate. Lossless encodings (as identified
by media type) are considered to have the highest possible bitrate.
Falls back to sorting by location for equal bitrates.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
nothing
Sort function for sorting by release date.
Falls back to album sort order for equal dates.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
nothing
Sort function for sorting by a rounded floating point value.
The property value is rounded up to an integer value for sorting.
If the values are the same, falls back to sorting by location.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
property to sort on
Sort function for sorting by genre. Sorts by genre, then artist,
then album, then disc number, then track number, then title.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
nothing
Sort function for sorting by location.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
nothing
Sort function for sorting by a single string property
Falls back to location sort order if the strings are equal.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
property to sort on
Sort function for sorting by title. Falls back to sorting
by location if the titles are the same.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
nothing
Sort function for sorting by track. Sorts by artist,
then album, then disc number, then track number, then title.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
nothing
Sort function for sorting by an unsigned integer property value.
If the values are the same, falls back to sorting by location.
result of sort comparison between a and b.
a #RhythmDBEntry
a #RhythmDBEntry
property to sort on
Adds an entry to the query model at the specified position. Does not check
if the entry matches the query (if any).
a #RhythmDBEntry to add
position at which to add it, or -1 to add at the end
Chains @model to @base. All changes made to the base model will be reflected in
the child model, and all changes made to the child model will be passed on to the
base model.
the #RhythmDBQueryModel to chain it to
if %TRUE, copy all existing entries from @base to @model
Constructs a status string describing the contents of the model.
allocated status string, to be freed by the caller.
singular form of the pattern describing the number of entries ("%d song")
plural form of the pattern describing the number of entries ("%d songs")
Copies all entries from @src to @dest.
source #RhythmDBQueryModel
Creates a #GtkTreeIter pointing to the specified entry in the model.
%TRUE if the iterator now points to the entry
the #RhythmDBEntry to look up
holds the returned #GtkTreeIter
Returns the total duration of all entries in the model.
the total duration (in seconds) of all entries in the model
Locates and returns the next #RhythmDBEntry in the model after the specified
entry. The caller owns a reference to the returned entry.
the next #RhythmDBEntry in the model, if any
a #RhythmDBEntry
Locates and returns the #RhythmDBEntry in the model before the specified
entry. The caller owns a reference to the returned entry.
the previous #RhythmDBEntry in the model, if any
a #RhythmDBEntry
Returns the total size of all entries in the model.
the total size (in bytes) of all entries in the model
Checks if a #RhythmDBQueryModel has any outstanding changes that are
yet to be processed. This is not very useful.
%TRUE if there are outstanding changes to the model
Locates and returns the #RhythmDBEntry pointed to by the specified iterator
in the model. The caller owns a reference to the returned entry.
the #RhythmDBEntry, if any
a #GtkTreeIter to dereference
Moves an entry to a new position in the query model.
The position must be a between 0 and the number of entries in the model.
Specifying -1 does not move the entry to the end of the model.
the #RhythmDBEntry to move
position to move to
Reapplies the existing query to the entries in the model. This
is mostly useful when the query contains relative time criteria
(such as 'not played in the last hour'). This will only remove
entries that are already in the model, it will not find entries
that previously did not match the query.
The 'filter' parameter should be set to TRUE when the query is
being used as a filter, rather than to define a base set of entries.
if %FALSE, emit entry-removed signals
Removes an entry from the query model.
%TRUE if the entry was removed
the #RhythmDBEntry to remove
Sets a new sort order on the model. This reorders the entries
in the model to match the new sort order.
new sort function
data to pass to the new sort function
function to call to free the sort data
if %TRUE, reverse the sort order
Shuffles the entries in the model into a new random order.
Locates the #RhythmDBEntry identified by the specified path in the model.
The caller owns a reference to the returned entry.
the #RhythmDBEntry, if any
a #GtkTreePath
Emitted when the database query populating the model is complete.
Emitted when an entry in the query model is changed. When multiple
properties are changed, the entry-prop-changed signals will be emitted
in the order that the changes were made. At the point that the
signal is emitted, all changes have already been applied to the
#RhythmDBEntry.
the #RhythmDBEntry that changed
the #RhythmDBPropType that was changed
the previous value for the property
the new value for the property
Emitted when an entry is removed from the model. There is some
difference between this and the #GtkTreeModel row-removed signal
but I don't know what it is right now.
the #RhythmDBEntry that was removed
Emitted when an entry is being added to a model by drag-and-drop.
This allows the owner of the model to filter out entries that should
not be added to the model (based on entry type, for instance).
If the signal handler returns %FALSE, the entry will not be added.
the #RhythmDBEntry being dropped
Emitted when a URI that does not match an existing #RhythmDBEntry
is dropped into the query model.
the URI that was dropped
the position in the query model at which it was dropped
Emitted after an entry has been removed from the model.
the #RhythmDBEntry that was removed
Creates a new empty query result list.
query result list
Returns the results from the query.
list of results
Emitted when the database query is complete.
Provides a new set of query results. References must be taken on the
entries.
#GPtrArray containing #RhythmDBEntry results
Called when the query is complete and all entries that match the query
have been supplied to rhythmdb_query_results_add_results. If the object
implementing this interface needs to identify newly added or changed entries
that match the query, it needs to use the entry-added, entry-deleted and
entry-changed signals from #RhythmDB.
When a new query is run, this method is invoked to give the
object implementing this interface a chance to take a copy of the
query criteria, so that it can evaluate the query for newly added
or changed entries once the query is complete.
the new query
Provides a new set of query results. References must be taken on the
entries.
#GPtrArray containing #RhythmDBEntry results
Called when the query is complete and all entries that match the query
have been supplied to rhythmdb_query_results_add_results. If the object
implementing this interface needs to identify newly added or changed entries
that match the query, it needs to use the entry-added, entry-deleted and
entry-changed signals from #RhythmDB.
When a new query is run, this method is invoked to give the
object implementing this interface a chance to take a copy of the
query criteria, so that it can evaluate the query for newly added
or changed entries once the query is complete.
the new query
the new query
#GPtrArray containing #RhythmDBEntry results
Creates a new search entry widget.
new search entry widget.
Clears the search entry text. The 'search' signal will
be emitted.
Grabs input focus for the text entry widget.
Returns %TRUE if there is search text in the entry widget.
%TRUE if searching
Adds or removes a mnemonic allowing the user to focus
the search entry.
if %TRUE, enable the mnemonic
Sets the placeholder text in the search entry box.
placeholder text
Sets the text in the search entry box.
The 'search' signal will be emitted.
new search text
If TRUE, show a button and only emit the 'search' signal when
the user presses it rather than when they stop typing.
If TRUE, show a primary icon and emit the show-popup when clicked.
Emitted when the entry is activated.
search text
Emitted when the search text changes. A signal
handler must initiate a search on the current
source.
search text
Emitted when a popup menu should be shown
Sets a value formatter function to use for the bar.
the formatter function to use
data to pass to the formatter
Creates the Rhythmbox shell. This is effectively a singleton, so it doesn't
make sense to call this from anywhere other than main.c.
the #RBShell instance
%TRUE if autostarted by the session manager
a pointer to the number of command line arguments
a pointer to the array of command line arguments
Searches for a source matching @source_uri and if found, selects it,
and depending on the value of @play, may start playing from it.
Device-based sources will match the device node or mount point URI.
Other types of sources may have their own URI scheme or format.
This is part of the DBus interface.
%TRUE if successful
URI for the source to activate
0: select source, 1: play source if not playing, 2: play source
Adds the specified URI to the Rhythmbox database. Whether the
title and genre specified are actually used is up to the source
that handles the URI
TRUE if the URI was added successfully
the URI to add
optional title value for the URI
optional genre value for the URI
Adds a widget to the main Rhythmbox window. See #gtk_box_pack_start for
details on how the expand and fill parameters work.
the #GtkWidget to insert into the main window
the location at which to insert the widget
whether the widget should be given extra space
whether the widget should fill all space allocated to it
Adds a new display page to the shell.
the new #RBDisplayPage
the parent page for the new page
Displays a notification of the current playing track.
not important
if %TRUE, the notification was requested by some explicit user action
Returns %TRUE if the shell is in party mode
%TRUE if the shell is in party mode
Gathers and returns all metadata (including extra metadata such as album
art URIs and lyrics) for the specified URI.
%TRUE if the URI is found in the database
the URI to query
(out callee-allocates) (element-type utf8 GObject.Value) returns the properties of the specified URI
Looks up and returns the source that owns entries of the specified
type.
source instance, if any
entry type for which to find a source
Attempts to locate the source that should handle the specified URI.
This iterates through all sources, calling #rb_source_want_uri,
returning the source that returns the highest value.
the most appropriate #RBSource for the uri
the URI to guess a source for
Loads a URI representing a single song, a directory, a playlist, or
an internet radio station, and optionally starts playing it.
For playlists containing only stream URLs, we either add the playlist
itself (if it's remote) or each URL from it (if it's local). The main
reason for this is so clicking on stream playlist links in web browsers
works properly - the playlist file will be downloaded to /tmp/, and
we can't add that to the database, so we need to add the stream URLs
instead.
TRUE if the URI was added successfully
the URI to load
if TRUE, start playing the URI (if possible)
Attempts to display the main window to the user. See #gtk_window_present for details.
not used.
GTK timestamp to use (for focus-stealing prevention)
Begins the process of shutting down Rhythmbox. This function will
return. The error parameter and return value only exist because this
function is part of the DBus interface.
not important
Registers a source as the owner of entries of the specified type.
The main effect of this is that calling #rb_shell_get_source_by_entry_type
with the same entry type will return the source. A source should only
be registered as the owner of a single entry type.
the #RBSource to register
the #RhythmDBEntryType to register for
Removes a widget added with #rb_shell_add_widget from the main window.
the #GtkWidget to remove from the main window
the UI location to which the widget was originally added
Attempts to set a property of a database entry identified by its URI.
If the URI identifies a file and the property is one associated with a
file metadata tag, the new value will be written to the file.
%TRUE if the property was set successfully.
the URI to modify
the name of the property to modify
the new value to set
Toggles the visibility of the main Rhythmbox window.
Whether Rhythmbox was automatically started by the session manager
The #RBShellClipboard instance
The #RhythmDB instance
If %TRUE, disable plugins
The model underlying the display page tree
The #RBDisplayPageTree instance
If TRUE, don't write back file metadata changes.
The library source
If %TRUE, disable single-instance features.
If %TRUE, don't update the database.
The #RBPlaylistManager instance
The path to the playlist file
The #RBShellPreferences instance
The play queue source
The #RBRemovableMediaManager instance
The path to the rhythmdb file
The currently selected display page
The #RBShellPlayer instance
The #RBTrackTransferQueue instance
The #GtkUIManager instance
Whether the main window is currently visible.
The main Rhythmbox window.
Emitted when creating a new #RBSongInfo window. Signal handlers can
add pages to the song info window notebook to display additional
information.
the new #RBSongInfo window
if %TRUE, the song info window is for multiple entries
Emitted when a custom notification should be displayed to the user.
length of time (in seconds) to display the notification
main notification text
secondary notification text
URI for an image to include in the notification (optional)
if %TRUE, the notification was triggered by an explicit user action
Emitted when a notification should be displayed showing the current
playing entry.
Emitted after the visibility of the main Rhythmbox window has
changed.
new visibility
Emitted before the visibility of the main window changes. The return
value overrides the visibility setting. If multiple signal handlers
are attached, the last one wins.
if %TRUE, this is the initial visibility for the window
new shell visibility
Returns the #GQuark used for #RBShell errors
shell error #GQuark
Creates the #RBShellPlayer
the #RBShellPlayer instance
the #RhythmDB
the #GtkUIManager
the #GtkActionGroup to use
Adds a new play order to the set of available play orders.
name of the new play order
description of the new play order
the #GType of the play order class
if %TRUE, don't display the play order in the UI
Skips to the next song. Consults the play queue and handles
transitions between the play queue and the active source.
Fails if there is no entry to play after the current one.
%TRUE if successful
If the current song has been playing for more than 3 seconds,
restarts it, otherwise, goes back to the previous song.
Fails if there is no current song, or if inside the first
3 seconds of the first song in the play order.
%TRUE if successful
Retrieves the active source. This is the source that the user
selected for playback.
the active #RBSource
Returns %TRUE if currently muted
%TRUE if currently muted
returns the current mute setting
Retrieves the current state of the shuffle and repeat settings.
%TRUE if successful.
returns the current shuffle setting
returns the current repeat setting
Reports whether playback is occuring by setting #playing.
%TRUE if successful
playback state return
Retrieves the currently playing #RhythmDBEntry, or NULL if
nothing is playing. The caller must unref the entry
(using #rhythmdb_entry_unref) when it is no longer needed.
the currently playing #RhythmDBEntry, or NULL
Retrieves the URI of the current playing entry. The
caller must not free the returned string.
%TRUE if successful
returns the URI of the current playing entry
Retrieves the duration of the current playing song.
duration, or -1 if not playing
Retrieves the current playing source. That is, the source from
which the current song was drawn. This differs from
#rb_shell_player_get_active_source when the current song came
from the play queue.
the current playing #RBSource
Retrieves the current playback position. Fails if
the player currently cannot provide the playback
position.
%TRUE if successful
returns the current playback position
Constructs a string showing the current playback position,
taking the time display settings into account.
allocated playing time string
Returns the current volume level
the current volume level.
returns the volume level
Scrolls the #RBEntryView for the current playing source so that
the current playing entry is visible and selects the row for the
entry. If there is no current playing entry, the selection is
cleared instead.
Pauses playback if possible, completely stopping if not.
paused/stopped or playback was not occurring).
whether playback is not occurring (TRUE when successfully
Starts playback, if it is not already playing.
or already playing).
whether playback is now occurring (TRUE when successfully started
Plays a specified entry.
the #RhythmDBEntry to play
the new #RBSource to set as playing (or NULL to use the selected source)
Toggles between playing and paused state. If there is no playing
entry, chooses an entry from (in order of preference) the play queue,
the selection in the current source, or the play order.
%TRUE if successful
nothing
Removes a play order previously added with #rb_shell_player_add_play_order
from the set of available play orders.
name of the play order to remove
Seeks forwards or backwards in the current playing
song. Fails if the current song is not seekable.
%TRUE if successful
relative seek target (in seconds)
Updates the mute setting on the player.
%TRUE if successful
%TRUE to mute playback
Sets the state of the shuffle and repeat settings.
whether to enable the shuffle setting
whether to enable the repeat setting
Replaces the current playing source.
the new playing #RBSource
Attempts to set the playback position. Fails if the
current song is not seekable.
%TRUE if successful
the target playback position (in seconds)
Updates the player to reflect a new source being selected.
the #RBSource to select
Sets the playback volume level.
%TRUE on success
the volume level (between 0 and 1)
Adds the specified value to the current volume level.
%TRUE on success
difference to apply to the volume level (between -1 and 1)
Completely stops playback, freeing resources and unloading the file.
In general rb_shell_player_pause() should be used instead, as it stops the
audio, but does not completely free resources.
The #GtkActionGroup to use for player actions
The #RhythmDB
Whether there is a track to play after the current track.
Whether there was a previous track before the current track.
The #RBHeader object
Whether playback is currently muted.
The current play order object.
The player backend object (an object implementing the #RBPlayer interface).
Whether Rhythmbox is currently playing something
If %TRUE, the current playing entry came from the play queue.
If %TRUE, activating an entry should only add it to the play queue.
The play queue source
The current source that is selected for playback.
The GtkUIManager
The current playback volume (between 0.0 and 1.0)
Emitted when the playback position changes.
the new playback position in seconds
Emitted when the playback position changes. Only use this (as opposed to
elapsed-changed) when you require subsecond precision. This signal will be
emitted multiple times per second.
the new playback position in nanoseconds
Emitted when playback either stops or starts.
flag indicating playback state
Emitted when the playing database entry changes
the new playing #RhythmDBEntry
Emitted when a property of the playing database entry changes.
the URI of the playing entry
the name of the property that changed
the previous value for the property
the new value of the property
Emitted when a new #RBSource instance starts playing
the #RBSource that is now playing
Emitted when the playing database entry changes, providing the
URI of the entry.
the URI of the new playing entry
Emitted when the main window title text should be changed
the new window title
Creates the #RBShellPreferences instance, populating it with the
preferences pages for the sources in the list.
the #RBShellPreferences instance
list of sources to check for preferences pages
Adds a widget to the preferences window. See #gtk_box_pack_start for
details on how the expand and fill parameters work. This function can be
used to add widgets to the 'general' and 'playback' pages.
the #GtkWidget to insert into the preferences window
the location at which to insert the widget
whether the widget should be given extra space
whether the widget should fill all space allocated to it
Appends a new page to the preferences dialog notebook.
name of the page to append
the #GtkWidget to use as the contents of the page
Removes a widget added with #rb_shell_preferences_add_widget from the preferences window.
the #GtkWidget to remove from the preferences window
the UI location to which the widget was originally added
Locations available for adding new widgets to the preferences dialog.
Creates a new #RBSongInfo for the selected entry or entries in
the specified entry view.
the new song properties window
#RBSource creating the song properties window
the #RBEntryView to get selection data from
Adds a new page to the song properties window. Should be called
in a handler connected to the #RBShell 'create-song-info' signal.
the page number
the title of the new page
the page #GtkWidget
The #RhythmDBEntry that is currently being displayed. Will be NULL for
multiple-entry song properties windows.
The #RBEntryView for the source that created the song properties window. Used
find the set of selected entries, and to change the selection when the 'back' and
'forward' buttons are pressed.
The set of #RhythmDBEntry objects currently being displayed. Valid for both
single-entry and multiple-entry song properties windows.
The #RBSource that created the song properties window. Used to update
for track list changes, and to find the sets of albums, artist, and genres
to use for tag edit completion.
Emitted just after changes have been applied to the database.
Probably useless.
the #RhythmDBEntry that was changed
Emitted just before the changes made in the song properties window
are applied to the database. This is only emitted in the single-entry
case.
the #RhythmDBEntry being changed
Adds the currently selected entries to the end of the
play queue.
the #RBSource for the play queue
Adds an entry corresponding to the URI to the source. The
@title and @genre parameters are not really used.
a URI to add
theoretically, the title of the entity the URI points to
theoretically, the genre of the entity the URI points to
a callback function to call when complete
data to pass to the callback
function to call to destroy the callback data
Binds the source's #GSettings instance to the given widgets. Should be called
from the source's constructed method.
If the browser widget has a browser-views property, it will be bound to the
browser-views settings key.
the #RBEntryView for the source
the #GtkPaned containing the entry view and the browser
the browser (typically a #RBLibraryBrowser) for the source
Determines whether the source can add the selected entries to
the play queue.
TRUE if adding to the play queue is supported
Determines whether the source supports the copy part
of a copy-and-paste operation.
TRUE if copying is supported
Determines whether the source supporst the typical cut
(as in cut-and-paste) operation.
TRUE if cutting is supported
Determines whether the source allows the user to delete
a selected set of entries.
TRUE if deletion is supported
Determines whether the source allows the user to trash
the files backing a selected set of entries.
TRUE if trashing is supported
Determines whether the source supports paste operations.
TRUE if the pasting is supported
Determines whether playback of entries from the source can
be paused.
TRUE if pausing is supported
Determines whether the source can be renamed.
TRUE if this source can be renamed
Determines whether the source can display a properties
window for the currently selected entry (or set of entries)
TRUE if showing properties is supported
Copies the selected entries to the clipboard.
the currently selected entries from the source.
a list containing
Removes the currently selected entries from the source and
returns them so they can be pasted into another source.
from the source.
entries cut
Deletes the currently selected entries from the source.
Returns a list containing the values of the specified
property from the selected entries in the source.
This is used to implement the 'browse this artist' (etc.)
actions.
list of property values
property for which to gather selection
Returns the name of the UI action to use for 'delete'.
This allows the source to customise the visible action name
and description to better describe what deletion actually does.
allocated string holding UI action name
Returns the entry view widget for the source.
the #RBEntryView instance for the source
Returns a list containing the #RBPropertyView instances for the
source, if any.
list of property views
Determines how EOS events should be handled when playing entries
from the source.
EOS event handling type
Trashes the files backing the currently selected set of entries.
In general, this should use #rhythmdb_entry_move_to_trash to
perform the actual trash operation.
Source implementations call this when their filter state changes
Adds a list of entries previously cut or copied from another
source. If the entries are not of the type used by the source,
the entries will be copied and possibly converted into an acceptable format.
This can be used for transfers to and from devices and network shares.
If the transfer is performed using an #RBTrackTransferBatch, the batch object
is returned so the caller can monitor the transfer progress. The caller does not
own a reference on the batch object.
the #RBTrackTransferBatch used to perform the transfer (if any)
a list of #RhythmDBEntry objects to paste in
Clears all filters (browser selections, etc.) in this source.
Updates the source with new search text. The source
should recreate the database query that feeds into the
browser (if any).
the active #RBSourceSearch instance
the current search text
the new search text
Enables or disables automatic hiding of the source when
there are no entries in it.
if TRUE, automatically hide the source
Displays a properties window for the currently selected entries.
Determines whether playback URIs for entries in the source should
be parsed as playlists rather than just played.
TRUE to attempt playlist parsing
Updates play count and play time statistics for a database entry.
Sources containing entries that do not normally reach EOS should
call this for an entry when it is no longer being played.
the #RhythmDB instance
the #RhythmDBEntry to update
Checks if the URI matches the source itself. A source
should return TRUE here if the URI points to the device that
the source represents, for example.
TRUE if the URI identifies the source itself.
a URI for the source to consider
Returns an indication of how much the source wants to handle
the specified URI. 100 is the highest usual value, and should
only be used when the URI can only be associated with this source.
0 should be used when the URI does not match the source at all.
source wants this URI.
value from 0 to 100 indicating how much the
a URI for the source to consider
The unfiltered query model for the source, containing all entries in the source.
Source classes should override this if they perform filtering based on the search
box or a browser.
Entry type for entries in this source.
If TRUE, the source will not be displayed in the source list
when it contains no entries.
Indicates whether the source is not loaded, is currently loading data, or is
fully loaded.
If the source provides its own play order, it can override this property.
The current query model for the source. This is used in
various places, including the play order, to find the
set of entries within the source.
The #GSettings instance storing settings for the source. The instance must
have a schema of org.gnome.Rhythmbox.Source.
Whether the browser widget for the source (if any) should be displayed.
This should be overridden in sources that include a browser widget.
UI manager path for a toolbar to display at the top of the source.
The #RBSource class doesn't actually display the toolbar anywhere.
Adding the toolbar to a container is the responsibility of a subclass
such as #RBBrowserSource.
Fires when the user changes the filter, either by changing the
contents of the search box or by selecting a different browser
entry.
Returns the #RBSourceSearch associated with the
specified UI action.
associated #RBSourceSearch
the action to find the #RBSourceSearch for
Creates a #RhythmDBQuery from the user's search text.
#RhythmDBQuery for the source to use
the #RhythmDB
the search text
Determines whether the new search text will result in a
subset of entries matched by the previous search. This is
used to optimise the search query.
TRUE iff the new search text will match a subset of those matched by the current search.
the current search text (or NULL if the current search was done with a different search implementation and so cannot be considered)
the new search text
Attaches a #RBSourceSearch to a UI action so that
the search implementation will be used when the action is active.
UI action to associate the search with
Creates a #RhythmDBQuery from the user's search text.
#RhythmDBQuery for the source to use
the #RhythmDB
the search text
Determines whether the new search text will result in a
subset of entries matched by the previous search. This is
used to optimise the search query.
TRUE iff the new search text will match a subset of those matched by the current search.
the current search text (or NULL if the current search was done with a different search implementation and so cannot be considered)
the new search text
Creates a new #RBSourceSearchBasic instance.
This performs simple string matching on a specified
property.
newly created #RBSourceSearchBasic
Creates #RBSourceSearchBasic instances for a set of
search actions and associates them with the actions.
The property to match on is taken from the action
value in the GtkRadioActionEntry structure.
TRUE iff the new search text will match a subset of those matched by the current search.
the current search text (or NULL if the current search was done with a different search implementation and so cannot be considered)
the new search text
#RhythmDBQuery for the source to use
the #RhythmDB
the search text
Creates a new source toolbar for @source. The toolbar does not
initially include a search entry. Call #rb_source_toolbar_add_search_entry
to add one. The toolbar content comes from the @RBSource:toolbar-path property.
the #RBSourceToolbar
a #RBSource
the #GtkUIManager
Adds a search entry to the toolbar. If a popup path is specified,
clicking on the primary icon will show a menu allowing the user to
select a search type, and the placeholder text for the entry will
be the selected search description. Otherwise, the specified placeholder
text will be displayed.
the UI path for the search popup (or NULL)
the placeholder text for the search entry (or NULL)
Clears the search entry text. Call this from RBSource:impl_reset_filters.
The #RBSource the toolbar is associated with
The #GtkUIManager instance
Creates a new static playlist source.
new playlist.
the #RBShell
the playlist name
the settings name for the playlist (GSettings path friendly)
if %TRUE, the playlist is local to the library
type of database entries that can be added to the playlist.
Constructs a new playlist from the given XML document node.
playlist read from XML
the #RBShell
XML node containing playlist entries
Adds the specified entry to the playlist.
entry to add to the playlist
position at which to add it (-1 to add at the end)
If the location matches an entry in the database, the entry is added
to the playlist. Otherwise, if it identifies a directory, the contents
of that directory are added.
location (URI) to add to the playlist
position at which to add the location (-1 to add at the end)
Adds the locations specified in @locations to the playlist.
See @rb_static_playlist_source_add_location for details.
URI strings to add
Loads the playlist contents from the specified XML document node.
XML node to load from
Moves an entry within the playlist.
the entry to move
new location for the entry
Removes the specified entry from the playlist.
the entry to remove
Removes the specified location from the playlist. This affects both
the location map and the query model, whether an entry exists for the
location or not.
location to remove
Provides status text and progress fraction suitable for use in
a streaming source's @rb_source_get_status method.
returns buffering status text
returns buffering progress fraction
Updates the streaming song album name. Call this when an updated
streaming song album name is received from the stream.
the new streaming song album name
Updates the streaming song artist name. Call this when an updated
streaming song artist name is received from the stream.
the new streaming song artist name
Updates the streaming song title. Call this when an updated
streaming song title is received from the stream.
the new streaming song title
Creates a new #RBStringValueMap
new empty #RBStringValueMap
Locates and copies the value associated with the key.
%TRUE if the value was found
key to retrieve
returns a copy of the value in the map
Locates the value associated with the key. This returns the
GValue stored in the map, so it cannot be modified.
the GValue associated with the key
key to retrieve
Removes a value from the map.
%TRUE if the value was found and removed
key to remove
Inserts a value into the map. The value is copied.
key to set
value to store
Returns the number of entries in the map.
number of entries
Extracts and returns the underlying hash table from the map,
and creates a new empty map.
#GHashTable from the map
Creates a new transfer batch with the specified encoding target. If no target
is specified, the default target will be used with the user's preferred
encoding type.
One or more entries must be added to the batch (using #rb_track_transfer_batch_add)
before the batch can be started (#rb_track_transfer_manager_start_batch).
new #RBTrackTransferBatch object
a #GstEncodingTarget describing allowable encodings (or NULL for defaults)
the #RBSource from which the entries are to be transferred
the #RBSource to which the entries are to be transferred
Adds an entry to be transferred.
the source #RhythmDBEntry to transfer
Cancels the batch.
Checks that all entries in the batch can be transferred in a format
supported by the destination. If no encoding profile is available for
some entries, but installing additional plugins could make a profile
available, a list of profiles that require additional plugins is returned.
%TRUE if some entries can be transferred without additional plugins
holds a #GList of #GstEncodingProfiles on return
holds the number of entries that cannot be transferred on return
The RBSource to which the tracks are being transferred.
Number of entries in the batch that have been transferred.
A GstEncodingTarget describing allowable target formats.
If NULL, the default set of profiles will be used.
A list of all entries in the batch.
Fraction of the transfer batch that has been processed.
The RBSource from which the tracks are being transferred.
Total number of entries in the transfer batch.
Emitted when the batch is cancelled.
hmm. will 'complete' still be emitted in this case?
Emitted when the batch is complete. This will be immediately
after the final entry transfer is complete.
Emitted to allow configuration of encoding profile settings
(mostly by setting presets on sub-profiles).
the target media type
the #GstEncodingProfile
The batch emits this to allow the creator to provide a destination
URI for an entry being transferred. This is emitted after the
output media type is decided, so the usual extension for the media
type can be taken into consideration.
the #RhythmDBEntry to be transferred
the destination media type for the transfer
usual extension for the destionation media type
Emitted when the destination URI for a transfer already exists.
The handler must call _rb_track_transfer_batch_continue or
_rb_track_transfer_batch_cancel when it has figured out what to
do.
the destination URI that already exists
Emitted when the batch is started. This will be after
all previous batches have finished, which is not necessarily
when #rb_track_transfer_manager_start_batch is called.
Emitted when a track transfer is complete, whether because
the track was fully transferred, because an error occurred,
or because the batch was cancelled (maybe..).
the #RhythmDBEntry that was transferred
the destination URI for the transfer
size of the destination file
the media type of the destination file
any error that occurred during transfer
Emitted regularly throughout the transfer to allow progress bars
and other UI elements to be updated.
the #RhythmDBEntry being transferred
the destination URI for the transfer
some measure of how much of the transfer is done
the total amount of that same measure
the fraction of the transfer that is done
Emitted when a new entry is about to be transferred.
This will be emitted for each entry in the batch, unless
the batch is cancelled.
the #RhythmDBEntry being transferred
the destination URI for the transfer
Creates the #RBTrackTransferQueue instance
the #RBTrackTransferQueue
the #RBShell
Removes a transfer batch from the queue. If an entry from the
batch is currently being transferred, the transfer will be
aborted.
the #RBTrackTransferBatch to cancel, or NULL for the current batch
Finds all transfer batches where @source is the source or destination.
This should be used to wait for transfers to finish (or cancel them) before
ejecting a device. The transfer batches are returned in the order they're
found in the queue, so waiting for the @RBTrackTransferBatch::complete signal
on the last one is sufficient to wait for them all to finish.
#GList of #RBTrackTransferBatch objects, not referenced
the #RBSource to search for
Retrieves transfer status information. Works similarly to
#rb_source_get_status.
TRUE if transfer status information is returned
returns the status bar text
returns the progress bar text
returns the progress fraction
returns the estimated number of seconds remaining
Adds a new transfer batch to the transfer queue; if the queue is currently
empty, the transfer will start immediately, but not before the call returns.
the #RBTrackTransferBatch to add to the queue
The current #RBTrackTransferBatch being processed
The #RBShell
Emitted to request installation of one or more encoder plugins for a
destination media format. When the closure included in the signal args
is called, the transfer batch will be started.
the list of plugin detail strings describing the missing plugins
the list of descriptions for the missing plugins
a #GClosure to be called when the plugin installation is complete
Emitted regularly to convey progress information. At the end of any given
transfer batch, there will be one signal emission with @done == @total and
@fraction == 1.0.
the number of entries transferred
the total number of entries in the batch
the fraction of the batch that has been transferred
the estimated remaining time (in seconds)
Constructs a URI to use as the destination for a transfer or transcoding
operation. The URI may be on the device itself, if the device is mounted
into the normal filesystem or through gvfs, or it may be a temporary
location used to store the file before uploading it to the device.
The destination URI should conform to the device's normal URI format,
and should use the provided extension instead of the extension from
the source entry.
constructed URI
a #RhythmDBEntry being transferred
destination media type
extension associated with destination media type
Checks whether @entry should be transferred to the target.
The target can check whether a matching entry already exists on the device,
for instance. @rb_transfer_target_check_duplicate may form part of
an implementation. If this method returns %FALSE, the entry
will be skipped.
%TRUE if the entry should be transferred to the target
a #RhythmDBEntry to consider transferring
Constructs a URI to use as the destination for a transfer or transcoding
operation. The URI may be on the device itself, if the device is mounted
into the normal filesystem or through gvfs, or it may be a temporary
location used to store the file before uploading it to the device.
The destination URI should conform to the device's normal URI format,
and should use the provided extension instead of the extension from
the source entry.
constructed URI
a #RhythmDBEntry being transferred
destination media type
extension associated with destination media type
This checks that the entry type of @entry is in a suitable
category for transfer. This can be used to implement
@should_transfer.
%TRUE if the entry is in a suitable category
a #RhythmDBEntry to check
This checks for an existing entry in the target that matches
the title, album, artist, and track number of the entry being
considered. This can be used to implement @should_transfer.
%TRUE if the entry already exists on the target.
a #RhythmDBEntry to check
Returns a #GList of allocated media format descriptions for
the formats supported by the target. The list and the strings
it holds must be freed by the caller.
list of descriptions.
Checks whether @entry should be transferred to the target.
The target can check whether a matching entry already exists on the device,
for instance. @rb_transfer_target_check_duplicate may form part of
an implementation. If this method returns %FALSE, the entry
will be skipped.
%TRUE if the entry should be transferred to the target
a #RhythmDBEntry to consider transferring
This is called when a transfer fails. If the source's
impl_track_add_error implementation returns %TRUE, an error dialog
will be displayed to the user containing the error message, unless
the error indicates that the destination file already exists.
the source #RhythmDBEntry for the transfer
the destination URI
the transfer error information
This is called when a transfer to the target has completed.
If the source's @track_added method returns %TRUE, the destination
URI will be added to the database using the entry type for the device.
If the target uses a temporary area as the destination for transfers,
it can instead upload the destination file to the device and create an
entry for it, then return %FALSE.
the source #RhythmDBEntry for the transfer
the destination URI
size of the destination file
media type of the destination file
Starts tranferring @entries to the target. This returns the
#RBTrackTransferBatch that it starts, so the caller can track
the progress of the transfer, or NULL if the target doesn't
want any of the entries.
an #RBTrackTransferBatch, or NULL
a #GList of entries to transfer
if %TRUE, don't start the transfer until
constructed URI
a #RhythmDBEntry being transferred
destination media type
extension associated with destination media type
%TRUE if the entry should be transferred to the target
a #RhythmDBEntry to consider transferring
Creates a URI entry dialog.
URI dialog instance.
Window title for the dialog
Label to display in the dialog
The label displayed in the dialog.
Emitted when the user has entered a URI into the dialog.
URI entered
Asserts that @mutex is currently locked. Does not work with all
mutex implementations.
a #GMutex
Makes a label built from a GtkBuilder file bold.
a #GtkBuilder instance
name of the label to boldify
Locates and reads a GtkBuilder file, automatically connecting
signal handlers where possible. The caller can specify a path
relative to the shared data directory, or its 'ui' or 'art'
subdirectories.
#GtkBuilder object built from the file
filename, either absolute or relative to the data directory
user data to pass to autoconnected signal handlers
Converts @uri to canonical URI form, ensuring it doesn't contain
any redundant directory fragments or unnecessarily escaped characters.
All URIs passed to #RhythmDB functions should be canonicalised.
canonical URI, must be freed by caller
URI to canonicalise
Checks that the filesystem holding @file has at least @bytes_needed
bytes available.
%TRUE if enough space is available.
a #GFile to check
number of bytes to check for
Checks that the filesystem holding @uri has at least @bytes_needed
bytes available.
%TRUE if enough space is available.
a URI to check
number of bytes to check for
Returns a #GList containing all keys from @table. The keys are
not copied.
#GList of keys
#GHashTable to collate
Returns a #GList containing all values from @table. The values are
not copied.
#GList of values
#GHashTable to collate
A row separator function to use for GtkComboBox widgets.
It expects the model to contain a string in its first column,
and interprets a string containing a single hyphen character
as a separator.
%TRUE if the row pointed to by @iter is a separator
a #GtkTreeModel
a #GtkTreeIter
nothing
Compares two #GTimeVal structures for sorting.
-1 if @a < @b, 0 if @a == @b, 1 if @a > @b
left hand side
right hand size
Just returns its first argument. Useful as a callback function.
@data
generic argument
Constructs arguments to pass to another process using
this debug output code that will produce the same debug output
settings.
debug output arguments, must be freed with #g_strfreev()
Sets up debug output, with either all debug enabled
or none.
if TRUE, enable all debug output
Sets up debug output, enabling debug output from file and function
names that contain the specified match string.
Also sets up a GLib log handler that will trigger a debugger
break for critical or warning level output if any debug output
at all is enabled.
string to match functions and filenames against
Checks if @file or @func matches the current debug output settings.
%TRUE if matched
function to check
filename to check
If the debug output settings match the function or file names,
the debug message will be formatted and written to standard error.
function name
file name
line number
if TRUE, add a newline to the output
the debug message
If the debug output settings match the function or file names,
the debug message will be formatted and written to standard error.
function name
file name
line number
if TRUE, add a newline to the output
printf style format specifier
Raises a SIGINT signal to get the attention of the debugger.
When not running under the debugger, we don't want to stop,
so we ignore the signal for just the moment that we raise it.
Creates a new #RBEncoder instance.
the new #RBEncoder
Creates and displays a simple error dialog box containing a primary
message in bold, larger type and a secondary message in the regular
font. Both the primary and secondary message strings should be
translated.
Care should be taken to avoid opening multiple error dialog boxes
when a single error message (such as 'out of disk space') affects
multiple items.
parent #GtkWindow for the dialog
main error message
secondary error message (printf-style format string)
Creates a new metadata lookup key with a single field.
Use @rb_ext_db_key_add_field to add more.
the new key
required field name
value for field
Creates a new metadata storage key with a single field.
Use @rb_ext_db_key_add_field to add more.
the new key
required field name
value for field
Just returns %FALSE, useful as a callback function.
%FALSE
unused
Searches for an installed file, returning the full path name
if found, NULL otherwise.
Full file name, if found. Must not be freed.
name of file to search for
Creates and shows a regular gtk+ file chooser dialog with
a given title. The user's music directory (typically ~/Music) is
added as a shortcut.
For consistency, this should be used anywhere a file chooser is required.
After creating the dialog, the caller should connect a handler to its
'response' signal to process the user's selected files or folders.
the file chooser #GtkWidget
title for the file chooser
parent #GtkWindow for the file chooser
the #GtkFileChooserAction
if TRUE, don't show network locations
Walks up the filesystem hierarchy to find a #GFile representing
the nearest extant ancestor of the specified file, which may be
the file itself if it exists.
#GFile for the nearest extant ancestor
a #GFile to find an extant ancestor of
Sets up file search paths for @rb_file. Must be called on startup.
if %TRUE, search in source and build directories as well as installed locations
Frees various data allocated by file helper functions.
Should be called on shutdown.
Locates a file under the plugin's data directory.
allocated string containing the location of the file
the plugin object
name of the file to find
Determines the full path to use for user-specific cached files
within the user cache directory.
an error occurred.
allocated string containing the location of the file to use, even if
name of file to find
Determines the full path to use for user-specific files, such as rhythmdb.xml,
within the user data directory (see @rb_user_data_dir).
an error occurred.
allocated string containing the location of the file to use, even if
name of file to find
Simple shortcut for getting a popup menu from a #GtkUIManager and
displaying it.
a #GtkUIManager
UI path for the popup to display
Compares @a and @b for sorting. @a and @b must contain the same value
type for the comparison to be valid. Comparisons for some value types
are not particularly useful.
-1 if @a < @b, 0 if @a == @b, 1 if @a > @b
left hand side
right hand size
Same as @gtk_image_new_from_stock except that it mirrors the icons for RTL
languages.
a #GtkImage of the requested stock item
stock image id
requested icon size
Checks if currently executing on the main thread.
%TRUE if on the main thread
Frees each element of @list and @list itself.
list to free
Calls @destroyer for each element in @list, then frees @list.
list to destroy
function to call to free elements of @list
Returns the locale directory identified at build configuration time.
locale dir
Constructs a string describing the specified duration. The string
describes hours, minutes, and seconds, and its format is localised.
duration string
duration in seconds
Constructs a string describing a playback position. The string describes hours,
minutes, and seconds, and its format is localised. The string can describe either
the elapsed time or the time remaining.
elapsed/remaining time string
elapsed time (in seconds)
duration (in seconds)
if %TRUE, show the remaining time, otherwise show elapsed time
Constructs a string describing the specified time.
time string
time in seconds
Returns the default directory for the user's music library.
This will usually be the 'Music' directory under the home directory.
user's music directory. must not be freed.
Just returns NULL. Useful as a callback function.
NULL
unused
Creates a new player object.
new player object.
if TRUE, try to use a backend that supports crossfading and other track transitions.
Creates a new profiler instance. This can be used to
time certain sections of code.
profiler instance
profiler name
Key equality function suitable for use with #GHashTable.
Equality checks for #RBRefString are just pointer comparisons,
since there can only be one refstring for a given string.
%TRUE if the strings are the same
an #RBRefString
another #RBRefstring
Returns an existing #RBRefString for @init if one exists,
otherwise returns NULL. If an existing refstring is found,
its reference count is increased.
existing #RBRefString, or NULL
string to find
Hash function suitable for use with @GHashTable.
hash value for the string underlying @p
an #RBRefString
Sets up the refstring system. Called on startup.
Frees all data associated with the refstring system.
Only called on shutdown.
Modifies @path such that it represents a legal path for MS DOS
filesystems.
a path to sanitize (modified in place)
Removes characters from @uri that are not allowed by the filesystem
on which it would be stored. At present, this only supports MS DOS
filesystems.
sanitized copy of @uri, must be freed by caller.
a URI to sanitize
Creates a new #GdkPixbuf from the original one, for a target of
size, respecting the aspect ratio of the image.
scaled #GdkPixbuf
the #GdkPixbuf containing the original image
a stock icon size
Returns a case-folded and punctuation-stripped version of @original, useful
for performing text searches.
case-folded string
the string to fold
Sets a fixed size for a tree view column based on
a set of strings to be displayed in the column.
the #GtkTreeView containing the column
the #GtkTreeViewColumn to size
the #GtkCellRenderer used in the column
a NULL-terminated set of strings to base the size on
a small amount of extra padding for the column
Synchronizes settings in the @settings instance after 500ms has elapsed
with no further changes.
#GSettings instance
function to call
data to pass to @func
function to use to free @data
Returns the #GQuark used for #RBShell errors
shell error #GQuark
A #GSignalAccumulator used to return the boolean OR of all
returned (boolean) values.
%FALSE to abort signal emission, %TRUE to continue
a #GSignalInvocationHint
holds the accumulated return value
holds the return value to be accumulated
user data (unused)
A #GSignalAccumulator that aborts the signal emission after the
first handler to return a value, and returns the value returned by
that handler. This is the opposite behaviour from what you get when
no accumulator is specified, where the last signal handler wins.
%FALSE to abort signal emission, %TRUE to continue
a #GSignalInvocationHint
holds the accumulated return value
holds the return value to be accumulated
user data (unused)
A #GSignalAccumulator used to combine all returned values into
a #GValueArray.
%FALSE to abort signal emission, %TRUE to continue
a #GSignalInvocationHint
holds the accumulated return value
holds the return value to be accumulated
user data (unused)
A #GSignalAccumulator that aborts the signal emission after the
first handler to return a value, and returns the value returned by
that handler. This is the opposite behaviour from what you get when
no accumulator is specified, where the last signal handler wins.
%FALSE to abort signal emission, %TRUE to continue
a #GSignalInvocationHint
holds the accumulated return value
holds the return value to be accumulated
user data (unused)
Frees each element of @list and @list itself.
list to free
Initializes the stock icons, adding the necessary filesystem
locations to the GTK icon search path. Must be called on startup.
If anything was necessary to clean up the stock icons, this function
would do it. Doesn't do anything, but should be called on shutdown
anyway.
Checks if @needle is present in the NULL-terminated string
array @haystack.
%TRUE if found
string to search for
array of strings to search
Checks if @list contains the string @s.
%TRUE if found
(element-type utf8) list to check
string to check for
Creates a deep copy of @list.
copied list
list of strings to copy
Checks if @a and @b contain exactly the same set of strings,
regardless of order.
%TRUE if the lists contain all the same strings
list of strings to compare
other list of strings to compare
Splits @string on word boundaries using Unicode character definitions.
NULL-terminated array of strings
the string to split
Initializes various thread helpers. Must be called on startup.
Just returns %TRUE, useful as a callback function.
%TRUE
unused
Creates a new URI consisting of @path appended to @uri.
new URI, must be freed by caller
the URI to append to
the path fragment to append
Creates a new URI consisting of @fragment appended to @uri.
Generally isn't a good idea.
new URI, must be freed by caller
the URI to append to
the URI fragment to append
Checks if @uri identifies a resource that is probably a podcast
(RSS or Atom feed). This does not perform any IO, it just guesses
based on the URI itself.
%TRUE if @uri may be a podcast
a URI to check
returns whether the URI identifies an OPML document
Ensures that all parent directories of @uri exist so that
@uri itself can be created directly.
%TRUE if successful
a URI for which to create parent directories
Checks if a URI identifies a resource that exists
%TRUE if @uri exists
a URI to check
Returns the directory component of @uri, that is, everything up
to the start of the filename.
new URI for parent of @uri, must be freed by caller.
a URI
Returns a string describing the type of the filesystem containing @uri.
filesystem type string, must be freed by caller.
URI to get filesystem type for
optionally returns the mount point for the filesystem as a URI
Returns the mount point of the filesystem holding @uri.
If @uri is on a normal filesystem mount (such as /, /home,
/var, etc.) this will be NULL.
or NULL.
filesystem mount point (must be freed by caller)
a URI
Returns the filename component of @uri, that is, everything after the
final slash and before the start of the query string or fragment.
filename component of @uri, must be freed by caller
a URI
Calls @func for each file found under the directory identified by @uri.
If @uri identifies a file, calls @func for that instead.
URI to visit
an optional #GCancellable to allow cancellation
Callback function
Data for callback function
Calls @func for each file found under the directory identified
by @uri, or if @uri identifies a file, calls it once
with that.
Directory recursion happens on a separate thread, but the callbacks
are called on the main thread.
If non-NULL, @destroy_data will be called once all files have been
processed, or when the operation is cancelled.
the URI to visit
a #GCancellable to allow cancellation
callback function
data to pass to callback
function to call to free @user_data
Checks if @uri identifies a directory.
%TRUE if @uri is a directory
the URI to check
Checks if @uri is hidden, according to the Unix filename convention.
If the filename component of @uri begins with a dot, the file is considered
hidden.
%TRUE if @uri is hidden
a URI to check
Checks if @uri identifies a local resource. Currently this just
checks that it uses the 'file' URI scheme.
%TRUE if @uri is local
a URI to check
Checks if the user can read the resource identified by @uri
%TRUE if @uri is readable
a URI to check
Checks if the user can write to the resource identified by @uri
%TRUE if @uri is writable
a URI to check
Converts a single string containing a list of URIs into
a #GList of URI strings.
#GList of URI strings
string containing URIs to parse
Constructs a URI that is similar to @uri but which identifies
a hidden file. This can be used for temporary files that should not
be visible to the user while they are in use.
hidden URI, must be freed by the caller.
a URI to construct a hidden version of
Creates a temporary file whose URI begins with @prefix, returning
the file URI and an output stream for writing to it.
%TRUE if successful
URI prefix
returns the temporary file URI
returns a @GOutputStream for the temporary file
Attempts to resolve symlinks in @uri and return a canonical URI for the file
it identifies.
resolved URI, or NULL on error
the URI to process
This will create the rhythmbox user cache directory, using the XDG
Base Directory specification. If none of the XDG environment
variables are set, this will be ~/.cache/rhythmbox.
NULL if the directory does not exist and could not be created.
string holding the path to the rhythmbox user cache directory, or
This will create the rhythmbox user data directory, using the XDG Base
Directory specification. If none of the XDG environment variables are
set, this will be ~/.local/share/rhythmbox.
NULL if the directory does not exist and cannot be created.
string holding the path to the rhythmbox user data directory, or
Appends a single value to @array, collecting it from @Varargs.
#GValueArray to append to
#GType of the value being appended
Unsets and frees @val. @val must have been allocated using
@g_slice_new or @g_slice_new0.
a #GValue