/
common.h
67 lines (55 loc) · 1.38 KB
/
common.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
66
67
#ifndef _gammu_common_h
#define _gammu_common_h
#include <gammu.h>
#include "../libgammu/misc/string.h"
extern volatile gboolean gshutdown;
extern GSM_StateMachine *gsm;
extern INI_Section *cfg;
extern gboolean batch;
extern gboolean batchConn;
extern gboolean always_answer_yes;
const char *GetMonthName(const int month);
const char *GetDayName(const int day);
void Print_Error(GSM_Error error);
void GSM_Init(gboolean checkerror);
void GSM_Terminate(void);
void GetStartStop(int *start, int *stop, int num, int argc, char *argv[]);
/**
* Requests response from user on single question.
*/
PRINTF_STYLE(1, 2)
gboolean answer_yes(const char *format, ...);
/**
* Prints information about security status.
*/
void PrintSecurityStatus(void);
/**
* Converts string to memory type.
*/
GSM_MemoryType MemoryTypeFromString(const char *type);
/**
* Interrupt handler, sets shutdown flag.
*/
void interrupt(int sign);
/**
* Downloads file from arbitrary URL.
*
* \param url URL to download.
* \param file Storage for data.
*
* \returns ERR_NONE on success.
*/
GSM_Error GSM_ReadHTTPFile(const char *url, GSM_File *file);
/**
* Cleanup performed at program termination.
*/
void Cleanup(void);
/**
* Cleanups and terminates program.
*/
NORETURN
void Terminate(int code);
#endif
/* How should editor hadle tabs in this file? Add editor commands here.
* vim: noexpandtab sw=8 ts=8 sts=8:
*/