tox-weechat/src/twc-tox-callbacks.h

83 lines
2.8 KiB
C
Raw Normal View History

2014-09-28 01:29:34 +00:00
/*
2017-02-04 00:00:25 +00:00
* Copyright (c) 2017 Håvard Pettersson <mail@haavard.me>
2014-09-28 01:29:34 +00:00
*
* This file is part of Tox-WeeChat.
*
* Tox-WeeChat 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.
*
* Tox-WeeChat 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 Tox-WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOX_WEECHAT_TOX_CALLBACKS_H
#define TOX_WEECHAT_TOX_CALLBACKS_H
#include <tox/tox.h>
int
twc_do_timer_cb(const void *pointer, void *data,
2014-09-28 01:29:34 +00:00
int remaining_calls);
void
2015-04-09 22:08:40 +00:00
twc_friend_message_callback(Tox *tox, uint32_t friend_number,
2016-12-22 12:35:08 +00:00
TOX_MESSAGE_TYPE type, const uint8_t *message,
size_t length, void *data);
2014-09-28 01:29:34 +00:00
void
2015-04-09 22:08:40 +00:00
twc_connection_status_callback(Tox *tox, uint32_t friend_number,
TOX_CONNECTION status, void *data);
2014-09-28 01:29:34 +00:00
void
2015-04-09 22:08:40 +00:00
twc_name_change_callback(Tox *tox, uint32_t friend_number,
const uint8_t *name, size_t length,
2014-09-28 01:29:34 +00:00
void *data);
void
2015-04-09 22:08:40 +00:00
twc_user_status_callback(Tox *tox, uint32_t friend_number,
TOX_USER_STATUS status, void *data);
2014-09-28 01:29:34 +00:00
void
2015-04-09 22:08:40 +00:00
twc_status_message_callback(Tox *tox, uint32_t friend_number,
const uint8_t *message, size_t length,
2014-09-28 01:29:34 +00:00
void *data);
void
2014-11-18 15:12:45 +00:00
twc_friend_request_callback(Tox *tox, const uint8_t *public_key,
2015-04-09 22:08:40 +00:00
const uint8_t *message, size_t length,
2014-09-28 01:29:34 +00:00
void *data);
2014-10-04 21:13:49 +00:00
void
twc_group_invite_callback(Tox *tox,
2016-12-22 12:35:08 +00:00
uint32_t friend_number, TOX_CONFERENCE_TYPE type,
const uint8_t *invite_data, size_t length,
2014-10-04 21:13:49 +00:00
void *data);
void
twc_group_message_callback(Tox *tox,
2016-12-22 12:35:08 +00:00
uint32_t group_number, uint32_t peer_number,
TOX_MESSAGE_TYPE type, const uint8_t *message,
size_t length, void *data);
2014-10-04 21:13:49 +00:00
2014-10-05 03:22:59 +00:00
void
twc_group_namelist_change_callback(Tox *tox,
2016-12-22 12:35:08 +00:00
uint32_t group_number, uint32_t peer_number,
TOX_CONFERENCE_STATE_CHANGE change_type,
2014-10-05 03:22:59 +00:00
void *data);
2014-11-18 15:04:57 +00:00
void
twc_group_title_callback(Tox *tox,
2016-12-22 12:35:08 +00:00
uint32_t group_number, uint32_t peer_number,
const uint8_t *title, size_t length,
2014-11-18 15:04:57 +00:00
void *data);
2014-09-28 01:29:34 +00:00
#endif // TOX_WEECHAT_TOX_CALLBACKS_H