-
Notifications
You must be signed in to change notification settings - Fork 117
/
lua_ext.h
65 lines (45 loc) · 1.71 KB
/
lua_ext.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**********************************************************************
*
* This file is part of Cardpeek, the smart card reader utility.
*
* Copyright 2009-2014 by Alain Pannetrat <[email protected]>
*
* Cardpeek is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Cardpeek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Cardpeek. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef LUAX_H
#define LUAX_H
#include "smartcard.h"
#include <glib.h>
void luax_set_card_reader(cardreader_t* r);
void luax_run_script(const char* scriptname);
void luax_run_command(const char* command);
int luax_init(void);
void luax_release(void);
char *luax_escape_string(const char *src);
enum {
LUAX_INIT_WITHOUT_UI=0,
LUAX_INIT_WITH_UI=1
};
/*****/
gboolean luax_config_table_save(void);
char *luax_variable_get_strdup(const char *vname);
gboolean luax_variable_set_strval(const char *vname, const char *value);
int luax_variable_get_integer(const char *vname);
gboolean luax_variable_set_integer(const char *vname, int value);
gboolean luax_variable_get_boolean(const char *vname);
gboolean luax_variable_set_boolean(const char *vname, gboolean value);
gboolean luax_variable_is_defined(const char *vname);
gboolean luax_variable_call(const char *vname, const char *format, ...);
#endif