CliXoN
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
cli_handle.h
Go to the documentation of this file.
1 /*
2  *
3  ***** BEGIN LICENSE BLOCK *****
4 
5  Copyright (C) 2009-2017 Olof Hagsand and Benny Holmgren
6 
7  This file is part of CLIXON.
8 
9  Licensed under the Apache License, Version 2.0 (the "License");
10  you may not use this file except in compliance with the License.
11  You may obtain a copy of the License at
12 
13  http://www.apache.org/licenses/LICENSE-2.0
14 
15  Unless required by applicable law or agreed to in writing, software
16  distributed under the License is distributed on an "AS IS" BASIS,
17  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  See the License for the specific language governing permissions and
19  limitations under the License.
20 
21  Alternatively, the contents of this file may be used under the terms of
22  the GNU General Public License Version 3 or later (the "GPL"),
23  in which case the provisions of the GPL are applicable instead
24  of those above. If you wish to allow use of your version of this file only
25  under the terms of the GPL, and not to allow others to
26  use your version of this file under the terms of Apache License version 2,
27  indicate your decision by deleting the provisions above and replace them with
28  the notice and other provisions required by the GPL. If you do not delete
29  the provisions above, a recipient may use your version of this file under
30  the terms of any one of the Apache License version 2 or the GPL.
31 
32  ***** END LICENSE BLOCK *****
33 
34  *
35  */
36 
37 #ifndef _CLI_HANDLE_H_
38 #define _CLI_HANDLE_H_
39 
40 /*
41  * Prototypes
42  * Internal prototypes. For exported functions see clicon_cli_api.h
43  */
44 char cli_tree_add(clicon_handle h, char *tree, parse_tree pt);
45 
46 int cli_parse_file(clicon_handle h,
47  FILE *f,
48  char *name, /* just for errs */
49  parse_tree *pt,
50  cvec *globals);
51 
52 char *cli_tree_active(clicon_handle h);
53 
54 int cli_tree_active_set(clicon_handle h, char *treename);
55 
56 parse_tree *cli_tree(clicon_handle h, char *name);
57 
58 int cli_susp_hook(clicon_handle h, cli_susphook_t *fn);
59 
60 char *cli_nomatch(clicon_handle h);
61 
62 int cli_prompt_set(clicon_handle h, char *prompt);
63 
64 int cli_logsyntax_set(clicon_handle h, int status);
65 
66 /* Internal functions for handling cli groups */
67 
68 cli_syntax_t *cli_syntax(clicon_handle h);
69 int cli_syntax_set(clicon_handle h, cli_syntax_t *stx);
70 
71 #endif /* _CLI_HANDLE_H_ */
char cli_tree_add(clicon_handle h, char *tree, parse_tree pt)
Definition: cli_handle.c:200
int cli_logsyntax_set(clicon_handle h, int status)
Definition: cli_handle.c:268
int cli_syntax_set(clicon_handle h, cli_syntax_t *stx)
Definition: cli_handle.c:144
int cli_parse_file(clicon_handle h, FILE *f, char *name, parse_tree *pt, cvec *globals)
Definition: cli_handle.c:232
char * cli_tree_active(clicon_handle h)
Definition: cli_handle.c:208
int cli_prompt_set(clicon_handle h, char *prompt)
Definition: cli_handle.c:261
int cli_susp_hook(clicon_handle h, cli_susphook_t *fn)
Definition: cli_handle.c:244
cli_syntax_t * cli_syntax(clicon_handle h)
Definition: cli_handle.c:136
< KEYWORD > status
Definition: clixon_yang_parse.l:170
Definition: cli_plugin.h:76
int cli_tree_active_set(clicon_handle h, char *treename)
Definition: cli_handle.c:216
int( cli_susphook_t)(clicon_handle, char *, int, int *)
Definition: cli_plugin.h:54
char * cli_nomatch(clicon_handle h)
Definition: cli_handle.c:253
parse_tree * cli_tree(clicon_handle h, char *name)
Definition: cli_handle.c:224