libpurple/purpleauthorizationrequest.h

Tue, 10 Sep 2024 01:31:09 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Tue, 10 Sep 2024 01:31:09 -0500
changeset 42929
e9cc6fc1f717
parent 42841
fbb5c5cb37f4
child 42941
d39faa3581eb
permissions
-rw-r--r--

Update Purple.NotificationAuthorizationRequest to take an id and auto populate account

This also removed the duplication in purplenotification.c.

Testing Done:
Ran the unit tests under valgrind and called in the turtles for the rest.

Bugs closed: PIDGIN-17939

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

41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
7 * source distribution.
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
9 * This library is free software; you can redistribute it and/or modify it
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
10 * under the terms of the GNU General Public License as published by the Free
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
11 * Software Foundation; either version 2 of the License, or (at your option)
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
12 * any later version.
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
14 * This library is distributed in the hope that it will be useful, but WITHOUT
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
17 * more details.
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
18 *
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
19 * You should have received a copy of the GNU General Public License along with
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_AUTHORIZATION_REQUEST_H
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_AUTHORIZATION_REQUEST_H
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib.h>
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib-object.h>
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
42344
c51d37734155 Rename account.[ch] to purpleaccount.[ch]
Gary Kramlich <grim@reaperworld.com>
parents: 41746
diff changeset
33 #include "purpleaccount.h"
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
34 #include "purpleversion.h"
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 G_BEGIN_DECLS
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 * PurpleAuthorizationRequest:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 * #PurpleAuthorizationRequest is a data structure that contains all of the
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 * information when someone has requested authorization to add you to their
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 * contact list.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
45 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 */
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 #define PURPLE_TYPE_AUTHORIZATION_REQUEST (purple_authorization_request_get_type())
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
50 PURPLE_AVAILABLE_IN_3_0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 G_DECLARE_FINAL_TYPE(PurpleAuthorizationRequest, purple_authorization_request,
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 PURPLE, AUTHORIZATION_REQUEST, GObject)
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 * purple_authorization_request_new:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * @account: The account that this request is for.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 * @username: The username of the user requesting authorization.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * Creates a new [class@Purple.AuthorizationRequest] for @username on @account.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 * This is typically only used by libpurple itself.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 * Returns: The new instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
65 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
67 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
68 PurpleAuthorizationRequest *purple_authorization_request_new(PurpleAccount *account, const char *username);
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * purple_authorization_request_get_account:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 * Gets the [class@Account] for @request.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * Returns: (transfer none): The account.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
78 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
80 PURPLE_AVAILABLE_IN_3_0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 PurpleAccount *purple_authorization_request_get_account(PurpleAuthorizationRequest *request);
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 /**
41646
df5560078186 Improve request documentation
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41514
diff changeset
84 * purple_authorization_request_get_username:
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 * Gets the username for the user requesting authorization.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 * Returns: The username of the remote user.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
91 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
93 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
94 const char *purple_authorization_request_get_username(PurpleAuthorizationRequest *request);
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 * purple_authorization_request_set_alias:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 * @alias: (nullable): The alias of the remote user.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 * Sets the alias of the remote user to @alias. User interfaces can use this
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 * when presenting the authorization request to the end user.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
104 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
106 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
107 void purple_authorization_request_set_alias(PurpleAuthorizationRequest *request, const char *alias);
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 * purple_authorization_request_get_alias:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 * Gets the alias of the remote user if one was set.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 * Returns: (nullable): The alias if one was set.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
117 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
119 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
120 const char *purple_authorization_request_get_alias(PurpleAuthorizationRequest *request);
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 * purple_authorization_request_set_message:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 * @message: (nullable): An optional message from the remote user.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 * Sets an optional message from remote user, that the user interface can
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 * display to the end user.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
130 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
132 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
133 void purple_authorization_request_set_message(PurpleAuthorizationRequest *request, const char *message);
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 * purple_authorization_request_get_message:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 * Gets the message that was optionally sent by the remote user.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 * Returns: (nullable): The optional message.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
143 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
145 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
146 const char *purple_authorization_request_get_message(PurpleAuthorizationRequest *request);
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 * purple_authorization_request_set_add:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 * @add: Whether or not to ask the user to add the remote user back.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 * Sets whether or not the user interface should ask the end user to add the
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154 * remote user if the remote user was accepted.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
156 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
158 PURPLE_AVAILABLE_IN_3_0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 void purple_authorization_request_set_add(PurpleAuthorizationRequest *request, gboolean add);
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
162 * purple_authorization_request_get_add:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
163 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
164 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
165 * Gets whether or not the user interface should ask the end user to add the
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166 * remote user if the end user accepted the remote user's friend request.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
167 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168 * Returns: %TRUE if the user interface should request the end user to add the
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 * remote user back.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
171 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
173 PURPLE_AVAILABLE_IN_3_0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
174 gboolean purple_authorization_request_get_add(PurpleAuthorizationRequest *request);
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
175
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 * purple_authorization_request_accept:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180 * Emits the [signal@AuthorizationRequest::accepted] signal. This is typically
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 * called by the user interface when the user has clicked the accept button.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
182 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183 * If this is called multiple times, or called after
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184 * [method@AuthorizationRequest.deny] then this does nothing.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
185 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
186 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
187 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
188 PURPLE_AVAILABLE_IN_3_0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189 void purple_authorization_request_accept(PurpleAuthorizationRequest *request);
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
191 /**
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 * purple_authorization_request_deny:
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193 * @request: The instance.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194 * @message: (nullable): An optional denial message.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
196 * Emits the [signal@AuthorizationRequest::denied] signal. This is typically
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197 * called by the user interface when the user has clicked the deny button.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
198 *
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
199 * If this is called multiple times, or called after
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 * [method@AuthorizationRequest.accept] then this does nothing.
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
201 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
202 * Since: 3.0
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
204 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
205 void purple_authorization_request_deny(PurpleAuthorizationRequest *request, const char *message);
41514
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
206
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207 G_END_DECLS
a96768bacb59 Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208
41746
e1d8d70679d5 Fix a bunch of header guard comments
Gary Kramlich <grim@reaperworld.com>
parents: 41646
diff changeset
209 #endif /* PURPLE_AUTHORIZATION_REQUEST_H */

mercurial