Update to upstream 1.0.1
[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* methods_to_mechanisms;
54     GHashTable* methods_to_loader_paths;
55 };
56
57 struct _GSignondPluginProxyFactoryClass
58 {
59     GObjectClass parent_class;
60 };
61
62 GType gsignond_plugin_proxy_factory_get_type (void);
63
64 GSignondPluginProxyFactory* 
65 gsignond_plugin_proxy_factory_new(GSignondConfig *config);
66
67 GSignondPluginProxy*
68 gsignond_plugin_proxy_factory_get_plugin(GSignondPluginProxyFactory* factory,
69                                          const gchar* plugin_type);
70
71 const gchar** 
72 gsignond_plugin_proxy_factory_get_plugin_types(
73    GSignondPluginProxyFactory* factory);
74    
75 const gchar**
76 gsignond_plugin_proxy_factory_get_plugin_mechanisms(
77    GSignondPluginProxyFactory* factory, const gchar* plugin_type);
78    
79
80 #endif /* __GSIGNOND_PLUGIN_PROXY_FACTORY_H__ */