Fri, 10 Jun 2022 20:42:36 -0500
fix memory leak when using purple accounts
Testing Done:
ran test_account_manager and test_notification (from /r/1502 where I first encountered that leak) in valgrind -> no more leak and no new invalid read/write
Reviewed at https://reviews.imfreedom.org/r/1503/
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
40651
8737840a09b7
Fix some file headers for the credential provider api
Gary Kramlich <grim@reaperworld.com>
parents:
40583
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
8737840a09b7
Fix some file headers for the credential provider api
Gary Kramlich <grim@reaperworld.com>
parents:
40583
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This library is free software; you can redistribute it and/or |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * modify it under the terms of the GNU Lesser General Public |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * License as published by the Free Software Foundation; either |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * version 2 of the License, or (at your option) any later version. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This library is distributed in the hope that it will be useful, |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * Lesser General Public License for more details. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU Lesser General Public |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * License along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | # error "only <purple.h> may be included directly" |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | #endif |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #ifndef PURPLE_CREDENTIAL_PROVIDER_H |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | #define PURPLE_CREDENTIAL_PROVIDER_H |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | #include <glib.h> |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #include <glib-object.h> |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #include "account.h" |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include "request.h" |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | G_BEGIN_DECLS |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | * PURPLE_CREDENTIAL_PROVIDER_DOMAIN: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * A #GError domain for errors from #PurpleCredentialProviders. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | #define PURPLE_CREDENTIAL_PROVIDER_DOMAIN (g_quark_from_static_string("purple-credential-provider")) |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * PurpleCredentialProvider: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * |
|
41207
d91e963b0a1c
Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41031
diff
changeset
|
46 | * #PurpleCredentialProvider is an abstract base class for implementing support |
|
d91e963b0a1c
Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41031
diff
changeset
|
47 | * for a specific password or keyring manager. At the time of this writing, |
|
d91e963b0a1c
Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41031
diff
changeset
|
48 | * libpurple ships with plugins for libsecret, macOS Keychain Access, KWallet, |
|
d91e963b0a1c
Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41031
diff
changeset
|
49 | * and the Windows Credentials store by subclassing #PurpleCredentialProvider. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | |
|
41010
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
54 | /** |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
55 | * PURPLE_TYPE_CREDENTIAL_PROVIDER: |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
56 | * |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
57 | * The standard _TYPE_ macro for PurpleCredentialProvider. |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
58 | * |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
59 | * Since: 3.0.0 |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
60 | */ |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
61 | |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | #define PURPLE_TYPE_CREDENTIAL_PROVIDER (purple_credential_provider_get_type()) |
|
41010
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
63 | |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
64 | /** |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
65 | * purple_credential_provider_get_type: |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
66 | * |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
67 | * Gets the #GType of #PurpleCredentialProvider. |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
68 | * |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
69 | * Returns: The #GType of #PurpleCredentialProvider. |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
70 | * |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
71 | * Since: 3.0.0 |
|
d0abbb616bea
A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40826
diff
changeset
|
72 | */ |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | G_DECLARE_DERIVABLE_TYPE(PurpleCredentialProvider, purple_credential_provider, |
|
40561
569ab1326932
Fix a few issues with the CredentialProvider code that snuck past review
Gary Kramlich <grim@reaperworld.com>
parents:
40548
diff
changeset
|
74 | PURPLE, CREDENTIAL_PROVIDER, GObject) |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | * PurpleCredentialProviderClass: |
|
40823
338bba38df77
Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents:
40790
diff
changeset
|
78 | * @activate: Called when the provider is made active. |
|
338bba38df77
Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents:
40790
diff
changeset
|
79 | * @deactivate: Called when another provider has been made active. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | * @read_password_async: Reads a password from the provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | * @read_password_finish: Finishes reading a password. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | * @write_password_async: Writes a password to the provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | * @write_password_finish: Finishes writing a password. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | * @clear_password_async: Clears a password from the provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | * @clear_password_finish: Finishes clearing a password from the provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | * @read_settings: Creates a #PurpleRequestFields for the available settings. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | * @write_settings: Updates the settings for provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | * #PurpleCredentialProviderClass defines the interface for interacting with |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | * credential providers like libsecret, kwallet, etc. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | struct _PurpleCredentialProviderClass { |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | /*< private >*/ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | GObjectClass parent; |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | /*< public >*/ |
|
40823
338bba38df77
Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents:
40790
diff
changeset
|
99 | void (*activate)(PurpleCredentialProvider *provider); |
|
338bba38df77
Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents:
40790
diff
changeset
|
100 | void (*deactivate)(PurpleCredentialProvider *provider); |
|
338bba38df77
Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents:
40790
diff
changeset
|
101 | |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | void (*read_password_async)(PurpleCredentialProvider *provider, PurpleAccount *account, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
40679
062a4574af3e
Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents:
40651
diff
changeset
|
103 | gchar *(*read_password_finish)(PurpleCredentialProvider *provider, GAsyncResult *result, GError **error); |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | void (*write_password_async)(PurpleCredentialProvider *provider, PurpleAccount *account, const gchar *password, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
40679
062a4574af3e
Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents:
40651
diff
changeset
|
106 | gboolean (*write_password_finish)(PurpleCredentialProvider *provider, GAsyncResult *result, GError **error); |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | void (*clear_password_async)(PurpleCredentialProvider *provider, PurpleAccount *account, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
40679
062a4574af3e
Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents:
40651
diff
changeset
|
109 | gboolean (*clear_password_finish)(PurpleCredentialProvider *provider, GAsyncResult *result, GError **error); |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | PurpleRequestFields *(*read_settings)(PurpleCredentialProvider *provider); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | gboolean (*write_settings)(PurpleCredentialProvider *provider, PurpleRequestFields *fields); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | /*< private >*/ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | /* Some extra padding to play it safe. */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | gpointer reserved[8]; |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | }; |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
120 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
121 | * purple_credential_provider_get_id: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
123 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | * Gets the identifier of @provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
126 | * Returns: The identifier of @provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
127 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
128 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
129 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
130 | const gchar *purple_credential_provider_get_id(PurpleCredentialProvider *provider); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
132 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
133 | * purple_credential_provider_get_name: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
134 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
135 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
136 | * Gets the name of @provider which can be show in user interfaces. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
137 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
138 | * Returns: The name of @provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
139 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
140 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
141 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
142 | const gchar *purple_credential_provider_get_name(PurpleCredentialProvider *provider); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
143 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
144 | /** |
|
40790
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
145 | * purple_credential_provider_get_description: |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
146 | * @provider: The #PurpleCredentialProvider instance. |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
147 | * |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
148 | * Gets the description of @provider which can be displayed in user interfaces |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
149 | * to help users figure out which provider to use. |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
150 | * |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
151 | * Returns: The description of @provider. |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
152 | * |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
153 | * Since: 3.0.0 |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
154 | */ |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
155 | const gchar *purple_credential_provider_get_description(PurpleCredentialProvider *provider); |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
156 | |
|
e92d5c060155
Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents:
40748
diff
changeset
|
157 | /** |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
158 | * purple_credential_provider_is_valid: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
159 | * @provider: The #PurpleCredentialProvider instance. |
|
40583
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
160 | * @error: (out) (optional) (nullable): Return address for a #GError. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | * Checks whether or not @provider is setup correctly. This is primarily meant |
|
40583
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
163 | * for #purple_credential_provider_register_provider to call to avoid |
|
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
164 | * programming errors, but can be used by anyone. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | * Returns: %FALSE on error, otherwise %TRUE. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
168 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
169 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | gboolean purple_credential_provider_is_valid(PurpleCredentialProvider *provider, GError **error); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
173 | * purple_credential_provider_read_password_async: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
175 | * @account: The #PurpleAccount whose password to read. |
|
40583
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
176 | * @cancellable: (nullable): optional GCancellable object, %NULL to ignore. |
|
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
177 | * @callback: (scope async): a #GAsyncReadyCallback to call when the request is |
|
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
178 | * satisfied. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
179 | * @data: User data to pass to @callback. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
180 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
181 | * Reads the password for @account from @provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
182 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
183 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
184 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
185 | void purple_credential_provider_read_password_async(PurpleCredentialProvider *provider, PurpleAccount *account, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
186 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
187 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
188 | * purple_credential_provider_read_password_finish: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
189 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
190 | * @result: The #GAsyncResult from the previous |
|
40573
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
191 | * purple_credential_provider_read_password_async() call. |
|
40583
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
192 | * @error: (out) (optional) (nullable): Return address for a #GError. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
193 | * |
|
40573
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
194 | * Finishes a previous call to purple_credential_provider_read_password_async(). |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
195 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
196 | * Returns: (transfer full): The password or %NULL if successful, otherwise |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
197 | * %NULL with @error set on failure. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
198 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
199 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
200 | */ |
|
40679
062a4574af3e
Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents:
40651
diff
changeset
|
201 | gchar *purple_credential_provider_read_password_finish(PurpleCredentialProvider *provider, GAsyncResult *result, GError **error); |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
202 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
203 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
204 | * purple_credential_provider_write_password_async: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
205 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
206 | * @account: The #PurpleAccount whose password to write. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
207 | * @password: The password to write. |
|
40583
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
208 | * @cancellable: (nullable): optional GCancellable object, %NULL to ignore. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
209 | * @callback: (scope async): a #GAsyncReadyCallback to call when the request is |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
210 | * satisfied. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
211 | * @data: User data to pass to @callback. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
212 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
213 | * Writes @password for @account to @provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
214 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
215 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
216 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
217 | void purple_credential_provider_write_password_async(PurpleCredentialProvider *provider, PurpleAccount *account, const gchar *password, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
218 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
219 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
220 | * purple_credential_provider_write_password_finish: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
221 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
222 | * @result: The #GAsyncResult from the previous |
|
40573
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
223 | * purple_credential_provider_write_password_async() call. |
|
40583
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
224 | * @error: (out) (optional) (nullable): Return address for a #GError. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
225 | * |
|
40573
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
226 | * Finishes a previous call to |
|
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
227 | * purple_credential_provider_write_password_async(). |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
228 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
229 | * Returns: %TRUE if the password was written successfully, otherwise %FALSE |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
230 | * with @error set. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
231 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
232 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
233 | */ |
|
40679
062a4574af3e
Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents:
40651
diff
changeset
|
234 | gboolean purple_credential_provider_write_password_finish(PurpleCredentialProvider *provider, GAsyncResult *result, GError **error); |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
235 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
236 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
237 | * purple_credential_provider_clear_password_async: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
238 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
239 | * @account: The #PurpleAccount whose password to clear. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
240 | * @cancellable: (nullable): optional #GCancellable object, or %NULL to ignore. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
241 | * @callback: (scope async): a #GAsyncReadyCallback to call when the request is |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
242 | * satisfied. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
243 | * @data: User data to pass to @callback. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
244 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
245 | * Clears the password for @account from @provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
246 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
247 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
248 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
249 | void purple_credential_provider_clear_password_async(PurpleCredentialProvider *provider, PurpleAccount *account, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
250 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
251 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
252 | * purple_credential_provider_clear_password_finish: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
253 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
254 | * @result: The #GAsyncResult from the previous |
|
40573
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
255 | * purple_credential_provider_clear_password_async() call. |
|
40583
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40573
diff
changeset
|
256 | * @error: (out) (optional) (nullable): Return address for a #GError. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
257 | * |
|
40573
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
258 | * Finishes a previous call to |
|
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
259 | * purple_credential_provider_clear_password_async(). |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
260 | * |
|
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
|
261 | * 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
|
262 | * otherwise %FALSE with @error set. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
263 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
264 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
265 | */ |
|
40679
062a4574af3e
Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents:
40651
diff
changeset
|
266 | gboolean purple_credential_provider_clear_password_finish(PurpleCredentialProvider *provider, GAsyncResult *result, GError **error); |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
267 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
268 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
269 | * purple_credential_provider_read_settings: |
|
40573
ca0198d7ccdd
Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents:
40561
diff
changeset
|
270 | * @provider: The #PurpleCredentialProvider instance. |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
271 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
272 | * Reads settings from @provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
273 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
274 | * Returns: (transfer full): New copy of current settings which must be free'd |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
275 | * with purple_request_fields_destroy(). |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
276 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
277 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
278 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
279 | PurpleRequestFields *purple_credential_provider_read_settings(PurpleCredentialProvider *provider); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
280 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
281 | /** |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
282 | * purple_credential_provider_write_settings: |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
283 | * @provider: The #PurpleCredentialProvider instance. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
284 | * @fields: Modified settings from purple_credential_provider_read_settings(). |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
285 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
286 | * Write @fields to @provider. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
287 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
288 | * Returns: %TRUE if successful, %FALSE otherwise. |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
289 | * |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
290 | * Since: 3.0.0 |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
291 | */ |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
292 | gboolean purple_credential_provider_write_settings(PurpleCredentialProvider *provider, PurpleRequestFields *fields); |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
293 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
294 | G_END_DECLS |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
295 | |
|
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
296 | #endif /* PURPLE_CREDENTIAL_PROVIDER */ |