![]() |
![]() |
![]() |
GNOME Online Accounts Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct GoaProviderFactory; struct GoaProviderFactoryClass; #define GOA_PROVIDER_FACTORY_EXTENSION_POINT_NAME GoaProvider * goa_provider_factory_get_provider (GoaProviderFactory *factory
,const gchar *provider_name
); void goa_provider_factory_get_providers (GoaProviderFactory *factory
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean goa_provider_factory_get_providers_finish (GoaProviderFactory *factory
,GList **out_providers
,GAsyncResult *result
,GError **error
);
GoaProviderFactory implementations are used to dynamically create GoaProvider instances.
struct GoaProviderFactory;
The GoaProviderFactory structure contains only private data and should only be accessed using the provided API.
struct GoaProviderFactoryClass { GObjectClass parent_class; /* Mandatory to implement. */ GoaProvider *(*get_provider) (GoaProviderFactory *factory, const gchar *provider_name); /* The async method is mandatory to implement, but _finish has a default * implementation suitable for a GSimpleAsyncResult. */ void (*get_providers) (GoaProviderFactory *factory, GAsyncReadyCallback callback, gpointer user_data); gboolean (*get_providers_finish) (GoaProviderFactory *factory, GList **out_providers, GAsyncResult *result, GError **error); };
Class structure for GoaProviderFactory.
GObjectClass |
The parent class. |
Virtual function for goa_provider_factory_get_provider() . |
|
Virtual function for goa_provider_factory_get_providers() . |
|
Virtual function for goa_provider_factory_get_providers_finish() . |
#define GOA_PROVIDER_FACTORY_EXTENSION_POINT_NAME "goa-backend-provider-factory"
Extension point for GoaProviderFactory implementations.
GoaProvider * goa_provider_factory_get_provider (GoaProviderFactory *factory
,const gchar *provider_name
);
Create a dynamic GoaProvider for the subclass-specific provider_name
.
|
A GoaProviderFactory. |
|
A provider type identifier (ie. IM protocol names in GoaTelepathyFactory) |
Returns : |
A GoaProvider (that must be freed
with g_object_unref() ) or NULL if not found. [transfer full]
|
void goa_provider_factory_get_providers (GoaProviderFactory *factory
,GAsyncReadyCallback callback
,gpointer user_data
);
Get asynchronously a list of GoaProvider instances handled by factory
.
When the result is ready, callback
will be called in the the goa_provider_factory_get_providers_finish()
to get the result
of the operation.
This is a virtual method that must be implemented by subclasses.
|
A GoaProviderFactory. |
|
The function to call when the request is satisfied. |
|
Pointer to pass to callback . |
gboolean goa_provider_factory_get_providers_finish (GoaProviderFactory *factory
,GList **out_providers
,GAsyncResult *result
,GError **error
);
Finishes an operation started with goa_provider_factory_get_providers()
This is a virtual method that subclasses may implement. The default implementation is suitable for
GSimpleAsyncResult an implementation of goa_provider_factory_get_providers()
using GSimpleAsyncResult.
|
A GoaProviderFactory. |
|
Return location for a list of GoaProvider instances handled by factory . [out]
|
|
A GAsyncResult obtained from the GAsyncReadyCallback passed to goa_provider_factory_get_providers() . |
|
Return location for error or NULL . |
Returns : |
TRUE if the list was successfully retrieved, FALSE if error is set. |