Imported Upstream version 0.0.1
[profile/ivi/signonui-efl.git] / src / sso-ui-dialog.h
1 /*
2  * This file is part of signonui-efl
3  *
4  * Copyright (C) 2013 Intel Corporation.
5  *
6  * Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  */
23
24 #ifndef __SSO_UI_DIALOG_H__
25 #define __SSO_UI_DIALOG_H__
26
27 #include <glib-object.h>
28 #include <gio/gio.h>
29 #include <gsignond/gsignond-signonui-data.h>
30
31 G_BEGIN_DECLS
32
33 #define SSO_TYPE_UI_DIALOG sso_ui_dialog_get_type()
34
35 #define SSO_UI_DIALOG(obj) \
36   (G_TYPE_CHECK_INSTANCE_CAST ((obj), SSO_TYPE_UI_DIALOG, SSOUIDialog))
37
38 #define SSO_UI_DIALOG_CLASS(klass) \
39   (G_TYPE_CHECK_CLASS_CAST ((klass), SSO_TYPE_UI_DIALOG, SSOUIDialogClass))
40
41 #define SSO_IS_UI_DIALOG(obj) \
42   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SSO_TYPE_UI_DIALOG))
43
44 #define SSO_IS_UI_DIALOG_CLASS(klass) \
45   (G_TYPE_CHECK_CLASS_TYPE ((klass), SSO_TYPE_UI_DIALOG))
46
47 #define SSO_UI_DIALOG_GET_CLASS(obj) \
48   (G_TYPE_INSTANCE_GET_CLASS ((obj), SSO_TYPE_UI_DIALOG, SSOUIDialogClass))
49
50 typedef struct _SSOUIDialogPrivate SSOUIDialogPrivate;
51
52 typedef struct _SSOUIDialog {
53   GObject parent;
54   SSOUIDialogPrivate *priv;
55 } SSOUIDialog;
56
57 typedef struct _SSOUIDialogClass {
58   GObjectClass parent_class;
59   void (* closed) (SSOUIDialog *dialog);
60 } SSOUIDialogClass;
61
62 GType sso_ui_dialog_get_type (void) G_GNUC_CONST;
63
64 SSOUIDialog*           sso_ui_dialog_new              (GSignondSignonuiData *parameters, GDBusMethodInvocation *invocation);
65
66 void                   sso_ui_dialog_set_parameters   (SSOUIDialog *self, GSignondSignonuiData *parameters);
67 gboolean               sso_ui_dialog_refresh_captcha  (SSOUIDialog * self, const gchar *url);
68
69 GDBusMethodInvocation* sso_ui_dialog_get_invocation   (SSOUIDialog *dialog);
70 const gchar*           sso_ui_dialog_get_request_id   (SSOUIDialog *dialog);
71 GSignondSignonuiData*  sso_ui_dialog_get_return_value (SSOUIDialog *dialog);
72
73 gboolean               sso_ui_dialog_show             (SSOUIDialog *dialog);
74 void                   sso_ui_dialog_close            (SSOUIDialog *dialog);
75
76 G_END_DECLS
77
78 #endif /* __SSO_UI_DIALOG_H__ */