Start documenting objects.
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 4 Aug 2008 10:00:35 +0000 (4 12:00 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 4 Aug 2008 10:00:35 +0000 (4 12:00 +0200)
libmmanager/mm-application-provider.h
libmmanager/mm-application.h
libmmanager/mm-attribute-base-manager.h
libmmanager/mm-attribute-manager.h
libmmanager/mm-attribute.h

index e1ff7f0..dded93b 100644 (file)
 #define MM_APPLICATION_PROVIDER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj),\
                                                 MM_TYPE_APPLICATION_PROVIDER, MMApplicationProviderIface))
 
+/**
+ * MMApplicationProvider:
+ *
+ * A handle to an object implementing the #MMApplicationProviderIface iterface.
+ * You need this to build a #MMApplication object if you're using #MMModule.
+ */
+
 typedef struct _MMApplicationProvider MMApplicationProvider;
 typedef struct _MMApplicationProviderIface MMApplicationProviderIface;
 
+/**
+ * MMApplicationProviderIface:
+ * @interface: the parent interface.
+ * @get_application: Gets the implemented #MMApplication object.
+ *
+ * Interface to build #MMApplication objects with #MMModule.
+ */
+
 struct _MMApplicationProviderIface {
   GTypeInterface interface;
 
@@ -43,6 +58,7 @@ struct _MMApplicationProviderIface {
 };
 
 /* Interface functions */
+
 GType           mm_application_provider_get_type        (void);
 MMApplication*  mm_application_provider_get_application (MMApplicationProvider *provider);
 
index f2eecd1..f635565 100644 (file)
 #define MM_APPLICATION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),\
                                         MM_TYPE_APPLICATION, MMApplicationClass))
 
+/**
+ * MMApplication:
+ *
+ * An object which identifies an application inside the library. This object
+ * has two implementations: #MMSoApplication and #MMDBusApplication, which
+ * allow a library client to implement the object either using #MMModule
+ * or DBus facilities.
+ */
+
 typedef struct _MMApplication        MMApplication;
 typedef struct _MMApplicationDetails MMApplicationDetails;
 typedef struct _MMApplicationClass   MMApplicationClass;
@@ -46,6 +55,14 @@ struct _MMApplication {
   MMApplicationDetails *details;
 };
 
+/**
+ * MMApplicationClass:
+ * @parent_class: the parent class.
+ * @get_categories: gets all the categories inside the application.
+ *
+ * The class of a #MMApplication object.
+ */
+
 struct _MMApplicationClass {
   GObjectClass parent_class;
 
@@ -61,8 +78,6 @@ void                  mm_application_set_attributes    (MMApplication     *appli
                                                         const char        *desktop_id,
                                                         MMApplicationType  supported_type,
                                                         const char        *id);
-
-/* return the list of the categories inside the application */
 GList*                mm_application_get_categories    (MMApplication     *application,
                                                         GError           **error);
 
index af8905b..f9a46eb 100644 (file)
 #define MM_ATTRIBUTE_BASE_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),\
                                                    MM_TYPE_ATTRIBUTE_BASE_MANAGER, MMAttributeBaseManagerClass))
 
+/**
+ * MMAttributeBaseManager:
+ *
+ * Implementation of a #MMAttributeManager for basic attributes. Currently the
+ * only supported attributes are "uri" and "name", but this could be easily
+ * extended with basically no effort. The #MMAttribute<!-- -->s managed by
+ * #MMAttributeBaseManager have the prefix "base" in their id.
+ */
+
 typedef struct _MMAttributeBaseManager MMAttributeBaseManager;
 typedef struct _MMAttributeBaseManagerClass MMAttributeBaseManagerClass;
 
index 2a74da4..6a17f56 100644 (file)
 #define MM_ATTRIBUTE_MANAGER_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE((obj),\
                                               MM_TYPE_ATTRIBUTE_MANAGER, MMAttributeManagerIface))
 
+/**
+ * MMAttributeManager:
+ *
+ * An object implementing the #MMAttributeManagerIface interface. It manages and
+ * owns a number of attributes, offering the chance to look them up by their
+ * unique id.
+ */
+
 typedef struct _MMAttributeManager      MMAttributeManager;
 typedef struct _MMAttributeManagerIface MMAttributeManagerIface;
 
+/**
+ * MMAttributeManagerIface:
+ * @base_iface: parent interface.
+ * @get_supported_attributes: Gets a #GList of all the supported attributes.
+ * @lookup_attribute: Gets the attribute with the specified id.
+ *
+ * Interface to manage #MMAttribute objects.
+ */
+
 struct _MMAttributeManagerIface {
   GTypeInterface base_iface;
 
index d2c0fe0..7171508 100644 (file)
 #include <glib.h>
 #include <glib-object.h>
 
+/**
+ * MMAttribute:
+ *
+ * Structure defining an attribute which the #MMCollection can be queried on.
+ * This structure is used both to build #MMFilterParam and #MMHit objects.
+ * The attributes should always be static and owned by the library, and you
+ * should use a #MMAttributeManager (either a stock one or a custom
+ * implementation of the interface) to get the #MMAttribute.
+ */
+
 typedef struct _MMAttribute      MMAttribute;
 
 /* public methods */