00001
00025 #ifndef _PURPLE_INTERNAL_H_
00026 #define _PURPLE_INTERNAL_H_
00027
00028 #ifdef HAVE_CONFIG_H
00029 # include <config.h>
00030 #endif
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifdef ENABLE_NLS
00044 # include <locale.h>
00045 # include <libintl.h>
00046 # define _(String) ((const char *)dgettext(PACKAGE, String))
00047 # ifdef gettext_noop
00048 # define N_(String) gettext_noop (String)
00049 # else
00050 # define N_(String) (String)
00051 # endif
00052 #else
00053 # include <locale.h>
00054 # define N_(String) (String)
00055 # ifndef _
00056 # define _(String) ((const char *)String)
00057 # endif
00058 # define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
00059 # define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
00060 #endif
00061
00062 #ifdef HAVE_ENDIAN_H
00063 # include <endian.h>
00064 #endif
00065
00066 #define MSG_LEN 2048
00067
00068
00069
00070 #define BUF_LEN MSG_LEN
00071 #define BUF_LONG BUF_LEN * 2
00072
00073 #include <sys/stat.h>
00074 #include <sys/types.h>
00075 #ifndef _WIN32
00076 #include <sys/time.h>
00077 #include <sys/wait.h>
00078 #endif
00079 #include <ctype.h>
00080 #include <errno.h>
00081 #include <fcntl.h>
00082 #include <math.h>
00083 #include <stdio.h>
00084 #include <stdlib.h>
00085 #include <string.h>
00086 #include <time.h>
00087
00088 #ifdef HAVE_ICONV
00089 #include <iconv.h>
00090 #endif
00091
00092 #ifdef HAVE_LANGINFO_CODESET
00093 #include <langinfo.h>
00094 #endif
00095
00096 #include <gmodule.h>
00097
00098 #ifdef PURPLE_PLUGINS
00099 # ifndef _WIN32
00100 # include <dlfcn.h>
00101 # endif
00102 #endif
00103
00104 #ifndef _WIN32
00105 # include <netinet/in.h>
00106 # include <sys/socket.h>
00107 # include <arpa/inet.h>
00108 # include <sys/un.h>
00109 # include <sys/utsname.h>
00110 # include <netdb.h>
00111 # include <signal.h>
00112 # include <unistd.h>
00113 #endif
00114
00115
00116
00117
00118 #if !GLIB_CHECK_VERSION(2,4,0)
00119 # ifndef MAXPATHLEN
00120 # ifdef PATH_MAX
00121 # define MAXPATHLEN PATH_MAX
00122 # else
00123 # define MAXPATHLEN 1024
00124 # endif
00125 # endif
00126 #endif
00127
00128 #ifndef HOST_NAME_MAX
00129 # define HOST_NAME_MAX 255
00130 #endif
00131
00132 #include <glib.h>
00133 #if !GLIB_CHECK_VERSION(2,4,0)
00134 # define G_MAXUINT32 ((guint32) 0xffffffff)
00135 #endif
00136
00137 #if GLIB_CHECK_VERSION(2,6,0)
00138 # include <glib/gstdio.h>
00139 #endif
00140
00141 #if !GLIB_CHECK_VERSION(2,6,0)
00142 # define g_freopen freopen
00143 # define g_fopen fopen
00144 # define g_rmdir rmdir
00145 # define g_remove remove
00146 # define g_unlink unlink
00147 # define g_lstat lstat
00148 # define g_stat stat
00149 # define g_mkdir mkdir
00150 # define g_rename rename
00151 # define g_open open
00152 #endif
00153
00154 #if !GLIB_CHECK_VERSION(2,8,0) && !defined _WIN32
00155 # define g_access access
00156 #endif
00157
00158 #if !GLIB_CHECK_VERSION(2,10,0)
00159 # define g_slice_new(type) g_new(type, 1)
00160 # define g_slice_new0(type) g_new0(type, 1)
00161 # define g_slice_free(type, mem) g_free(mem)
00162 #endif
00163
00164 #ifdef _WIN32
00165 #include "win32dep.h"
00166 #endif
00167
00168
00169
00170
00171 #ifndef G_GINT64_MODIFIER
00172 # if GLIB_SIZEOF_LONG == 8
00173 # define G_GINT64_MODIFIER "l"
00174 # else
00175 # define G_GINT64_MODIFIER "ll"
00176 # endif
00177 #endif
00178
00179 #ifndef G_GSIZE_FORMAT
00180 # if GLIB_SIZEOF_LONG == 8
00181 # define G_GSIZE_FORMAT "lu"
00182 # else
00183 # define G_GSIZE_FORMAT "u"
00184 # endif
00185 #endif
00186
00187 #ifndef G_GNUC_NULL_TERMINATED
00188 # if __GNUC__ >= 4
00189 # define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
00190 # else
00191 # define G_GNUC_NULL_TERMINATED
00192 # endif
00193 #endif
00194
00195
00196
00197
00198 #define purple_strlcpy(dest, src) g_strlcpy(dest, src, sizeof(dest))
00199 #define purple_strlcat(dest, src) g_strlcat(dest, src, sizeof(dest))
00200
00201 #define PURPLE_WEBSITE "http://pidgin.im/"
00202 #define PURPLE_DEVEL_WEBSITE "http://developer.pidgin.im/"
00203
00204
00205
00206 void
00207 _purple_buddy_icons_account_loaded_cb(void);
00208
00209
00210
00211 void
00212 _purple_buddy_icons_blist_loaded_cb(void);
00213
00214
00215
00216
00217 void
00218 _purple_buddy_icon_set_old_icons_dir(const char *dirname);
00219
00220 #endif