internal.h File Reference

Internal definitions and includes. More...

#include <locale.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <gmodule.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/un.h>
#include <sys/utsname.h>
#include <netdb.h>
#include <signal.h>
#include <unistd.h>
#include <glib.h>
#include "account.h"
#include "connection.h"

Go to the source code of this file.

Defines

#define N_(String)   (String)
#define _(String)   ((const char *)String)
#define ngettext(Singular, Plural, Number)   ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
#define dngettext(Domain, Singular, Plural, Number)   ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
#define MSG_LEN   2048
#define BUF_LEN   MSG_LEN
#define BUF_LONG   BUF_LEN * 2
#define MAXPATHLEN   1024
#define HOST_NAME_MAX   255
#define G_MAXUINT32   ((guint32) 0xffffffff)
#define G_MAXSIZE   ((gsize) 0xffffffff)
#define g_freopen   freopen
#define g_fopen   fopen
#define g_rmdir   rmdir
#define g_remove   remove
#define g_unlink   unlink
#define g_lstat   lstat
#define g_stat   stat
#define g_mkdir   mkdir
#define g_rename   rename
#define g_open   open
#define g_access   access
#define g_slice_new(type)   g_new(type, 1)
#define g_slice_new0(type)   g_new0(type, 1)
#define g_slice_free(type, mem)   g_free(mem)
#define G_GINT64_MODIFIER   "ll"
#define G_GSIZE_MODIFIER   ""
#define G_GSIZE_FORMAT   "u"
#define G_GSSIZE_FORMAT   "i"
#define purple_strlcpy(dest, src)   g_strlcpy(dest, src, sizeof(dest))
#define purple_strlcat(dest, src)   g_strlcat(dest, src, sizeof(dest))
#define PURPLE_WEBSITE   "http://pidgin.im/"
#define PURPLE_DEVEL_WEBSITE   "http://developer.pidgin.im/"

Functions

void _purple_buddy_icons_account_loaded_cb (void)
void _purple_buddy_icons_blist_loaded_cb (void)
void _purple_buddy_icon_set_old_icons_dir (const char *dirname)
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 account.
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.


Detailed Description

Internal definitions and includes.

Definition in file internal.h.


Function Documentation

void _purple_connection_destroy ( PurpleConnection gc  ) 

Disconnects and destroys a PurpleConnection.

Note:
This function should only be called by purple_account_disconnect() in account.c. If you're trying to sign off an account, use that function instead.
Parameters:
gc The purple connection to destroy.

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 account.

If you are logging in, the connection uses the current active status for this account. So if you want to sign on as "away," for example, you need to have called purple_account_set_status(account, "away"). (And this will call purple_account_connect() automatically).

Note:
This function should only be called by purple_account_connect() in account.c. If you're trying to sign on an account, use that function instead.
Parameters:
account The account the connection should be connecting to.
regist Whether we are registering a new account or just trying to do a normal signon.
password The password to use.

void _purple_connection_new_unregister ( PurpleAccount account,
const char *  password,
PurpleAccountUnregistrationCb  cb,
void *  user_data 
)

Tries to unregister the account on the server.

If the account is not connected, also creates a new connection.

Note:
This function should only be called by purple_account_unregister() in account.c.
Parameters:
account The account to unregister
password The password to use.
cb Optional callback to be called when unregistration is complete
user_data user data to pass to the callback