Fri, 08 Mar 2024 02:28:05 -0600
Make PurpleNotification derivable
This is the first step in making all of the notifications subclasses.
Testing Done:
Hanged ten with the turtles and used the add contact account action from the demo protocol plugin to make sure notifications were still displayed right.
Reviewed at https://reviews.imfreedom.org/r/3009/
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42548
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:
42548
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:
42548
diff
changeset
|
7 | * source distribution. |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42548
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:
42548
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:
42548
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:
42548
diff
changeset
|
12 | * any later version. |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42548
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:
42548
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:
42548
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:
42548
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:
42548
diff
changeset
|
18 | * |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42548
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:
42548
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <purple.h> may be included directly" |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PURPLE_NOTIFICATION_H |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PURPLE_NOTIFICATION_H |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #include <glib-object.h> |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
42344
c51d37734155
Rename account.[ch] to purpleaccount.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
41841
diff
changeset
|
33 | #include "purpleaccount.h" |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
34 | #include "purpleauthorizationrequest.h" |
|
41517
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
35 | #include "purpleaddcontactrequest.h" |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
36 | #include "purpleversion.h" |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | G_BEGIN_DECLS |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * PurpleNotificationType: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
43 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
45 | PURPLE_AVAILABLE_TYPE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | typedef enum { |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | PURPLE_NOTIFICATION_TYPE_UNKNOWN, |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | PURPLE_NOTIFICATION_TYPE_GENERIC, |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | PURPLE_NOTIFICATION_TYPE_CONNECTION_ERROR, |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
50 | PURPLE_NOTIFICATION_TYPE_AUTHORIZATION_REQUEST, |
|
41517
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
51 | PURPLE_NOTIFICATION_TYPE_ADD_CONTACT, |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | PURPLE_NOTIFICATION_TYPE_FILE_TRANSFER, |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | PURPLE_NOTIFICATION_TYPE_CHAT_INVITE, |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | PURPLE_NOTIFICATION_TYPE_MENTION, |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | PURPLE_NOTIFICATION_TYPE_REACTION, |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | } PurpleNotificationType; |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | * PurpleNotification: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * An object that represents a notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
63 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | */ |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | #define PURPLE_TYPE_NOTIFICATION (purple_notification_get_type()) |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
67 | |
|
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
68 | PURPLE_AVAILABLE_IN_3_0 |
|
42630
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
69 | G_DECLARE_DERIVABLE_TYPE(PurpleNotification, purple_notification, PURPLE, |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
70 | NOTIFICATION, GObject) |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
71 | |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
72 | struct _PurpleNotificationClass { |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
73 | /*< private >*/ |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
74 | GObjectClass parent; |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
75 | |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
76 | /*< private >*/ |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
77 | gpointer reserved[4]; |
|
4895793f3298
Make PurpleNotification derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42614
diff
changeset
|
78 | }; |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | * purple_notification_new: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | * @type: The [enum@NotificationType] of the notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | * @account: (nullable): The [class@Account] that created the notification if |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | * applicable. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | * @data: The data for the notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | * @data_destroy_func: A GDestroyNotify to call to free @data. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | * Creates a new notification with the given properties. @account is optional. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | * Once the notification is prepared, it should be added to a |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | * [class@NotificationManager] to be presented to the user. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | * Returns: (transfer full): The new notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
95 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
97 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | PurpleNotification *purple_notification_new(PurpleNotificationType type, PurpleAccount *account, gpointer data, GDestroyNotify data_destroy_func); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | /** |
|
41517
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
101 | * purple_notification_new_from_add_contact_request: |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
102 | * @request: (transfer full): The [class@AddContactRequest] instance. |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
103 | * |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
104 | * Creates a new [class@Notification] for @request. This helper will |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
105 | * automatically fill out the notification according to the information in |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
106 | * @request. |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
107 | * |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
108 | * Returns: (transfer full): The new notification. |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
109 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
110 | * Since: 3.0 |
|
41517
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
111 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
112 | PURPLE_AVAILABLE_IN_3_0 |
|
41517
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
113 | PurpleNotification *purple_notification_new_from_add_contact_request(PurpleAddContactRequest *request); |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
114 | |
|
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
115 | /** |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
116 | * purple_notification_new_from_authorization_request: |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
117 | * @authorization_request: (transfer full): The [class@AuthorizationRequest] |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
118 | * instance. |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
119 | * |
|
41517
5bafe75d3907
Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
41514
diff
changeset
|
120 | * Creates a new [class@Notification] for the @authorization_request. This |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
121 | * helper will automatically fill out the notification according to the |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
122 | * information in @authorization_request. |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
123 | * |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
124 | * Returns: (transfer full): The new notification. |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
125 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
126 | * Since: 3.0 |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
127 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
128 | PURPLE_AVAILABLE_IN_3_0 |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
129 | PurpleNotification *purple_notification_new_from_authorization_request(PurpleAuthorizationRequest *authorization_request); |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
130 | |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
131 | /** |
|
41819
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
132 | * purple_notification_new_from_connection_error: |
|
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
133 | * @account: The [class@Purple.Account] that had the connection error. |
|
41841
4321441729ba
Fix argument name in a doc comment
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41819
diff
changeset
|
134 | * @info: The [struct@Purple.ConnectionErrorInfo] for the error. |
|
41819
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
135 | * |
|
41841
4321441729ba
Fix argument name in a doc comment
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41819
diff
changeset
|
136 | * Creates a new [class@Purple.Notification] for @account with the @info for |
|
4321441729ba
Fix argument name in a doc comment
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41819
diff
changeset
|
137 | * the connection. This helper will automatically fill out the notification |
|
41819
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
138 | * according to the given parameters. |
|
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
139 | * |
|
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
140 | * Returns: (transfer full): The new notification. |
|
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
141 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
142 | * Since: 3.0 |
|
41819
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
143 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
144 | PURPLE_AVAILABLE_IN_3_0 |
|
41819
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
145 | PurpleNotification *purple_notification_new_from_connection_error(PurpleAccount *account, PurpleConnectionErrorInfo *info); |
|
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
146 | |
|
4461c8ec4d65
Create purple_notification_new_from_connection_error to clean up the accounts code
Gary Kramlich <grim@reaperworld.com>
parents:
41746
diff
changeset
|
147 | /** |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
148 | * purple_notification_get_id: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
149 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
150 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
151 | * Gets the identifier of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
152 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
153 | * Returns: The identifier of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
154 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
155 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
156 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
157 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
158 | const gchar *purple_notification_get_id(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
159 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
160 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | * purple_notification_get_notification_type: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
164 | * Gets the [enum@NotificationType] of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | * Returns: The type of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
168 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
169 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
170 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | PurpleNotificationType purple_notification_get_notification_type(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
173 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | * purple_notification_get_account: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
175 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
176 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
177 | * Gets the [class@Account] of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
178 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
179 | * Returns: (transfer none): The account of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
180 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
181 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
182 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
183 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
184 | PurpleAccount *purple_notification_get_account(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
185 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
186 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
187 | * purple_notification_get_created_timestamp: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
188 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
189 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
190 | * Gets the created time of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
191 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
192 | * Returns: (transfer none): The creation time of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
193 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
194 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
195 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
196 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
197 | GDateTime *purple_notification_get_created_timestamp(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
198 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
199 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
200 | * purple_notification_set_created_timestamp: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
201 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
202 | * @timestamp: (transfer none): The new timestamp. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
203 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
204 | * Sets the created timestamp of @notification to @timestamp. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
205 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
206 | * Timestamp is internally converted to UTC so you don't need to do that ahead |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
207 | * of time. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
208 | * |
|
41438
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
209 | * If @timestamp is %NULL, the current time will be used. |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
210 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
211 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
212 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
213 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
214 | void purple_notification_set_created_timestamp(PurpleNotification *notification, GDateTime *timestamp); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
215 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
216 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
217 | * purple_notification_get_title: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
218 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
219 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
220 | * Gets the title of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
221 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
222 | * Returns: The title of @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
223 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
224 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
225 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
226 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
227 | const gchar *purple_notification_get_title(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
228 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
229 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
230 | * purple_notification_set_title: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
231 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
232 | * @title: (nullable): The new title. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
233 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
234 | * Sets the title of @notification to @title. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
235 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
236 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
237 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
238 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
239 | void purple_notification_set_title(PurpleNotification *notification, const gchar *title); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
240 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
241 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
242 | * purple_notification_get_icon_name: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
243 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
244 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
245 | * Gets the named icon for @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
246 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
247 | * Returns: The named icon for @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
248 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
249 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
250 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
251 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
252 | const gchar *purple_notification_get_icon_name(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
253 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
254 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
255 | * purple_notification_set_icon_name: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
256 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
257 | * @icon_name: (nullable): The icon name. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
258 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
259 | * Sets the named icon for @notification to @icon_name. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
260 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
261 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
262 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
263 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
264 | void purple_notification_set_icon_name(PurpleNotification *notification, const gchar *icon_name); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
265 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
266 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
267 | * purple_notification_get_read: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
268 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
269 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
270 | * Gets whether or not @notification has been read. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
271 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
272 | * Returns: %TRUE if @notification has been read, %FALSE otherwise. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
273 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
274 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
275 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
276 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
277 | gboolean purple_notification_get_read(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
278 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
279 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
280 | * purple_notification_set_read: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
281 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
282 | * @read: Whether or not the notification has been read. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
283 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
284 | * Sets @notification's read state to @read. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
285 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
286 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
287 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
288 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
289 | void purple_notification_set_read(PurpleNotification *notification, gboolean read); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
290 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
291 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
292 | * purple_notification_get_interactive: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
293 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
294 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
295 | * Gets whether or not @notification can be interacted with. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
296 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
297 | * Returns: %TRUE if @notification can be interacted with, %FALSE otherwise. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
298 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
299 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
300 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
301 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
302 | gboolean purple_notification_get_interactive(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
303 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
304 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
305 | * purple_notification_set_interactive: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
306 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
307 | * @interactive: Whether or not the notification can be interacted with. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
308 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
309 | * Sets @notification's interactive state to @interactive. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
310 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
311 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
312 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
313 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
314 | void purple_notification_set_interactive(PurpleNotification *notification, gboolean interactive); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
315 | |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
316 | /** |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
317 | * purple_notification_get_data: |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
318 | * @notification: The instance. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
319 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
320 | * Gets the data that @notification was created with. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
321 | * |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
322 | * Returns: (transfer none): The data for @notification. |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
323 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
324 | * Since: 3.0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
325 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
326 | PURPLE_AVAILABLE_IN_3_0 |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
327 | gpointer purple_notification_get_data(PurpleNotification *notification); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
328 | |
|
41438
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
329 | /** |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
330 | * purple_notification_compare: |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
331 | * @a: The first notification to compare. |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
332 | * @b: The second notification to compare. |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
333 | * |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
334 | * A comparison function for PurpleNotification that is suitable as a |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
335 | * GCompareFunc. |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
336 | * |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
337 | * Returns: -1 if @a's created timestamp occurred before @b, 0 if they were |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
338 | * created at the same time, or 1 if @b was created before @a. |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
339 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
340 | * Since: 3.0 |
|
41438
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
341 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
342 | PURPLE_AVAILABLE_IN_3_0 |
|
41438
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
343 | gint purple_notification_compare(gconstpointer a, gconstpointer b); |
|
86beaec0fa35
Create and add notifications for account errors.
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
344 | |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
345 | /** |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
346 | * purple_notification_delete: |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
347 | * @notification: The instance. |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
348 | * |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
349 | * Emits the [signal@PurpleNotification::deleted] signal. This is typically |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
350 | * called by a user interface when the user has deleted a notification. |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
351 | * |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
352 | * If this is called more than once for @notification, the signal will not be |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
353 | * emitted. |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
354 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
355 | * Since: 3.0 |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
356 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
357 | PURPLE_AVAILABLE_IN_3_0 |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
358 | void purple_notification_delete(PurpleNotification *notification); |
|
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41438
diff
changeset
|
359 | |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
360 | G_END_DECLS |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
361 | |
|
41746
e1d8d70679d5
Fix a bunch of header guard comments
Gary Kramlich <grim@reaperworld.com>
parents:
41517
diff
changeset
|
362 | #endif /* PURPLE_NOTIFICATION_H */ |