move PurpleAccountUserSplit to their own file
--- a/libpurple/accountopt.c Wed Oct 09 02:04:50 2019 +0000
+++ b/libpurple/accountopt.c Fri Sep 27 02:07:00 2019 -0500
@@ -59,24 +59,6 @@
- * This is used by some protocols to separate the fields of the username
- * into more human-readable components.
-struct _PurpleAccountUserSplit
- char *text; /* The text that will appear to the user. */
- char *default_value; /* The default value. */
- char field_sep; /* The field separator. */
- gboolean reverse; /* TRUE if the separator should be found
- starting a the end of the string, FALSE
purple_account_option_new(PurplePrefType type, const char *text,
@@ -365,92 +347,3 @@
return option->default_value.list;
-/**************************************************************************
- * Account User Split API
- **************************************************************************/
-PurpleAccountUserSplit *
-purple_account_user_split_new(const char *text, const char *default_value,
- PurpleAccountUserSplit *split;
- g_return_val_if_fail(text != NULL, NULL);
- g_return_val_if_fail(sep != 0, NULL);
- split = g_new0(PurpleAccountUserSplit, 1);
- split->text = g_strdup(text);
- split->field_sep = sep;
- split->default_value = g_strdup(default_value);
-purple_account_user_split_destroy(PurpleAccountUserSplit *split)
- g_return_if_fail(split != NULL);
- g_free(split->default_value);
-purple_account_user_split_get_text(const PurpleAccountUserSplit *split)
- g_return_val_if_fail(split != NULL, NULL);
-purple_account_user_split_get_default_value(const PurpleAccountUserSplit *split)
- g_return_val_if_fail(split != NULL, NULL);
- return split->default_value;
-purple_account_user_split_get_separator(const PurpleAccountUserSplit *split)
- g_return_val_if_fail(split != NULL, 0);
- return split->field_sep;
-purple_account_user_split_get_reverse(const PurpleAccountUserSplit *split)
- g_return_val_if_fail(split != NULL, FALSE);
-purple_account_user_split_set_reverse(PurpleAccountUserSplit *split, gboolean reverse)
- g_return_if_fail(split != NULL);
- split->reverse = reverse;
-purple_account_user_split_is_constant(const PurpleAccountUserSplit *split)
- g_return_val_if_fail(split != NULL, FALSE);
- return split->constant;
-purple_account_user_split_set_constant(PurpleAccountUserSplit *split,
- g_return_if_fail(split != NULL);
- split->constant = constant;
--- a/libpurple/accountopt.h Wed Oct 09 02:04:50 2019 +0000
+++ b/libpurple/accountopt.h Fri Sep 27 02:07:00 2019 -0500
@@ -44,16 +44,6 @@
typedef struct _PurpleAccountOption PurpleAccountOption;
- * PurpleAccountUserSplit:
- * This is used by some protocols to separate the fields of the username
- * into more human-readable components.
-typedef struct _PurpleAccountUserSplit PurpleAccountUserSplit;
/**************************************************************************/
@@ -336,108 +326,6 @@
GList *purple_account_option_get_list(const PurpleAccountOption *option);
-/**************************************************************************/
-/* Account User Split API */
-/**************************************************************************/
- * purple_account_user_split_new:
- * @text: The text of the option.
- * @default_value: The default value.
- * @sep: The field separator.
- * Creates a new account username split.
- * Returns: The new user split.
-PurpleAccountUserSplit *purple_account_user_split_new(const char *text,
- const char *default_value,
- * purple_account_user_split_destroy:
- * @split: The split to destroy.
- * Destroys an account username split.
-void purple_account_user_split_destroy(PurpleAccountUserSplit *split);
- * purple_account_user_split_get_text:
- * @split: The account username split.
- * Returns the text for an account username split.
- * Returns: The account username split's text.
-const char *purple_account_user_split_get_text(const PurpleAccountUserSplit *split);
- * purple_account_user_split_get_default_value:
- * @split: The account username split.
- * Returns the default string value for an account split.
- * Returns: The default string.
-const char *purple_account_user_split_get_default_value(
- const PurpleAccountUserSplit *split);
- * purple_account_user_split_get_separator:
- * @split: The account username split.
- * Returns the field separator for an account split.
- * Returns: The field separator.
-char purple_account_user_split_get_separator(const PurpleAccountUserSplit *split);
- * purple_account_user_split_get_reverse:
- * @split: The account username split.
- * Returns the 'reverse' value for an account split.
- * Returns: The 'reverse' value.
-gboolean purple_account_user_split_get_reverse(const PurpleAccountUserSplit *split);
- * purple_account_user_split_set_reverse:
- * @split: The account username split.
- * @reverse: The 'reverse' value
- * Sets the 'reverse' value for an account split.
-void purple_account_user_split_set_reverse(PurpleAccountUserSplit *split, gboolean reverse);
- * purple_account_user_split_is_constant:
- * @split: The account username split.
- * Returns the constant parameter for an account split.
- * When split is constant, it does not need to be displayed
- * in configuration dialog.
- * Returns: %TRUE, if the split is constant.
-purple_account_user_split_is_constant(const PurpleAccountUserSplit *split);
- * purple_account_user_split_set_constant:
- * @split: The account username split.
- * @constant: %TRUE, if the split is a constant part.
- * Sets the constant parameter of account split.
-purple_account_user_split_set_constant(PurpleAccountUserSplit *split,
#endif /* PURPLE_ACCOUNTOPT_H */
--- a/libpurple/meson.build Wed Oct 09 02:04:50 2019 +0000
+++ b/libpurple/meson.build Fri Sep 27 02:07:00 2019 -0500
@@ -49,6 +49,7 @@
+ 'purpleaccountusersplit.c', @@ -127,6 +128,7 @@
+ 'purpleaccountusersplit.h', --- a/libpurple/protocol.h Wed Oct 09 02:04:50 2019 +0000
+++ b/libpurple/protocol.h Fri Sep 27 02:07:00 2019 -0500
@@ -51,6 +51,7 @@
+#include "purpleaccountusersplit.h" --- a/libpurple/protocols/jabber/gtalk.c Wed Oct 09 02:04:50 2019 +0000
+++ b/libpurple/protocols/jabber/gtalk.c Fri Sep 27 02:07:00 2019 -0500
@@ -24,6 +24,7 @@
+#include "purpleaccountusersplit.h" --- a/libpurple/protocols/jabber/xmpp.c Wed Oct 09 02:04:50 2019 +0000
+++ b/libpurple/protocols/jabber/xmpp.c Fri Sep 27 02:07:00 2019 -0500
@@ -24,6 +24,7 @@
+#include "purpleaccountusersplit.h" --- a/libpurple/protocols/sametime/sametime.c Wed Oct 09 02:04:50 2019 +0000
+++ b/libpurple/protocols/sametime/sametime.c Fri Sep 27 02:07:00 2019 -0500
@@ -43,6 +43,7 @@
+#include "purpleaccountusersplit.h" --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/purpleaccountusersplit.c Fri Sep 27 02:07:00 2019 -0500
@@ -0,0 +1,131 @@
+ * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +#include "purpleaccountusersplit.h" + * This is used by some protocols to separate the fields of the username + * into more human-readable components. +struct _PurpleAccountUserSplit + char *text; /* The text that will appear to the user. */ + char *default_value; /* The default value. */ + char field_sep; /* The field separator. */ + gboolean reverse; /* TRUE if the separator should be found + starting a the end of the string, FALSE +/************************************************************************** + * Account User Split API + **************************************************************************/ +PurpleAccountUserSplit * +purple_account_user_split_new(const char *text, const char *default_value, + PurpleAccountUserSplit *split; + g_return_val_if_fail(text != NULL, NULL); + g_return_val_if_fail(sep != 0, NULL); + split = g_new0(PurpleAccountUserSplit, 1); + split->text = g_strdup(text); + split->field_sep = sep; + split->default_value = g_strdup(default_value); +purple_account_user_split_destroy(PurpleAccountUserSplit *split) + g_return_if_fail(split != NULL); + g_free(split->default_value); +purple_account_user_split_get_text(const PurpleAccountUserSplit *split) + g_return_val_if_fail(split != NULL, NULL); +purple_account_user_split_get_default_value(const PurpleAccountUserSplit *split) + g_return_val_if_fail(split != NULL, NULL); + return split->default_value; +purple_account_user_split_get_separator(const PurpleAccountUserSplit *split) + g_return_val_if_fail(split != NULL, 0); + return split->field_sep; +purple_account_user_split_get_reverse(const PurpleAccountUserSplit *split) + g_return_val_if_fail(split != NULL, FALSE); +purple_account_user_split_set_reverse(PurpleAccountUserSplit *split, gboolean reverse) + g_return_if_fail(split != NULL); + split->reverse = reverse; +purple_account_user_split_is_constant(const PurpleAccountUserSplit *split) + g_return_val_if_fail(split != NULL, FALSE); + return split->constant; +purple_account_user_split_set_constant(PurpleAccountUserSplit *split, + g_return_if_fail(split != NULL); + split->constant = constant; --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/purpleaccountusersplit.h Fri Sep 27 02:07:00 2019 -0500
@@ -0,0 +1,152 @@
+ * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +#ifndef PURPLE_ACCOUNT_SPLIT_H +#define PURPLE_ACCOUNT_SPLIT_H + * @section_id: libpurple-accountopt + * @short_description: <filename>accountopt.h</filename> + * @title: Account Options API +/**************************************************************************/ +/**************************************************************************/ + * PurpleAccountUserSplit: + * This is used by some protocols to separate the fields of the username + * into more human-readable components. +typedef struct _PurpleAccountUserSplit PurpleAccountUserSplit; +/**************************************************************************/ +/* Account User Split API */ +/**************************************************************************/ + * purple_account_user_split_new: + * @text: The text of the option. + * @default_value: The default value. + * @sep: The field separator. + * Creates a new account username split. + * Returns: The new user split. +PurpleAccountUserSplit *purple_account_user_split_new(const char *text, + const char *default_value, + * purple_account_user_split_destroy: + * @split: The split to destroy. + * Destroys an account username split. +void purple_account_user_split_destroy(PurpleAccountUserSplit *split); + * purple_account_user_split_get_text: + * @split: The account username split. + * Returns the text for an account username split. + * Returns: The account username split's text. +const char *purple_account_user_split_get_text(const PurpleAccountUserSplit *split); + * purple_account_user_split_get_default_value: + * @split: The account username split. + * Returns the default string value for an account split. + * Returns: The default string. +const char *purple_account_user_split_get_default_value( + const PurpleAccountUserSplit *split); + * purple_account_user_split_get_separator: + * @split: The account username split. + * Returns the field separator for an account split. + * Returns: The field separator. +char purple_account_user_split_get_separator(const PurpleAccountUserSplit *split); + * purple_account_user_split_get_reverse: + * @split: The account username split. + * Returns the 'reverse' value for an account split. + * Returns: The 'reverse' value. +gboolean purple_account_user_split_get_reverse(const PurpleAccountUserSplit *split); + * purple_account_user_split_set_reverse: + * @split: The account username split. + * @reverse: The 'reverse' value + * Sets the 'reverse' value for an account split. +void purple_account_user_split_set_reverse(PurpleAccountUserSplit *split, gboolean reverse); + * purple_account_user_split_is_constant: + * @split: The account username split. + * Returns the constant parameter for an account split. + * When split is constant, it does not need to be displayed + * in configuration dialog. + * Returns: %TRUE, if the split is constant. +purple_account_user_split_is_constant(const PurpleAccountUserSplit *split); + * purple_account_user_split_set_constant: + * @split: The account username split. + * @constant: %TRUE, if the split is a constant part. + * Sets the constant parameter of account split. +purple_account_user_split_set_constant(PurpleAccountUserSplit *split, +#endif /* PURPLE_ACCOUNT_SPLIT_H */