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