Source
Object Hierarchy:
Description:
Namespace: Grl
Package: grilo-0.3
Content:
Properties:
- public uint auto_split_threshold { get; set; }
Transparently split queries with count requests bigger than a certain threshold into smaller queries.
- public Plugin plugin { owned get; set construct; }
Plugin the source belongs to
- public int rank { get; set construct; }
Source rank
- public string source_desc { owned get; set construct; }
A description of the source
- public Icon source_icon { owned get; set construct; }
Icon representing the source
- public string source_id { owned get; set construct; }
The identifier of the source.
- public string source_name { owned get; set construct; }
The name of the source.
- public string[] source_tags { owned get; set construct; }
A string array of tags relevant this source.
- public SupportedMedia supported_media { get; set construct; }
List of supported media types by this source.
Creation methods:
- protected Source ()
Methods:
- public virtual void browse (SourceBrowseSpec bs)
- public List<Media> browse_sync (Media? container, List<KeyID> keys, OperationOptions options) throws Error
Browse media elements through an available list.
- public virtual void cancel (uint operation_id)
- public uint do_browse (Media? container, List<KeyID> keys, OperationOptions options, SourceResultCb callback)
Browse from media elements through an available list.
- public uint do_query (string query, List<KeyID> keys, OperationOptions options, SourceResultCb callback)
- public void do_remove (Media media, SourceRemoveCb callback)
- public uint do_resolve (owned Media? media, List<KeyID> keys, OperationOptions options, SourceResolveCb callback)
- public uint do_search (string text, List<KeyID> keys, OperationOptions options, SourceResultCb callback)
- public void do_store (Media? parent, Media media, WriteFlags flags, SourceStoreCb callback)
- public void do_store_metadata (Media media, List<KeyID>? keys, WriteFlags flags, SourceStoreCb callback)
- public uint get_auto_split_threshold ()
Gets how much elements the source is able to handle in a single request.
- public virtual unowned Caps get_caps (SupportedOps operation)
Get the capabilities of this for
operation
. - public unowned string get_description ()
- public unowned Icon get_icon ()
- public unowned string get_id ()
- public uint get_media_from_uri (string uri, List<KeyID> keys, OperationOptions options, SourceResolveCb callback)
Creates an instance of Media representing the media resource exposed at
uri
. - public Media get_media_from_uri_sync (string uri, List<KeyID> keys, OperationOptions options) throws Error
Creates an instance of Media representing the media resource exposed at
uri
. - public unowned string get_name ()
- public unowned Plugin get_plugin ()
- public int get_rank ()
Gets the source rank
- public SupportedMedia get_supported_media ()
Gets the supported type of medias this can deal with.
- public uint get_supported_operations ()
- public unowned string[] get_tags ()
- public virtual bool may_resolve (Media media, KeyID key_id, List<KeyID> missing_keys)
Checks whether
key_id
may be resolved with this formedia
, so that the caller can avoid calling resolve if it can be known in advance it will fail. - public virtual void media_from_uri (SourceMediaFromUriSpec mfus)
- public void notify_change (Media? media, SourceChangeType change_type, bool location_unknown)
Emits "content-changed" signal to notify subscribers that a change ocurred in this.
- public void notify_change_list (owned GenericArray<Media> changed_medias, SourceChangeType change_type, bool location_unknown)
Emits "content-changed" signal to notify subscribers that a change ocurred in this.
- public virtual bool notify_change_start () throws Error
Starts emitting content_changed signals when this discovers changes in the content.
- public virtual bool notify_change_stop () throws Error
This will drop emission of content_changed signals from this.
- public virtual void query (SourceQuerySpec qs)
Execute a specialized query (specific for each provider) on a media repository.
- public List<Media> query_sync (string query, List<KeyID> keys, OperationOptions options) throws Error
Execute a specialized query (specific for each provider) on a media repository.
- public virtual void remove (SourceRemoveSpec rs)
Remove a
media
from the this repository. - public void remove_sync (Media media) throws Error
Remove a
media
from the this repository. - public virtual void resolve (SourceResolveSpec ms)
This method is intended to fetch the requested keys of metadata of a given
media
to the media source. - public Media resolve_sync (owned Media? media, List<KeyID> keys, OperationOptions options) throws Error
This method is intended to fetch the requested keys of metadata of a given
media
to the media source. - public virtual void search (SourceSearchSpec ss)
Search for the
text
string in a source for data identified with that string. - public List<Media> search_sync (string text, List<KeyID> keys, OperationOptions options) throws Error
Search for the
text
string in a source for data identified with that string. - public void set_auto_split_threshold (uint threshold)
Sets how much elements the source is able to handle in a single request.
- public virtual unowned List<KeyID> slow_keys ()
Similar to supported_keys, but these keys are marked as slow because of the amount of traffic/processing needed to fetch them.
- public virtual void store (SourceStoreSpec ss)
Store the
media
into theparent
container - public virtual void store_metadata (SourceStoreMetadataSpec sms)
Get the values for
keys
frommedia
and store it permanently. - public List<KeyID> store_metadata_sync (Media media, List<KeyID>? keys, WriteFlags flags) throws Error
Update
keys
values frommedia
in the this. - public void store_sync (Media? parent, Media media, WriteFlags flags) throws Error
Store the
media
into theparent
container. - public virtual unowned List<KeyID> supported_keys ()
Get a list of KeyID, which describe a metadata types that this source can fetch and store.
- public virtual SupportedOps supported_operations ()
By default the derived objects of Source can only resolve.
- public virtual bool test_media_from_uri (string uri)
Tests whether this can instantiate a Media object representing the media resource exposed at
uri
. - public virtual unowned List<KeyID> writable_keys ()
Similar to 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.
Signals:
- public signal void content_changed (GenericArray<Media> changed_medias, SourceChangeType change_type, bool location_unknown)
Signals that the content in the source has changed.
Inherited Members:
All known members inherited from class GLib.Object