prpl.h File Reference

Protocol Plugin functions

purple. More...

#include "blist.h"
#include "conversation.h"
#include "ft.h"
#include "imgstore.h"
#include "notify.h"
#include "proxy.h"
#include "plugin.h"
#include "roomlist.h"
#include "status.h"
#include "whiteboard.h"

Include dependency graph for prpl.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _PurpleBuddyIconSpec
struct  proto_chat_entry
struct  _PurplePluginProtocolInfo
 A protocol plugin information structure. More...

Basic Protocol Information

#define NO_BUDDY_ICONS   {NULL, 0, 0, 0, 0, 0, 0}
 This #define exists just to make it easier to fill out the buddy icon field in the prpl info struct for protocols that couldn't care less.
#define PURPLE_IS_PROTOCOL_PLUGIN(plugin)   ((plugin)->info->type == PURPLE_PLUGIN_PROTOCOL)
#define PURPLE_PLUGIN_PROTOCOL_INFO(plugin)   ((PurplePluginProtocolInfo *)(plugin)->info->extra_info)
typedef _PurpleBuddyIconSpec PurpleBuddyIconSpec
 A description of a Buddy Icon specification.
enum  PurpleIconScaleRules { PURPLE_ICON_SCALE_DISPLAY = 0x01, PURPLE_ICON_SCALE_SEND = 0x02 }
enum  PurpleProtocolOptions {
  OPT_PROTO_UNIQUE_CHATNAME = 0x00000004, OPT_PROTO_CHAT_TOPIC = 0x00000008, OPT_PROTO_NO_PASSWORD = 0x00000010, OPT_PROTO_MAIL_CHECK = 0x00000020,
  OPT_PROTO_IM_IMAGE = 0x00000040, OPT_PROTO_PASSWORD_OPTIONAL = 0x00000080, OPT_PROTO_USE_POINTSIZE = 0x00000100, OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200,
  OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400
}
 Protocol options. More...

Protocol Plugin API

void purple_prpl_got_account_idle (PurpleAccount *account, gboolean idle, time_t idle_time)
 Notifies Purple that an account's idle state and time have changed.
void purple_prpl_got_account_login_time (PurpleAccount *account, time_t login_time)
 Notifies Purple of an account's log-in time.
void purple_prpl_got_account_status (PurpleAccount *account, const char *status_id,...) G_GNUC_NULL_TERMINATED
 Notifies Purple that an account's status has changed.
void purple_prpl_got_user_idle (PurpleAccount *account, const char *name, gboolean idle, time_t idle_time)
 Notifies Purple that a user's idle state and time have changed.
void purple_prpl_got_user_login_time (PurpleAccount *account, const char *name, time_t login_time)
 Notifies Purple of a user's log-in time.
void purple_prpl_got_user_status (PurpleAccount *account, const char *name, const char *status_id,...) G_GNUC_NULL_TERMINATED
 Notifies Purple that a user's status has been activated.
void purple_prpl_got_user_status_deactive (PurpleAccount *account, const char *name, const char *status_id)
 Notifies libpurple that a user's status has been deactivated.
void purple_prpl_change_account_status (PurpleAccount *account, PurpleStatus *old_status, PurpleStatus *new_status)
 Informs the server that an account's status changed.
GList * purple_prpl_get_statuses (PurpleAccount *account, PurplePresence *presence)
 Retrieves the list of stock status types from a prpl.

Protocol Plugin Subsystem API

PurplePluginpurple_find_prpl (const char *id)
 Finds a protocol plugin structure of the specified type.

Typedefs

typedef _PurplePluginProtocolInfo PurplePluginProtocolInfo


Detailed Description

Protocol Plugin functions

purple.

Purple is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this source distribution.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Typedef Documentation

typedef struct _PurpleBuddyIconSpec PurpleBuddyIconSpec
 

A description of a Buddy Icon specification.

This tells Purple what kind of image file it should give this prpl, and what kind of image file it should expect back. Dimensions less than 1 should be ignored and the image not scaled.


Enumeration Type Documentation

enum PurpleIconScaleRules
 

Enumerator:
PURPLE_ICON_SCALE_DISPLAY  We scale the icon when we display it.
PURPLE_ICON_SCALE_SEND  We scale the icon before we send it to the server.

enum PurpleProtocolOptions
 

Protocol options.

