Thu, 24 Apr 2025 21:42:59 -0500
Add Purple.Contact.is_own_account
This checks to see if a Purple.Contact shares the Purple.ContactInfo with the
account it is tied to.
Testing Done:
Ran the unit tests under valgrind and called in the turtles.
Reviewed at https://reviews.imfreedom.org/r/3985/
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42545
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
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:
42545
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:
42545
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:
42545
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:
42545
diff
changeset
|
12 | * any later version. |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
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:
42545
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:
42545
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:
42545
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:
42545
diff
changeset
|
17 | * more details. |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42545
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:
42545
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <purple.h> may be included directly" |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PURPLE_PROTOCOL_CONTACTS_H |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PURPLE_PROTOCOL_CONTACTS_H |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #include <glib-object.h> |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
42338
2548eb61acc9
Make sure all internal includes use double quotes
Gary Kramlich <grim@reaperworld.com>
parents:
42317
diff
changeset
|
33 | #include "purpleprotocol.h" |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42338
diff
changeset
|
34 | #include "purpleversion.h" |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | #define PURPLE_TYPE_PROTOCOL_CONTACTS (purple_protocol_contacts_get_type()) |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42338
diff
changeset
|
37 | |
|
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42338
diff
changeset
|
38 | PURPLE_AVAILABLE_IN_3_0 |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | G_DECLARE_INTERFACE(PurpleProtocolContacts, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | purple_protocol_contacts, PURPLE, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | PROTOCOL_CONTACTS, PurpleProtocol) |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | /** |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * PurpleProtocolContacts: |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | * #PurpleProtocolContacts provides methods for interacting with remote |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | * contacts. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | * |
|
42615
2f3308794a8f
Remove the micro version from since tags for libpurple part 4
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
49 | * Since: 3.0 |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | */ |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | /** |
|
42538
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
53 | * PURPLE_PROTOCOL_CONTACTS_DOMAIN: |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
54 | * |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
55 | * A domain for errors from the [class@ProtocolContacts] API. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
56 | * |
|
42615
2f3308794a8f
Remove the micro version from since tags for libpurple part 4
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
57 | * Since: 3.0 |
|
42538
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
58 | */ |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
59 | #define PURPLE_PROTOCOL_CONTACTS_DOMAIN \ |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
60 | g_quark_from_static_string("purple-protocol-contacts") \ |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
61 | PURPLE_AVAILABLE_MACRO_IN_3_0 |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
62 | |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | struct _PurpleProtocolContactsInterface { |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | /*< private >*/ |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | GTypeInterface parent; |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | /*< public >*/ |
|
42768
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
68 | guint (*get_minimum_search_length)(PurpleProtocolContacts *protocol_contacts); |
|
42538
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
69 | void (*search_async)(PurpleProtocolContacts *protocol_contacts, PurpleAccount *account, const char *text, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
70 | GListModel *(*search_finish)(PurpleProtocolContacts *protocol_contacts, GAsyncResult *result, GError **error); |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
71 | |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | void (*get_profile_async)(PurpleProtocolContacts *protocol_contacts, PurpleContactInfo *info, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | char *(*get_profile_finish)(PurpleProtocolContacts *protocol_contacts, GAsyncResult *result, GError **error); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | |
|
42297
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
75 | GActionGroup *(*get_actions)(PurpleProtocolContacts *protocol_contacts, PurpleContactInfo *info); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
76 | GMenuModel *(*get_menu)(PurpleProtocolContacts *protocol_contacts, PurpleContactInfo *info); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
77 | |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | /*< private >*/ |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | gpointer reserved[4]; |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | }; |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | G_BEGIN_DECLS |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | /** |
|
42768
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
85 | * purple_protocol_contacts_implements_search: |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
86 | * @protocol_contacts: The instance. |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
87 | * |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
88 | * Checks if @protocol_contacts implements |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
89 | * [vfunc@ProtocolContacts.search_async] and |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
90 | * [vfunc@ProtocolContacts.search_finish]. |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
91 | * |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
92 | * Returns: %TRUE if the search interface is implemented, otherwise %FALSE. |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
93 | * |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
94 | * Since: 3.0 |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
95 | */ |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
96 | PURPLE_AVAILABLE_IN_3_0 |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
97 | gboolean purple_protocol_contacts_implements_search(PurpleProtocolContacts *protocol_contacts); |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
98 | |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
99 | /** |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
100 | * purple_protocol_contacts_get_minimum_search_length: |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
101 | * @protocol_contacts: The instance. |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
102 | * |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
103 | * Gets the minimum length of the search term before |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
104 | * [method@ProtocolContacts.search_async] should be called. |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
105 | * |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
106 | * The default implementation returns 3. |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
107 | * |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
108 | * Returns: The minimum length of the search term. |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
109 | * |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
110 | * Since: 3.0 |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
111 | */ |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
112 | PURPLE_AVAILABLE_IN_3_0 |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
113 | guint purple_protocol_contacts_get_minimum_search_length(PurpleProtocolContacts *protocol_contacts); |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
114 | |
|
5ebb4beb29b7
Add a get_minimum_search_length to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42656
diff
changeset
|
115 | /** |
|
42538
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
116 | * purple_protocol_contacts_search_async: |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
117 | * @protocol_contacts: The instance. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
118 | * @account: The [class@Account] to search under. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
119 | * @text: The text to search for which must not be an empty string. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
120 | * @cancellable: (nullable): optional GCancellable object, %NULL to ignore. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
121 | * @callback: (scope async): a #GAsyncReadyCallback to call when the request is |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
122 | * satisfied. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
123 | * @data: User data to pass to @callback. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
124 | * |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
125 | * Starts the process of searching for contacts using @account that match |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
126 | * @text. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
127 | * |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
128 | * Call [method@ProtocolContacts.search_finish] to get the results. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
129 | * |
|
42615
2f3308794a8f
Remove the micro version from since tags for libpurple part 4
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
130 | * Since: 3.0 |
|
42538
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
131 | */ |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
132 | PURPLE_AVAILABLE_IN_3_0 |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
133 | void purple_protocol_contacts_search_async(PurpleProtocolContacts *protocol_contacts, PurpleAccount *account, const char *text, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
134 | |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
135 | /** |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
136 | * purple_protocol_contacts_search_finish: |
|
42545
26ae6ffab6d0
Fix a misnamed parameter in the docs
Gary Kramlich <grim@reaperworld.com>
parents:
42538
diff
changeset
|
137 | * @protocol_contacts: The instance. |
|
42538
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
138 | * @result: The [iface@Gio.AsyncResult] from the previous |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
139 | * [method@ProtocolContacts.search_async] call. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
140 | * @error: Return address for a #GError, or %NULL. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
141 | * |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
142 | * Finishes a previous call to [method@ProtocolContacts.search_async] and |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
143 | * gets the result. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
144 | * |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
145 | * Returns: (transfer full): A [iface@Gio.ListModel] of the matched contacts or |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
146 | * %NULL with @error set on error. |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
147 | * |
|
42615
2f3308794a8f
Remove the micro version from since tags for libpurple part 4
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
148 | * Since: 3.0 |
|
42538
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
149 | */ |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
150 | PURPLE_AVAILABLE_IN_3_0 |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
151 | GListModel *purple_protocol_contacts_search_finish(PurpleProtocolContacts *protocol_contacts, GAsyncResult *result, GError **error); |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
152 | |
|
d6b14c011e68
Merge PurpleProtocolContactsSearch into PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42387
diff
changeset
|
153 | /** |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
154 | * purple_protocol_contacts_get_profile_async: |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
155 | * @protocol_contacts: The instance. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
156 | * @info: The [class@ContactInfo] whose profile to get. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
157 | * @cancellable: (nullable): optional GCancellable object, %NULL to ignore. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
158 | * @callback: (scope async): a #GAsyncReadyCallback to call when the request is |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
159 | * satisfied. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
160 | * @data: User data to pass to @callback. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | * Starts the process requesting the user profile for @info. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
164 | * Call [method@ProtocolContacts.get_profile_finish] to get the results. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | * |
|
42615
2f3308794a8f
Remove the micro version from since tags for libpurple part 4
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
166 | * Since: 3.0 |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42338
diff
changeset
|
168 | PURPLE_AVAILABLE_IN_3_0 |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
169 | void purple_protocol_contacts_get_profile_async(PurpleProtocolContacts *protocol_contacts, PurpleContactInfo *info, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | /** |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | * purple_protocol_contacts_get_profile_finish: |
|
42317
8a8e85e9e114
Fix some documentation issues in PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42297
diff
changeset
|
173 | * @protocol_contacts: The instance. |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | * @result: The [iface@Gio.AsyncResult] from the previous |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
175 | * [method@ProtocolContacts.get_profile_async] call. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
176 | * @error: Return address for a #GError, or %NULL. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
177 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
178 | * Finishes a previous call to [method@ProtocolContacts.get_profile_async] and |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
179 | * gets the result. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
180 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
181 | * Returns: (transfer full): A plain text or markdown formatted string of the |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
182 | * contact info's profile, or %NULL with @error set on error. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
183 | * |
|
42615
2f3308794a8f
Remove the micro version from since tags for libpurple part 4
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
184 | * Since: 3.0 |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
185 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42338
diff
changeset
|
186 | PURPLE_AVAILABLE_IN_3_0 |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
187 | char *purple_protocol_contacts_get_profile_finish(PurpleProtocolContacts *protocol_contacts, GAsyncResult *result, GError **error); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
188 | |
|
42297
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
189 | /** |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
190 | * purple_protocol_contacts_get_actions: |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
191 | * @protocol_contacts: The instance. |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
192 | * @info: The [class@ContactInfo] to get the actions for. |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
193 | * |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
194 | * Gets a [iface@Gio.ActionGroup] for @info. When this action group is used, |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
195 | * it should use the prefix of `contact`. |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
196 | * |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
197 | * Returns: (transfer full): The action group or %NULL. |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
198 | * |
|
42615
2f3308794a8f
Remove the micro version from since tags for libpurple part 4
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
199 | * Since: 3.0 |
|
42297
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
200 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42338
diff
changeset
|
201 | PURPLE_AVAILABLE_IN_3_0 |
|
42297
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
202 | GActionGroup *purple_protocol_contacts_get_actions(PurpleProtocolContacts *protocol_contacts, PurpleContactInfo *info); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
203 | |
|
42317
8a8e85e9e114
Fix some documentation issues in PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42297
diff
changeset
|
204 | /** |
|
42297
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
205 | * purple_protocol_contacts_get_menu: |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
206 | * @protocol_contacts: The instance. |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
207 | * @info: The [class@ContactInfo] to get the menu for. |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
208 | * |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
209 | * Gets a [class@Gio.MenuModel] for @info. |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
210 | * |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
211 | * Returns: (transfer full): The menu model or %NULL. |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
212 | * |
|
42615
2f3308794a8f
Remove the micro version from since tags for libpurple part 4
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
213 | * Since: 3.0 |
|
42297
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
214 | */ |
|
42387
d9350cda1556
Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42338
diff
changeset
|
215 | PURPLE_AVAILABLE_IN_3_0 |
|
42297
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
216 | GMenuModel *purple_protocol_contacts_get_menu(PurpleProtocolContacts *protocol_contacts, PurpleContactInfo *info); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
217 | |
|
42293
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
218 | G_END_DECLS |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
219 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
220 | #endif /* PURPLE_PROTOCOL_CONTACTS_H */ |