2014-01-05 15:52:45 -05:00
|
|
|
/*
|
|
|
|
* server_events.h
|
|
|
|
*
|
2016-02-14 17:54:46 -05:00
|
|
|
* Copyright (C) 2012 - 2016 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"
|
|
|
|
|
2015-10-13 19:23:12 -04:00
|
|
|
void sv_ev_login_account_success(char *account_name, int secured);
|
2015-04-28 18:38:56 -04:00
|
|
|
void sv_ev_lost_connection(void);
|
|
|
|
void sv_ev_failed_login(void);
|
|
|
|
void sv_ev_room_invite(jabber_invite_t invite_type,
|
2015-10-25 18:32:46 -04:00
|
|
|
const char *const invitor, const char *const room,
|
|
|
|
const char *const reason, const char *const password);
|
|
|
|
void sv_ev_room_broadcast(const char *const room_jid, const char *const message);
|
|
|
|
void sv_ev_room_subject(const char *const room, const char *const nick, const char *const subject);
|
|
|
|
void sv_ev_room_history(const char *const room_jid, const char *const nick,
|
|
|
|
GDateTime *timestamp, const char *const message);
|
|
|
|
void sv_ev_room_message(const char *const room_jid, const char *const nick,
|
|
|
|
const char *const message);
|
2015-09-08 15:18:31 -04:00
|
|
|
void sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_message, GDateTime *timestamp);
|
2015-10-25 18:32:46 -04:00
|
|
|
void sv_ev_incoming_private_message(const char *const fulljid, char *message);
|
|
|
|
void sv_ev_delayed_private_message(const char *const fulljid, char *message, GDateTime *timestamp);
|
2015-04-28 18:38:56 -04:00
|
|
|
void sv_ev_typing(char *barejid, char *resource);
|
|
|
|
void sv_ev_paused(char *barejid, char *resource);
|
|
|
|
void sv_ev_inactive(char *barejid, char *resource);
|
|
|
|
void sv_ev_activity(char *barejid, char *resource, gboolean send_states);
|
2015-10-25 18:32:46 -04:00
|
|
|
void sv_ev_gone(const char *const barejid, const char *const resource);
|
2015-04-28 18:38:56 -04:00
|
|
|
void sv_ev_subscription(const char *from, jabber_subscr_t type);
|
2016-04-27 06:31:28 -04:00
|
|
|
void sv_ev_message_receipt(const char *const barejid, const char *const id);
|
2015-04-28 18:38:56 -04:00
|
|
|
void sv_ev_contact_offline(char *contact, char *resource, char *status);
|
2015-05-07 17:22:28 -04:00
|
|
|
void sv_ev_contact_online(char *contact, Resource *resource, GDateTime *last_activity, char *pgpkey);
|
2015-10-25 18:32:46 -04:00
|
|
|
void sv_ev_leave_room(const char *const room);
|
|
|
|
void sv_ev_room_destroy(const char *const room);
|
|
|
|
void sv_ev_room_occupant_offline(const char *const room, const char *const nick,
|
|
|
|
const char *const show, const char *const status);
|
|
|
|
void sv_ev_room_destroyed(const char *const room, const char *const new_jid, const char *const password,
|
|
|
|
const char *const reason);
|
|
|
|
void sv_ev_room_kicked(const char *const room, const char *const actor, const char *const reason);
|
|
|
|
void sv_ev_room_occupent_kicked(const char *const room, const char *const nick, const char *const actor,
|
|
|
|
const char *const reason);
|
|
|
|
void sv_ev_room_banned(const char *const room, const char *const actor, const char *const reason);
|
|
|
|
void sv_ev_room_occupent_banned(const char *const room, const char *const nick, const char *const actor,
|
|
|
|
const char *const reason);
|
2016-03-21 20:20:29 -04:00
|
|
|
void sv_ev_outgoing_carbon(char *barejid, char *message, char *pgp_message);
|
|
|
|
void sv_ev_incoming_carbon(char *barejid, char *resource, char *message, char *pgp_message);
|
2015-10-25 18:32:46 -04:00
|
|
|
void sv_ev_xmpp_stanza(const char *const msg);
|
|
|
|
void sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean config_required,
|
|
|
|
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);
|
|
|
|
void sv_ev_muc_occupant_online(const char *const room, const char *const nick, const char *const jid,
|
|
|
|
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);
|
|
|
|
void sv_ev_roster_update(const char *const barejid, const char *const name,
|
|
|
|
GSList *groups, const char *const subscription, gboolean pending_out);
|
2015-04-28 18:38:56 -04:00
|
|
|
void sv_ev_roster_received(void);
|
2015-11-09 20:20:40 -05:00
|
|
|
int sv_ev_certfail(const char *const errormsg, TLSCertificate *cert);
|
2015-10-25 18:32:46 -04:00
|
|
|
void sv_ev_lastactivity_response(const char *const from, const int seconds, const char *const msg);
|
2015-09-22 15:55:41 -04:00
|
|
|
|
2014-01-05 15:52:45 -05:00
|
|
|
#endif
|