Update to upstream 1.0.1
[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         const gchar* loader_path,
75         const gchar* plugin_type,
76         gint timeout);
77
78 void 
79 gsignond_plugin_proxy_cancel (
80         GSignondPluginProxy *self,
81         GSignondAuthSession* session);
82 void
83 gsignond_plugin_proxy_process (
84         GSignondPluginProxy *self,
85         GSignondAuthSession* session,
86         GSignondSessionData *session_data,
87         GSignondDictionary *identity_method_cache,
88         const gchar *mechanism,
89         gpointer userdata);
90 void
91 gsignond_plugin_proxy_user_action_finished (
92         GSignondPluginProxy *self,
93         GSignondSignonuiData *ui_data);
94 void
95 gsignond_plugin_proxy_refresh (
96         GSignondPluginProxy *self,
97         GSignondSignonuiData *ui_data);
98
99 #endif /* __GSIGNOND_PLUGIN_PROXY_H__ */