Phurple Reference

Anatol Belski

Copyright

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 3 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, see <http://www.gnu.org/licenses/>.


Table of Contents

I. Common
Introduction
1. Requirements
2. Installation
3. Runtime Configuration
4. Examples
II. Class Reference
I. Phurple\Client
Phurple\Client::__construct — Constructor
Phurple\Client::getInstance — Creates new Phurple\Client instance
Phurple\Client::addAccount — Adds a new account to the current client
Phurple\Client::getCoreVersion — Returns the libpurple core version string
Phurple\Client::getProtocols — Returns a list of all valid protocol plugins
Phurple\Client::initInternal — This callback method is called within the Phurple\Client::getInstance
Phurple\Client::loopCallback — This callback method is called within the Phurple\Client::runLoop
Phurple\Client::loopHeartBeat — This callback method is being called as timer
Phurple\Client::runLoop — Creates the main loop
Phurple\Client::setUserDir — Define a custom phurple settings directory.
Phurple\Client::setUiId — Set ui id
Phurple\Client::setDebug — Turn debug on or off, default off
Phurple\Client::writeConv — This callback method writes to the conversation, if implemented
Phurple\Client::writeIM — This callback method writes instant message, if implemented
Phurple\Client::onSignedOn — This callback is called at the moment, where the client gets singed on, if implemented
Phurple\Client::onSigningOn — This callback is called when the client is about to singn on, if implemented
Phurple\Client::onSignedOff — This callback is called at the moment, after the client was singed off, if implemented
Phurple\Client::onSigningOff — This callback is called when the client is about to sign off, if implemented
Phurple\Client::onAutojoin — This callback is called when the connection has signed on, if implemented
Phurple\Client::onConnectionError — This callback is called when a connection error occurs, if implemented
Phurple\Client::deleteAccount — Removes an account from the list of accounts
Phurple\Client::findAccount — Finds the specified account in the accounts list
Phurple\Client::authorizeRequest — This callback method is invoked, when someone adds us to his buddy list
Phurple\Client::iterate — Do a single glib's main loop iteration
Phurple\Client::connect — Connect the client
Phurple\Client::requestAction — Prompts user for an action
Phurple\Client::writingImMsg — Invoked when a message is being written in an IM conversation.
Phurple\Client::writingChatMsg — Invoked when a message is being written in a chat conversation.
Phurple\Client::wroteImMsg — Invoked after a message was written in IM conversation.
Phurple\Client::wroteChatMsg — Invoked after a message was written in a chat conversation.
Phurple\Client::sendingImMsg — Invoked before a message is sent to IM conversation.
Phurple\Client::sendingChatMsg — Invoked before a message is sent to chat.
Phurple\Client::sentImMsg — Invoked after a message was sent to IM conversation.
Phurple\Client::sentChatMsg — Invoked after a message was sent to chat.
Phurple\Client::receivingImMsg — Invoked when receiving IM
Phurple\Client::receivingChatMsg — Invoked when receiving chat message
Phurple\Client::receivedImMsg — Invoked after IM was received
Phurple\Client::receivedChatMsg — Invoked after a chat message was received
Phurple\Client::blockedImMsg — Invoked after IM is blocked
Phurple\Client::conversationCreated — Invoked when new conversation is created
Phurple\Client::conversationUpdated — Invoked when conversation is updated
Phurple\Client::deletingConversation — Invoked before the conversation is about to be destroyed
Phurple\Client::chatJoined — Invoked when account joins a chat
Phurple\Client::chatLeft — Invoked when account leaves a chat
Phurple\Client::buddyTyping — Invoked when buddy starts typing into conversation
Phurple\Client::buddyTypingStopped — Invoked when buddy stops typing into conversation
Phurple\Client::chatBuddyJoining — Invoked when buddy is joining a chat
Phurple\Client::chatBuddyJoined — Invoked when buddy joined a chat
Phurple\Client::chatJoinFailed — Invoked when account fails to join a chat
Phurple\Client::chatInvitingUser — Invoked when user is being invited to a chat
Phurple\Client::chatInvitedUser — Invoked when user invited another to a chat
Phurple\Client::chatBuddyLeaving — Invoked when user is leaving a chat
Phurple\Client::chatBuddyLeft — Invoked when user leavs a chat
Phurple\Client::chatInvited — Invoked when account was invited to a chat
Phurple\Client::chatInviteBlocked — Invoked when invitation to join a chat is blocked
Phurple\Client::chatTopicChanged — Invoked when chat topic is changed
Phurple\Client::chatBuddyFlags — Invoked when user flags in chat was changed
Phurple\Client::disconnect — Disconnects all the connections
Phurple\Client::quitLoop — Quits the main loop
II. Phurple\Account
Phurple\Account::__construct — Creates a new account
Phurple\Account::addBuddy — Adds a buddy to the server-side buddy list for the specified account
Phurple\Account::removeBuddy — Removes a buddy from the server-side buddy list for the specified account
Phurple\Account::setPassword — Sets the account's password
Phurple\Account::setStatus — Sets the account's status
Phurple\Account::setEnabled — Sets whether or not this account is enabled for some UI
Phurple\Account::clearSettings — Clears all protocol-specific settings on an account.
Phurple\Account::set — Sets a protocol-specific setting for an account.
Phurple\Account::get — Gets a protocol-specific setting for an account.
Phurple\Account::isConnecting — Returns whether or not the account is connecting
Phurple\Account::isDisconnecting — Indicates that account is being disconnected
Phurple\Account::isConnected — Returns whether or not the account is connected
Phurple\Account::isDisconnected — Returns whether the account is disconnected
Phurple\Account::connect — Connect the account
Phurple\Account::disconnect — Disconnect the account
Phurple\Account::getPresence — Returns account's presence
Phurple\Account::getUserName — Returns the account's username
Phurple\Account::getPassword — Returns the account's password
III. Phurple\Connection
Phurple\Connection::__construct — constructor
Phurple\Connection::getAccount — Returns the connection's account
Phurple\Connection::setAccount — Set the connection's account
Phurple\Connection::getState — Returns the connection state
IV. Phurple\Conversation
Phurple\Conversation::__construct — Creates a new conversation of the specified type
Phurple\Conversation::getName — Returns the specified conversation's name
Phurple\Conversation::sendIM — Sends a message to this IM conversation
Phurple\Conversation::setAccount — Sets the specified conversation's phurple_account
Phurple\Conversation::getAccount — Gets the account of this conversation
Phurple\Conversation::isUserInChat — Lookup user in a chat room
Phurple\Conversation::inviteUser — Invite user into a chat room
Phurple\Conversation::getTitle — Gets conversation title
Phurple\Conversation::setTitle — Set conversation title
V. Phurple\Buddy
Phurple\Buddy::__construct — Creates new buddy
Phurple\Buddy::getAccount — gets buddy's account
Phurple\Buddy::getAlias — gets buddy alias
Phurple\Buddy::getName — Gets buddy name
Phurple\Buddy::getGroup — Gets buddy's group
Phurple\Buddy::isOnline — Checks weither the buddy is online
VI. Phurple\BuddyList
Phurple\BuddyList::__construct — should newer be called
Phurple\BuddyList::load — loads the blist.xml from the homedir
Phurple\BuddyList::addBuddy — adds the buddy to the blist (optionally to the given group in the blist, not implemented yet)
Phurple\BuddyList::addChat — saves the chat into the blist
Phurple\BuddyList::addGroup — Adds new group to the blist
Phurple\BuddyList::findBuddy — returns the buddy, if found
Phurple\BuddyList::findGroup — Finds group by name }}}
Phurple\BuddyList::removeBuddy — Removes a buddy from the buddy list
Phurple\BuddyList::removeGroup — Removes an empty group from the buddy list
VII. Phurple\Group
Phurple\Group::__construct — constructor
Phurple\Group::getAccounts — gets all the accounts related to the group
Phurple\Group::getName — gets the name of the group
Phurple\Group::getOnlineCount — gets the count of the buddies in the group with the status online
Phurple\Group::getSize — gets the count of the buddies in the group

List of Tables

3.1.

List of Examples

2.1.
4.1.