TizenRT Libs&Environment  v2.0 M2
tash.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Copyright 2016 Samsung Electronics All Rights Reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing,
12  * software distributed under the License is distributed on an
13  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14  * either express or implied. See the License for the specific
15  * language governing permissions and limitations under the License.
16  *
17  ****************************************************************************/
19 
24 
27 #ifndef __APPS_INCLUDE_SHELL_TASH_H
28 #define __APPS_INCLUDE_SHELL_TASH_H
29 
30 #include <tinyara/config.h>
31 
38 #define TASH_EXECMD_SYNC (0)
39 #define TASH_EXECMD_ASYNC (1)
40 
45 typedef int (*TASH_CMD_CALLBACK)(int argc, char **args);
46 
52 struct tash_cmdlist_s {
53  const char *name;
54  const TASH_CMD_CALLBACK entry;
55  const int exectype;
56 };
57 typedef struct tash_cmdlist_s tash_cmdlist_t;
58 
69 int tash_cmd_install(const char *str, TASH_CMD_CALLBACK cb, int thread_exec);
70 
78 void tash_cmdlist_install(const tash_cmdlist_t list[]);
79 
88 int tash_start(void);
89 
90 #if defined(CONFIG_TASH_COMMAND_INTERFACE)
91 
97 int tash_get_cmdscount(void);
98 
114 int tash_get_cmdpair(char *str, TASH_CMD_CALLBACK *cb, int index);
115 #endif /*CONFIG_TASH_COMMAND_INTERFACE */
116 
117 #endif /*__APPS_INCLUDE_SHELL_TASH_H*/
118