Profanity C Plugin API
|
Go to the source code of this file.
Functions | |
void | prof_init (const char *const version, const char *const status, const char *const account_name, const char *const fulljid) |
void | prof_on_start (void) |
void | prof_on_shutdown (void) |
void | prof_on_unload (void) |
void | prof_on_connect (const char *const account_name, const char *const fulljid) |
void | prof_on_disconnect (const char *const account_name, const char *const fulljid) |
char * | prof_pre_chat_message_display (const char *const barejid, const char *const resource, const char *message) |
void | prof_post_chat_message_display (const char *const barejid, const char *const resource, const char *message) |
char * | prof_pre_chat_message_send (const char *const barejid, const char *message) |
void | prof_post_chat_message_send (const char *const barejid, const char *message) |
char * | prof_pre_room_message_display (const char *const barejid, const char *const nick, const char *message) |
void | prof_post_room_message_display (const char *const barejid, const char *const nick, const char *message) |
char * | prof_pre_room_message_send (const char *const barejid, const char *message) |
void | prof_post_room_message_send (const char *const barejid, const char *message) |
void | prof_on_room_history_message (const char *const barejid, const char *const nick, const char *const message, const char *const timestamp) |
char * | prof_pre_priv_message_display (const char *const barejid, const char *const nick, const char *message) |
void | prof_post_priv_message_display (const char *const barejid, const char *const nick, const char *message) |
char * | prof_pre_priv_message_send (const char *const barejid, const char *const nick, const char *message) |
void | prof_post_priv_message_send (const char *const barejid, const char *const nick, const char *message) |
char * | prof_on_message_stanza_send (const char *const stanza) |
int | prof_on_message_stanza_receive (const char *const stanza) |
char * | prof_on_presence_stanza_send (const char *const stanza) |
int | prof_on_presence_stanza_receive (const char *const stanza) |
char * | prof_on_iq_stanza_send (const char *const stanza) |
int | prof_on_iq_stanza_receive (const char *const stanza) |
void | prof_on_contact_offline (const char *const barejid, const char *const resource, const char *const status) |
void | prof_on_contact_presence (const char *const barejid, const char *const resource, const char *const presence, const char *const status, const int priority) |
void | prof_on_chat_win_focus (const char *const barejid) |
void | prof_on_room_win_focus (const char *const barejid) |
C Hooks.
void prof_init | ( | const char *const | version, |
const char *const | status, | ||
const char *const | account_name, | ||
const char *const | fulljid | ||
) |
Called when a plugin is loaded, either when profanity is started, or when the /plugins load or /plugins install commands are called
version | the version of Profanity |
status | the package status of Profanity, "development" or "release" |
account_name | account name of the currently logged in account, or NULL if not logged in |
fulljid | the users full Jabber ID (barejid and resource) if logged in, NULL otherwise |
void prof_on_chat_win_focus | ( | const char *const | barejid | ) |
Called when a chat window is focussed
barejid | Jabber ID of the chat window recipient |
void prof_on_connect | ( | const char *const | account_name, |
const char *const | fulljid | ||
) |
Called when the user connects with an account
account_name | account name of the account used for logging in |
fulljid | the full Jabber ID (barejid and resource) of the account |
void prof_on_contact_offline | ( | const char *const | barejid, |
const char *const | resource, | ||
const char *const | status | ||
) |
Called when a contact goes offline
barejid | Jabber ID of the contact |
resource | the resource being disconnected |
status | the status message received with the offline presence, or NULL |
void prof_on_contact_presence | ( | const char *const | barejid, |
const char *const | resource, | ||
const char *const | presence, | ||
const char *const | status, | ||
const int | priority | ||
) |
Called when a presence notification is received from a contact
barejid | Jabber ID of the contact |
resource | the resource being disconnected |
presence | presence of the contact, one of "chat", "online", "away", "xa" or "dnd" |
status | the status message received with the presence, or NULL |
priority | the priority associated with the resource |
void prof_on_disconnect | ( | const char *const | account_name, |
const char *const | fulljid | ||
) |
Called when the user disconnects an account
account_name | account name of the account being disconnected |
fulljid | the full Jabber ID (barejid and resource) of the account |
int prof_on_iq_stanza_receive | ( | const char *const | stanza | ) |
Called when an XMPP iq stanza is received
stanza | The stanza received |
char* prof_on_iq_stanza_send | ( | const char *const | stanza | ) |
Called before an XMPP iq stanza is sent
stanza | The stanza to send |
int prof_on_message_stanza_receive | ( | const char *const | stanza | ) |
Called when an XMPP message stanza is received
stanza | The stanza received |
char* prof_on_message_stanza_send | ( | const char *const | stanza | ) |
Called before an XMPP message stanza is sent
stanza | The stanza to send |
int prof_on_presence_stanza_receive | ( | const char *const | stanza | ) |
Called when an XMPP presence stanza is received
stanza | The stanza received |
char* prof_on_presence_stanza_send | ( | const char *const | stanza | ) |
Called before an XMPP presence stanza is sent
stanza | The stanza to send |
void prof_on_room_history_message | ( | const char *const | barejid, |
const char *const | nick, | ||
const char *const | message, | ||
const char *const | timestamp | ||
) |
Called when the server sends a chat room history message
barejid | Jabber ID of the room |
nick | nickname of the message sender |
message | the message to be sent |
timestamp | time the message was originally sent to the room, in ISO8601 format |
void prof_on_room_win_focus | ( | const char *const | barejid | ) |
Called when a chat room window is focussed
barejid | Jabber ID of the room |
void prof_on_shutdown | ( | void | ) |
Called when the user quits Profanity
void prof_on_start | ( | void | ) |
Called when Profanity is started
void prof_on_unload | ( | void | ) |
Called when a plugin is unloaded with the /plugins unload command
void prof_post_chat_message_display | ( | const char *const | barejid, |
const char *const | resource, | ||
const char * | message | ||
) |
Called after a chat message is displayed
barejid | Jabber ID of the message sender |
resource | resource of the message sender |
message | the received message |
void prof_post_chat_message_send | ( | const char *const | barejid, |
const char * | message | ||
) |
Called after a chat message has been sent
barejid | Jabber ID of the message recipient |
message | the sent message |
void prof_post_priv_message_display | ( | const char *const | barejid, |
const char *const | nick, | ||
const char * | message | ||
) |
Called after a private chat room message is displayed
barejid | Jabber ID of the room |
nick | nickname of the message sender |
message | the received message |
void prof_post_priv_message_send | ( | const char *const | barejid, |
const char *const | nick, | ||
const char * | message | ||
) |
Called after a private chat room message has been sent
barejid | Jabber ID of the room |
nick | nickname of the message recipient |
message | the sent message |
void prof_post_room_message_display | ( | const char *const | barejid, |
const char *const | nick, | ||
const char * | message | ||
) |
Called after a chat room message is displayed
barejid | Jabber ID of the room |
nick | nickname of the message sender |
message | the received message |
void prof_post_room_message_send | ( | const char *const | barejid, |
const char * | message | ||
) |
Called after a chat room message has been sent
barejid | Jabber ID of the room |
message | the sent message |
char* prof_pre_chat_message_display | ( | const char *const | barejid, |
const char *const | resource, | ||
const char * | message | ||
) |
Called before a chat message is displayed
barejid | Jabber ID of the message sender |
resource | resource of the message sender |
message | the received message |
char* prof_pre_chat_message_send | ( | const char *const | barejid, |
const char * | message | ||
) |
Called before a chat message is sent
barejid | Jabber ID of the message recipient |
message | the message to be sent |
char* prof_pre_priv_message_display | ( | const char *const | barejid, |
const char *const | nick, | ||
const char * | message | ||
) |
Called before a private chat room message is displayed
barejid | Jabber ID of the room |
nick | nickname of message sender |
message | the received message |
char* prof_pre_priv_message_send | ( | const char *const | barejid, |
const char *const | nick, | ||
const char * | message | ||
) |
Called before a private chat room message is sent
barejid | Jabber ID of the room |
nick | nickname of message recipient |
message | the message to be sent |
char* prof_pre_room_message_display | ( | const char *const | barejid, |
const char *const | nick, | ||
const char * | message | ||
) |
Called before a chat room message is displayed
barejid | Jabber ID of the room |
nick | nickname of message sender |
message | the received message |
char* prof_pre_room_message_send | ( | const char *const | barejid, |
const char * | message | ||
) |
Called before a chat room message is sent
barejid | Jabber ID of the room |
message | the message to be sent |