Top | ![]() |
![]() |
![]() |
![]() |
FCmdrService * | service | Read / Write / Construct Only |
SoupURI * | uri | Read / Write / Construct Only |
A FCmdrProfileSource describes a location from which to obtain profile data that can be deserialized into FCmdrProfile instances.
The FCmdrProfileSource class itself is abstract. Each subclass handles profile loading for a particular URI scheme, like "http".
FCmdrProfileSource * fcmdr_profile_source_try_new (FCmdrService *service
,SoupURI *uri
);
Instantiates a FCmdrProfileSource subclass to handle the given uri
.
If no suitable subclass is available, the function returns NULL
.
FCmdrService *
fcmdr_profile_source_ref_service (FCmdrProfileSource *source
);
Returns the FCmdrService passed to fcmdr_profile_source_try_new()
.
The returned FCmdrService is referenced for thread-safety and must be
unreferenced with g_object_unref()
when finished with it.
SoupURI *
fcmdr_profile_source_dup_uri (FCmdrProfileSource *source
);
Returns a copy of the SoupURI passed to fcmdr_profile_source_try_new()
.
Free the returned SoupURI with soup_uri_free()
.
void fcmdr_profile_source_load_remote (FCmdrProfileSource *source
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously loads remote profile data from the source
's
“uri”.
When the operation is finished, callback
will be called. You can then
call fcmdr_profile_source_load_remote_finish()
to get the result of the
operation.
source |
||
cancellable |
optional GCancellable object, or |
|
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
data to pass to the callback function |
gboolean fcmdr_profile_source_load_remote_finish (FCmdrProfileSource *source
,GQueue *out_profiles
,GAsyncResult *result
,GError **error
);
Finishes the operation started with fcmdr_profile_source_load_remote()
.
The out_profiles
queue will be populated with freshly loaded FCmdrProfile
instances. If an error occurred, the out_profiles
queue will remain empty
and the function will set error
and return FALSE
.
#define FCMDR_PROFILE_SOURCE_EXTENSION_POINT_NAME "fcmdr-profile-source"
Extension point for methods of obtaining profile data.
When registering extensions for this extension point, the extension name should match the URI scheme to be handled, like "http".
“service”
property“service” FCmdrService *
The owner of this profile source.
Flags: Read / Write / Construct Only
“uri”
property“uri” SoupURI *
The URI for this profile source.
Flags: Read / Write / Construct Only