2014-01-05 15:52:45 -05:00
|
|
|
/*
|
|
|
|
* server_events.h
|
|
|
|
*
|
2015-02-10 18:16:09 -05:00
|
|
|
* Copyright (C) 2012 - 2015 James Booth <boothj5@gmail.com>
|
2014-01-05 15:52:45 -05:00
|
|
|
*
|
|
|
|
* This file is part of Profanity.
|
|
|
|
*
|
|
|
|
* Profanity 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.
|
|
|
|
*
|
|
|
|
* Profanity 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 Profanity. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
2014-08-24 15:57:39 -04:00
|
|
|
* In addition, as a special exception, the copyright holders give permission to
|
|
|
|
* link the code of portions of this program with the OpenSSL library under
|
|
|
|
* certain conditions as described in each individual source file, and
|
|
|
|
* distribute linked combinations including the two.
|
|
|
|
*
|
|
|
|
* You must obey the GNU General Public License in all respects for all of the
|
|
|
|
* code used other than OpenSSL. If you modify file(s) with this exception, you
|
|
|
|
* may extend this exception to your version of the file(s), but you are not
|
|
|
|
* obligated to do so. If you do not wish to do so, delete this exception
|
|
|
|
* statement from your version. If you delete this exception statement from all
|
|
|
|
* source files in the program, then also delete it here.
|
|
|
|
*
|
2014-01-05 15:52:45 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SERVER_EVENTS_H
|
|
|
|
#define SERVER_EVENTS_H
|
|
|
|
|
2014-01-20 13:40:48 -05:00
|
|
|
#include "xmpp/xmpp.h"
|
|
|
|
|
2014-01-05 15:58:19 -05:00
|
|
|
void handle_login_account_success(char *account_name);
|
2014-01-05 16:04:30 -05:00
|
|
|
void handle_lost_connection(void);
|
|
|
|
void handle_failed_login(void);
|
2014-01-05 16:11:09 -05:00
|
|
|
void handle_software_version_result(const char * const jid, const char * const presence,
|
|
|
|
const char * const name, const char * const version, const char * const os);
|
2014-01-05 16:17:07 -05:00
|
|
|
void handle_disco_info(const char *from, GSList *identities, GSList *features);
|
2014-09-23 19:30:05 -04:00
|
|
|
void handle_disco_info_error(const char * const from, const char * const error);
|
2014-01-05 16:20:15 -05:00
|
|
|
void handle_room_list(GSList *rooms, const char *conference_node);
|
|
|
|
void handle_disco_items(GSList *items, const char *jid);
|
2014-01-05 16:33:12 -05:00
|
|
|
void handle_room_invite(jabber_invite_t invite_type,
|
|
|
|
const char * const invitor, const char * const room,
|
|
|
|
const char * const reason);
|
|
|
|
void handle_room_broadcast(const char *const room_jid,
|
|
|
|
const char * const message);
|
2014-10-04 22:05:46 -04:00
|
|
|
void handle_room_subject(const char * const room, const char * const nick, const char * const subject);
|
2014-01-05 16:33:12 -05:00
|
|
|
void handle_room_history(const char * const room_jid, const char * const nick,
|
|
|
|
GTimeVal tv_stamp, const char * const message);
|
|
|
|
void handle_room_message(const char * const room_jid, const char * const nick,
|
|
|
|
const char * const message);
|
2014-04-20 19:37:04 -04:00
|
|
|
void handle_room_join_error(const char * const room, const char * const err);
|
2014-10-02 18:37:10 -04:00
|
|
|
void handle_room_info_error(const char * const room, const char * const error);
|
2015-03-28 20:55:33 -04:00
|
|
|
void handle_room_disco_info(const char * const room, GSList *identities, GSList *features, gboolean display);
|
2014-10-04 20:39:48 -04:00
|
|
|
void handle_room_affiliation_list_result_error(const char * const room, const char * const affiliation,
|
|
|
|
const char * const error);
|
|
|
|
void handle_room_affiliation_list(const char * const room, const char * const affiliation, GSList *jids);
|
|
|
|
void handle_room_affiliation_set_error(const char * const room, const char * const jid, const char * const affiliation,
|
|
|
|
const char * const error);
|
2014-10-06 16:42:09 -04:00
|
|
|
void handle_room_role_list_result_error(const char * const from, const char * const role, const char * const error);
|
|
|
|
void handle_room_role_list(const char * const from, const char * const role, GSList *nicks);
|
|
|
|
void handle_room_role_set_error(const char * const room, const char * const nick, const char * const role,
|
|
|
|
const char * const error);
|
2014-10-04 22:52:55 -04:00
|
|
|
void handle_room_kick_result_error(const char * const room, const char * const nick, const char * const error);
|
2015-01-10 13:35:59 -05:00
|
|
|
void handle_incoming_message(char *barejid, char *resource, char *message);
|
2014-12-10 17:23:33 -05:00
|
|
|
void handle_incoming_private_message(char *fulljid, char *message);
|
|
|
|
void handle_delayed_message(char *fulljid, char *message, GTimeVal tv_stamp);
|
|
|
|
void handle_delayed_private_message(char *fulljid, char *message, GTimeVal tv_stamp);
|
2015-01-11 15:20:17 -05:00
|
|
|
void handle_typing(char *barejid, char *resource);
|
|
|
|
void handle_paused(char *barejid, char *resource);
|
|
|
|
void handle_inactive(char *barejid, char *resource);
|
|
|
|
void handle_activity(char *barejid, char *resource, gboolean send_states);
|
2015-01-11 18:04:22 -05:00
|
|
|
void handle_gone(const char * const barejid, const char * const resource);
|
2014-01-05 16:48:04 -05:00
|
|
|
void handle_subscription(const char *from, jabber_subscr_t type);
|
2015-03-11 19:18:28 -04:00
|
|
|
void handle_message_receipt(char *barejid, char *id);
|
2014-01-05 16:48:04 -05:00
|
|
|
void handle_contact_offline(char *contact, char *resource, char *status);
|
|
|
|
void handle_contact_online(char *contact, Resource *resource,
|
|
|
|
GDateTime *last_activity);
|
|
|
|
void handle_leave_room(const char * const room);
|
2014-09-03 17:00:08 -04:00
|
|
|
void handle_room_destroy(const char * const room);
|
2014-10-06 19:46:08 -04:00
|
|
|
void handle_room_occupant_offline(const char * const room, const char * const nick,
|
2014-01-05 16:48:04 -05:00
|
|
|
const char * const show, const char * const status);
|
2014-10-05 15:52:34 -04:00
|
|
|
void handle_room_destroyed(const char * const room, const char * const new_jid, const char * const password,
|
|
|
|
const char * const reason);
|
|
|
|
void handle_room_kicked(const char * const room, const char * const actor, const char * const reason);
|
|
|
|
void handle_room_occupent_kicked(const char * const room, const char * const nick, const char * const actor,
|
|
|
|
const char * const reason);
|
2014-10-06 17:59:25 -04:00
|
|
|
void handle_room_banned(const char * const room, const char * const actor, const char * const reason);
|
|
|
|
void handle_room_occupent_banned(const char * const room, const char * const nick, const char * const actor,
|
|
|
|
const char * const reason);
|
2014-01-05 16:55:32 -05:00
|
|
|
void handle_group_add(const char * const contact,
|
|
|
|
const char * const group);
|
|
|
|
void handle_group_remove(const char * const contact,
|
|
|
|
const char * const group);
|
|
|
|
void handle_roster_remove(const char * const barejid);
|
2014-01-05 18:54:29 -05:00
|
|
|
void handle_roster_add(const char * const barejid, const char * const name);
|
2014-01-25 19:53:24 -05:00
|
|
|
void handle_autoping_cancel(void);
|
2015-02-02 05:10:05 -05:00
|
|
|
void handle_carbon(char *barejid, char *message);
|
2014-01-28 17:37:50 -05:00
|
|
|
void handle_message_error(const char * const from, const char * const type,
|
|
|
|
const char * const err_msg);
|
2014-01-30 17:20:57 -05:00
|
|
|
void handle_presence_error(const char *from, const char * const type,
|
|
|
|
const char *err_msg);
|
2014-04-14 20:08:41 -04:00
|
|
|
void handle_xmpp_stanza(const char * const msg);
|
2014-09-03 20:08:10 -04:00
|
|
|
void handle_ping_result(const char * const from, int millis);
|
2014-09-07 16:50:59 -04:00
|
|
|
void handle_ping_error_result(const char * const from, const char * const error);
|
2014-09-04 18:15:51 -04:00
|
|
|
void handle_room_configure(const char * const room, DataForm *form);
|
2014-09-09 18:16:12 -04:00
|
|
|
void handle_room_configuration_form_error(const char * const from, const char * const message);
|
2014-09-17 16:48:55 -04:00
|
|
|
void handle_room_config_submit_result(const char * const room);
|
|
|
|
void handle_room_config_submit_result_error(const char * const room, const char * const message);
|
2014-10-06 19:22:39 -04:00
|
|
|
void handle_muc_self_online(const char * const room, const char * const nick, gboolean config_required,
|
2014-10-17 20:37:52 -04:00
|
|
|
const char * const role, const char * const affiliation, const char * const actor, const char * const reason,
|
|
|
|
const char * const jid, const char * const show, const char * const status);
|
2014-10-06 19:22:39 -04:00
|
|
|
void handle_muc_occupant_online(const char * const room, const char * const nick, const char * const jid,
|
2014-10-18 14:10:50 -04:00
|
|
|
const char * const role, const char * const affiliation, const char * const actor, const char * const reason,
|
|
|
|
const char * const show_str, const char * const status_str);
|
2014-11-12 19:22:22 -05:00
|
|
|
void handle_roster_update(const char * const barejid, const char * const name,
|
|
|
|
GSList *groups, const char * const subscription, gboolean pending_out);
|
2014-11-19 19:32:33 -05:00
|
|
|
void handle_roster_received(void);
|
2015-03-09 19:07:51 -04:00
|
|
|
void handle_enable_carbons_error(const char * const error);
|
|
|
|
void handle_disable_carbons_error(const char * const error);
|
2014-01-05 15:52:45 -05:00
|
|
|
|
|
|
|
#endif
|