Ignore po_box field
[gammu.git] / gammu / common.h
blob47114aaeef22520643b232867da406503561671d
1 #ifndef _gammu_common_h
2 #define _gammu_common_h
4 #include <gammu.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[]);
21 /**
22 * Requests response from user on single question.
24 PRINTF_STYLE(1, 2)
25 gboolean answer_yes(const char *format, ...);
27 /**
28 * Prints information about security status.
30 void PrintSecurityStatus(void);
32 /**
33 * Converts string to memory type.
35 GSM_MemoryType MemoryTypeFromString(const char *type);
37 /**
38 * Interrupt handler, sets shutdown flag.
40 void interrupt(int sign);
42 /**
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);
52 /**
53 * Cleanup performed at program termination.
55 void Cleanup(void);
57 /**
58 * Cleanups and terminates program.
60 NORETURN
61 void Terminate(int code);
63 #ifdef GSM_ENABLE_BEEP
64 void GSM_PhoneBeep(void);
65 #endif
66 #endif
68 /* How should editor hadle tabs in this file? Add editor commands here.
69 * vim: noexpandtab sw=8 ts=8 sts=8: