ekg2
GIT master
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
plugins
rivchat
rivchat.h
Idź do dokumentacji tego pliku.
1
/* some rivchat-magic-stuff based on protocol: http://akolacz.googlepages.com/RivChat-specyfikacja.PDF */
2
3
#define RC_BROADCAST 0xFFFFFFFF
4
5
#define RC_TIMEOUT 30
/* soft-timeout */
6
#define RC_PING_TIMEOUT 60
/* hard-timeout */
7
8
#define RC_MAGICSIZE 11
9
#define RC_SIZE 328
10
#define RC_DATASIZE 256
11
#define RC_INFOSIZE 140
12
13
#define RC_MESSAGE 0
14
#define RC_INIT 1
15
#define RC_NICKCHANGE 2
16
#define RC_QUIT 3
17
#define RC_ME 4
18
#define RC_PING 5
19
#define RC_NICKPROTEST 6
20
#define RC_TOPIC 7
21
#define RC_NEWTOPIC 8
22
#define RC_AWAY 9
23
#define RC_REAWAY 10
24
#define RC_KICK 11
25
#define RC_POP 12
26
#define RC_REPOP 13
27
#define RC_KICKED 14
28
#define RC_IGNORE 15
29
#define RC_NOIGNORE 16
30
#define RC_REPOPIGNORED 17
31
#define RC_ECHOMSG 18
32
#define RC_PINGAWAY 19
33
#define RC_FILEPROPOSE 20
34
#define RC_FILEREQUEST 21
35
#define RC_FILECANCEL 22
36
#define RC_FILECANCEL2 23
/* XXX, nie w protokole */
37
38
static
const
char
rivchat_magic
[
RC_MAGICSIZE
] = {
'R'
,
'i'
,
'v'
,
'C'
,
'h'
,
'a'
,
't'
/* here NULs */
};
/* RivChat\0\0\0\0 */
39
40
#define RC_PACKED __attribute__ ((packed))
41
42
typedef
struct
{
43
char
host[50];
44
char
os[20];
45
char
prog[18];
46
guint8 version[2];
47
guint8
away
;
48
guint8
master
;
49
guint32
slowa
;
50
char
user[32];
51
guint8
kod
;
52
guint8
plec
;
53
guint8 __pad1[2];
54
guint32
online
;
55
guint8
filetransfer
;
56
guint8
pisze
;
57
guint8 __pad2[2];
58
}
RC_PACKED
rivchat_info_t;
59
60
typedef
struct
{
61
char
header[
RC_MAGICSIZE
];
/* rivchat_magic */
62
guint8 __pad1;
63
guint32
size
;
64
guint32
fromid
;
65
guint32
toid
;
66
char
nick[30];
67
guint8 __pad2[2];
68
guint32
type
;
69
char
data[
RC_DATASIZE
];
/* or RCINFO */
70
guint8
colors
[3];
/* colors RGB values */
71
guint8
seq
;
/* sequence */
72
/* these 8bytes, can be uint64_t -> filesize */
73
guint8
gender
;
/* 1 - man, 2 - woman */
74
guint8
encrypted
;
/* we support encryption? */
75
guint8
bold
;
/* ? */
76
guint8 reserved[5];
77
}
RC_PACKED
rivchat_header_t;
78
79
#define RC_FILETRANSFER 2
80
// #define RC_FILETRANSFER 0
81
#define RC_ENCRYPTED 0
RC_DATASIZE
#define RC_DATASIZE
Definition:
rivchat.h:10
__attribute__::seq
guint8 seq
Definition:
rivchat.h:71
__attribute__::fromid
guint32 fromid
Definition:
rivchat.h:64
rivchat_magic
static const char rivchat_magic[11]
Definition:
rivchat.h:38
__attribute__::filetransfer
guint8 filetransfer
Definition:
rivchat.h:55
__attribute__::bold
guint8 bold
Definition:
rivchat.h:75
__attribute__::away
guint8 away
Definition:
rivchat.h:47
__attribute__::master
guint8 master
Definition:
rivchat.h:48
__attribute__::kod
guint8 kod
Definition:
rivchat.h:51
__attribute__::toid
guint32 toid
Definition:
rivchat.h:65
__attribute__::gender
guint8 gender
Definition:
rivchat.h:73
__attribute__::encrypted
guint8 encrypted
Definition:
rivchat.h:74
RC_MAGICSIZE
#define RC_MAGICSIZE
Definition:
rivchat.h:8
__attribute__::slowa
guint32 slowa
Definition:
rivchat.h:49
RC_PACKED
#define RC_PACKED
Definition:
rivchat.h:40
__attribute__::size
guint32 size
Definition:
rivchat.h:63
__attribute__::pisze
guint8 pisze
Definition:
rivchat.h:56
__attribute__::plec
guint8 plec
Definition:
rivchat.h:52
colors
GdkColor colors[]
Definition:
palette.c:63
__attribute__::online
guint32 online
Definition:
rivchat.h:54
__attribute__::type
guint32 type
Definition:
rivchat.h:68
Wygenerowano So, 19 kwi 2014 18:23:11 dla ekg2 programem
1.8.6