libpurple/request/purplerequestfieldlabel.h

Fri, 14 Feb 2025 02:12:52 -0600

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 14 Feb 2025 02:12:52 -0600
changeset 43176
04f562dc0ff2
parent 42617
c8eb73bff6e0
child 43285
acde304cf24c
permissions
-rw-r--r--

Annotate libpurple constructors that return base types

In that case, annotating the actual type will help bindings use the correct type.

Testing Done:
Compared the gir before and after:
```diff
--- Purple-3.0.gir 2025-02-14 00:51:54.467548255 -0500
+++ build/libpurple/Purple-3.0.gir 2025-02-14 02:45:56.050535272 -0500
@@ -19676,8 +19676,9 @@
<return-value transfer-ownership="full">
<doc xml:space="preserve"
filename="libpurple/purplenoopcredentialprovider.h"
- line="62">The new #PurpleNoopCredentialProvider instance.</doc>
- <type name="CredentialProvider" c:type="PurpleCredentialProvider*"/>
+ line="62">The new credential provider.</doc>
+ <type name="NoopCredentialProvider"
+ c:type="PurpleCredentialProvider*"/>
</return-value>
</constructor>
</class>
@@ -20412,7 +20413,7 @@
<doc xml:space="preserve"
filename="libpurple/purplenotificationaddcontact.h"
line="65">The new notification.</doc>
- <type name="Notification" c:type="PurpleNotification*"/>
+ <type name="NotificationAddContact" c:type="PurpleNotification*"/>
</return-value>
<parameters>
<parameter name="id"
@@ -20507,7 +20508,8 @@
<doc xml:space="preserve"
filename="libpurple/purplenotificationauthorizationrequest.h"
line="65">The new notification.</doc>
- <type name="Notification" c:type="PurpleNotification*"/>
+ <type name="NotificationAuthorizationRequest"
+ c:type="PurpleNotification*"/>
</return-value>
<parameters>
<parameter name="id"
@@ -20608,11 +20610,12 @@
line="55">Creates a new [class@Notification] for a connection error on @account.</doc>
<source-position filename="libpurple/purplenotificationconnectionerror.h"
line="67"/>
- <return-value transfer-ownership="full" nullable="1">
+ <return-value transfer-ownership="full">
<doc xml:space="preserve"
filename="libpurple/purplenotificationconnectionerror.h"
line="62">The new notification.</doc>
- <type name="Notification" c:type="PurpleNotification*"/>
+ <type name="NotificationConnectionError"
+ c:type="PurpleNotification*"/>
</return-value>
<parameters>
<parameter name="id"
@@ -20668,7 +20671,7 @@
<doc xml:space="preserve"
filename="libpurple/purplenotificationlink.h"
line="61">The new notification.</doc>
- <type name="Notification" c:type="PurpleNotification*"/>
+ <type name="NotificationLink" c:type="PurpleNotification*"/>
</return-value>
<parameters>
<parameter name="id"
@@ -21881,8 +21884,8 @@
<return-value transfer-ownership="full">
<doc xml:space="preserve"
filename="libpurple/purpleplugininfo.h"
- line="207">A new #PurplePluginInfo instance.</doc>
- <type name="GPlugin.PluginInfo" c:type="GPluginPluginInfo*"/>
+ line="207">The new plugin info.</doc>
+ <type name="PluginInfo" c:type="GPluginPluginInfo*"/>
</return-value>
<parameters>
<parameter name="first_property" transfer-ownership="none">
@@ -31364,7 +31367,7 @@
<doc xml:space="preserve"
filename="libpurple/request/purplerequestfieldaccount.h"
line="79">The new field.</doc>
- <type name="RequestField" c:type="PurpleRequestField*"/>
+ <type name="RequestFieldAccount" c:type="PurpleRequestField*"/>
</return-value>
<parameters>
<parameter name="id" transfer-ownership="none">
@@ -31737,7 +31740,7 @@
<doc xml:space="preserve"
filename="libpurple/request/purplerequestfieldbool.h"
line="61">The new field.</doc>
- <type name="RequestField" c:type="PurpleRequestField*"/>
+ <type name="RequestFieldBool" c:type="PurpleRequestField*"/>
</return-value>
<parameters>
<parameter name="id" transfer-ownership="none">
@@ -31918,7 +31921,7 @@
<doc xml:space="preserve"
filename="libpurple/request/purplerequestfieldchoice.h"
line="61">The new field.</doc>
- <type name="RequestField" c:type="PurpleRequestField*"/>
+ <type name="RequestFieldChoice" c:type="PurpleRequestField*"/>
</return-value>
<parameters>
<parameter name="id" transfer-ownership="none">
@@ -32281,7 +32284,7 @@
<doc xml:space="preserve"
filename="libpurple/request/purplerequestfieldimage.h"
line="63">The new field.</doc>
- <type name="RequestField" c:type="PurpleRequestField*"/>
+ <type name="RequestFieldImage" c:type="PurpleRequestField*"/>
</return-value>
<parameters>
<parameter name="id" transfer-ownership="none">
@@ -32508,7 +32511,7 @@
<doc xml:space="preserve"
filename="libpurple/request/purplerequestfieldint.h"
line="61">The new field.</doc>
- <type name="RequestField" c:type="PurpleRequestField*"/>
+ <type name="RequestFieldInt" c:type="PurpleRequestField*"/>
</return-value>
<parameters>
<parameter name="id" transfer-ownership="none">
@@ -32825,7 +32828,7 @@
<doc xml:space="preserve"
filename="libpurple/request/purplerequestfieldlabel.h"
line="58">The new field.</doc>
- <type name="RequestField" c:type="PurpleRequestField*"/>
+ <type name="RequestFieldLabel" c:type="PurpleRequestField*"/>
</return-value>
<parameters>
<parameter name="id" transfer-ownership="none">
@@ -32876,7 +32879,7 @@
<doc xml:space="preserve"
filename="libpurple/request/purplerequestfieldlist.h"
line="58">The new field.</doc>
- <type name="RequestField" c:type="PurpleRequestField*"/>
+ <type name="RequestFieldList" c:type="PurpleRequestField*"/>
</return-value>
<parameters>
<parameter name="id" transfer-ownership="none">
@@ -33230,7 +33233,7 @@
<doc xml:space="preserve"
filename="libpurple/request/purplerequestfieldstring.h"
line="60">The new field.</doc>
- <type name="RequestField" c:type="PurpleRequestField*"/>
+ <type name="RequestFieldString" c:type="PurpleRequestField*"/>
</return-value>
<parameters>
<parameter name="id" transfer-ownership="none">
@@ -35252,8 +35255,8 @@
<return-value transfer-ownership="full">
<doc xml:space="preserve"
filename="libpurple/purplesqlitehistoryadapter.h"
- line="60">The new #PurpleSqliteHistoryAdapter instance.</doc>
- <type name="HistoryAdapter" c:type="PurpleHistoryAdapter*"/>
+ line="60">The new history adapter.</doc>
+ <type name="SqliteHistoryAdapter" c:type="PurpleHistoryAdapter*"/>
</return-value>
<parameters>
<parameter name="filename" transfer-ownership="none">
```

