fix one too small
[RRG-proxmark3.git] / client / src / cmdparser.h
blob34eee8bd5947784ad77169c6457ef49374a3663d
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 // Command parser
17 //-----------------------------------------------------------------------------
19 #ifndef CMDPARSER_H__
20 #define CMDPARSER_H__
22 #include "common.h"
24 typedef struct command_s {
25 const char *Name;
26 int (*Parse)(const char *Cmd);
27 bool (*IsAvailable)(void);
28 const char *Help;
29 } command_t;
30 // command_t array are expected to be NULL terminated
32 // helpers for command_t IsAvailable
33 bool AlwaysAvailable(void);
34 bool IfClientDebugEnabled(void);
35 bool IfPm3Present(void);
36 bool IfPm3Rdv4Fw(void);
37 bool IfPm3Flash(void);
38 bool IfPm3Smartcard(void);
39 bool IfPm3FpcUsart(void);
40 bool IfPm3FpcUsartHost(void);
41 bool IfPm3FpcUsartHostFromUsb(void);
42 bool IfPm3FpcUsartDevFromUsb(void);
43 bool IfPm3FpcUsartFromUsb(void);
44 bool IfPm3Lf(void);
45 bool IfPm3Hitag(void);
46 bool IfPm3EM4x50(void);
47 bool IfPm3EM4x70(void);
48 bool IfPm3Hfsniff(void);
49 bool IfPm3Hfplot(void);
50 bool IfPm3Iso14443a(void);
51 bool IfPm3Iso14443b(void);
52 bool IfPm3Iso14443(void);
53 bool IfPm3Iso15693(void);
54 bool IfPm3Felica(void);
55 bool IfPm3Legicrf(void);
56 bool IfPm3Iclass(void);
57 bool IfPm3NfcBarcode(void);
58 bool IfPm3Lcd(void);
59 bool IfPm3Zx8211(void);
61 // Print help for each command in the command array
62 void CmdsHelp(const command_t Commands[]);
63 // Print each command in the command array without help
64 void CmdsLS(const command_t Commands[]);
65 // Parse a command line
66 int CmdsParse(const command_t Commands[], const char *Cmd);
67 void dumpCommandsRecursive(const command_t cmds[], int markdown, bool full_help);
69 #endif