Source
Object Hierarchy:
Grl.Source
Grl.Source
Grl.Source
GLib.Object
GLib.Object
GLib.Object->Grl.Source
Description:
[ CCode ( type_id = "grl_source_get_type ()" ) ]public abstract class Source : Object
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:
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 for media
, 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
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 the parent
container
public virtual void store_metadata (SourceStoreMetadataSpec sms)
Get the values for keys
from media
and store
it permanently.
public List <KeyID > store_metadata_sync (Media media, List <KeyID >? keys, WriteFlags flags) throws Error
Update keys
values from media
in the
this .
public void store_sync (Media ? parent, Media media, WriteFlags flags) throws Error
Store the media
into the parent
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:
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref