<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<chapter id="implementing-cps">
  <title>Integrating with cloud providers</title>
  <para>
    Integration with cloud providers can be achieved by fetching a list of exported
    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 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, #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_providers_account_get_menu_model() and cloud_providers_account_get_action_group().
  </para>
</chapter>
