Add manifest and fix packaging
[profile/ivi/libgsignon-glib.git] / libgsignon-glib / signon-auth-service.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 libgsignon-glib
5  *
6  * Copyright (C) 2009-2010 Nokia Corporation.
7  *
8  * Contact: Alberto Mardegan <alberto.mardegan@nokia.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 License
12  * version 2.1 as published by the Free Software Foundation.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22  * 02110-1301 USA
23  */
24
25 #ifndef _SIGNON_AUTH_SERVICE_H_
26 #define _SIGNON_AUTH_SERVICE_H_
27
28 #include <glib-object.h>
29
30 G_BEGIN_DECLS
31
32 #define SIGNON_TYPE_AUTH_SERVICE             (signon_auth_service_get_type ())
33 #define SIGNON_AUTH_SERVICE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIGNON_TYPE_AUTH_SERVICE, SignonAuthService))
34 #define SIGNON_AUTH_SERVICE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), SIGNON_TYPE_AUTH_SERVICE, SignonAuthServiceClass))
35 #define SIGNON_IS_AUTH_SERVICE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIGNON_TYPE_AUTH_SERVICE))
36 #define SIGNON_IS_AUTH_SERVICE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), SIGNON_TYPE_AUTH_SERVICE))
37 #define SIGNON_AUTH_SERVICE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), SIGNON_TYPE_AUTH_SERVICE, SignonAuthServiceClass))
38
39 typedef struct _SignonAuthServiceClass SignonAuthServiceClass;
40 typedef struct _SignonAuthServicePrivate SignonAuthServicePrivate;
41 typedef struct _SignonAuthService SignonAuthService;
42
43 /**
44  * SignonAuthServiceClass:
45  * @parent_class: a reference to the parent class
46  *
47  * Opaque struct. Use the accessor functions below.
48  */
49 struct _SignonAuthServiceClass
50 {
51     GObjectClass parent_class;
52 };
53
54 /**
55  * SignonAuthService:
56  *
57  * Opaque struct. Use the accessor functions below.
58  */
59 struct _SignonAuthService
60 {
61     GObject parent_instance;
62     SignonAuthServicePrivate *priv;
63 };
64
65 GType signon_auth_service_get_type (void) G_GNUC_CONST;
66
67 typedef void (*SignonQueryMethodsCb) (SignonAuthService *auth_service,
68                                       gchar **methods,
69                                       const GError *error,
70                                       gpointer user_data);
71
72 typedef void (*SignonQueryMechanismCb) (SignonAuthService *auth_service,
73                                         const gchar *method,
74                                         gchar **mechanisms,
75                                         const GError *error,
76                                         gpointer user_data);
77
78 /**
79  * SignonIdentityList:
80  *
81  * GList of #SignonIdentity items.
82  */
83 typedef GList SignonIdentityList;
84
85 /**
86  * SignonIdentityFilter:
87  *
88  * #GHashTable based filter variant dictionary.
89  */
90 typedef GHashTable SignonIdentityFilter;
91
92 typedef void (*SignonQueryIdentitiesCb) (SignonAuthService *auth_service,
93                                          SignonIdentityList *identities,
94                                          const GError *error,
95                                          gpointer user_data);
96
97 SignonAuthService *signon_auth_service_new ();
98
99 void signon_auth_service_query_methods (SignonAuthService *auth_service,
100                                         SignonQueryMethodsCb cb,
101                                         gpointer user_data);
102
103 void signon_auth_service_query_mechanisms (SignonAuthService *auth_service,
104                                            const gchar *method,
105                                            SignonQueryMechanismCb cb,
106                                            gpointer user_data);
107
108 void signon_auth_service_query_identities (SignonAuthService *auth_service,
109                                            SignonIdentityFilter *filter,
110                                            const gchar *application_context,
111                                            SignonQueryIdentitiesCb cb,
112                                            gpointer user_data);
113
114 G_END_DECLS
115
116 #endif /* _SIGNON_AUTH_SERVICE_H_ */