![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
RhythmDBQueryResults; RhythmDBQueryResultsIface; void rhythmdb_query_results_set_query (RhythmDBQueryResults *results, GPtrArray *query); void rhythmdb_query_results_add_results (RhythmDBQueryResults *results, GPtrArray *entries); void rhythmdb_query_results_query_complete (RhythmDBQueryResults *results);
This is the interface that RhythmDB uses to report results of database queries. When running a query, it first calls rhythmdb_query_results_set_query, then passes entries matching the query to rhythmdb_query_results_add_results in batches, and finally calls rhythmdb_query_results_query_complete. There are no guarantees as to which threads the calls are made from.
typedef struct { GTypeInterface g_iface; /* vtable */ void (*set_query) (RhythmDBQueryResults *results, GPtrArray *query); void (*add_results) (RhythmDBQueryResults *results, GPtrArray *entries); void (*query_complete) (RhythmDBQueryResults *results); } RhythmDBQueryResultsIface;
void rhythmdb_query_results_set_query (RhythmDBQueryResults *results, GPtrArray *query);
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 RhythmDBQueryResults implementation |
|
the new query |
void rhythmdb_query_results_add_results (RhythmDBQueryResults *results, GPtrArray *entries);
Provides a new set of query results. References must be taken on the entries.
|
the RhythmDBQueryResults implementation |
|
GPtrArray containing RhythmDBEntry results |
void rhythmdb_query_results_query_complete (RhythmDBQueryResults *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.
|
the RhythmDBQueryResults |