1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-01 16:37:46 +02:00
toxic/src/friendlist.h

61 lines
1.7 KiB
C
Raw Normal View History

2014-02-25 08:28:24 +01:00
/* friendlist.h
*
*
* Copyright (C) 2014 Toxic All Rights Reserved.
*
* This file is part of Toxic.
*
* Toxic 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.
*
* Toxic 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 Toxic. If not, see <http://www.gnu.org/licenses/>.
*
*/
2013-08-13 00:50:43 +02:00
#ifndef FRIENDLIST_H_53I41IM
#define FRIENDLIST_H_53I41IM
#include "toxic_windows.h"
2013-11-30 00:52:21 +01:00
typedef struct {
uint8_t name[TOX_MAX_NAME_LENGTH];
uint16_t namelength;
uint8_t statusmsg[TOX_MAX_STATUSMESSAGE_LENGTH];
uint16_t statusmsg_len;
uint8_t pending_groupchat[TOX_CLIENT_ID_SIZE];
uint8_t pub_key[TOX_CLIENT_ID_SIZE];
2013-11-30 00:52:21 +01:00
int num;
int chatwin;
bool active;
bool online;
2014-02-23 10:28:33 +01:00
bool is_typing;
bool logging_on; /* saves preference for friend irrespective of chat windows */
2014-03-14 04:30:44 +01:00
uint64_t last_online;
2013-11-30 00:52:21 +01:00
TOX_USERSTATUS status;
struct FileReceiver file_receiver;
} ToxicFriend;
2014-03-09 05:57:21 +01:00
typedef struct {
int num;
bool active;
} PendingDel;
ToxWindow new_friendlist(void);
2013-08-13 00:50:43 +02:00
void disable_chatwin(int f_num);
int get_friendnum(uint8_t *name);
2013-11-25 00:22:48 +01:00
2014-03-05 14:01:12 +01:00
void friendlist_onFriendAdded(ToxWindow *self, Tox *m, int num, bool sort);
2013-11-25 00:22:48 +01:00
/* sorts friendlist_index first by connection status then alphabetically */
2014-03-14 04:30:44 +01:00
void sort_friendlist_index(void);
2013-08-13 00:50:43 +02:00
#endif /* end of include guard: FRIENDLIST_H_53I41IM */