libpurple/purplecredentialmanager.h

Sat, 09 Aug 2025 17:37:27 +0800

author
Gong Zhile <gongzl@stu.hebust.edu.cn>
date
Sat, 09 Aug 2025 17:37:27 +0800
branch
bird-header-fix
changeset 43304
2599d35e9750
parent 43050
04e9feb2d806
permissions
-rw-r--r--

Fix the birb header path

The birb header referred would only work with birb provided by wrap casuing
build to fail because of system-installed birb dependency. The commit points
it to the correct path <birb.h>.

See: https://keep.imfreedom.org/birb/birb/file/5bf00c7d7f80/birb/meson.build#l77

40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
7 * source distribution.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
9 * This library is free software; you can redistribute it and/or modify it
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
10 * under the terms of the GNU General Public License as published by the Free
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
11 * Software Foundation; either version 2 of the License, or (at your option)
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
12 * any later version.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
14 * This library is distributed in the hope that it will be useful, but WITHOUT
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
17 * more details.
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
18 *
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
19 * You should have received a copy of the GNU General Public License along with
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
41276
03f98ece6b26 Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents: 41207
diff changeset
24 # error "only <purple.h> may be included directly"
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_CREDENTIAL_MANAGER_H
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_CREDENTIAL_MANAGER_H
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib.h>
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib-object.h>
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
42344
c51d37734155 Rename account.[ch] to purpleaccount.[ch]
Gary Kramlich <grim@reaperworld.com>
parents: 42340
diff changeset
33 #include "purpleaccount.h"
42340
807dda9de806 Fix more internal includes that were using just angle brackets
Gary Kramlich <grim@reaperworld.com>
parents: 41982
diff changeset
34 #include "purplecredentialprovider.h"
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
35 #include "purpleversion.h"
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 G_BEGIN_DECLS
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 /**
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 * PURPLE_CREDENTIAL_MANAGER_DOMAIN:
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 *
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 * A #GError domain for errors from #PurpleCredentialManager.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
44 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
46 #define PURPLE_CREDENTIAL_MANAGER_DOMAIN \
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
47 g_quark_from_static_string("purple-credential-manager") \
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
48 PURPLE_AVAILABLE_MACRO_IN_3_0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 #define PURPLE_TYPE_CREDENTIAL_MANAGER (purple_credential_manager_get_type())
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
51
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
52 PURPLE_AVAILABLE_IN_3_0
41130
afe8c89a8e90 Make PurpleCredentialManager a final type
Gary Kramlich <grim@reaperworld.com>
parents: 41031
diff changeset
53 G_DECLARE_FINAL_TYPE(PurpleCredentialManager, purple_credential_manager,
afe8c89a8e90 Make PurpleCredentialManager a final type
Gary Kramlich <grim@reaperworld.com>
parents: 41031
diff changeset
54 PURPLE, CREDENTIAL_MANAGER, GObject)
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 /**
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 * PurpleCredentialManager:
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 *
41207
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41130
diff changeset
59 * Purple Credential Manager is the main API access to different credential
43027
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
60 * providers. Providers are added to the manager and then the user can choose
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
61 * which provider to use.
41207
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41130
diff changeset
62 *
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41130
diff changeset
63 * Once a provider is selected, all credential access will be directed to that
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41130
diff changeset
64 * provider.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
66 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 */
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 /**
43027
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
70 * purple_credential_manager_add:
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
71 * @manager: The instance.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
72 * @provider: The provider to add.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
73 * @error: Return address for a #GError, or %NULL.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
74 *
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
75 * Adds @provider to @manager.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
76 *
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
77 * Returns: %TRUE if @provider was successfully added, otherwise %FALSE.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
78 *
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
79 * Since: 3.0
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
80 */
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
81 PURPLE_AVAILABLE_IN_3_0
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
82 gboolean purple_credential_manager_add(PurpleCredentialManager *manager, PurpleCredentialProvider *provider, GError **error);
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
83
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
84 /**
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 * purple_credential_manager_get_default:
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
87 * Gets the default [class@CredentialManager] instance.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 *
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 * Returns: (transfer none): The default #PurpleCredentialManager instance.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
91 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
93 PURPLE_AVAILABLE_IN_3_0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 PurpleCredentialManager *purple_credential_manager_get_default(void);
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 /**
43048
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
97 * purple_credential_manager_get_default_as_model:
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
98 *
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
99 * Gets the default [class@CredentialManager] instance cast to a list model.
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
100 *
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
101 * Returns: (transfer none): The default #PurpleCredentialManager instance cast
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
102 * to [iface@Gio.ListModel].
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
103 *
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
104 * Since: 3.0
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
105 */
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
106 PURPLE_AVAILABLE_IN_3_0
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
107 GListModel *purple_credential_manager_get_default_as_model(void);
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
108
45a4e977eff7 Update Purple.CredentialManager to implement Gio.ListModel
Gary Kramlich <grim@reaperworld.com>
parents: 43027
diff changeset
109 /**
40987
671f2442e50e Clean up PidginCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
110 * purple_credential_manager_set_active:
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
111 * @manager: The instance.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
112 * @id: (nullable): The id of the provider to use or %NULL to disable the
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 * active provider.
41881
7e1dd7e9efbb Fix error parameter annotations
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41802
diff changeset
114 * @error: Return address for a #GError, or %NULL.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
116 * Changes the active provider of @manager to the provider with an id of @id.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117 *
41802
487d13861ae4 Remember CredentialProvider setting while exiting
Gary Kramlich <grim@reaperworld.com>
parents: 41686
diff changeset
118 * If @id is %NULL, it is assumed that the process is shutting down and that
487d13861ae4 Remember CredentialProvider setting while exiting
Gary Kramlich <grim@reaperworld.com>
parents: 41686
diff changeset
119 * the active provider setting will be left intact. If you want to disable the
487d13861ae4 Remember CredentialProvider setting while exiting
Gary Kramlich <grim@reaperworld.com>
parents: 41686
diff changeset
120 * active provider and keep running, you should set the active provider to
487d13861ae4 Remember CredentialProvider setting while exiting
Gary Kramlich <grim@reaperworld.com>
parents: 41686
diff changeset
121 * [class@Purple.NoopCredentialProvider].
487d13861ae4 Remember CredentialProvider setting while exiting
Gary Kramlich <grim@reaperworld.com>
parents: 41686
diff changeset
122 *
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 * Returns: %TRUE on success or %FALSE with @error set on failure.
40730
12b38cca63d7 Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents: 40680
diff changeset
124 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
125 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
127 PURPLE_AVAILABLE_IN_3_0
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
128 gboolean purple_credential_manager_set_active(PurpleCredentialManager *manager, const char *id, GError **error);
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 /**
40987
671f2442e50e Clean up PidginCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
131 * purple_credential_manager_get_active:
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
132 * @manager: The instance.
40730
12b38cca63d7 Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents: 40680
diff changeset
133 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
134 * Gets the currently active [class@CredentialProvider] or %NULL if there is no
40730
12b38cca63d7 Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents: 40680
diff changeset
135 * active provider.
12b38cca63d7 Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents: 40680
diff changeset
136 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
137 * Returns: (transfer none): The active provider.
40730
12b38cca63d7 Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents: 40680
diff changeset
138 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
139 * Since: 3.0
40730
12b38cca63d7 Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents: 40680
diff changeset
140 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
141 PURPLE_AVAILABLE_IN_3_0
40987
671f2442e50e Clean up PidginCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
142 PurpleCredentialProvider *purple_credential_manager_get_active(PurpleCredentialManager *manager);
40730
12b38cca63d7 Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents: 40680
diff changeset
143
12b38cca63d7 Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents: 40680
diff changeset
144 /**
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 * purple_credential_manager_read_password_async:
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
146 * @manager: The instance.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
147 * @account: The associated account.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
148 * @cancellable: (nullable): An optional cancellable.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
149 * @callback: (nullable) (scope async): A callback to call when the request is
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150 * satisfied.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 * @data: User data to pass to @callback.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
153 * Reads the password for @account using the active provider of @manager.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
155 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
157 PURPLE_AVAILABLE_IN_3_0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158 void purple_credential_manager_read_password_async(PurpleCredentialManager *manager, PurpleAccount *account, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data);
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160 /**
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 * purple_credential_manager_read_password_finish:
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
162 * @manager: The instance.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
163 * @result: The result from the previous
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
164 * [method@CredentialManager.read_password_async] call.
41881
7e1dd7e9efbb Fix error parameter annotations
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41802
diff changeset
165 * @error: Return address for a #GError, or %NULL.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
167 * Finishes a previous call to [method@CredentialManager.read_password_async].
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168 *
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 * Returns: (transfer full): The password or %NULL if successful, otherwise
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170 * %NULL with @error set on failure.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
171 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
172 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
174 PURPLE_AVAILABLE_IN_3_0
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
175 char *purple_credential_manager_read_password_finish(PurpleCredentialManager *manager, GAsyncResult *result, GError **error);
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 /**
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178 * purple_credential_manager_write_password_async:
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
179 * @manager: The instance.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
180 * @account: The account whose password to write.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 * @password: The password to write.
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
182 * @cancellable: (nullable): optional cancellable.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
183 * @callback: (nullable) (scope async): The callback to call when the request
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
184 * is satisfied.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
185 * @data: User data to pass to @callback.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
186 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
187 * Writes @password for @account to the active provider of @manager.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
189 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
191 PURPLE_AVAILABLE_IN_3_0
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
192 void purple_credential_manager_write_password_async(PurpleCredentialManager *manager, PurpleAccount *account, const char *password, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data);
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194 /**
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 * purple_credential_manager_write_password_finish:
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
196 * @manager: The instance.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
197 * @result: The result from the previous
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
198 * [method@CredentialManager.write_password_async] call.
41881
7e1dd7e9efbb Fix error parameter annotations
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41802
diff changeset
199 * @error: Return address for a #GError, or %NULL.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
201 * Finishes a previous call to [method@CredentialManager.write_password_async].
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
202 *
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203 * Returns: %TRUE if the password was written successfully, otherwise %FALSE
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
204 * with @error set.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
205 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
206 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
208 PURPLE_AVAILABLE_IN_3_0
40680
f9ea6d5e8992 Use PurpleCredentialManager instead of the old keyring api.
Gary Kramlich <grim@reaperworld.com>
parents: 40670
diff changeset
209 gboolean purple_credential_manager_write_password_finish(PurpleCredentialManager *manager, GAsyncResult *result, GError **error);
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
211 /**
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
212 * purple_credential_manager_clear_password_async:
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
213 * @manager: The instance.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
214 * @account: The account whose password to clear.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
215 * @cancellable: (nullable): An optional cancellable.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
216 * @callback: (scope async): A callback to call when the request is satisfied.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
217 * @data: User data to pass to @callback.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
218 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
219 * Clears the password for @account from the active provider of @manager.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
220 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
221 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
223 PURPLE_AVAILABLE_IN_3_0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
224 void purple_credential_manager_clear_password_async(PurpleCredentialManager *manager, PurpleAccount *account, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data);
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
225
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
226 /**
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
227 * purple_credential_manager_clear_password_finish:
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
228 * @manager: The instance.
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
229 * @result: The result from the previous
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
230 * [method@CredentialManager.clear_password_async] call.
41881
7e1dd7e9efbb Fix error parameter annotations
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41802
diff changeset
231 * @error: Return address for a #GError, or %NULL.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
232 *
42626
c36543f2ec67 Some cleanups for PurpleCredentialManager
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
233 * Finishes a previous call to [method@CredentialManager.clear_password_async].
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
234 *
41031
2918459dbd63 Don't error out when trying to remove a password that isn't stored.
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
235 * Returns: %TRUE if the password didn't exist or was cleared successfully,
2918459dbd63 Don't error out when trying to remove a password that isn't stored.
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
236 * otherwise %FALSE with @error set.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
237 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
238 * Since: 3.0
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
240 PURPLE_AVAILABLE_IN_3_0
40680
f9ea6d5e8992 Use PurpleCredentialManager instead of the old keyring api.
Gary Kramlich <grim@reaperworld.com>
parents: 40670
diff changeset
241 gboolean purple_credential_manager_clear_password_finish(PurpleCredentialManager *manager, GAsyncResult *result, GError **error);
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
243 /**
43027
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
244 * purple_credential_manager_remove:
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
245 * @manager: The instance.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
246 * @provider: The provider to remove.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
247 * @error: Return address for a #GError, or %NULL.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
248 *
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
249 * Removes @provider from @manager.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
250 *
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
251 * Returns: %TRUE if @provider was successfully removed from @provider,
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
252 * %FALSE otherwise.
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
253 *
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
254 * Since: 3.0
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
255 */
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
256 PURPLE_AVAILABLE_IN_3_0
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
257 gboolean purple_credential_manager_remove(PurpleCredentialManager *manager, PurpleCredentialProvider *provider, GError **error);
581af7cd0603 Rename Purple.CredentialManager.register/unregister to add/remove
Gary Kramlich <grim@reaperworld.com>
parents: 42626
diff changeset
258
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
259 G_END_DECLS
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
260
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
261 #endif /* PURPLE_CREDENTIAL_MANAGER_H */

mercurial