These should all be stuff that some plugins can do and others can't.

Enumerator:
OPT_PROTO_UNIQUE_CHATNAME  Use a unique name, not an alias, for chat rooms.

XMPP lets you choose what name you want for chat. So it shouldn't be pulling the alias for when you're in chat; it gets annoying.

OPT_PROTO_CHAT_TOPIC  Chat rooms have topics.

IRC and XMPP support this.

OPT_PROTO_NO_PASSWORD  Don't require passwords for sign-in.

Zephyr doesn't require passwords, so there's no need for a password prompt.

OPT_PROTO_MAIL_CHECK  Notify on new mail.

MSN and Yahoo notify you when you have new mail.

OPT_PROTO_IM_IMAGE  Images in IMs.

Oscar lets you send images in direct IMs.

OPT_PROTO_PASSWORD_OPTIONAL  Allow passwords to be optional.

Passwords in IRC are optional, and are needed for certain functionality.

OPT_PROTO_USE_POINTSIZE  Allows font size to be specified in sane point size.

Probably just XMPP and Y!M

OPT_PROTO_REGISTER_NOSCREENNAME  Set the Register button active when screenname is not given.

Gadu-Gadu doesn't need a screenname to register new account.

OPT_PROTO_SLASH_COMMANDS_NATIVE  Indicates that slash commands are native to this protocol.

Used as a hint that unknown commands should not be sent as messages.


Function Documentation

PurplePlugin* purple_find_prpl const char *  id  ) 
 

Finds a protocol plugin structure of the specified type.

Parameters:
id The protocol plugin;

void purple_prpl_change_account_status PurpleAccount *  account,
PurpleStatus *  old_status,
PurpleStatus *  new_status
 

Informs the server that an account's status changed.

Parameters:
account The account the user is on.
old_status The previous status.
new_status The status that was activated, or deactivated (in the case of independent statuses).

GList* purple_prpl_get_statuses PurpleAccount *  account,
PurplePresence *  presence
 

Retrieves the list of stock status types from a prpl.

Parameters:
account The account the user is on.
presence The presence for which we're going to get statuses
Returns:
List of statuses

void purple_prpl_got_account_idle PurpleAccount *  account,
gboolean  idle,
time_t  idle_time
 

Notifies Purple that an account's idle state and time have changed.

This is meant to be called from protocol plugins.

Parameters:
account The account.
idle The user's idle state.
idle_time The user's idle time.

void purple_prpl_got_account_login_time PurpleAccount *  account,
time_t  login_time
 

Notifies Purple of an account's log-in time.

This is meant to be called from protocol plugins.

Parameters:
account The account the user is on.
login_time The user's log-in time.

void purple_prpl_got_account_status PurpleAccount *  account,
const char *  status_id,
  ...
 

Notifies Purple that an account's status has changed.

This is meant to be called from protocol plugins.

Parameters:
account The account the user is on.
status_id The status ID.
... A NULL-terminated list of attribute IDs and values, beginning with the value for attr_id.

void purple_prpl_got_user_idle PurpleAccount *  account,
const char *  name,
gboolean  idle,
time_t  idle_time
 

Notifies Purple that a user's idle state and time have changed.

This is meant to be called from protocol plugins.

Parameters:
account The account the user is on.
name The screen name of the user.
idle The user's idle state.
idle_time The user's idle time. This is the time at which the user became idle, in seconds since the epoch.

void purple_prpl_got_user_login_time PurpleAccount *  account,
const char *  name,
time_t  login_time
 

Notifies Purple of a user's log-in time.

This is meant to be called from protocol plugins.

Parameters:
account The account the user is on.
name The screen name of the user.
login_time The user's log-in time.

void purple_prpl_got_user_status PurpleAccount *  account,
const char *  name,
const char *  status_id,
  ...
 

Notifies Purple that a user's status has been activated.

This is meant to be called from protocol plugins.

Parameters:
account The account the user is on.
name The screen name of the user.
status_id The status ID.
... A NULL-terminated list of attribute IDs and values, beginning with the value for attr_id.

void purple_prpl_got_user_status_deactive PurpleAccount *  account,
const char *  name,
const char *  status_id
 

Notifies libpurple that a user's status has been deactivated.

This is meant to be called from protocol plugins.

Parameters:
account The account the user is on.
name The screen name of the user.
status_id The status ID.