Reviewed at https://reviews.imfreedom.org/r/3837/

40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
1 /*
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
2 * Purple - Internet Messaging Library
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
5477
942b6f295034 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
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: 42401
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7964
diff changeset
7 * source distribution.
7035
76bca80cd91d [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
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: 42401
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: 42401
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: 42401
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: 42401
diff changeset
12 * any later version.
5477
942b6f295034 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.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: 42401
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: 42401
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: 42401
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: 42401
diff changeset
17 * more details.
5477
942b6f295034 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.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: 42401
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: 42401
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
5477
942b6f295034 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
22
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
24 # error "only <purple.h> may be included directly"
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
25 #endif
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
26
42141
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
27 #ifndef PURPLE_REQUEST_FIELD_LABEL_H
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
28 #define PURPLE_REQUEST_FIELD_LABEL_H
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
29
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40330
diff changeset
30 #include <glib.h>
5477
942b6f295034 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 #include <glib-object.h>
942b6f295034 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
42144
92dd14dc8a73 Cleanup request field files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42141
diff changeset
33 #include "purplerequestfield.h"
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42144
diff changeset
34 #include "purpleversion.h"
42144
92dd14dc8a73 Cleanup request field files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42141
diff changeset
35
92dd14dc8a73 Cleanup request field files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42141
diff changeset
36 G_BEGIN_DECLS
92dd14dc8a73 Cleanup request field files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42141
diff changeset
37
32554
0d844fac6679 Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 32531
diff changeset
38 /**
42141
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
39 * PurpleRequestFieldLabel:
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
40 *
42141
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
41 * A label request field.
42144
92dd14dc8a73 Cleanup request field files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42141
diff changeset
42 *
42617
c8eb73bff6e0 Remove the micro version from since tags for libpurple part 6
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
43 * Since: 3.0
32554
0d844fac6679 Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 32531
diff changeset
44 */
42141
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
45 #define PURPLE_TYPE_REQUEST_FIELD_LABEL (purple_request_field_label_get_type())
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42144
diff changeset
46
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42144
diff changeset
47 PURPLE_AVAILABLE_IN_3_0
42141
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
48 G_DECLARE_FINAL_TYPE(PurpleRequestFieldLabel, purple_request_field_label,
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
49 PURPLE, REQUEST_FIELD_LABEL, PurpleRequestField)
7905
03db29949e5d [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
50
03db29949e5d [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
51 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
52 * purple_request_field_label_new:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35050
diff changeset
53 * @id: The field ID.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35050
diff changeset
54 * @text: The label of the field.
7905
03db29949e5d [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
55 *
03db29949e5d [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
56 * Creates a label field.
03db29949e5d [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
57 *
43176
04f562dc0ff2 Annotate libpurple constructors that return base types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42617
diff changeset
58 * Returns: (transfer full) (type PurpleRequestFieldLabel): The new field.
7905
03db29949e5d [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
59 */
42401
72dffc07269c Mark remaining request API as always available
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
60 PURPLE_AVAILABLE_IN_ALL
42141
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
61 PurpleRequestField *purple_request_field_label_new(const char *id, const char *text);
33237
2574432da068 Validation for Request API: common validators
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33219
diff changeset
62
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
63 G_END_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
64
42141
7ecf7a18e627 Make PurpleRequestFieldLabel into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42140
diff changeset
65 #endif /* PURPLE_REQUEST_FIELD_LABEL_H */

mercurial