~cyphermox/ethos/debian

« back to all changes in this revision

Viewing changes to ethos/ethos-manager.h

  • Committer: Mathieu Trudel-Lapierre
  • Date: 2011-07-27 00:48:52 UTC
  • Revision ID: mathieu-tl@ubuntu.com-20110727004852-t7bz3ye3ugttb9aq
Clean tree to get to a merge-mode package tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ethos-manager.h
2
 
 *
3
 
 * Copyright (C) 2009 Christian Hergert <chris@dronelabs.com>
4
 
 *
5
 
 * This library is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU Library 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.
9
 
 *
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
 
 * Library General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU Library General Public
16
 
 * License along with this library; if not, write to the Free Software
17
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 
18
 
 * 02110-1301 USA
19
 
 */
20
 
 
21
 
#ifndef __ETHOS_MANAGER_H__
22
 
#define __ETHOS_MANAGER_H__
23
 
 
24
 
#include <glib-object.h>
25
 
 
26
 
#include "ethos-plugin.h"
27
 
#include "ethos-plugin-info.h"
28
 
 
29
 
G_BEGIN_DECLS
30
 
 
31
 
#define ETHOS_TYPE_MANAGER              (ethos_manager_get_type ())
32
 
#define ETHOS_MANAGER(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), ETHOS_TYPE_MANAGER, EthosManager))
33
 
#define ETHOS_MANAGER_CONST(obj)        (G_TYPE_CHECK_INSTANCE_CAST ((obj), ETHOS_TYPE_MANAGER, EthosManager const))
34
 
#define ETHOS_MANAGER_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass),  ETHOS_TYPE_MANAGER, EthosManagerClass))
35
 
#define ETHOS_IS_MANAGER(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ETHOS_TYPE_MANAGER))
36
 
#define ETHOS_IS_MANAGER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass),  ETHOS_TYPE_MANAGER))
37
 
#define ETHOS_MANAGER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj),  ETHOS_TYPE_MANAGER, EthosManagerClass))
38
 
 
39
 
typedef struct _EthosManager            EthosManager;
40
 
typedef struct _EthosManagerClass       EthosManagerClass;
41
 
typedef struct _EthosManagerPrivate     EthosManagerPrivate;
42
 
 
43
 
struct _EthosManager
44
 
{
45
 
        GObject parent;
46
 
 
47
 
        EthosManagerPrivate *priv;
48
 
};
49
 
 
50
 
struct _EthosManagerClass
51
 
{
52
 
        GObjectClass parent_class;
53
 
 
54
 
        void     (*initialized)     (EthosManager     *manager);
55
 
        gboolean (*load_plugin)     (EthosManager     *manager,
56
 
                                     EthosPlugin      *plugin,
57
 
                                     GError          **error);
58
 
        gboolean (*unload_plugin)   (EthosManager     *manager,
59
 
                                     EthosPlugin      *plugin,
60
 
                                     GError          **error);
61
 
        void     (*plugin_loaded)   (EthosManager     *manager,
62
 
                                     EthosPluginInfo  *plugin_info);
63
 
        void     (*plugin_unloaded) (EthosManager     *manager,
64
 
                                     EthosPluginInfo  *plugin_info);
65
 
 
66
 
        void     (*reserved1)       (void);
67
 
        void     (*reserved2)       (void);
68
 
        void     (*reserved3)       (void);
69
 
        void     (*reserved4)       (void);
70
 
        void     (*reserved5)       (void);
71
 
        void     (*reserved6)       (void);
72
 
        void     (*reserved7)       (void);
73
 
        void     (*reserved8)       (void);
74
 
};
75
 
 
76
 
GType                  ethos_manager_get_type           (void) G_GNUC_CONST;
77
 
EthosManager*          ethos_manager_new                (void);
78
 
EthosManager*          ethos_manager_new_full           (const gchar      *app_name,
79
 
                                                         gchar           **plugin_dirs);
80
 
void                   ethos_manager_initialize         (EthosManager     *manager);
81
 
void                   ethos_manager_unload             (EthosManager     *manager);
82
 
gboolean               ethos_manager_load_plugin        (EthosManager     *manager,
83
 
                                                         EthosPluginInfo  *plugin_info,
84
 
                                                         GError          **error);
85
 
gboolean               ethos_manager_unload_plugin      (EthosManager     *manager,
86
 
                                                         EthosPluginInfo  *plugin_info,
87
 
                                                         GError          **error);
88
 
GList*                 ethos_manager_get_plugin_info    (EthosManager     *manager);
89
 
EthosPlugin*           ethos_manager_get_plugin         (EthosManager     *manager,
90
 
                                                         EthosPluginInfo  *plugin_info);
91
 
GList*                 ethos_manager_get_plugin_loaders (EthosManager     *manager);
92
 
G_CONST_RETURN gchar** ethos_manager_get_plugin_dirs    (EthosManager     *manager);
93
 
void                   ethos_manager_set_plugin_dirs    (EthosManager     *manager,
94
 
                                                         gchar           **plugin_dirs);
95
 
G_CONST_RETURN gchar*  ethos_manager_get_app_name       (EthosManager     *manager);
96
 
void                   ethos_manager_set_app_name       (EthosManager     *manager,
97
 
                                                         const gchar      *app_name);
98
 
 
99
 
G_END_DECLS
100
 
 
101
 
#endif /* __ETHOS_MANAGER_H__ */