ekg2
Strona główna
Dodatkowe strony
Moduły
Struktury Danych
Pliki
Lista plików
Globalne
All
Struktury Danych
Pliki
Funkcje
Zmienne
Definicje typów
Wyliczenia
Wartości wyliczeń
Definicje
Grupay
Strony
remote
sessions.h
Idź do dokumentacji tego pliku.
1
/* $Id: sessions.h 4589 2008-09-01 18:44:20Z peres $ */
2
3
/*
4
* (C) Copyright 2003 Wojtek Kaniewski <wojtekka@irc.pl>
5
* 2004 Piotr Kupisiewicz <deli@rzepaknet.us>
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License Version 2 as
9
* published by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
*/
20
21
#ifndef __EKG_SESSIONS_H
22
#define __EKG_SESSIONS_H
23
24
#include <time.h>
25
26
typedef
enum
{
27
EKG_STATUS_NULL
= 0x00,
/* special value */
28
29
/* These statuses should be considered as no-delivery */
30
EKG_STATUS_ERROR
,
/* used in Jabber */
31
EKG_STATUS_BLOCKED
,
/* used in GG */
32
33
/* These statuses should be considered as 'not sure' */
34
EKG_STATUS_UNKNOWN
,
/* used in Jabber */
35
EKG_STATUS_NA
,
/* universal */
36
37
/* These should be considered as 'probably available' */
38
EKG_STATUS_INVISIBLE
,
/* GG; hard to prioritize... */
39
EKG_STATUS_DND
,
/* Jabber */
40
EKG_STATUS_GONE
,
/* ICQ */
41
EKG_STATUS_XA
,
/* Jabber */
42
EKG_STATUS_AWAY
,
/* universal */
43
44
/* These should be considered as 'sure available' */
45
EKG_STATUS_AVAIL
,
/* universal */
46
EKG_STATUS_FFC
/* Jabber */
47
}
status_t
;
48
49
typedef
struct
session_param
{
50
struct
session_param
*
next
;
51
52
char
*
key
;
/* nazwa parametru */
53
char
*
value
;
/* wartość parametru */
54
}
session_param_t
;
55
59
typedef
struct
ekg_session
{
60
struct
ekg_session
*
next
;
61
62
/* public: */
63
void
*
plugin
;
/* ekg2-remote: OK */
64
char
*
uid
;
/* ekg2-remote: OK */
65
char
*
alias
;
/* ekg2-remote: OK */
66
void
*
__priv
;
/* ekg2-remote: NULL, OK */
67
struct
userlist
*
userlist
;
68
69
/* private: */
70
status_t
status
;
71
char
*
descr
;
72
char
*
__password
;
/* ekg2-remote: NULL, ok */
73
74
unsigned
int
connected
: 1;
/* ekg2-remote: OK */
75
unsigned
int
connecting
: 2;
76
unsigned
int
__autoaway
: 1;
/* ekg2-remote: 0, OK */
77
78
time_t
__activity
;
/* ekg2-remote: 0, OK */
79
time_t
__last_conn
;
/* ekg2-remote: 0, OK */
80
81
int
__global_vars_count
;
/* ekg2-remote: 0, OK */
82
char
**
__values
;
/* ekg2-remote: NULL, OK */
83
session_param_t
*
__local_vars
;
/* ekg2-remote: NULL, OK */
84
85
status_t
__last_status
;
/* ekg2-remote: EKG_STATUS_NULL, OK */
86
char
*
__last_descr
;
/* ekg2-remote: NULL, OK */
87
int
__flock_fd
;
/* ekg2-remote: (0), OK */
/* XXX, could be -1 */
88
}
session_t
;
89
90
extern
session_t
*
sessions
;
91
92
extern
session_t
*
session_current
;
93
94
session_t
*
session_find
(
const
char
*
uid
);
95
96
const
char
*
session_uid_get
(
session_t
*s);
97
98
session_t
*
remote_session_add
(
const
char
*
uid
,
const
char
*
plugin
);
99
int
remote_session_remove
(
const
char
*
uid
);
100
101
void
sessions_free
();
102
103
#endif
/* __EKG_SESSIONS_H */
104
105
/*
106
* Local Variables:
107
* mode: c
108
* c-file-style: "k&r"
109
* c-basic-offset: 8
110
* indent-tabs-mode: t
111
* End:
112
*/
Wygenerowano N, 7 lip 2013 09:24:28 dla ekg2 programem
1.8.4