Add doc files to dist and fix version number in NEWS.
[mmediamanager.git] / libmmanager / mm-module.h
blob0c375719e79cf56388e98a173188d6b7c2fe1350
1 /* MManager - a Desktop wide manager for multimedia applications.
3 * Copyright (C) 2008 Cosimo Cecchi <cosimoc@gnome.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __MM_MODULE_H__
22 #define __MM_MODULE_H__
24 #include <glib-object.h>
25 #include <glib.h>
27 #include "mm-hit-collection-provider.h"
28 #include "mm-application-provider.h"
29 #include "mm-category-provider.h"
31 #define MM_TYPE_MODULE (mm_module_get_type ())
32 #define MM_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
33 MM_TYPE_MODULE, MMModule))
34 #define MM_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
35 MM_TYPE_MODULE, MMModuleClass))
36 #define MM_IS_MODULE(obj) (G_TYPE_INSTANCE_CHECK_TYPE ((obj),\
37 MM_TYPE_MODULE))
38 #define MM_IS_MODULE_CLASS(klass) (G_TYPE_CLASS_CHECK_CLASS_TYPE ((klass),\
39 MM_TYPE_MODULE))
41 /**
42 * SECTION:mm-module
43 * @short_description: module.
45 * #MMModule is a #GTypeModule for a registered application. An application
46 * which wants to use the the library has to implement all the methods of the
47 * interface, and create his own implementations for all the three providers.
50 typedef struct _MMModule MMModule;
51 typedef struct _MMModulePrivate MMModulePrivate;
52 typedef struct _MMModuleClass MMModuleClass;
54 /**
55 * MMModule:
56 * @initialize: function that will be called to initialize the module.
57 * @shutdown: function that will be called to shutdown the module.
58 * @get_types: returns an array of the #GType of provider implementations.
59 * @get_name: returns the module name.
61 * Class for extending libmmanager with new applications.
64 struct _MMModule {
65 GTypeModule parent;
67 MMModulePrivate *details;
69 /* module symbols here */
70 void (* initialize) (GTypeModule *module);
71 void (* shutdown) (void);
72 void (* get_types) (GType **gtypes);
73 void (* get_name ) (char **name);
76 struct _MMModuleClass {
77 GTypeModuleClass parent_class;
80 /* public methods */
81 GType mm_module_get_type (void);
82 MMModule* mm_module_load_file (const char *path);
84 MMApplicationProvider* mm_module_get_application_provider (MMModule *module);
85 MMCategoryProvider* mm_module_get_category_provider (MMModule *module);
86 MMHitCollectionProvider* mm_module_get_hit_collection_provider (MMModule *module);
87 char* mm_module_get_name (MMModule *module);
89 #endif /* __MM_MODULE_H__ */