[libcloudproviders/documentation-update: 2/2] docs: Add documentation for CloudProviderAccountExporter



commit b2fe8b9564605edac21643cba21e11b2414c2596
Author: Julius Härtl <jus bitgrid net>
Date:   Mon Sep 4 11:51:21 2017 +0200

    docs: Add documentation for CloudProviderAccountExporter

 docs/reference/libcloudproviders-sections.txt | 113 +++++++++++++-------------
 src/cloudprovideraccount.h                    |   9 ++
 src/cloudprovideraccountexporter.c            | 102 +++++++++++++++++++++--
 src/cloudprovideraccountexporter.h            |   2 +-
 4 files changed, 159 insertions(+), 67 deletions(-)
---
diff --git a/docs/reference/libcloudproviders-sections.txt b/docs/reference/libcloudproviders-sections.txt
index 17b337c..782282a 100644
--- a/docs/reference/libcloudproviders-sections.txt
+++ b/docs/reference/libcloudproviders-sections.txt
@@ -1,72 +1,69 @@
 <SECTION>
-<FILE>cloudprovider</FILE>
-<TITLE>CloudProvider</TITLE>
-cloud_provider_add_account
-cloud_provider_export_account
-cloud_provider_unexport_account
-cloud_provider_export_menu
-cloud_provider_unexport_menu
-cloud_provider_export_action_group
-cloud_provider_unexport_action_group
-cloud_provider_export_objects
-cloud_provider_emit_changed
-cloud_provider_new
+<FILE>cloudproviderexporter</FILE>
+<TITLE>CloudProviderexporter</TITLE>
+cloud_provider_exporter_new
+cloud_provider_exporter_add_account
+cloud_provider_exporter_remove_account
+cloud_provider_exporter_export_objects
+cloud_provider_exporter_emit_account_changed
 <SUBSECTION Standard>
-CLOUD_PROVIDER
-CLOUD_PROVIDER_CLASS
-CLOUD_PROVIDER_GET_CLASS
-CloudProvider
-CloudProviderClass
-IS_CLOUD_PROVIDER
-IS_CLOUD_PROVIDER_CLASS
-TYPE_CLOUD_PROVIDER
-cloud_provider_get_type
+CLOUD_PROVIDER_EXPORTER
+CLOUD_PROVIDER_EXPORTER_CLASS
+CLOUD_PROVIDER_EXPORTER_GET_CLASS
+CloudProviderExporter
+CloudProviderExporterClass
+IS_CLOUD_PROVIDER_EXPORTER
+IS_CLOUD_PROVIDER_EXPORTER_CLASS
+TYPE_CLOUD_PROVIDER_EXPORTER
+cloud_provider_exporter_get_type
 </SECTION>
 
 <SECTION>
-<FILE>cloudprovidermanager</FILE>
-<TITLE>CloudProviderManager</TITLE>
-CLOUD_PROVIDER_MANAGER_DBUS_IFACE
-CLOUD_PROVIDER_MANAGER_DBUS_NAME
-CLOUD_PROVIDER_MANAGER_DBUS_PATH
-cloud_provider_manager_dup_singleton
+<FILE>cloudprovideraccountexporter</FILE>
+<TITLE>CloudProviderAccountExporter</TITLE>
+cloud_provider_account_exporter_new
+cloud_provider_account_exporter_add_menu_model
+cloud_provider_account_exporter_add_action_group
+cloud_provider_account_exporter_remove_menu
+cloud_provider_account_exporter_remove_action_group
 <SUBSECTION Standard>
-CLOUD_PROVIDER_MANAGER
-CLOUD_PROVIDER_MANAGER_CLASS
-CLOUD_PROVIDER_MANAGER_GET_CLASS
-CloudProviderManager
-CloudProviderManagerClass
-IS_CLOUD_PROVIDER_MANAGER
-IS_CLOUD_PROVIDER_MANAGER_CLASS
-TYPE_CLOUD_PROVIDER_MANAGER
-cloud_provider_manager_get_type
+CLOUD_PROVIDER_ACCOUNT_EXPORTER
+CLOUD_PROVIDER_ACCOUNT_EXPORTER_CLASS
+CLOUD_PROVIDER_ACCOUNT_EXPORTER_GET_CLASS
+CloudProviderAccountExporter
+CloudProviderAccountExporterClass
+IS_CLOUD_PROVIDER_ACCOUNT_EXPORTER
+IS_CLOUD_PROVIDER_ACCOUNT_EXPORTER_CLASS
+TYPE_CLOUD_PROVIDER_ACCOUNT_EXPORTER
+cloud_provider_account_exporter_get_type
 </SECTION>
 
 <SECTION>
-<FILE>cloudproviderproxy</FILE>
-<TITLE>CloudProviderProxy</TITLE>
+<FILE>cloudprovideraccount</FILE>
+<TITLE>CloudProviderAccount</TITLE>
 CloudProviderStatus
