File: commands.h

package info (click to toggle)
cdebconf 0.10-7.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 884 kB
  • ctags: 642
  • sloc: ansic: 5,072; makefile: 285; sh: 274; sql: 51
file content (43 lines) | stat: -rw-r--r-- 1,919 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _COMMANDS_H_
#define _COMMANDS_H_

#include "confmodule.h"

#define CMDSTATUS_SUCCESS		0
#define CMDSTATUS_BADQUESTION		10
#define CMDSTATUS_BADPARAM		10
#define CMDSTATUS_SYNTAXERROR		20
#define CMDSTATUS_INPUTINVISIBLE	30
#define CMDSTATUS_BADVERSION		30
#define CMDSTATUS_GOBACK		30
#define CMDSTATUS_INTERNALERROR		100

typedef int (*command_function_t)(struct confmodule *, int, char **, char *, size_t);

typedef struct {
	const char *command;
	command_function_t handler;
} commands_t;

int command_input(struct confmodule *, int, char **, char *, size_t);
int command_clear(struct confmodule *, int, char **, char *, size_t);
int command_version(struct confmodule *, int, char **, char *, size_t);
int command_capb(struct confmodule *, int, char **, char *, size_t);
int command_title(struct confmodule *, int, char **, char *, size_t);
int command_beginblock(struct confmodule *, int, char **, char *, size_t);
int command_endblock(struct confmodule *, int, char **, char *, size_t);
int command_go(struct confmodule *, int, char **, char *, size_t);
int command_get(struct confmodule *, int, char **, char *, size_t);
int command_set(struct confmodule *, int, char **, char *, size_t);
int command_reset(struct confmodule *, int, char **, char *, size_t);
int command_subst(struct confmodule *, int, char **, char *, size_t);
int command_register(struct confmodule *, int, char **, char *, size_t);
int command_unregister(struct confmodule *, int, char **, char *, size_t);
int command_purge(struct confmodule *, int, char **, char *, size_t);
int command_metaget(struct confmodule *, int, char **, char *, size_t);
int command_fget(struct confmodule *, int, char **, char *, size_t);
int command_fset(struct confmodule *, int, char **, char *, size_t);
int command_exist(struct confmodule *, int, char **, char *, size_t);
int command_stop(struct confmodule *, int, char **, char *, size_t);

#endif