1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*
* Copyright (C) 2010-2013 Sebastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* 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.
*
* 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 WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_IRC_NOTIFY_H
#define __WEECHAT_IRC_NOTIFY_H 1
struct t_irc_server;
struct t_irc_notify
{
struct t_irc_server *server; /* server */
char *nick; /* nick */
int check_away; /* check away status (with whois) */
/* current state of nick */
int is_on_server; /* 1 if nick is currently on server */
/* 0 if nick is not on server */
/* -1 for unknown status (check is */
/* in progress) */
/* (using answer of ison command) */
char *away_message; /* current away message, NULL if */
/* nick is not away (using answer of */
/* whois command) */
/* internal stuff */
int ison_received; /* used when receiving ison answer */
struct t_irc_notify *prev_notify; /* link to previous notify */
struct t_irc_notify *next_notify; /* link to next notify */
};
extern int irc_notify_valid (struct t_irc_server *server,
struct t_irc_notify *notify);
extern struct t_irc_notify *irc_notify_search (struct t_irc_server *server,
const char *nick);
extern void irc_notify_set_server_option (struct t_irc_server *server);
extern struct t_irc_notify *irc_notify_new (struct t_irc_server *server,
const char *nick,
int check_away);
extern void irc_notify_check_now (struct t_irc_notify *notify);
extern void irc_notify_new_for_server (struct t_irc_server *server);
extern void irc_notify_new_for_all_servers ();
extern void irc_notify_free (struct t_irc_server *server,
struct t_irc_notify *notify);
extern void irc_notify_free_all (struct t_irc_server *server);
extern void irc_notify_display_list (struct t_irc_server *server);
extern int irc_notify_timer_ison_cb (void *data, int remaining_calls);
extern int irc_notify_timer_whois_cb (void *data, int remaining_calls);
extern struct t_hdata *irc_notify_hdata_notify_cb (void *data,
const char *hdata_name);
extern int irc_notify_add_to_infolist (struct t_infolist *infolist,
struct t_irc_notify *notify);
extern void irc_notify_print_log (struct t_irc_server *server);
extern void irc_notify_hook_timer_ison ();
extern void irc_notify_hook_timer_whois ();
extern void irc_notify_init ();
extern void irc_notify_end ();
#endif /* __WEECHAT_IRC_NOTIFY_H */
|