2014-09-28 03:29:34 +02:00
|
|
|
/*
|
2017-02-04 01:00:25 +01:00
|
|
|
* Copyright (c) 2017 Håvard Pettersson <mail@haavard.me>
|
2014-09-28 03:29:34 +02: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_MESSAGE_QUEUE_H
|
|
|
|
#define TOX_WEECHAT_MESSAGE_QUEUE_H
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
#include <tox/tox.h>
|
|
|
|
|
|
|
|
#include "twc-chat.h"
|
|
|
|
|
|
|
|
struct t_twc_profile;
|
|
|
|
struct t_twc_list_item;
|
|
|
|
|
|
|
|
struct t_twc_queued_message
|
|
|
|
{
|
|
|
|
struct tm *time;
|
|
|
|
char *message;
|
2016-12-22 13:35:08 +01:00
|
|
|
TOX_MESSAGE_TYPE message_type;
|
2014-09-28 03:29:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void
|
|
|
|
twc_message_queue_add_friend_message(struct t_twc_profile *profile,
|
|
|
|
int32_t friend_number,
|
|
|
|
const char *message,
|
2016-12-22 13:35:08 +01:00
|
|
|
TOX_MESSAGE_TYPE message_type);
|
2014-09-28 03:29:34 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
twc_message_queue_flush_friend(struct t_twc_profile *profile,
|
|
|
|
int32_t friend_number);
|
|
|
|
|
|
|
|
void
|
|
|
|
twc_message_queue_free_message(struct t_twc_queued_message *message);
|
|
|
|
|
|
|
|
void
|
|
|
|
twc_message_queue_free_profile(struct t_twc_profile *profile);
|
|
|
|
|
|
|
|
#endif // TOX_WEECHAT_MESSAGE_QUEUE_H
|
|
|
|
|