| 1 |
/*
|
| 2 |
* This program is free software; you can redistribute it and/or
|
| 3 |
* modify it under the terms of the GNU General Public License
|
| 4 |
* as published by the Free Software Foundation; either version 2
|
| 5 |
* of the License, or (at your option) any later version.
|
| 6 |
*
|
| 7 |
* This program is distributed in the hope that it will be useful,
|
| 8 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
* GNU General Public License for more details.
|
| 11 |
*
|
| 12 |
* You should have received a copy of the GNU General Public License
|
| 13 |
* along with this program; if not, write to the Free Software
|
| 14 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
| 15 |
*/
|
| 16 |
|
| 17 |
#ifndef INCLUDED_FRIENDS_H
|
| 18 |
#define INCLUDED_FRIENDS_H
|
| 19 |
|
| 20 |
typedef struct friend_struct {
|
| 21 |
char mutual; /* -1 - unloaded(used to remove deleted elems when reload); 0 - not mutual ; 1 - is mutual */
|
| 22 |
t_account *friendacc;
|
| 23 |
} t_friend;
|
| 24 |
|
| 25 |
#ifndef JUST_NEED_TYPES
|
| 26 |
|
| 27 |
extern t_account * friend_get_account(t_friend *);
|
| 28 |
extern int friend_set_account(t_friend *, t_account * acc);
|
| 29 |
extern char friend_get_mutual(t_friend *);
|
| 30 |
extern int friend_set_mutual(t_friend *, char);
|
| 31 |
|
| 32 |
extern int friendlist_unload(t_list *);
|
| 33 |
extern int friendlist_close(t_list *);
|
| 34 |
extern int friendlist_purge(t_list *);
|
| 35 |
extern int friendlist_add_account(t_list *, t_account *, int);
|
| 36 |
extern int friendlist_remove_friend(t_list * flist, t_friend *);
|
| 37 |
extern int friendlist_remove_account(t_list *, t_account *);
|
| 38 |
extern int friendlist_remove_username(t_list *, const char *);
|
| 39 |
extern t_friend * friendlist_find_account(t_list *, t_account *);
|
| 40 |
extern t_friend * friendlist_find_username(t_list *, const char *);
|
| 41 |
extern t_friend * friendlist_find_uid(t_list *, int);
|
| 42 |
|
| 43 |
#endif
|
| 44 |
|
| 45 |
#endif
|