-cloud_provider_proxy_new
-cloud_provider_proxy_get_name
-cloud_provider_proxy_get_status
-cloud_provider_proxy_get_status_details
-cloud_provider_proxy_get_icon
-cloud_provider_proxy_get_menu_model
-cloud_provider_proxy_get_action_group
-cloud_provider_proxy_get_path
-cloud_provider_proxy_get_owner
-cloud_provider_proxy_is_available
-cloud_provider_proxy_update
+cloud_provider_account_new
+cloud_provider_account_get_name
+cloud_provider_account_get_status
+cloud_provider_account_get_status_details
+cloud_provider_account_get_icon
+cloud_provider_account_get_menu_model
+cloud_provider_account_get_action_group
+cloud_provider_account_get_path
+cloud_provider_account_get_owner
+cloud_provider_account_is_available
+cloud_provider_account_update
+
 <SUBSECTION Standard>
-CLOUD_PROVIDER_PROXY
-CLOUD_PROVIDER_PROXY_CLASS
-CLOUD_PROVIDER_PROXY_GET_CLASS
-CloudProviderProxy
-CloudProviderProxyClass
-IS_CLOUD_PROVIDER_PROXY
-IS_CLOUD_PROVIDER_PROXY_CLASS
-TYPE_CLOUD_PROVIDER_PROXY
-cloud_provider_proxy_get_type
+CLOUD_PROVIDER_ACCOUNT
+CLOUD_PROVIDER_ACCOUNT_CLASS
+CLOUD_PROVIDER_ACCOUNT_GET_CLASS
+CloudProviderAccount
+CloudProviderAccountClass
+IS_CLOUD_PROVIDER_ACCOUNT
+IS_CLOUD_PROVIDER_ACCOUNT_CLASS
+TYPE_CLOUD_PROVIDER_ACCOUNT
+cloud_provider_account_get_type
 </SECTION>
 
 <SECTION>
diff --git a/src/cloudprovideraccount.h b/src/cloudprovideraccount.h
index 9a9d801..cda32a5 100644
--- a/src/cloudprovideraccount.h
+++ b/src/cloudprovideraccount.h
@@ -24,6 +24,15 @@
 
 G_BEGIN_DECLS
 
