Mon, 13 Nov 2023 20:52:30 -0600
Fix some small doc issues
- `Return Value` is deprecated.
- `See Also` is not a valid tag, and does not appear anywhere. If placed in the
description, then it does appear, but just like a regular paragraph, so write
it like one.
- Fix a few typos.
Testing Done:
Built docs.
Reviewed at https://reviews.imfreedom.org/r/2803/
|
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 |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
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 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
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 | #include "purpleprotocolcontacts.h" |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | /****************************************************************************** |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | * GInterface Implementation |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | *****************************************************************************/ |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | G_DEFINE_INTERFACE(PurpleProtocolContacts, purple_protocol_contacts, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | PURPLE_TYPE_PROTOCOL) |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | static void |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | purple_protocol_contacts_default_init(G_GNUC_UNUSED PurpleProtocolContactsInterface *iface) |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | { |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | } |
|
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 | /****************************************************************************** |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * Public API |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | *****************************************************************************/ |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | void |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | purple_protocol_contacts_get_profile_async(PurpleProtocolContacts *protocol_contacts, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | PurpleContactInfo *info, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | GCancellable *cancellable, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | GAsyncReadyCallback callback, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | gpointer data) |
|
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 | PurpleProtocolContactsInterface *iface = NULL; |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | g_return_if_fail(PURPLE_IS_PROTOCOL_CONTACTS(protocol_contacts)); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | g_return_if_fail(PURPLE_IS_CONTACT_INFO(info)); |
|
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 | iface = PURPLE_PROTOCOL_CONTACTS_GET_IFACE(protocol_contacts); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | if(iface != NULL && iface->get_profile_async != NULL) { |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | iface->get_profile_async(protocol_contacts, info, cancellable, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | callback, data); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | } else { |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | g_warning("%s does not implement get_profile_async", |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | G_OBJECT_TYPE_NAME(protocol_contacts)); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | } |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | } |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | char * |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | purple_protocol_contacts_get_profile_finish(PurpleProtocolContacts *protocol_contacts, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | GAsyncResult *result, |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | GError **error) |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | { |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | PurpleProtocolContactsInterface *iface = NULL; |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONTACTS(protocol_contacts), NULL); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | iface = PURPLE_PROTOCOL_CONTACTS_GET_IFACE(protocol_contacts); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | if(iface != NULL && iface->get_profile_finish != NULL) { |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | return iface->get_profile_finish(protocol_contacts, result, error); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | } else { |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | g_warning("%s does not implement get_profile_finish", |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | G_OBJECT_TYPE_NAME(protocol_contacts)); |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | } |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | return NULL; |
|
8888e6d1e9a8
Create the PurpleProtocolContacts interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | } |
|
42297
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
80 | |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
81 | GActionGroup * |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
82 | purple_protocol_contacts_get_actions(PurpleProtocolContacts *protocol_contacts, |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
83 | PurpleContactInfo *info) |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
84 | { |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
85 | PurpleProtocolContactsInterface *iface = NULL; |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
86 | |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
87 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONTACTS(protocol_contacts), NULL); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
88 | g_return_val_if_fail(PURPLE_IS_CONTACT_INFO(info), NULL); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
89 | |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
90 | iface = PURPLE_PROTOCOL_CONTACTS_GET_IFACE(protocol_contacts); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
91 | if(iface != NULL && iface->get_actions != NULL) { |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
92 | return iface->get_actions(protocol_contacts, info); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
93 | } |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
94 | |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
95 | return NULL; |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
96 | } |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
97 | |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
98 | GMenuModel * |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
99 | purple_protocol_contacts_get_menu(PurpleProtocolContacts *protocol_contacts, |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
100 | PurpleContactInfo *info) |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
101 | { |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
102 | PurpleProtocolContactsInterface *iface = NULL; |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
103 | |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
104 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONTACTS(protocol_contacts), NULL); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
105 | g_return_val_if_fail(PURPLE_IS_CONTACT_INFO(info), NULL); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
106 | |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
107 | iface = PURPLE_PROTOCOL_CONTACTS_GET_IFACE(protocol_contacts); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
108 | if(iface != NULL && iface->get_menu != NULL) { |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
109 | return iface->get_menu(protocol_contacts, info); |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
110 | } |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
111 | |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
112 | return NULL; |
|
392bb692c505
Add virtual functions for actions and menu to PurpleProtocolContacts
Gary Kramlich <grim@reaperworld.com>
parents:
42293
diff
changeset
|
113 | } |