26 #ifndef _PURPLE_INTERNAL_H_ 27 #define _PURPLE_INTERNAL_H_ 35 #include <net/sockios.h> 51 # define _(String) ((const char *)dgettext(PACKAGE, String)) 53 # define N_(String) gettext_noop (String) 55 # define N_(String) (String) 59 # define N_(String) (String) 61 # define _(String) ((const char *)String) 63 # define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural)) 64 # define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural)) 75 #define BUF_LEN MSG_LEN 76 #define BUF_LONG BUF_LEN * 2 79 #include <sys/types.h> 98 #ifdef HAVE_LANGINFO_CODESET 104 #ifdef PURPLE_PLUGINS 111 # include <netinet/in.h> 112 # include <sys/socket.h> 113 # include <arpa/inet.h> 115 # include <sys/utsname.h> 121 #ifndef HOST_NAME_MAX 122 # define HOST_NAME_MAX 255 129 # if GLIB_SIZEOF_LONG == 8 130 # define G_MAXSSIZE ((gssize) 0x7fffffffffffffff) 132 # define G_MAXSSIZE ((gssize) 0x7fffffff) 136 #include <glib/gstdio.h> 139 #include "win32dep.h" 143 #if SIZEOF_TIME_T == 4 144 # define PURPLE_TIME_T_MODIFIER "lu" 145 #elif SIZEOF_TIME_T == 8 146 # define PURPLE_TIME_T_MODIFIER "zu" 148 #error Unknown size of time_t 152 #include <glib-object.h> 154 #if !GLIB_CHECK_VERSION(2, 32, 0) 156 #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS 157 #define G_GNUC_END_IGNORE_DEPRECATIONS 163 #undef G_GNUC_BEGIN_IGNORE_DEPRECATIONS 164 #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ 165 _Pragma ("clang diagnostic push") \ 166 _Pragma ("clang diagnostic ignored \"-Wdeprecated-declarations\"") 168 #undef G_GNUC_END_IGNORE_DEPRECATIONS 169 #define G_GNUC_END_IGNORE_DEPRECATIONS \ 170 _Pragma ("clang diagnostic pop") 177 #undef g_utf8_next_char 178 #define g_utf8_next_char(p) (char *)((p) + 1) 185 #define purple_strlcpy(dest, src) g_strlcpy(dest, src, sizeof(dest)) 186 #define purple_strlcat(dest, src) g_strlcat(dest, src, sizeof(dest)) 191 struct sockaddr_in in;
192 struct sockaddr_in6 in6;
193 struct sockaddr_storage storage;
196 #define PURPLE_WEBSITE "http://pidgin.im/" 197 #define PURPLE_DEVEL_WEBSITE "http://developer.pidgin.im/" 208 _purple_buddy_icons_account_loaded_cb(
void);
213 _purple_buddy_icons_blist_loaded_cb(
void);
219 _purple_buddy_icon_set_old_icons_dir(
const char *dirname);
239 const char *password);
253 PurpleAccountUnregistrationCb cb,
void *user_data);
gboolean _purple_network_set_common_socket_flags(int fd)
Sets most commonly used socket flags: O_NONBLOCK and FD_CLOEXEC.
Structure representing an account.
void _purple_connection_new(PurpleAccount *account, gboolean regist, const char *password)
Creates a connection to the specified account and either connects or attempts to register a new accou...
void _purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data)
Tries to unregister the account on the server.
void _purple_connection_destroy(PurpleConnection *gc)
Disconnects and destroys a PurpleConnection.