Sun, 21 Jun 2020 04:16:15 -0500
Make it so only libpurple can directly include libpurple header files.
This is part of our on going effort to make it easier to develop against libpurple as well as making our filenames not part of our api.
Make it so only libpurple can directly include libpurple header files.
Testing Done:
Just a normal compile to make sure everything builds again.
Reviewed at https://reviews.imfreedom.org/r/8/
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
1 | /* purple |
| 12272 | 2 | * |
| 15884 | 3 | * Purple is the legal property of its developers, whose names are too numerous |
| 12272 | 4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 5 | * source distribution. | |
| 6 | * | |
| 7 | * This program is free software; you can redistribute it and/or modify | |
| 8 | * it under the terms of the GNU General Public License as published by | |
| 9 | * the Free Software Foundation; either version 2 of the License, or | |
| 10 | * (at your option) any later version. | |
| 11 | * | |
| 12 | * This program is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 18 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16743
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 12272 | 20 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35486
diff
changeset
|
21 | |
|
40474
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
22 | #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:
39659
diff
changeset
|
23 | # 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:
39659
diff
changeset
|
24 | #endif |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
25 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37113
diff
changeset
|
26 | #ifndef PURPLE_IDLE_H |
|
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37113
diff
changeset
|
27 | #define PURPLE_IDLE_H |
|
35440
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
28 | /** |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
29 | * SECTION:idle |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
30 | * @section_id: libpurple-idle |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
31 | * @short_description: <filename>idle.h</filename> |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
32 | * @title: Idle API |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
33 | */ |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
34 | |
|
28230
5a6e42fc2b40
Ensure time_t is defined before we use it
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20147
diff
changeset
|
35 | #include <time.h> |
| 35572 | 36 | #include <glib-object.h> |
| 37 | ||
| 38 | #define PURPLE_TYPE_IDLE_UI_OPS (purple_idle_ui_ops_get_type()) | |
|
28230
5a6e42fc2b40
Ensure time_t is defined before we use it
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20147
diff
changeset
|
39 | |
|
35467
975ae62dd895
Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents:
35440
diff
changeset
|
40 | typedef struct _PurpleIdleUiOps PurpleIdleUiOps; |
|
975ae62dd895
Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents:
35440
diff
changeset
|
41 | |
| 12272 | 42 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
43 | * PurpleIdleUiOps: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
44 | * |
| 12272 | 45 | * Idle UI operations. |
| 46 | */ | |
|
35467
975ae62dd895
Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents:
35440
diff
changeset
|
47 | struct _PurpleIdleUiOps |
| 12272 | 48 | { |
| 49 | time_t (*get_time_idle)(void); | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
50 | |
|
35024
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
51 | /*< private >*/ |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
52 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
53 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
54 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
55 | void (*_purple_reserved4)(void); |
|
35467
975ae62dd895
Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents:
35440
diff
changeset
|
56 | }; |
| 12272 | 57 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
28230
diff
changeset
|
58 | G_BEGIN_DECLS |
| 12272 | 59 | |
| 60 | /**************************************************************************/ | |
| 35472 | 61 | /* Idle API */ |
| 12272 | 62 | /**************************************************************************/ |
| 63 | ||
| 64 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
65 | * purple_idle_touch: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
66 | * |
| 12272 | 67 | * Touch our idle tracker. This signifies that the user is |
| 68 | * 'active'. The conversation code calls this when the | |
| 69 | * user sends an IM, for example. | |
| 70 | */ | |
| 15884 | 71 | void purple_idle_touch(void); |
| 12272 | 72 | |
| 73 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
74 | * purple_idle_set: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
75 | * |
| 12272 | 76 | * Fake our idle time by setting the time at which our |
| 77 | * accounts purportedly became idle. This is used by | |
| 78 | * the I'dle Mak'er plugin. | |
| 79 | */ | |
| 15884 | 80 | void purple_idle_set(time_t time); |
| 12272 | 81 | |
| 82 | /**************************************************************************/ | |
| 35472 | 83 | /* Idle Subsystem */ |
| 12272 | 84 | /**************************************************************************/ |
| 85 | ||
| 86 | /** | |
| 35572 | 87 | * purple_idle_ui_ops_get_type: |
| 88 | * | |
| 89 | * Returns: The #GType for the #PurpleIdleUiOps boxed structure. | |
| 90 | */ | |
| 91 | GType purple_idle_ui_ops_get_type(void); | |
| 92 | ||
| 93 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
94 | * purple_idle_set_ui_ops: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
95 | * @ops: The UI operations structure. |
| 12272 | 96 | * |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
97 | * Sets the UI operations structure to be used for idle reporting. |
| 12272 | 98 | */ |
| 15884 | 99 | void purple_idle_set_ui_ops(PurpleIdleUiOps *ops); |
| 12272 | 100 | |
| 101 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
102 | * purple_idle_get_ui_ops: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
103 | * |
| 12272 | 104 | * Returns the UI operations structure used for idle reporting. |
| 105 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
106 | * Returns: The UI operations structure in use. |
| 12272 | 107 | */ |
| 15884 | 108 | PurpleIdleUiOps *purple_idle_get_ui_ops(void); |
| 12272 | 109 | |
| 110 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
111 | * purple_idle_init: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
112 | * |
| 12272 | 113 | * Initializes the idle system. |
| 114 | */ | |
| 15884 | 115 | void purple_idle_init(void); |
| 12272 | 116 | |
| 117 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
118 | * purple_idle_uninit: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
119 | * |
| 12272 | 120 | * Uninitializes the idle system. |
| 121 | */ | |
| 15884 | 122 | void purple_idle_uninit(void); |
| 12272 | 123 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
28230
diff
changeset
|
124 | G_END_DECLS |
| 12272 | 125 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37113
diff
changeset
|
126 | #endif /* PURPLE_IDLE_H */ |