~ubuntu-branches/ubuntu/trusty/unity-control-center/trusty

« back to all changes in this revision

Viewing changes to panels/user-accounts/um-realm-manager.h

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2014-01-08 16:29:18 UTC
  • Revision ID: package-import@ubuntu.com-20140108162918-g29dd08tr913y2qh
Tags: upstream-14.04.0
ImportĀ upstreamĀ versionĀ 14.04.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
 
2
 *
 
3
 * Copyright 2012  Red Hat, Inc.
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation; either version 2 of the License, or
 
8
 * (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
 *
 
19
 * Written by: Stef Walter <stefw@gnome.org>
 
20
 */
 
21
 
 
22
#ifndef __UM_REALM_MANAGER_H__
 
23
#define __UM_REALM_MANAGER_H__
 
24
 
 
25
#include "um-realm-generated.h"
 
26
 
 
27
G_BEGIN_DECLS
 
28
 
 
29
typedef enum {
 
30
        UM_REALM_ERROR_BAD_LOGIN,
 
31
        UM_REALM_ERROR_BAD_PASSWORD,
 
32
        UM_REALM_ERROR_GENERIC,
 
33
} UmRealmErrors;
 
34
 
 
35
#define UM_REALM_ERROR             (um_realm_error_get_quark ())
 
36
 
 
37
GQuark           um_realm_error_get_quark         (void) G_GNUC_CONST;
 
38
 
 
39
#define UM_TYPE_REALM_MANAGER      (um_realm_manager_get_type ())
 
40
#define UM_REALM_MANAGER(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), UM_TYPE_REALM_MANAGER, UmRealmManager))
 
41
#define UM_IS_REALM_MANAGER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UM_TYPE_REALM_MANAGER))
 
42
 
 
43
typedef struct _UmRealmManager UmRealmManager;
 
44
 
 
45
GType            um_realm_manager_get_type        (void) G_GNUC_CONST;
 
46
 
 
47
void             um_realm_manager_new             (GCancellable *cancellable,
 
48
                                                   GAsyncReadyCallback callback,
 
49
                                                   gpointer user_data);
 
50
 
 
51
UmRealmManager * um_realm_manager_new_finish      (GAsyncResult *result,
 
52
                                                   GError **error);
 
53
 
 
54
void             um_realm_manager_discover        (UmRealmManager *self,
 
55
                                                   const gchar *input,
 
56
                                                   GCancellable *cancellable,
 
57
                                                   GAsyncReadyCallback callback,
 
58
                                                   gpointer user_data);
 
59
 
 
60
GList *          um_realm_manager_discover_finish (UmRealmManager *self,
 
61
                                                   GAsyncResult *result,
 
62
                                                   GError **error);
 
63
 
 
64
GList *          um_realm_manager_get_realms      (UmRealmManager *self);
 
65
 
 
66
void             um_realm_login                   (UmRealmObject *realm,
 
67
                                                   const gchar *login,
 
68
                                                   const gchar *password,
 
69
                                                   GCancellable *cancellable,
 
70
                                                   GAsyncReadyCallback callback,
 
71
                                                   gpointer user_data);
 
72
 
 
73
gboolean         um_realm_login_finish            (GAsyncResult *result,
 
74
                                                   GBytes **credentials,
 
75
                                                   GError **error);
 
76
 
 
77
gboolean         um_realm_join_as_user            (UmRealmObject *realm,
 
78
                                                   const gchar *login,
 
79
                                                   const gchar *password,
 
80
                                                   GBytes *credentials,
 
81
                                                   GCancellable *cancellable,
 
82
                                                   GAsyncReadyCallback callback,
 
83
                                                   gpointer user_data)
 
84
                                                   G_GNUC_WARN_UNUSED_RESULT;
 
85
 
 
86
gboolean         um_realm_join_as_admin           (UmRealmObject *realm,
 
87
                                                   const gchar *login,
 
88
                                                   const gchar *password,
 
89
                                                   GBytes *credentials,
 
90
                                                   GCancellable *cancellable,
 
91
                                                   GAsyncReadyCallback callback,
 
92
                                                   gpointer user_data)
 
93
                                                   G_GNUC_WARN_UNUSED_RESULT;
 
94
 
 
95
gboolean         um_realm_join_finish             (UmRealmObject *realm,
 
96
                                                   GAsyncResult *result,
 
97
                                                   GError **error);
 
98
 
 
99
gboolean         um_realm_is_configured           (UmRealmObject *realm);
 
100
 
 
101
gchar *          um_realm_calculate_login         (UmRealmCommon *realm,
 
102
                                                   const gchar *username);
 
103
 
 
104
G_END_DECLS
 
105
 
 
106
#endif /* __UM_REALM_H__ */