docs: Update with latest changes

parent 13be2d6f
Pipeline #455 passed with stage
in 1 minute and 59 seconds
......@@ -7,18 +7,20 @@
<title>Integrating with cloud providers</title>
<para>
Integration with cloud providers can be achieved by fetching a list of exported
cloud provider accounts using cloud_providers_get_providers(). This function returns
a list of #CloudProviderAccount objects that can then be used to obtain details about
the accounts.
cloud provider accounts using <link linkend="cloud_providers_collector_get_providers()">cloud_providers_collector_get_providers()</link>. This function returns
a list of #CloudProvidersProvider objects that can then be used to obtain details about
the providers. Each #CloudProvidersProvider holds a list of #CloudProvidersAccount
that can be query using cloud_providers_provider_get_accounts().
</para>
<para>
To get notified about changes of individual accounts, the #CloudProviderAccount::changed
signal is being emitted everytime information about an account changes. Any UI elements
should be updated after receiving this signal.
To get notified about changes in either the #CloudProvidersProvider or each of
their #CloudProvidersAccount you can connect to the "notify::" signal of
each of their properties. Any UI elements should be updated after receiving
this signal.
</para>
<para>
Besides the account details, cloud providers may also export a #GMenuModel and a #GActionGroup
Besides the account details, #CloudProvidersAccount may also export a #GMenuModel and a #GActionGroup
to provide actions that are related with the account. Those can be obtained by calling
cloud_provider_account_get_menu_model() and cloud_provider_account_get_action_group()
cloud_providers_account_get_menu_model() and cloud_providers_account_get_action_group().
</para>
</chapter>
......@@ -6,11 +6,13 @@
<chapter id="implementing-cp">
<title>Implementing support as a cloud provider</title>
<para>
Cloud providers need to create #CloudProviderAccountExporter objects for
every account they like to expose to the API. To provide the account details
clients need to listen to the signals provided by the exporter and return
their information there. All #CloudProviderAccountExporter objects need to
be added to the #CloudProviderExporter by calling cloud_provider_exporter_add_account().
Cloud providers need to create #CloudProvidersAccountExporter objects for
every account they like to expose to the API and use the #CloudProvidersAccountExporter
API to set the properties of the accounts. Also a #CloudProvidersProviderExporter
needs to be created in order to hold all the #CloudProvidersAccountExporter objects
that will be added to the provider when created.
#CloudProvidersProviderExporter also export properties that define the provider
that can be set using the #CloudProvidersProviderExporter API.
</para>
<para>
To register your cloud provider you also need to provide a file in DATADIR/cloud-providers.
......@@ -19,8 +21,8 @@
<title>Example file to register a cloud provider</title>
<programlisting>
[Cloud Provider]
BusName=org.mycloudprovider.CloudProviderServerExample
ObjectPath=/org/mycloudprovider/CloudProviderServerExample
BusName=org.mycloudprovider.CloudProviders.ServerExample
ObjectPath=/org/mycloudprovider/CloudProviders/ServerExample
Version=1
</programlisting>
</example>
......
......@@ -39,7 +39,11 @@
<title>libcloudproviders library</title>
<partintro>
<para>
This part documents libcloudproviders libs.
This part documents libcloudproviders library. The library is meant to be used
as a C interface with their respective language bindings through introspection.
However, it can also be used with raw DBus management. If that's the
case, make sure it implements the DBus interfaces explained at
<link linkend="cloudproviders-dbus">cloudproviders-dbus</link>.
</para>
</partintro>
<xi:include href="xml/cloudproviderscollector.xml"/>
......@@ -59,10 +63,25 @@
<title>DBus Interfaces</title>
<partintro>
<para>
cloud provider accounts using <link linkend="cloud_providers_collector_get_providers()">cloud_providers_collector_get_providers()</link>. This function returns
cloud-providers-collector-get-providers()
#CloudProvidersCollector.signals
cloudprovidersprovider
<link href="glib-Hash-Tables">Hash Tables</link>
<link href="#CloudProvidersProvider.signals">Hash Tables</link>
<link href="CloudProvidersCollector.html#cloud-providers-collector-get-providers">Hash Tables</link>
The DBus object that is passed to cloud_providers_provider_exporter_new() will implement the <ulink
url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
interface, and that can be used by clients to discover and query
objects like the provider properties itself or the accounts associated
with your provider.
</para>
</partintro>
<xi:include href="generated-docs-org.freedesktop.CloudProviders.Account.xml"/>
<xi:include href="generated-docs-org.freedesktop.CloudProviders.Provider.xml"/>
</part>
<index id="index-all">
<title>Index of all symbols</title>
</index>
</book>
......@@ -60,12 +60,9 @@ CloudProvidersProvider
<TITLE>CloudProvidersProviderExporter</TITLE>
CLOUD_PROVIDERS_TYPE_PROVIDER_EXPORTER
CloudProvidersProviderExporterClass
cloud_providers_provider_exporter_add_account
cloud_providers_provider_exporter_remove_account
cloud_providers_provider_exporter_set_name
cloud_providers_provider_exporter_get_name
cloud_providers_provider_exporter_new
cloud_providers_provider_exporter_get_object_path
cloud_providers_provider_exporter_get_bus
CloudProvidersProviderExporter
</SECTION>
......@@ -152,6 +152,7 @@ cloud_providers_account_exporter_get_skeleton (CloudProvidersAccountExporter *se
/**
* cloud_providers_account_exporter_new:
* @provider: The provider to which it will be associated.
* @bus_name: A unique name for the account
* must be a valid DBus object name
*
......
......@@ -117,8 +117,9 @@ unexport_account(CloudProvidersProviderExporter *self,
* @account: The account object
*
* Each cloud provider can have a variety of account associated with it. Use this
* function to add the accounts the user set up. Calling cloud_providers_provider_exporter_export_objects()
* once is required after adding the initial set of accounts.
* function to add the accounts the user set up. This function is currently only internal,
* as we do automation for hte dbus handling for adding and exporting an account.
* This is handled in cloud_providers_account_exporter_new().
*/
void
cloud_providers_provider_exporter_add_account (CloudProvidersProviderExporter *self,
......@@ -134,7 +135,7 @@ cloud_providers_provider_exporter_add_account (CloudProvidersProviderExporter *s
* @account: The account object
*
* Each cloud provider can have a variety of account associated with it. Use this
* function to remove the accounts added by cloud_providers_provider_exporter_add_account().
* function to remove the accounts that were added when created by cloud_providers_account_exporter_new().
*/
void
cloud_providers_provider_exporter_remove_account (CloudProvidersProviderExporter *self,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment