Remove includes from protocol.h that weren't used there and deal with the fallout
Testing Done:
Compiled and ran locally. Connected with bonjour, xmpp, and irc.
Reviewed at https://reviews.imfreedom.org/r/635/
--- a/libpurple/account.h Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/account.h Fri Apr 30 05:03:39 2021 -0500
@@ -54,6 +54,7 @@
typedef void (*PurpleAccountRegistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data);
typedef void (*PurpleAccountUnregistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data);
--- a/libpurple/buddy.c Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/buddy.c Fri Apr 30 05:03:39 2021 -0500
@@ -20,6 +20,9 @@
* along with this program; if not, see <https://www.gnu.org/licenses/>.
#include "purplebuddypresence.h"
#include "purpleprotocolclient.h"
--- a/libpurple/group.c Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/group.c Fri Apr 30 05:03:39 2021 -0500
@@ -22,6 +22,8 @@
#include "internal.h" /* TODO: we need to kill this */
#include "purpleprivate.h"
#include "purpleprotocolserver.h"
--- a/libpurple/meson.build Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/meson.build Fri Apr 30 05:03:39 2021 -0500
@@ -228,7 +228,6 @@
'purpleimconversation.h',
--- a/libpurple/protocol.h Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/protocol.h Fri Apr 30 05:03:39 2021 -0500
@@ -45,24 +45,72 @@
-#include "conversations.h"
#include "purpleaccountoption.h"
#include "purpleaccountusersplit.h"
#include "purplemessage.h"
-#include "purplewhiteboard.h"
#include "purplewhiteboardops.h"
+ * PurpleProtocolOptions: + * @OPT_PROTO_UNIQUE_CHATNAME: User names are unique to a chat and are not + * shared between rooms.<sbr/> + * XMPP lets you choose what name you want in chats, so it shouldn't + * be pulling the aliases from the buddy list for the chat list; it + * @OPT_PROTO_CHAT_TOPIC: Chat rooms have topics.<sbr/> + * IRC and XMPP support this. + * @OPT_PROTO_NO_PASSWORD: Don't require passwords for sign-in.<sbr/> + * Zephyr doesn't require passwords, so there's no need for a + * @OPT_PROTO_MAIL_CHECK: Notify on new mail.<sbr/> + * MSN and Yahoo notify you when you have new mail. + * @OPT_PROTO_PASSWORD_OPTIONAL: Allow passwords to be optional.<sbr/> + * Passwords in IRC are optional, and are needed for certain + * @OPT_PROTO_USE_POINTSIZE: Allows font size to be specified in sane point + * Probably just XMPP and Y!M + * @OPT_PROTO_REGISTER_NOSCREENNAME: Set the Register button active even when + * the username has not been specified.<sbr/> + * Gadu-Gadu doesn't need a username to register new account (because + * usernames are assigned by the server). + * @OPT_PROTO_SLASH_COMMANDS_NATIVE: Indicates that slash commands are native + * to this protocol.<sbr/> + * Used as a hint that unknown commands should not be sent as + * @OPT_PROTO_INVITE_MESSAGE: Indicates that this protocol supports sending a + * user-supplied message along with an invitation. + * @OPT_PROTO_AUTHORIZATION_GRANTED_MESSAGE: Indicates that this protocol + * supports sending a user-supplied message along with an + * authorization acceptance. + * @OPT_PROTO_AUTHORIZATION_DENIED_MESSAGE: Indicates that this protocol + * supports sending a user-supplied message along with an + * authorization denial. + * These should all be stuff that some protocols can do and others can't. +typedef enum /*< flags >*/ + OPT_PROTO_UNIQUE_CHATNAME = 0x00000004, + OPT_PROTO_CHAT_TOPIC = 0x00000008, + OPT_PROTO_NO_PASSWORD = 0x00000010, + OPT_PROTO_MAIL_CHECK = 0x00000020, + OPT_PROTO_PASSWORD_OPTIONAL = 0x00000080, + OPT_PROTO_USE_POINTSIZE = 0x00000100, + OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200, + OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400, + OPT_PROTO_INVITE_MESSAGE = 0x00000800, + OPT_PROTO_AUTHORIZATION_GRANTED_MESSAGE = 0x00001000, + OPT_PROTO_AUTHORIZATION_DENIED_MESSAGE = 0x00002000 +} PurpleProtocolOptions; * Represents an instance of a protocol registered with #PurpleProtocolManager.
--- a/libpurple/protocols.h Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/protocols.h Fri Apr 30 05:03:39 2021 -0500
@@ -39,63 +39,6 @@
typedef struct _PurpleProtocolChatEntry PurpleProtocolChatEntry;
- * PurpleProtocolOptions:
- * @OPT_PROTO_UNIQUE_CHATNAME: User names are unique to a chat and are not
- * shared between rooms.<sbr/>
- * XMPP lets you choose what name you want in chats, so it shouldn't
- * be pulling the aliases from the buddy list for the chat list; it
- * @OPT_PROTO_CHAT_TOPIC: Chat rooms have topics.<sbr/>
- * IRC and XMPP support this.
- * @OPT_PROTO_NO_PASSWORD: Don't require passwords for sign-in.<sbr/>
- * Zephyr doesn't require passwords, so there's no need for a
- * @OPT_PROTO_MAIL_CHECK: Notify on new mail.<sbr/>
- * MSN and Yahoo notify you when you have new mail.
- * @OPT_PROTO_PASSWORD_OPTIONAL: Allow passwords to be optional.<sbr/>
- * Passwords in IRC are optional, and are needed for certain
- * @OPT_PROTO_USE_POINTSIZE: Allows font size to be specified in sane point
- * Probably just XMPP and Y!M
- * @OPT_PROTO_REGISTER_NOSCREENNAME: Set the Register button active even when
- * the username has not been specified.<sbr/>
- * Gadu-Gadu doesn't need a username to register new account (because
- * usernames are assigned by the server).
- * @OPT_PROTO_SLASH_COMMANDS_NATIVE: Indicates that slash commands are native
- * to this protocol.<sbr/>
- * Used as a hint that unknown commands should not be sent as
- * @OPT_PROTO_INVITE_MESSAGE: Indicates that this protocol supports sending a
- * user-supplied message along with an invitation.
- * @OPT_PROTO_AUTHORIZATION_GRANTED_MESSAGE: Indicates that this protocol
- * supports sending a user-supplied message along with an
- * authorization acceptance.
- * @OPT_PROTO_AUTHORIZATION_DENIED_MESSAGE: Indicates that this protocol
- * supports sending a user-supplied message along with an
- * authorization denial.
- * These should all be stuff that some protocols can do and others can't.
-typedef enum /*< flags >*/
- OPT_PROTO_UNIQUE_CHATNAME = 0x00000004,
- OPT_PROTO_CHAT_TOPIC = 0x00000008,
- OPT_PROTO_NO_PASSWORD = 0x00000010,
- OPT_PROTO_MAIL_CHECK = 0x00000020,
- OPT_PROTO_PASSWORD_OPTIONAL = 0x00000080,
- OPT_PROTO_USE_POINTSIZE = 0x00000100,
- OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200,
- OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400,
- OPT_PROTO_INVITE_MESSAGE = 0x00000800,
- OPT_PROTO_AUTHORIZATION_GRANTED_MESSAGE = 0x00001000,
- OPT_PROTO_AUTHORIZATION_DENIED_MESSAGE = 0x00002000
-} PurpleProtocolOptions;
--- a/libpurple/purple-gio.c Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/purple-gio.c Fri Apr 30 05:03:39 2021 -0500
@@ -21,9 +21,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
--- a/libpurple/purpleaccountoption.h Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/purpleaccountoption.h Fri Apr 30 05:03:39 2021 -0500
@@ -29,6 +29,8 @@
+#include <libpurple/prefs.h> * SECTION:purpleaccountoption
* @section_id: libpurple-account-option
--- a/libpurple/purpleimconversation.c Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/purpleimconversation.c Fri Apr 30 05:03:39 2021 -0500
@@ -21,6 +21,7 @@
#include <libpurple/purpleimconversation.h>
+#include <libpurple/debug.h> #include <libpurple/enums.h>
#include <libpurple/purpleprivate.h>
#include <libpurple/purpleprotocolclient.h>
--- a/libpurple/purpleprotocolfactory.h Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/purpleprotocolfactory.h Fri Apr 30 05:03:39 2021 -0500
@@ -42,6 +42,7 @@
#include <libpurple/account.h>
#include <libpurple/connection.h>
#include <libpurple/protocol.h>
+#include <libpurple/roomlist.h> --- a/libpurple/server.c Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/server.c Fri Apr 30 05:03:39 2021 -0500
@@ -44,6 +44,7 @@
#define SECS_BEFORE_RESENDING_AUTORESPONSE 600
#define SEX_BEFORE_RESENDING_AUTORESPONSE "Only after you're married"
--- a/libpurple/util.h Fri Apr 30 05:02:01 2021 -0500
+++ b/libpurple/util.h Fri Apr 30 05:03:39 2021 -0500
@@ -42,6 +42,7 @@