GCC Code Coverage Report


Directory: ./
File: panels/system/users/cc-realm-manager.h
Date: 2024-05-04 07:58:27
Exec Total Coverage
Lines: 0 1 0.0%
Functions: 0 2 0.0%
Branches: 0 6 0.0%

Line Branch Exec Source
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, see <http://www.gnu.org/licenses/>.
17 *
18 * Written by: Stef Walter <stefw@gnome.org>
19 */
20
21 #pragma once
22
23 #include "cc-realm-generated.h"
24
25 G_BEGIN_DECLS
26
27 typedef enum {
28 CC_REALM_ERROR_BAD_LOGIN,
29 CC_REALM_ERROR_BAD_PASSWORD,
30 CC_REALM_ERROR_CANNOT_AUTH,
31 CC_REALM_ERROR_BAD_HOSTNAME,
32 CC_REALM_ERROR_GENERIC,
33 } CcRealmErrors;
34
35 #define CC_REALM_ERROR (cc_realm_error_get_quark ())
36
37 GQuark cc_realm_error_get_quark (void) G_GNUC_CONST;
38
39 #define CC_TYPE_REALM_MANAGER (cc_realm_manager_get_type ())
40 G_DECLARE_FINAL_TYPE (CcRealmManager, cc_realm_manager, CC, REALM_MANAGER, CcRealmObjectManagerClient)
41
42 void cc_realm_manager_new (GCancellable *cancellable,
43 GAsyncReadyCallback callback,
44 gpointer user_data);
45
46 CcRealmManager * cc_realm_manager_new_finish (GAsyncResult *result,
47 GError **error);
48
49 void cc_realm_manager_discover (CcRealmManager *self,
50 const gchar *input,
51 GCancellable *cancellable,
52 GAsyncReadyCallback callback,
53 gpointer user_data);
54
55 GList * cc_realm_manager_discover_finish (CcRealmManager *self,
56 GAsyncResult *result,
57 GError **error);
58
59 GList * cc_realm_manager_get_realms (CcRealmManager *self);
60
61 void cc_realm_login (CcRealmObject *realm,
62 const gchar *login,
63 const gchar *password,
64 GCancellable *cancellable,
65 GAsyncReadyCallback callback,
66 gpointer user_data);
67
68 GBytes * cc_realm_login_finish (GAsyncResult *result,
69 GError **error);
70
71 gboolean cc_realm_join_as_user (CcRealmObject *realm,
72 const gchar *login,
73 const gchar *password,
74 GBytes *credentials,
75 GCancellable *cancellable,
76 GAsyncReadyCallback callback,
77 gpointer user_data)
78 G_GNUC_WARN_UNUSED_RESULT;
79
80 gboolean cc_realm_join_as_admin (CcRealmObject *realm,
81 const gchar *login,
82 const gchar *password,
83 GBytes *credentials,
84 GCancellable *cancellable,
85 GAsyncReadyCallback callback,
86 gpointer user_data)
87 G_GNUC_WARN_UNUSED_RESULT;
88
89 gboolean cc_realm_join_finish (CcRealmObject *realm,
90 GAsyncResult *result,
91 GError **error);
92
93 gboolean cc_realm_is_configured (CcRealmObject *realm);
94
95 gchar * cc_realm_calculate_login (CcRealmCommon *realm,
96 const gchar *username);
97
98 G_END_DECLS
99