libpurple/purplecredentialprovider.h

Wed, 04 Aug 2021 04:40:54 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Wed, 04 Aug 2021 04:40:54 -0500
changeset 41010
d0abbb616bea
parent 40826
f3fd62f8c831
child 41031
2918459dbd63
permissions
-rw-r--r--

A bunch of random libpurple documentation fixes

Testing Done:
Build the docs and verified the fixes in `build/doc/reference/libpurple/libpurple-undocumented.txt`

Reviewed at https://reviews.imfreedom.org/r/872/

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 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 * SECTION:purplecredentialprovider
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 * @section_id: libpurple-purplecredentialprovider
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 * @title: Credential Provider Object
41010
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
36 * @short_description: Abstraction of credential providers.
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
37 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
38 * #PurpleCredentialProvider is an abstract base class for implementing support
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
39 * for a specific password or keyring manager. At the time of this writing,
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
40 * libpurple ships with plugins for libsecret, KWallet, and the Windows
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
41 * 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
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 G_BEGIN_DECLS
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 * 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
48 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 * 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
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 #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
54
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * PurpleCredentialProvider:
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 * #PurpleCredentialProvider is a base class that should be sub classed by
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * credential providers. It defines the behavior of all credential providers
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 * and implements some shared properties.
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * 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
63 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64
41010
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
65 /**
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
66 * PURPLE_TYPE_CREDENTIAL_PROVIDER:
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
67 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
68 * The standard _TYPE_ macro for PurpleCredentialProvider.
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
69 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
70 * Since: 3.0.0
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
71 */
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 #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
74
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
75 /**
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
76 * purple_credential_provider_get_type:
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
77 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
78 * Gets the #GType of #PurpleCredentialProvider.
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
79 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
80 * Returns: The #GType of #PurpleCredentialProvider.
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
81 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
82 * Since: 3.0.0
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40826
diff changeset
83 */
40548
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 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
85 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
86
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 * PurpleCredentialProviderClass:
40823
338bba38df77 Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents: 40790
diff changeset
89 * @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
90 * @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
91 * @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
92 * @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
93 * @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
94 * @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
95 * @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
96 * @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
97 * @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
98 * @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
99 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 * #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
101 * 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
102 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 * 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
104 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 struct _PurpleCredentialProviderClass {
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 /*< private >*/
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 GObjectClass parent;
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 /*< public >*/
40823
338bba38df77 Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents: 40790
diff changeset
110 void (*activate)(PurpleCredentialProvider *provider);
338bba38df77 Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents: 40790
diff changeset
111 void (*deactivate)(PurpleCredentialProvider *provider);
338bba38df77 Port the KWallet Keyring to the new CredentialProvider API.
Gary Kramlich <grim@reaperworld.com>
parents: 40790
diff changeset
112
40548
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 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
114 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
115
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 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
117 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
118
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 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
120 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
121
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 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
123 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
124
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 /*< private >*/
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 /* 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
128 gpointer reserved[8];
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
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 * 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
133 * @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
134 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 * 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
136 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 * 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
138 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 * 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
140 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 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
142
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 * 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
145 * @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
146 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 * 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
148 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 * 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
150 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 * 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
152 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 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
154
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 /**
40790
e92d5c060155 Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents: 40748
diff changeset
156 * 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
157 * @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
158 *
e92d5c060155 Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents: 40748
diff changeset
159 * 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
160 * 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
161 *
e92d5c060155 Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents: 40748
diff changeset
162 * 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
163 *
e92d5c060155 Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents: 40748
diff changeset
164 * 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
165 */
e92d5c060155 Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents: 40748
diff changeset
166 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
167
e92d5c060155 Add a description to PurpleCredentialProvider and show it in the preferences selector
Gary Kramlich <grim@reaperworld.com>
parents: 40748
diff changeset
168 /**
40548
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 * 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
170 * @provider: The #PurpleCredentialProvider instance.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents: 40573
diff changeset
171 * @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
172 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173 * 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
174 * 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
175 * 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
176 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 * 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
178 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 * 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
180 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 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
182
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184 * 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
185 * @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
186 * @account: The #PurpleAccount whose password to read.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents: 40573
diff changeset
187 * @cancellable: (nullable): optional GCancellable object, %NULL to ignore.
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents: 40573
diff changeset
188 * @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
189 * satisfied.
40548
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 * @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
191 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 * 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
193 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194 * 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
195 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
196 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
197
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 * 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
200 * @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
201 * @result: The #GAsyncResult from the previous
40573
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
202 * purple_credential_provider_read_password_async() call.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents: 40573
diff changeset
203 * @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
204 *
40573
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
205 * 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
206 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207 * 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
208 * %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
209 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210 * 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
211 */
40679
062a4574af3e Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents: 40651
diff changeset
212 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
213
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 * 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
216 * @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
217 * @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
218 * @password: The password to write.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents: 40573
diff changeset
219 * @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
220 * @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
221 * satisfied.
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 * @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
223 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
224 * 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
225 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
226 * 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
227 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
228 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
229
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
230 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
231 * 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
232 * @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
233 * @result: The #GAsyncResult from the previous
40573
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
234 * purple_credential_provider_write_password_async() call.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents: 40573
diff changeset
235 * @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
236 *
40573
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
237 * Finishes a previous call to
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
238 * 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
239 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
240 * 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
241 * with @error set.
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
243 * 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
244 */
40679
062a4574af3e Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents: 40651
diff changeset
245 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
246
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
247 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
248 * 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
249 * @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
250 * @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
251 * @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
252 * @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
253 * satisfied.
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
254 * @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
255 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
256 * 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
257 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
258 * 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
259 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
260 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
261
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
262 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
263 * 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
264 * @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
265 * @result: The #GAsyncResult from the previous
40573
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
266 * purple_credential_provider_clear_password_async() call.
40583
28964322556c Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents: 40573
diff changeset
267 * @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
268 *
40573
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
269 * Finishes a previous call to
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
270 * 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
271 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
272 * Returns: %TRUE if the password was cleared successfully, otherwise %FALSE
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
273 * with @error set.
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
274 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
275 * 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
276 */
40679
062a4574af3e Remove the account parameter from purple_credential_provider_*_finish functions.
Gary Kramlich <grim@reaperworld.com>
parents: 40651
diff changeset
277 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
278
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
279 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
280 * purple_credential_provider_read_settings:
40573
ca0198d7ccdd Some random documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40561
diff changeset
281 * @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
282 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
283 * 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
284 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
285 * 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
286 * 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
287 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
288 * 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
289 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
290 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
291
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
292 /**
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
293 * 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
294 * @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
295 * @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
296 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
297 * 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
298 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
299 * 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
300 *
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
301 * 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
302 */
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
303 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
304
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
305 G_END_DECLS
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
306
42556c49e1e2 Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
307 #endif /* PURPLE_CREDENTIAL_PROVIDER */

mercurial