4ca48656ab63544b4b8214e7d87395f77cdefe8d
[profile/ivi/gsignond.git] / include / gsignond / gsignond-session-data.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-2013 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, but
16  * 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_SESSION_DATA_H__
27 #define __GSIGNOND_SESSION_DATA_H__
28
29 #include <gsignond/gsignond-dictionary.h>
30
31 G_BEGIN_DECLS
32
33 #define GSIGNOND_TYPE_SESSION_DATA (GSIGNOND_TYPE_DICTIONARY)
34
35 #define GSIGNOND_SESSION_DATA(obj) \
36     (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
37                                  GSIGNOND_TYPE_SESSION_DATA, \
38                                  GSignondSessionData))
39 #define GSIGNOND_IS_SESSION_DATA(obj) \
40     (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
41                                  GSIGNOND_TYPE_SESSION_DATA))
42
43 typedef GSignondDictionary GSignondSessionData;
44
45 typedef enum {
46     GSIGNOND_UI_POLICY_DEFAULT = 0,
47     GSIGNOND_UI_POLICY_REQUEST_PASSWORD,
48     GSIGNOND_UI_POLICY_NO_USER_INTERACTION,
49     GSIGNOND_UI_POLICY_VALIDATION
50 } GSignondUiPolicy;
51
52
53 const gchar *
54 gsignond_session_data_get_username (GSignondSessionData *data);
55
56 void
57 gsignond_session_data_set_username (GSignondSessionData *data, 
58                                     const gchar *username);
59
60 const gchar *
61 gsignond_session_data_get_secret (GSignondSessionData *data);
62
63 void
64 gsignond_session_data_set_secret (GSignondSessionData *data, 
65                                   const gchar *secret);
66
67 const gchar *
68 gsignond_session_data_get_realm (GSignondSessionData *data);
69
70 void
71 gsignond_session_data_set_realm (GSignondSessionData *data,
72                                  const gchar *realm);
73
74 const gchar *
75 gsignond_session_data_get_caption (GSignondSessionData *data);
76
77 void
78 gsignond_session_data_set_caption (GSignondSessionData *data,
79                                    const gchar *caption);
80
81 gboolean
82 gsignond_session_data_get_renew_token (GSignondSessionData *data,
83                                        gboolean *renew_token);
84
85 void
86 gsignond_session_data_set_renew_token (GSignondSessionData *data,
87                                        gboolean renew_token);
88
89 gboolean
90 gsignond_session_data_get_ui_policy (GSignondSessionData *data,
91                                      GSignondUiPolicy *ui_policy);
92
93 void
94 gsignond_session_data_set_ui_policy (GSignondSessionData *data,
95                                      GSignondUiPolicy ui_policy);
96
97 const gchar *
98 gsignond_session_data_get_network_proxy (GSignondSessionData *data);
99
100 void
101 gsignond_session_data_set_network_proxy (GSignondSessionData *data,
102                                          const gchar *network_proxy);
103
104 gboolean
105 gsignond_session_data_get_network_timeout (GSignondSessionData *data,
106                                            guint32 *network_timeout);
107
108 void
109 gsignond_session_data_set_network_timeout (GSignondSessionData *data,
110                                            guint32 network_timeout);
111
112 gboolean
113 gsignond_session_data_get_window_id (GSignondSessionData *data,
114                                      guint32 *window_id);
115
116 void
117 gsignond_session_data_set_window_id (GSignondSessionData *data,
118                                      guint32 window_id);
119
120
121 G_END_DECLS
122
123 #endif /* __GSIGNOND_SESSION_DATA_H__ */