Added SILC Server library.
[silc.git] / lib / silcserver / server_entry.h
1 /*
2
3   server_entry.h
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 2005 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; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 #ifndef SERVER_ENTRY_H
21 #define SERVER_ENTRY_H
22
23 void silc_server_destructor_client(SilcIDCache cache,
24                                    const SilcIDCacheEntry entry,
25                                    void *destructor_context,
26                                    void *app_context);
27 void silc_server_destructor_server(SilcIDCache cache,
28                                    const SilcIDCacheEntry entry,
29                                    void *destructor_context,
30                                    void *app_context);
31 void silc_server_destructor_channel(SilcIDCache cache,
32                                     const SilcIDCacheEntry entry,
33                                     void *destructor_context,
34                                     void *app_context);
35
36 SilcServerEntry silc_server_add_server(SilcServer server,
37                                        const char *server_name,
38                                        SilcServerType server_type,
39                                        SilcServerID *id,
40                                        SilcPacketStream origin);
41 SilcBool silc_server_del_server(SilcServer server, SilcServerEntry entry);
42 SilcServerEntry
43 silc_server_find_server_by_id(SilcServer server,
44                               SilcServerID *id,
45                               SilcBool registered,
46                               SilcIDCacheEntry *ret_entry);
47 SilcServerEntry
48 silc_server_find_server_by_name(SilcServer server, char *name,
49                                 SilcBool registered,
50                                 SilcIDCacheEntry *ret_entry);
51 SilcServerEntry
52 silc_server_find_server_by_conn(SilcServer server, char *hostname,
53                                 int port, SilcBool registered,
54                                 SilcIDCacheEntry *ret_entry);
55 SilcServerEntry
56 silc_server_replace_server_id(SilcServer server, SilcServerID *old_id,
57                               SilcServerID *new_id);
58 SilcClientEntry silc_server_add_client(SilcServer server,
59                                        const char *nickname,
60                                        const char *username,
61                                        const char *userinfo,
62                                        SilcClientID *id,
63                                        SilcUInt32 mode,
64                                        SilcPacketStream origin);
65 SilcBool silc_server_del_client(SilcServer server, SilcClientEntry entry);
66 SilcBool silc_server_find_clients(SilcServer server, char *nickname,
67                                   SilcList *list);
68 SilcClientEntry silc_server_find_client_by_id(SilcServer server,
69                                               SilcClientID *id,
70                                               SilcBool registered,
71                                               SilcIDCacheEntry *ret_entry);
72 SilcClientEntry
73 silc_server_replace_client_id(SilcServer server, SilcClientID *old_id,
74                               SilcClientID *new_id, const char *nickname);
75 SilcChannelEntry silc_server_add_channel(SilcServer server,
76                                          const char *channel_name,
77                                          SilcUInt32 mode,
78                                          SilcChannelID *id,
79                                          SilcPacketStream origin,
80                                          SilcCipher channel_key,
81                                          SilcHmac hmac);
82 SilcBool silc_server_del_channel(SilcServer server, SilcChannelEntry entry);
83 SilcChannelEntry silc_server_find_channel_by_name(SilcServer server,
84                                                   const char *name,
85                                                   SilcIDCacheEntry *ret_entry);
86 SilcChannelEntry silc_server_find_channel_by_id(SilcServer server,
87                                                 SilcChannelID *id,
88                                                 SilcIDCacheEntry *ret_entry);
89 SilcChannelEntry silc_server_replace_channel_id(SilcServer server,
90                                                 SilcChannelID *old_id,
91                                                 SilcChannelID *new_id);
92 SilcBool silc_server_get_channels(SilcServer server,
93                                   SilcChannelID *channel_id,
94                                   SilcList *list);
95
96 #endif /* SERVER_ENTRY_H */