Added SILC Thread Queue API
[crypto.git] / apps / silc / local_command.h
1 /*
2
3   local_command.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 LOCAL_COMMAND_H
22 #define LOCAL_COMMAND_H
23
24 /* All local commands */
25 extern SilcClientCommand silc_local_command_list[];
26
27 /* Local commands */
28 #define SILC_LOCAL_COMMAND_HELP         1
29 #define SILC_LOCAL_COMMAND_CLEAR        2
30 #define SILC_LOCAL_COMMAND_VERSION      3
31 #define SILC_LOCAL_COMMAND_SERVER       4
32 #define SILC_LOCAL_COMMAND_MSG          5
33 #define SILC_LOCAL_COMMAND_AWAY         6
34 #define SILC_LOCAL_COMMAND_KEY          7
35 #define SILC_LOCAL_COMMAND_ME           8
36 #define SILC_LOCAL_COMMAND_NOTICE       9
37
38 /* Macros */
39
40 /* Macro used for command declaration in command list structure */
41 #define SILC_CLIENT_LCMD(func, cmd, name, flags, args) \
42 { silc_client_local_command_##func, SILC_LOCAL_COMMAND_##cmd, \
43   name, flags, args }
44
45 /* Macro used to declare command functions */
46 #define SILC_CLIENT_LCMD_FUNC(func) \
47 void silc_client_local_command_##func(void *context)
48
49 /* Prototypes */
50 SilcClientCommand *silc_client_local_command_find(const char *name);
51 SILC_CLIENT_LCMD_FUNC(help);
52 SILC_CLIENT_LCMD_FUNC(clear);
53 SILC_CLIENT_LCMD_FUNC(version);
54 SILC_CLIENT_LCMD_FUNC(msg);
55 SILC_CLIENT_LCMD_FUNC(server);
56 SILC_CLIENT_LCMD_FUNC(away);
57 SILC_CLIENT_LCMD_FUNC(key);
58 SILC_CLIENT_LCMD_FUNC(me);
59 SILC_CLIENT_LCMD_FUNC(notice);
60
61 #endif