d5b5bc1e4744b11b6ebf80510b8ada3b13a8de65
[profile/ivi/gsignond.git] / src / daemon / plugins / gsignond-plugin-proxy.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_H__
27 #define __GSIGNOND_PLUGIN_PROXY_H__
28
29 #include <glib-object.h>
30
31 #include "common/gsignond-disposable.h"
32 #include "daemon/gsignond-types.h"
33 #include <gsignond/gsignond-plugin-interface.h>
34 #include <gsignond/gsignond-config.h>
35
36 #define GSIGNOND_TYPE_PLUGIN_PROXY \
37     (gsignond_plugin_proxy_get_type ())
38 #define GSIGNOND_PLUGIN_PROXY(obj) \
39     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSIGNOND_TYPE_PLUGIN_PROXY, \
40             GSignondPluginProxy))
41 #define GSIGNOND_IS_PLUGIN_PROXY(obj) \
42     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSIGNOND_TYPE_PLUGIN_PROXY))
43 #define GSIGNOND_PLUGIN_PROXY_CLASS(klass) \
44     (G_TYPE_CHECK_CLASS_CAST ((klass), GSIGNOND_TYPE_PLUGIN_PROXY, \
45             GSignondPluginProxyClass))
46 #define GSIGNOND_IS_PLUGIN_PROXY_CLASS(klass) \
47     (G_TYPE_CHECK_CLASS_TYPE ((klass), GSIGNOND_TYPE_PLUGIN_PROXY))
48 #define GSIGNOND_PLUGIN_PROXY_GET_CLASS(obj) \
49     (G_TYPE_INSTANCE_GET_CLASS ((obj), GSIGNOND_TYPE_PLUGIN_PROXY, \
50             GSignondPluginProxyClass))
51
52 typedef struct _GSignondPluginProxy        GSignondPluginProxy;
53 typedef struct _GSignondPluginProxyClass   GSignondPluginProxyClass;
54 typedef struct _GSignondPluginProxyPrivate GSignondPluginProxyPrivate;
55
56 struct _GSignondPluginProxy
57 {
58     GSignondDisposable parent_instance;
59     
60     /* Private */
61     GSignondPluginProxyPrivate *priv;
62 };
63
64 struct _GSignondPluginProxyClass
65 {
66     GSignondDisposableClass parent_class;
67 };
68
69 GType
70 gsignond_plugin_proxy_get_type (void);
71
72 GSignondPluginProxy* 
73 gsignond_plugin_proxy_new(
74         GSignondConfig *config,
75         const gchar* plugin_type);
76
77 void 
78 gsignond_plugin_proxy_cancel (
79         GSignondPluginProxy *self,
80         GSignondAuthSession* session);
81 void
82 gsignond_plugin_proxy_process (
83         GSignondPluginProxy *self,
84         GSignondAuthSession* session,
85         GSignondSessionData *session_data,
86         GSignondDictionary *identity_method_cache,
87         const gchar *mechanism,
88         gpointer userdata);
89 void
90 gsignond_plugin_proxy_user_action_finished (
91         GSignondPluginProxy *self,
92         GSignondSignonuiData *ui_data);
93 void
94 gsignond_plugin_proxy_refresh (
95         GSignondPluginProxy *self,
96         GSignondSignonuiData *ui_data);
97
98 #endif /* __GSIGNOND_PLUGIN_PROXY_H__ */