OSDN Git Service

(none)
[hos/hos-v4a.git] / aplfw / system / command / command.h
1 /** 
2  *  Hyper Operating System  Application Framework
3  *
4  * @file  handle.h
5  * @brief %jp{ハンドルオブジェクト}
6  *
7  * Copyright (C) 2006 by Project HOS
8  * http://sourceforge.jp/projects/hos/
9  */
10
11
12 /* コマンドのようなものを登録できるようにしてみるてすと */
13
14
15 #ifndef __HOS__command_h__
16 #define __HOS__command_h__
17
18 #define COMMAND_ERR_OK          0
19 #define COMMAND_ERR_NG          1
20
21
22 typedef int COMMAND_ERR;
23 typedef int (*COMMAND_FUNC)(int argc, char *argv[]);
24
25 typedef void    *COMMAND_PTR;   
26
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 void         Command_Initialize(void);
33 void         Command_AddCommand(const char *pszName, COMMAND_FUNC pfncMain);            /* コマンドを登録する */
34 COMMAND_ERR  Command_Execute(const char *pszCommandLine, int *piExitCode);                      /* コマンドを実行する */
35
36 COMMAND_PTR  Command_GetFirstCommand(void);
37 COMMAND_PTR      Command_GetNextCommand(COMMAND_PTR Ptr, const char **ppszName);
38 COMMAND_FUNC Command_GetCommandAddr(const char *pszName);
39
40 #ifdef __cplusplus
41 }
42 #endif
43
44
45 #endif  /* __HOS__handle_h__ */
46
47
48 /* end of file */