3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
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.
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.
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
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef PURPLE_ACCOUNT_USER_SPLIT_H
23 #define PURPLE_ACCOUNT_USER_SPLIT_H
26 * SECTION:accountusersplit
27 * @section_id: libpurple-account-user-split
28 * @short_description: Username splitting
29 * @title: Account Username Splitting API
33 #include <glib-object.h>
35 #define PURPLE_TYPE_ACCOUNT_USER_SPLIT (purple_account_user_split_get_type())
38 * PurpleAccountUserSplit:
42 * This is used by some protocols to separate the fields of the username
43 * into more human-readable components.
45 typedef struct _PurpleAccountUserSplit PurpleAccountUserSplit
;
49 GType
purple_account_user_split_get_type(void);
52 * purple_account_user_split_new:
53 * @text: The text of the option.
54 * @default_value: The default value.
55 * @sep: The field separator.
57 * Creates a new account username split.
59 * Returns: The new user split.
61 PurpleAccountUserSplit
*purple_account_user_split_new(const gchar
*text
, const gchar
*default_value
, gchar sep
);
64 * purple_account_user_split_copy:
65 * @split: The split to copy.
67 * Creates a copy of @split.
69 * Returns: (transfer full): A copy of @split.
73 PurpleAccountUserSplit
*purple_account_user_split_copy(PurpleAccountUserSplit
*split
);
76 * purple_account_user_split_destroy:
77 * @split: The split to destroy.
79 * Destroys an account username split.
81 void purple_account_user_split_destroy(PurpleAccountUserSplit
*split
);
84 * purple_account_user_split_get_text:
85 * @split: The account username split.
87 * Returns the text for an account username split.
89 * Returns: The account username split's text.
91 const gchar
*purple_account_user_split_get_text(const PurpleAccountUserSplit
*split
);
94 * purple_account_user_split_get_default_value:
95 * @split: The account username split.
97 * Returns the default string value for an account split.
99 * Returns: The default string.
101 const gchar
*purple_account_user_split_get_default_value(const PurpleAccountUserSplit
*split
);
104 * purple_account_user_split_get_separator:
105 * @split: The account username split.
107 * Returns the field separator for an account split.
109 * Returns: The field separator.
111 gchar
purple_account_user_split_get_separator(const PurpleAccountUserSplit
*split
);
114 * purple_account_user_split_get_reverse:
115 * @split: The account username split.
117 * Returns the 'reverse' value for an account split.
119 * Returns: The 'reverse' value.
121 gboolean
purple_account_user_split_get_reverse(const PurpleAccountUserSplit
*split
);
124 * purple_account_user_split_set_reverse:
125 * @split: The account username split.
126 * @reverse: The 'reverse' value
128 * Sets the 'reverse' value for an account split.
130 void purple_account_user_split_set_reverse(PurpleAccountUserSplit
*split
, gboolean reverse
);
133 * purple_account_user_split_is_constant:
134 * @split: The account username split.
136 * Returns the constant parameter for an account split.
138 * When split is constant, it does not need to be displayed
139 * in configuration dialog.
141 * Returns: %TRUE, if the split is constant.
143 gboolean
purple_account_user_split_is_constant(const PurpleAccountUserSplit
*split
);
146 * purple_account_user_split_set_constant:
147 * @split: The account username split.
148 * @constant: %TRUE, if the split is a constant part.
150 * Sets the constant parameter of account split.
152 void purple_account_user_split_set_constant(PurpleAccountUserSplit
*split
, gboolean constant
);
156 #endif /* PURPLE_ACCOUNT_USER_SPLIT_H */