Class
GrlSource
Instance methods
grl_source_get_auto_split_threshold
Gets how much elements the source is able to handle in a single request.
since: 0.2.0
grl_source_get_media_from_uri
Creates an instance of GrlMedia
representing the media resource
exposed at uri
.
since: 0.2.0
grl_source_get_media_from_uri_sync
Creates an instance of GrlMedia
representing the media resource
exposed at uri
.
since: 0.2.0
grl_source_may_resolve
Checks whether key_id
may be resolved with source
for media
, so that the
caller can avoid calling grl_source_resolve()
if it can be known in
advance it will fail.
since: 0.2.0
grl_source_notify_change
Emits “content-changed” signal to notify subscribers that a change ocurred
in source
.
since: 0.2.0
grl_source_notify_change_list
Emits “content-changed” signal to notify subscribers that a change ocurred
in source
.
since: 0.2.0
grl_source_notify_change_start
Starts emitting ::content-changed signals when source
discovers changes in
the content. This instructs source
to setup the machinery needed to be aware
of changes in the content.
since: 0.2.0
grl_source_notify_change_stop
This will drop emission of ::content-changed signals from source
. When this
is done source
should stop the machinery required for it to track changes in
the content.
since: 0.2.0
grl_source_query
Execute a specialized query (specific for each provider) on a media repository.
since: 0.2.0
grl_source_query_sync
Execute a specialized query (specific for each provider) on a media repository.
since: 0.2.0
grl_source_resolve
This method is intended to fetch the requested keys of metadata of
a given media
to the media source.
since: 0.2.0
grl_source_resolve_sync
This method is intended to fetch the requested keys of metadata of
a given media
to the media source.
since: 0.2.0
grl_source_search
Search for the text
string in a source for data identified with that string.
since: 0.2.0
grl_source_search_sync
Search for the text
string in a source for data identified with that string.
since: 0.2.0
grl_source_set_auto_split_threshold
Sets how much elements the source is able to handle in a single request.
since: 0.2.0
grl_source_slow_keys
Similar to grl_source_supported_keys(), but these keys are marked as slow because of the amount of traffic/processing needed to fetch them.
since: 0.2.0
grl_source_store_metadata
Get the values for keys
from media
and store it permanently. After
calling this method, future queries that return this media object
shall return this new values for the selected keys.
since: 0.2.0
grl_source_store_metadata_sync
Update keys
values from media
in the source
. After calling this method,
future queries that return this media object shall return this new value for
the selected key.
since: 0.2.0
grl_source_supported_keys
Get a list of GrlKeyID
, which describe a metadata types that this
source can fetch and store.
since: 0.2.0
grl_source_supported_operations
By default the derived objects of GrlSource
can only resolve.
since: 0.2.0
grl_source_test_media_from_uri
Tests whether source
can instantiate a GrlMedia
object representing
the media resource exposed at uri
.
since: 0.2.0
grl_source_writable_keys
Similar to grl_source_supported_keys(), but these keys are marked as writable, meaning the source allows the client to provide new values for these keys that will be stored permanently.
since: 0.2.0
Properties
Grl.Source:auto-split-threshold
Transparently split queries with count requests bigger than a certain threshold into smaller queries.
since: 0.2.0
Signals
Grl.Source::content-changed
Signals that the content in the source has changed. changed_medias
is the
list of elements that have changed. Usually these medias are of type
GrlMedia
container, meaning that the content of that container has changed.
since: 0.2.0
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct GrlSourceClass {
GObjectClass parent_class;
GrlSupportedOps (* supported_operations) (
GrlSource* source
);
const GList* (* supported_keys) (
GrlSource* source
);
const GList* (* slow_keys) (
GrlSource* source
);
const GList* (* writable_keys) (
GrlSource* source
);
GrlCaps* (* get_caps) (
GrlSource* source,
GrlSupportedOps operation
);
void (* resolve) (
GrlSource* source,
GrlSourceResolveSpec* ms
);
gboolean (* may_resolve) (
GrlSource* source,
GrlMedia* media,
GrlKeyID key_id,
GList** missing_keys
);
gboolean (* test_media_from_uri) (
GrlSource* source,
const gchar* uri
);
void (* media_from_uri) (
GrlSource* source,
GrlSourceMediaFromUriSpec* mfus
);
void (* browse) (
GrlSource* source,
GrlSourceBrowseSpec* bs
);
void (* search) (
GrlSource* source,
GrlSourceSearchSpec* ss
);
void (* query) (
GrlSource* source,
GrlSourceQuerySpec* qs
);
void (* remove) (
GrlSource* source,
GrlSourceRemoveSpec* rs
);
void (* store) (
GrlSource* source,
GrlSourceStoreSpec* ss
);
void (* store_metadata) (
GrlSource* source,
GrlSourceStoreMetadataSpec* sms
);
void (* cancel) (
GrlSource* source,
guint operation_id
);
gboolean (* notify_change_start) (
GrlSource* source,
GError** error
);
gboolean (* notify_change_stop) (
GrlSource* source,
GError** error
);
}
Grilo Source class. Override the vmethods to implement the element functionality.
Class members
parent_class: GObjectClass
The parent class structure.
supported_operations: GrlSupportedOps (* supported_operations) ( GrlSource* source )
- No description available.
supported_keys: const GList* (* supported_keys) ( GrlSource* source )
- No description available.
slow_keys: const GList* (* slow_keys) ( GrlSource* source )
- No description available.
writable_keys: const GList* (* writable_keys) ( GrlSource* source )
- No description available.
get_caps: GrlCaps* (* get_caps) ( GrlSource* source, GrlSupportedOps operation )
- No description available.
resolve: void (* resolve) ( GrlSource* source, GrlSourceResolveSpec* ms )
- No description available.
may_resolve: gboolean (* may_resolve) ( GrlSource* source, GrlMedia* media, GrlKeyID key_id, GList** missing_keys )
- No description available.
test_media_from_uri: gboolean (* test_media_from_uri) ( GrlSource* source, const gchar* uri )
- No description available.
media_from_uri: void (* media_from_uri) ( GrlSource* source, GrlSourceMediaFromUriSpec* mfus )
- No description available.
browse: void (* browse) ( GrlSource* source, GrlSourceBrowseSpec* bs )
- No description available.
search: void (* search) ( GrlSource* source, GrlSourceSearchSpec* ss )
- No description available.
query: void (* query) ( GrlSource* source, GrlSourceQuerySpec* qs )
- No description available.
remove: void (* remove) ( GrlSource* source, GrlSourceRemoveSpec* rs )
- No description available.
store: void (* store) ( GrlSource* source, GrlSourceStoreSpec* ss )
- No description available.
store_metadata: void (* store_metadata) ( GrlSource* source, GrlSourceStoreMetadataSpec* sms )
- No description available.
cancel: void (* cancel) ( GrlSource* source, guint operation_id )
- No description available.
notify_change_start: gboolean (* notify_change_start) ( GrlSource* source, GError** error )
- No description available.
notify_change_stop: gboolean (* notify_change_stop) ( GrlSource* source, GError** error )
- No description available.
Virtual methods
Grl.SourceClass.may_resolve
Checks whether key_id
may be resolved with source
for media
, so that the
caller can avoid calling grl_source_resolve()
if it can be known in
advance it will fail.
since: 0.2.0
Grl.SourceClass.notify_change_start
Starts emitting ::content-changed signals when source
discovers changes in
the content. This instructs source
to setup the machinery needed to be aware
of changes in the content.
since: 0.2.0
Grl.SourceClass.notify_change_stop
This will drop emission of ::content-changed signals from source
. When this
is done source
should stop the machinery required for it to track changes in
the content.
since: 0.2.0
Grl.SourceClass.slow_keys
Similar to grl_source_supported_keys(), but these keys are marked as slow because of the amount of traffic/processing needed to fetch them.
since: 0.2.0
Grl.SourceClass.supported_keys
Get a list of GrlKeyID
, which describe a metadata types that this
source can fetch and store.
since: 0.2.0
Grl.SourceClass.test_media_from_uri
Tests whether source
can instantiate a GrlMedia
object representing
the media resource exposed at uri
.
since: 0.2.0
Grl.SourceClass.writable_keys
Similar to grl_source_supported_keys(), but these keys are marked as writable, meaning the source allows the client to provide new values for these keys that will be stored permanently.
since: 0.2.0