Thu, 07 Aug 2025 21:40:13 -0500
Add an avatar-for-display property to Purple.ContactInfo
Testing Done:
Ran the tests under valgrind and called in the turtles.
Reviewed at https://reviews.imfreedom.org/r/4086/
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
f589ceec0172
Create the new PurpleContact
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:
42532
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:
42532
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:
42532
diff
changeset
|
7 | * source distribution. |
|
41739
f589ceec0172
Create the new PurpleContact
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:
42532
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:
42532
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:
42532
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:
42532
diff
changeset
|
12 | * any later version. |
|
41739
f589ceec0172
Create the new PurpleContact
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:
42532
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:
42532
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:
42532
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:
42532
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:
42532
diff
changeset
|
18 | * |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42532
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:
42532
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
42628
b069ea54b906
Fix the libpurple include warnings that were suggesting pidgin.h be included
Gary Kramlich <grim@reaperworld.com>
parents:
42613
diff
changeset
|
24 | # error "only <purple.h> may be included directly" |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PURPLE_CONTACT_H |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PURPLE_CONTACT_H |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #include <glib-object.h> |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | #include <gdk-pixbuf/gdk-pixbuf.h> |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | |
|
42338
2548eb61acc9
Make sure all internal includes use double quotes
Gary Kramlich <grim@reaperworld.com>
parents:
41948
diff
changeset
|
35 | #include "purplecontactinfo.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" |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | G_BEGIN_DECLS |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | |
|
42674
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
40 | /** |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
41 | * PURPLE_CONTACT_DOMAIN: |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
42 | * |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
43 | * An error domain for [class@Contact]. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
44 | * |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
45 | * Since: 3.0 |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
46 | */ |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
47 | #define PURPLE_CONTACT_DOMAIN \ |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
48 | (g_quark_from_static_string("purple-contact")) \ |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
49 | PURPLE_AVAILABLE_MACRO_IN_3_0 |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
50 | |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | #define PURPLE_TYPE_CONTACT (purple_contact_get_type()) |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
52 | |
|
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
53 | PURPLE_AVAILABLE_IN_3_0 |
|
41948
6d844d2faff1
Split PurpleContactInfo out of PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
41933
diff
changeset
|
54 | G_DECLARE_FINAL_TYPE(PurpleContact, purple_contact, PURPLE, CONTACT, |
|
6d844d2faff1
Split PurpleContactInfo out of PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
41933
diff
changeset
|
55 | PurpleContactInfo) |
|
41918
106ae46b290b
Add a permission property to PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
41917
diff
changeset
|
56 | |
|
42344
c51d37734155
Rename account.[ch] to purpleaccount.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
42338
diff
changeset
|
57 | #include "purpleaccount.h" |
|
42532
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
58 | #include "purpleconversation.h" |
|
41933
8ccd6fdc7ceb
Make PurpleContact derivable
Gary Kramlich <grim@reaperworld.com>
parents:
41930
diff
changeset
|
59 | |
|
8ccd6fdc7ceb
Make PurpleContact derivable
Gary Kramlich <grim@reaperworld.com>
parents:
41930
diff
changeset
|
60 | /** |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * PurpleContact: |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | * |
|
41948
6d844d2faff1
Split PurpleContactInfo out of PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
41933
diff
changeset
|
63 | * A contact is a concrete representation of a user in that it contains all of |
|
6d844d2faff1
Split PurpleContactInfo out of PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
41933
diff
changeset
|
64 | * the contact information as well as a [class@Purple.Account] to use that |
|
6d844d2faff1
Split PurpleContactInfo out of PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
41933
diff
changeset
|
65 | * contact information with. |
|
43285
acde304cf24c
Fix some Since tags
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43241
diff
changeset
|
66 | * |
|
acde304cf24c
Fix some Since tags
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43241
diff
changeset
|
67 | * Since: 2.0 |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | */ |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | /** |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | * purple_contact_new: |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | * @account: The [class@Purple.Account] this contact is from. |
|
41759
1ecc0512e714
Make purple_contact_new take the id instead of the username.
Gary Kramlich <grim@reaperworld.com>
parents:
41755
diff
changeset
|
73 | * @id: (nullable): The id of the contact. |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | * |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | * Creates a new [class@Purple.Contact]. |
|
41759
1ecc0512e714
Make purple_contact_new take the id instead of the username.
Gary Kramlich <grim@reaperworld.com>
parents:
41755
diff
changeset
|
76 | * |
|
1ecc0512e714
Make purple_contact_new take the id instead of the username.
Gary Kramlich <grim@reaperworld.com>
parents:
41755
diff
changeset
|
77 | * If @id is %NULL, an ID will be randomly generated. |
|
1ecc0512e714
Make purple_contact_new take the id instead of the username.
Gary Kramlich <grim@reaperworld.com>
parents:
41755
diff
changeset
|
78 | * |
|
1ecc0512e714
Make purple_contact_new take the id instead of the username.
Gary Kramlich <grim@reaperworld.com>
parents:
41755
diff
changeset
|
79 | * Returns: (transfer full): The new instance. |
|
1ecc0512e714
Make purple_contact_new take the id instead of the username.
Gary Kramlich <grim@reaperworld.com>
parents:
41755
diff
changeset
|
80 | * |
|
42613
780d7efe37c2
Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
81 | * Since: 3.0 |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42344
diff
changeset
|
83 | PURPLE_AVAILABLE_IN_3_0 |
|
41759
1ecc0512e714
Make purple_contact_new take the id instead of the username.
Gary Kramlich <grim@reaperworld.com>
parents:
41755
diff
changeset
|
84 | PurpleContact *purple_contact_new(PurpleAccount *account, const gchar *id); |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | /** |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | * purple_contact_get_account: |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | * @contact: The instance. |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | * |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | * Gets the [class@Purple.Account] that @contact belongs to. |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | * |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | * Returns: (transfer none): The [class@Purple.Account] that @contact belongs |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | * to. |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | * |
|
42613
780d7efe37c2
Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
95 | * Since: 3.0 |
|
41739
f589ceec0172
Create the new PurpleContact
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 |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | PurpleAccount *purple_contact_get_account(PurpleContact *contact); |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | |
|
42532
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
100 | /** |
|
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
101 | * purple_contact_find_dm: |
|
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
102 | * @contact: The instance. |
|
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
103 | * |
|
42676
e28d0c86b62c
Fix a few issues with the new dm stuff in PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
42674
diff
changeset
|
104 | * This is a wrapper around [method@ConversationManager.find_dm] to make it |
|
e28d0c86b62c
Fix a few issues with the new dm stuff in PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
42674
diff
changeset
|
105 | * easier to see if a direct message exists with @contact. |
|
42532
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
106 | * |
|
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
107 | * Returns: (transfer none) (nullable): The conversation or %NULL. |
|
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
108 | * |
|
42613
780d7efe37c2
Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
109 | * Since: 3.0 |
|
42532
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
110 | */ |
|
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
111 | PURPLE_AVAILABLE_IN_3_0 |
|
42676
e28d0c86b62c
Fix a few issues with the new dm stuff in PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
42674
diff
changeset
|
112 | PurpleConversation *purple_contact_find_dm(PurpleContact *contact); |
|
42532
eca0c08ed2a3
Add purple_contact_find_dm
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
113 | |
|
42674
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
114 | /** |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
115 | * purple_contact_create_dm_async: |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
116 | * @contact: The instance. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
117 | * @cancellable: (nullable): optional GCancellable object, %NULL to ignore. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
118 | * @callback: (scope async): a #GAsyncReadyCallback to call when the request is |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
119 | * satisfied. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
120 | * @data: User data to pass to @callback. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
121 | * |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
122 | * Asks the protocol to create a direct message with @contact. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
123 | * |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
124 | * The protocol may return an existing conversation. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
125 | * |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
126 | * Since: 3.0 |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
127 | */ |
|
42676
e28d0c86b62c
Fix a few issues with the new dm stuff in PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
42674
diff
changeset
|
128 | PURPLE_AVAILABLE_IN_3_0 |
|
42674
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
129 | void purple_contact_create_dm_async(PurpleContact *contact, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
130 | |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
131 | /** |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
132 | * purple_contact_create_dm_finish: |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
133 | * @contact: The instance. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
134 | * @result: The result. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
135 | * @error: The return address for a #GError. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
136 | * |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
137 | * Finishes a previous call to [method@Contact.create_dm_async]. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
138 | * |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
139 | * Returns: (transfer full): The conversation if successful, otherwise %NULL |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
140 | * with @error set. |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
141 | * |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
142 | * Since: 3.0 |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
143 | */ |
|
42676
e28d0c86b62c
Fix a few issues with the new dm stuff in PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
42674
diff
changeset
|
144 | PURPLE_AVAILABLE_IN_3_0 |
|
42674
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
145 | PurpleConversation *purple_contact_create_dm_finish(PurpleContact *contact, GAsyncResult *result, GError **error); |
|
b37a9a8ad04a
Add PurpleContact.create_dm_async and create_dm_finish
Gary Kramlich <grim@reaperworld.com>
parents:
42628
diff
changeset
|
146 | |
|
43101
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
147 | /** |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
148 | * purple_contact_compare: |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
149 | * @a: (nullable): the first instance |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
150 | * @b: (nullable): the second instance |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
151 | * |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
152 | * Compares contacts @a and @b. |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
153 | * |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
154 | * Returns: less than 0 if @a should be sorted before @b, 0 if they sorted |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
155 | * equally, and greater than 0 if @a should be sorted after @b. |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
156 | * |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
157 | * Since: 3.0 |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
158 | */ |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
159 | PURPLE_AVAILABLE_IN_3_0 |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
160 | int purple_contact_compare(PurpleContact *a, PurpleContact *b); |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
161 | |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
162 | /** |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
163 | * purple_contact_equal: |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
164 | * @a: (nullable): the first instance |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
165 | * @b: (nullable): the second instance |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
166 | * |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
167 | * Checks two [class@Contact] objects for equality. |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
168 | * |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
169 | * Returns: true if @a and @b are equal; false otherwise. |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
170 | * |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
171 | * Since: 3.0 |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
172 | */ |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
173 | PURPLE_AVAILABLE_IN_3_0 |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
174 | gboolean purple_contact_equal(PurpleContact *a, PurpleContact *b); |
|
085f4a5b74fe
Add Purple.Contact.compare and Purple.Contact.equal methods
Markus Fischer <ivanhoe@fiscari.de>
parents:
42676
diff
changeset
|
175 | |
|
43241
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
176 | /** |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
177 | * purple_contact_is_own_account: |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
178 | * |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
179 | * Checks if contact is for the contact info of the account that it is tied to. |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
180 | * |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
181 | * This is just a helper around calling [method@ContactInfo.equal] with the |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
182 | * contact and [method@Account.get_contact_info] from the account for this |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
183 | * contact. |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
184 | * |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
185 | * Returns: true if this contact is for the account it belongs to. |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
186 | * |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
187 | * Since: 3.0 |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
188 | */ |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
189 | PURPLE_AVAILABLE_IN_3_0 |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
190 | gboolean purple_contact_is_own_account(PurpleContact *contact); |
|
e41969a43e42
Add Purple.Contact.is_own_account
Gary Kramlich <grim@reaperworld.com>
parents:
43101
diff
changeset
|
191 | |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
192 | G_END_DECLS |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
193 | |
|
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
194 | #endif /* PURPLE_CONTACT_H */ |