+/**
+ * CloudProviderStatus:
+ * @CLOUD_PROVIDER_STATUS_INVALID
+ * @CLOUD_PROVIDER_STATUS_IDLE
+ * @CLOUD_PROVIDER_STATUS_SYNCING
+ * @CLOUD_PROVIDER_STATUS_ERROR
+ *
+ * Enum values used to describe the sync status of a cloud providers account
+ **/
 typedef enum {
   CLOUD_PROVIDER_STATUS_INVALID,
   CLOUD_PROVIDER_STATUS_IDLE,
diff --git a/src/cloudprovideraccountexporter.c b/src/cloudprovideraccountexporter.c
index 81570ed..2acff57 100644
--- a/src/cloudprovideraccountexporter.c
+++ b/src/cloudprovideraccountexporter.c
@@ -30,6 +30,13 @@ typedef struct
 
 G_DEFINE_TYPE_WITH_PRIVATE (CloudProviderAccountExporter, cloud_provider_account_exporter, G_TYPE_OBJECT)
 
+/**
+ * SECTION:cloudprovideraccountexporter
+ * @title: CloudProviderAccountExporter
+ * @short_description: Base object for representing a cloud providers account
+ * @include: src/cloudprovideraccountexporter.h
+ */
+
 gchar *
 cloud_provider_account_exporter_get_object_name (CloudProviderAccountExporter *self)
 {
@@ -114,6 +121,13 @@ on_get_status_details (CloudProviderAccountExporter   *self,
   cloud_provider_account1_complete_get_status_details (priv->skeleton, invocation, status_details);
 }
 
+/**
+ * cloud_provider_account_exporter_new:
+ * @object_name: A unique name for the account
+ *               must be a valid DBus object name
+ *
+ * Create a new #CloudProviderAccountExporter object
+ */
 CloudProviderAccountExporter*
 cloud_provider_account_exporter_new (const gchar *object_name)
 {
@@ -136,6 +150,14 @@ cloud_provider_account_exporter_new (const gchar *object_name)
   return self;
 }
 
+/**
+ * cloud_provider_account_exporter_add_menu_model:
+ * @self: The cloud provider account exporter
+ * @menu_model: The g menu model to export
+ *
+ * Add a #GMenuModel to export via DBus which will be shown to the user
+ * for actions with the cloud provider account
+ */
 void
 cloud_provider_account_exporter_add_menu_model (CloudProviderAccountExporter *self,
                                                 GMenuModel                   *menu_model)
@@ -144,6 +166,12 @@ cloud_provider_account_exporter_add_menu_model (CloudProviderAccountExporter *se
   priv->menu_model = menu_model;
 }
 
+/**
+ * cloud_provider_account_exporter_remove_menu:
+ * @self: The cloud provider account exporter
+ *
+ * Remove a menu added with cloud_provider_account_exporter_add_menu_model()
+ */
 void
 cloud_provider_account_exporter_remove_menu (CloudProviderAccountExporter *self)
 {
@@ -151,6 +179,14 @@ cloud_provider_account_exporter_remove_menu (CloudProviderAccountExporter *self)
   priv->menu_model = NULL;
 }
 
+/**
+ * cloud_provider_account_exporter_add_action_group:
+ * @self: The cloud provider account exporter
+ * @action_group: The g action group to export
+ *
+ * Add a #GActionGroup to export via DBus to provide actions for menus exported
+ * with #cloud_provider_account_exporter_add_menu()
+ */
 void
 cloud_provider_account_exporter_add_action_group (CloudProviderAccountExporter *self,
                                                   GActionGroup                 *action_group)
@@ -159,6 +195,12 @@ cloud_provider_account_exporter_add_action_group (CloudProviderAccountExporter *
   priv->action_group = action_group;
 }
 
+/**
+ * cloud_provider_account_exporter_remove_action_group:
+ * @self: The cloud provider account exporter
+ *
+ * Remove an action group added with cloud_provider_account_exporter_add_action_group()
+ */
 void
 cloud_provider_account_exporter_remove_action_group (CloudProviderAccountExporter *self)
 {
@@ -185,15 +227,32 @@ cloud_provider_account_exporter_class_init (CloudProviderAccountExporterClass *k
 
   object_class->finalize = cloud_provider_account_exporter_finalize;
 
+  /**
+   * CloudProviderAccountExporter::handle_get_name:
+   * @self: The CloudProviderAccountExporter emitting the signal
+   *
+   * The ::handle_get_name signal is emitted each time someone tries to get the account name.
+   *
+   * Returns: Return a #gchar in the signal handler
+   */
   g_signal_new ("handle_get_name",
-                  G_TYPE_FROM_CLASS (klass),
-                  G_SIGNAL_RUN_LAST,
-                  0,
-                  NULL,
-                  NULL,
-                  g_cclosure_marshal_generic,
-                  G_TYPE_POINTER,
-                  0);
+                G_TYPE_FROM_CLASS (klass),
+                G_SIGNAL_RUN_LAST,
+                0,
+                NULL,
+                NULL,
+                g_cclosure_marshal_generic,
+                G_TYPE_POINTER,
+                0);
+
+  /**
+   * CloudProviderAccountExporter::handle_get_icon
+   * @self: The CloudProviderAccountExporter emitting the signal
+   *
+   * The ::handle_get_icon signal is emitted each time someone tries to get the account name.
+   *
+   * Returns: Return a #GIcon in the signal handler
+   */
   g_signal_new ("handle_get_icon",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
@@ -203,6 +262,15 @@ cloud_provider_account_exporter_class_init (CloudProviderAccountExporterClass *k
                   g_cclosure_marshal_generic,
                   G_TYPE_POINTER,
                   0);
+
+  /**
+   * CloudProviderAccountExporter::handle_get_path
+   * @self: The #CloudProviderAccountExporter emitting the signal
+   *
+   * The ::handle_get_path signal is emitted each time someone tries to get the path.
+   *
+   * Returns: Return a #gchar in the signal handler
+   */
   g_signal_new ("handle_get_path",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
@@ -212,6 +280,15 @@ cloud_provider_account_exporter_class_init (CloudProviderAccountExporterClass *k
                   g_cclosure_marshal_generic,
                   G_TYPE_POINTER,
                   0);
+
+  /**
+   * CloudProviderAccountExporter::handle_get_status
+   * @self: The CloudProviderAccountExporter emitting the signal
+   *
+   * The ::handle_get_status signal is emitted each time someone tries to get the status.
+   *
+   * Returns: Return a #CloudProviderSyncStatus in the signal handler
+   */
   g_signal_new ("handle_get_status",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
@@ -221,6 +298,15 @@ cloud_provider_account_exporter_class_init (CloudProviderAccountExporterClass *k
                   g_cclosure_marshal_generic,
                   G_TYPE_POINTER,
                   0);
+
+  /**
+   * CloudProviderAccountExporter::handle_get_status_details
+   * @self: The #CloudProviderAccountExporter emitting the signal
+   *
+   * The ::handle_get_status_details signal is emitted each time someone tries to get the status details.
+   *
+   * Returns: Return a #gchar in the signal handler
+   */
   g_signal_new ("handle_get_status_details",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
diff --git a/src/cloudprovideraccountexporter.h b/src/cloudprovideraccountexporter.h
index b0b7ed4..3591728 100644
--- a/src/cloudprovideraccountexporter.h
+++ b/src/cloudprovideraccountexporter.h
@@ -1,4 +1,4 @@
-/* cloudprovideraccount.h
+/* cloudprovideraccountexporter.h
  *
  * Copyright (C) 2017 Julius Haertl <jus bitgrid net>
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]