bd61ae9c8feb9ea01c1ed4e96a1ded9ef76b8562
[silc.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
36 /* Macros */
37
38 /* Macro used for command declaration in command list structure */
39 #define SILC_CLIENT_LCMD(func, cmd, name, flags, args) \
40 { silc_client_local_command_##func, SILC_LOCAL_COMMAND_##cmd, \
41   name, flags, args }
42
43 /* Macro used to declare command functions */
44 #define SILC_CLIENT_LCMD_FUNC(func) \
45 void silc_client_local_command_##func(void *context)
46
47 /* Prototypes */
48 SilcClientCommand *silc_client_local_command_find(const char *name);
49 SILC_CLIENT_LCMD_FUNC(help);
50 SILC_CLIENT_LCMD_FUNC(clear);
51 SILC_CLIENT_LCMD_FUNC(version);
52 SILC_CLIENT_LCMD_FUNC(msg);
53 SILC_CLIENT_LCMD_FUNC(server);
54 SILC_CLIENT_LCMD_FUNC(away);
55 SILC_CLIENT_LCMD_FUNC(key);
56
57 #endif