26 #ifndef _PURPLE_INTERNAL_H_ 27 #define _PURPLE_INTERNAL_H_ 35 #include <net/sockios.h> 51 # define __APPLE_CC__ 0 54 # define _(String) ((const char *)dgettext(PACKAGE, String)) 56 # define N_(String) gettext_noop (String) 58 # define N_(String) (String) 62 # define N_(String) (String) 64 # define _(String) ((const char *)String) 66 # define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural)) 67 # define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural)) 78 #define BUF_LEN MSG_LEN 79 #define BUF_LONG BUF_LEN * 2 82 #include <sys/types.h> 101 #ifdef HAVE_LANGINFO_CODESET 102 #include <langinfo.h> 107 #ifdef PURPLE_PLUGINS 114 # include <netinet/in.h> 115 # include <sys/socket.h> 116 # include <arpa/inet.h> 118 # include <sys/utsname.h> 124 #ifndef HOST_NAME_MAX 125 # define HOST_NAME_MAX 255 132 # if GLIB_SIZEOF_LONG == 8 133 # define G_MAXSSIZE ((gssize) 0x7fffffffffffffff) 135 # define G_MAXSSIZE ((gssize) 0x7fffffff) 139 #include <glib/gstdio.h> 142 #include "win32dep.h" 146 #if SIZEOF_TIME_T == 4 147 # define PURPLE_TIME_T_MODIFIER "lu" 148 #elif SIZEOF_TIME_T == 8 149 # define PURPLE_TIME_T_MODIFIER "zu" 151 #error Unknown size of time_t 155 #include <glib-object.h> 157 #if !GLIB_CHECK_VERSION(2, 32, 0) 159 #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS 160 #define G_GNUC_END_IGNORE_DEPRECATIONS 166 #undef G_GNUC_BEGIN_IGNORE_DEPRECATIONS 167 #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ 168 _Pragma ("clang diagnostic push") \ 169 _Pragma ("clang diagnostic ignored \"-Wdeprecated-declarations\"") 171 #undef G_GNUC_END_IGNORE_DEPRECATIONS 172 #define G_GNUC_END_IGNORE_DEPRECATIONS \ 173 _Pragma ("clang diagnostic pop") 180 #undef g_utf8_next_char 181 #define g_utf8_next_char(p) (char *)((p) + 1) 188 #define purple_strlcpy(dest, src) g_strlcpy(dest, src, sizeof(dest)) 189 #define purple_strlcat(dest, src) g_strlcat(dest, src, sizeof(dest)) 194 struct sockaddr_in in;
195 struct sockaddr_in6 in6;
196 struct sockaddr_storage storage;
199 #define PURPLE_WEBSITE "http://pidgin.im/" 200 #define PURPLE_DEVEL_WEBSITE "http://developer.pidgin.im/" 211 _purple_buddy_icons_account_loaded_cb(
void);
216 _purple_buddy_icons_blist_loaded_cb(
void);
222 _purple_buddy_icon_set_old_icons_dir(
const char *dirname);
242 const char *password);
256 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.