3
* Copyright (C) 2009 Christian Hergert <chris@dronelabs.com>
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.
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.
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
21
#ifndef __ETHOS_MANAGER_H__
22
#define __ETHOS_MANAGER_H__
24
#include <glib-object.h>
26
#include "ethos-plugin.h"
27
#include "ethos-plugin-info.h"
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))
39
typedef struct _EthosManager EthosManager;
40
typedef struct _EthosManagerClass EthosManagerClass;
41
typedef struct _EthosManagerPrivate EthosManagerPrivate;
47
EthosManagerPrivate *priv;
50
struct _EthosManagerClass
52
GObjectClass parent_class;
54
void (*initialized) (EthosManager *manager);
55
gboolean (*load_plugin) (EthosManager *manager,
58
gboolean (*unload_plugin) (EthosManager *manager,
61
void (*plugin_loaded) (EthosManager *manager,
62
EthosPluginInfo *plugin_info);
63
void (*plugin_unloaded) (EthosManager *manager,
64
EthosPluginInfo *plugin_info);
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);
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,
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,
85
gboolean ethos_manager_unload_plugin (EthosManager *manager,
86
EthosPluginInfo *plugin_info,
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,
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);
101
#endif /* __ETHOS_MANAGER_H__ */