1 #ifndef _gammu_common_h
2 #define _gammu_common_h
5 #include "../helper/string.h"
7 extern volatile gboolean gshutdown
;
8 extern GSM_StateMachine
*gsm
;
9 extern INI_Section
*cfg
;
10 extern gboolean batch
;
11 extern gboolean batchConn
;
12 extern gboolean always_answer_yes
;
14 const char *GetMonthName(const int month
);
15 const char *GetDayName(const int day
);
16 void Print_Error(GSM_Error error
);
17 void GSM_Init(gboolean checkerror
);
18 void GSM_Terminate(void);
19 void GetStartStop(int *start
, int *stop
, int num
, int argc
, char *argv
[]);
22 * Requests response from user on single question.
25 gboolean
answer_yes(const char *format
, ...);
28 * Prints information about security status.
30 void PrintSecurityStatus(void);
33 * Converts string to memory type.
35 GSM_MemoryType
MemoryTypeFromString(const char *type
);
38 * Interrupt handler, sets shutdown flag.
40 void interrupt(int sign
);
43 * Downloads file from arbitrary URL.
45 * \param url URL to download.
46 * \param file Storage for data.
48 * \returns ERR_NONE on success.
50 GSM_Error
GSM_ReadHTTPFile(const char *url
, GSM_File
*file
);
53 * Cleanup performed at program termination.
58 * Cleanups and terminates program.
61 void Terminate(int code
);
63 #ifdef GSM_ENABLE_BEEP
64 void GSM_PhoneBeep(void);
68 /* How should editor hadle tabs in this file? Add editor commands here.
69 * vim: noexpandtab sw=8 ts=8 sts=8: