1 /* 2 * e-module.h 3 * 4 * This library is free software: you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as published by 6 * the Free Software Foundation. 7 * 8 * This library is distributed in the hope that it will be useful, but 9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 11 * for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public License 14 * along with this library. If not, see <http://www.gnu.org/licenses/>. 15 * 16 */ 17 18 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION) 19 #error "Only <libedataserver/libedataserver.h> should be included directly." 20 #endif 21 22 #ifndef E_MODULE_H 23 #define E_MODULE_H 24 25 #include <gmodule.h> 26 #include <glib-object.h> 27 28 /* Standard GObject macros */ 29 #define E_TYPE_MODULE \ 30 (e_module_get_type ()) 31 #define E_MODULE(obj) \ 32 (G_TYPE_CHECK_INSTANCE_CAST \ 33 ((obj), E_TYPE_MODULE, EModule)) 34 #define E_MODULE_CLASS(cls) \ 35 (G_TYPE_CHECK_CLASS_CAST \ 36 ((cls), E_TYPE_MODULE, EModuleClass)) 37 #define E_IS_MODULE(obj) \ 38 (G_TYPE_CHECK_INSTANCE_TYPE \ 39 ((obj), E_TYPE_MODULE)) 40 #define E_IS_MODULE_CLASS(cls) \ 41 (G_TYPE_CHECK_CLASS_TYPE \ 42 ((cls), E_TYPE_MODULE)) 43 #define E_MODULE_GET_CLASS(obj) \ 44 (G_TYPE_INSTANCE_GET_CLASS \ 45 ((obj), E_TYPE_MODULE, EModuleClass)) 46 47 G_BEGIN_DECLS 48 49 typedef struct _EModule EModule; 50 typedef struct _EModuleClass EModuleClass; 51 typedef struct _EModulePrivate EModulePrivate; 52 53 /** 54 * EModule: 55 * 56 * Contains only private data that should be read and manipulated using the 57 * functions below. 58 * 59 * Since: 3.4 60 **/ 61 struct _EModule { 62 /*< private >*/ 63 GTypeModule parent; 64 EModulePrivate *priv; 65 }; 66 67 struct _EModuleClass { 68 GTypeModuleClass parent_class; 69 }; 70 71 GType e_module_get_type (void) G_GNUC_CONST; 72 EModule * e_module_new (const gchar *filename); 73 const gchar * e_module_get_filename (EModule *module); 74 EModule * e_module_load_file (const gchar *filename); 75 GList * e_module_load_all_in_directory (const gchar *dirname); 76 GList * e_module_load_all_in_directory_and_prefixes 77 (const gchar *dirname, 78 const gchar *dirprefix); 79 80 G_END_DECLS 81 82 #endif /* E_MODULE_H */ 83