From: Cosimo Cecchi Date: Mon, 4 Aug 2008 10:00:35 +0000 (+0200) Subject: Start documenting objects. X-Git-Tag: 0.1~9 X-Git-Url: https://repo.or.cz/w/mmediamanager.git/commitdiff_plain/696931a9a09830c97b2f2e7db89ae9340298a013 Start documenting objects. --- diff --git a/libmmanager/mm-application-provider.h b/libmmanager/mm-application-provider.h index e1ff7f0..dded93b 100644 --- a/libmmanager/mm-application-provider.h +++ b/libmmanager/mm-application-provider.h @@ -33,9 +33,24 @@ #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); diff --git a/libmmanager/mm-application.h b/libmmanager/mm-application.h index f2eecd1..f635565 100644 --- a/libmmanager/mm-application.h +++ b/libmmanager/mm-application.h @@ -37,6 +37,15 @@ #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); diff --git a/libmmanager/mm-attribute-base-manager.h b/libmmanager/mm-attribute-base-manager.h index af8905b..f9a46eb 100644 --- a/libmmanager/mm-attribute-base-manager.h +++ b/libmmanager/mm-attribute-base-manager.h @@ -38,6 +38,15 @@ #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 #MMAttributes managed by + * #MMAttributeBaseManager have the prefix "base" in their id. + */ + typedef struct _MMAttributeBaseManager MMAttributeBaseManager; typedef struct _MMAttributeBaseManagerClass MMAttributeBaseManagerClass; diff --git a/libmmanager/mm-attribute-manager.h b/libmmanager/mm-attribute-manager.h index 2a74da4..6a17f56 100644 --- a/libmmanager/mm-attribute-manager.h +++ b/libmmanager/mm-attribute-manager.h @@ -38,9 +38,26 @@ #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; diff --git a/libmmanager/mm-attribute.h b/libmmanager/mm-attribute.h index d2c0fe0..7171508 100644 --- a/libmmanager/mm-attribute.h +++ b/libmmanager/mm-attribute.h @@ -24,6 +24,16 @@ #include #include +/** + * 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 */