libpurple/purpleauthorizationrequest.h

changeset 42613
780d7efe37c2
parent 42594
eddde70cedd8
child 42841
fbb5c5cb37f4
equal deleted inserted replaced
42612:d905313bc732 42613:780d7efe37c2
40 * 40 *
41 * #PurpleAuthorizationRequest is a data structure that contains all of the 41 * #PurpleAuthorizationRequest is a data structure that contains all of the
42 * information when someone has requested authorization to add you to their 42 * information when someone has requested authorization to add you to their
43 * contact list. 43 * contact list.
44 * 44 *
45 * Since: 3.0.0 45 * Since: 3.0
46 */ 46 */
47 47
48 #define PURPLE_TYPE_AUTHORIZATION_REQUEST (purple_authorization_request_get_type()) 48 #define PURPLE_TYPE_AUTHORIZATION_REQUEST (purple_authorization_request_get_type())
49 49
50 PURPLE_AVAILABLE_IN_3_0 50 PURPLE_AVAILABLE_IN_3_0
60 * 60 *
61 * This is typically only used by libpurple itself. 61 * This is typically only used by libpurple itself.
62 * 62 *
63 * Returns: The new instance. 63 * Returns: The new instance.
64 * 64 *
65 * Since: 3.0.0 65 * Since: 3.0
66 */ 66 */
67 PURPLE_AVAILABLE_IN_3_0 67 PURPLE_AVAILABLE_IN_3_0
68 PurpleAuthorizationRequest *purple_authorization_request_new(PurpleAccount *account, const gchar *username); 68 PurpleAuthorizationRequest *purple_authorization_request_new(PurpleAccount *account, const gchar *username);
69 69
70 /** 70 /**
73 * 73 *
74 * Gets the [class@Account] for @request. 74 * Gets the [class@Account] for @request.
75 * 75 *
76 * Returns: (transfer none): The account. 76 * Returns: (transfer none): The account.
77 * 77 *
78 * Since: 3.0.0 78 * Since: 3.0
79 */ 79 */
80 PURPLE_AVAILABLE_IN_3_0 80 PURPLE_AVAILABLE_IN_3_0
81 PurpleAccount *purple_authorization_request_get_account(PurpleAuthorizationRequest *request); 81 PurpleAccount *purple_authorization_request_get_account(PurpleAuthorizationRequest *request);
82 82
83 /** 83 /**
86 * 86 *
87 * Gets the username for the user requesting authorization. 87 * Gets the username for the user requesting authorization.
88 * 88 *
89 * Returns: The username of the remote user. 89 * Returns: The username of the remote user.
90 * 90 *
91 * Since: 3.0.0 91 * Since: 3.0
92 */ 92 */
93 PURPLE_AVAILABLE_IN_3_0 93 PURPLE_AVAILABLE_IN_3_0
94 const gchar *purple_authorization_request_get_username(PurpleAuthorizationRequest *request); 94 const gchar *purple_authorization_request_get_username(PurpleAuthorizationRequest *request);
95 95
96 /** 96 /**
99 * @alias: (nullable): The alias of the remote user. 99 * @alias: (nullable): The alias of the remote user.
100 * 100 *
101 * Sets the alias of the remote user to @alias. User interfaces can use this 101 * Sets the alias of the remote user to @alias. User interfaces can use this
102 * when presenting the authorization request to the end user. 102 * when presenting the authorization request to the end user.
103 * 103 *
104 * Since: 3.0.0 104 * Since: 3.0
105 */ 105 */
106 PURPLE_AVAILABLE_IN_3_0 106 PURPLE_AVAILABLE_IN_3_0
107 void purple_authorization_request_set_alias(PurpleAuthorizationRequest *request, const gchar *alias); 107 void purple_authorization_request_set_alias(PurpleAuthorizationRequest *request, const gchar *alias);
108 108
109 /** 109 /**
112 * 112 *
113 * Gets the alias of the remote user if one was set. 113 * Gets the alias of the remote user if one was set.
114 * 114 *
115 * Returns: (nullable): The alias if one was set. 115 * Returns: (nullable): The alias if one was set.
116 * 116 *
117 * Since: 3.0.0 117 * Since: 3.0
118 */ 118 */
119 PURPLE_AVAILABLE_IN_3_0 119 PURPLE_AVAILABLE_IN_3_0
120 const gchar *purple_authorization_request_get_alias(PurpleAuthorizationRequest *request); 120 const gchar *purple_authorization_request_get_alias(PurpleAuthorizationRequest *request);
121 121
122 /** 122 /**
125 * @message: (nullable): An optional message from the remote user. 125 * @message: (nullable): An optional message from the remote user.
126 * 126 *
127 * Sets an optional message from remote user, that the user interface can 127 * Sets an optional message from remote user, that the user interface can
128 * display to the end user. 128 * display to the end user.
129 * 129 *
130 * Since: 3.0.0 130 * Since: 3.0
131 */ 131 */
132 PURPLE_AVAILABLE_IN_3_0 132 PURPLE_AVAILABLE_IN_3_0
133 void purple_authorization_request_set_message(PurpleAuthorizationRequest *request, const gchar *message); 133 void purple_authorization_request_set_message(PurpleAuthorizationRequest *request, const gchar *message);
134 134
135 /** 135 /**
138 * 138 *
139 * Gets the message that was optionally sent by the remote user. 139 * Gets the message that was optionally sent by the remote user.
140 * 140 *
141 * Returns: (nullable): The optional message. 141 * Returns: (nullable): The optional message.
142 * 142 *
143 * Since: 3.0.0 143 * Since: 3.0
144 */ 144 */
145 PURPLE_AVAILABLE_IN_3_0 145 PURPLE_AVAILABLE_IN_3_0
146 const gchar *purple_authorization_request_get_message(PurpleAuthorizationRequest *request); 146 const gchar *purple_authorization_request_get_message(PurpleAuthorizationRequest *request);
147 147
148 /** 148 /**
151 * @add: Whether or not to ask the user to add the remote user back. 151 * @add: Whether or not to ask the user to add the remote user back.
152 * 152 *
153 * Sets whether or not the user interface should ask the end user to add the 153 * Sets whether or not the user interface should ask the end user to add the
154 * remote user if the remote user was accepted. 154 * remote user if the remote user was accepted.
155 * 155 *
156 * Since: 3.0.0 156 * Since: 3.0
157 */ 157 */
158 PURPLE_AVAILABLE_IN_3_0 158 PURPLE_AVAILABLE_IN_3_0
159 void purple_authorization_request_set_add(PurpleAuthorizationRequest *request, gboolean add); 159 void purple_authorization_request_set_add(PurpleAuthorizationRequest *request, gboolean add);
160 160
161 /** 161 /**
166 * remote user if the end user accepted the remote user's friend request. 166 * remote user if the end user accepted the remote user's friend request.
167 * 167 *
168 * Returns: %TRUE if the user interface should request the end user to add the 168 * Returns: %TRUE if the user interface should request the end user to add the
169 * remote user back. 169 * remote user back.
170 * 170 *
171 * Since: 3.0.0 171 * Since: 3.0
172 */ 172 */
173 PURPLE_AVAILABLE_IN_3_0 173 PURPLE_AVAILABLE_IN_3_0
174 gboolean purple_authorization_request_get_add(PurpleAuthorizationRequest *request); 174 gboolean purple_authorization_request_get_add(PurpleAuthorizationRequest *request);
175 175
176 /** 176 /**
181 * called by the user interface when the user has clicked the accept button. 181 * called by the user interface when the user has clicked the accept button.
182 * 182 *
183 * If this is called multiple times, or called after 183 * If this is called multiple times, or called after
184 * [method@AuthorizationRequest.deny] then this does nothing. 184 * [method@AuthorizationRequest.deny] then this does nothing.
185 * 185 *
186 * Since: 3.0.0 186 * Since: 3.0
187 */ 187 */
188 PURPLE_AVAILABLE_IN_3_0 188 PURPLE_AVAILABLE_IN_3_0
189 void purple_authorization_request_accept(PurpleAuthorizationRequest *request); 189 void purple_authorization_request_accept(PurpleAuthorizationRequest *request);
190 190
191 /** 191 /**
197 * called by the user interface when the user has clicked the deny button. 197 * called by the user interface when the user has clicked the deny button.
198 * 198 *
199 * If this is called multiple times, or called after 199 * If this is called multiple times, or called after
200 * [method@AuthorizationRequest.accept] then this does nothing. 200 * [method@AuthorizationRequest.accept] then this does nothing.
201 * 201 *
202 * Since: 3.0.0 202 * Since: 3.0
203 */ 203 */
204 PURPLE_AVAILABLE_IN_3_0 204 PURPLE_AVAILABLE_IN_3_0
205 void purple_authorization_request_deny(PurpleAuthorizationRequest *request, const gchar *message); 205 void purple_authorization_request_deny(PurpleAuthorizationRequest *request, const gchar *message);
206 206
207 G_END_DECLS 207 G_END_DECLS

mercurial