bed020c97bbb43b73401e5e63766007ea0df830f
[profile/ivi/gsignond.git] / src / daemon / plugins / gsignond-plugin-proxy-factory.h
1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /*
4  * This file is part of gsignond
5  *
6  * Copyright (C) 2012 Intel Corporation.
7  *
8  * Contact: Alexander Kanavin <alex.kanavin@gmail.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23  * 02110-1301 USA
24  */
25
26 #ifndef __GSIGNOND_PLUGIN_PROXY_FACTORY_H__
27 #define __GSIGNOND_PLUGIN_PROXY_FACTORY_H__
28
29 #include <glib-object.h>
30 #include "gsignond-plugin-proxy.h"
31 #include <gsignond/gsignond-config.h>
32
33 #define GSIGNOND_TYPE_PLUGIN_PROXY_FACTORY             (gsignond_plugin_proxy_factory_get_type ())
34 #define GSIGNOND_PLUGIN_PROXY_FACTORY(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSIGNOND_TYPE_PLUGIN_PROXY_FACTORY, GSignondPluginProxyFactory))
35 #define GSIGNOND_IS_PLUGIN_PROXY_FACTORY(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSIGNOND_TYPE_PLUGIN_PROXY_FACTORY))
36 #define GSIGNOND_PLUGIN_PROXY_FACTORY_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GSIGNOND_TYPE_PLUGIN_PROXY_FACTORY, GSignondPluginProxyFactoryClass))
37 #define GSIGNOND_IS_PLUGIN_PROXY_FACTORY_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GSIGNOND_TYPE_PLUGIN_PROXY_FACTORY))
38 #define GSIGNOND_PLUGIN_PROXY_FACTORY_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GSIGNOND_TYPE_PLUGIN_PROXY_FACTORY, GSignondPluginProxyFactoryClass))
39
40
41 typedef struct _GSignondPluginProxyFactory        GSignondPluginProxyFactory;
42 typedef struct _GSignondPluginProxyFactoryClass   GSignondPluginProxyFactoryClass;
43
44 struct _GSignondPluginProxyFactory
45 {
46     GObject parent_instance;
47     
48     /* Private */
49     GSignondConfig *config;
50     GHashTable* plugins;
51     
52     gchar** methods;
53     GHashTable* mechanisms;
54 };
55
56 struct _GSignondPluginProxyFactoryClass
57 {
58     GObjectClass parent_class;
59 };
60
61 GType gsignond_plugin_proxy_factory_get_type (void);
62
63 GSignondPluginProxyFactory* 
64 gsignond_plugin_proxy_factory_new(GSignondConfig *config);
65
66 GSignondPluginProxy*
67 gsignond_plugin_proxy_factory_get_plugin(GSignondPluginProxyFactory* factory,
68                                          const gchar* plugin_type);
69
70 gboolean gsignond_plugin_proxy_factory_add_plugin(
71     GSignondPluginProxyFactory* factory,
72     GSignondPluginProxy* proxy);
73     
74 const gchar** 
75 gsignond_plugin_proxy_factory_get_plugin_types(
76    GSignondPluginProxyFactory* factory);
77    
78 const gchar**
79 gsignond_plugin_proxy_factory_get_plugin_mechanisms(
80    GSignondPluginProxyFactory* factory, const gchar* plugin_type);
81    
82
83 #endif /* __GSIGNOND_PLUGIN_PROXY_FACTORY_H__ */