treebird/src/conversations.h
nekobit 95bca87556 Messages
FossilOrigin-Name: 74fe969864d4419e2a040bda2e5482806ed3fd390dafe66c7ec9962304cd763d
2022-07-05 09:44:38 +00:00

43 lines
1.7 KiB
C

/*
* Treebird - Lightweight frontend for Pleroma
* Copyright (C) 2022 Nekobit
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef CONVERSATIONS_H
#define CONVERSATIONS_H
#include <stddef.h>
#include <mastodont.h>
#include "session.h"
char* construct_chat(struct mstdnt_chat* chat, size_t* size);
char* construct_chats(struct mstdnt_chat* chats, size_t size, size_t* ret_size);
char* construct_chats_view(char* lists_string, size_t* size);
// Message
char* construct_message(struct mstdnt_message* message,
struct mstdnt_account* your_profile,
struct mstdnt_account* their_profile,
size_t* size);
char* construct_messages(struct mstdnt_message* message,
struct mstdnt_account* your_profile,
struct mstdnt_account* their_profile,
size_t size,
size_t* ret_size);
void content_chats(struct session* ssn, mastodont_t* api, char** data);
void content_chat_view(struct session* ssn, mastodont_t* api, char** data);
#endif // LISTS_H