Importet from internal CVS/Added Log headers.
[silc.git] / apps / silc / idlist.h
1 /*
2
3   idlist.h
4
5   Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
6
7   Copyright (C) 1997 - 2000 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; either version 2 of the License, or
12   (at your option) any later version.
13   
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18
19 */
20
21 #ifndef IDLIST_H
22 #define IDLIST_H
23
24 /* Client entry context. When client receives information about new client
25    (it receives its ID, for example, by IDENTIFY request) we create new
26    client entry. This entry also includes the private message keys if
27    they are used. */
28 typedef struct SilcClientEntryStruct {
29   char *nickname;
30   SilcClientID *id;
31
32   /* Keys, these are defined if private message key has been defined 
33      with the remote client. */
34   SilcCipher send_key;
35   SilcCipher receive_key;
36 } SilcClientEntryObject;
37
38 typedef SilcClientEntryObject *SilcClientEntry;
39
40 /* Channel entry context. This is allocate for every channel client has
41    joined to. This includes for example the channel specific keys */
42 /* XXX channel_key is the server generated key. Later this context must 
43    include the channel private key. */
44 typedef struct SilcChannelEntryStruct {
45   char *channel_name;
46   SilcChannelID *id;
47   int on_channel;
48
49   /* Channel keys */
50   SilcCipher channel_key;
51   unsigned char *key;
52   unsigned int key_len;
53   unsigned char iv[SILC_CIPHER_MAX_IV_SIZE];
54 } SilcChannelEntryObject;
55
56 typedef SilcChannelEntryObject *SilcChannelEntry;
57
58 #endif