2011-11-29 13:47:48 +04:00
|
|
|
#ifndef YASND_H
|
|
|
|
#define YASND_H
|
|
|
|
|
|
|
|
// Debug verbosity
|
|
|
|
#define DEBUG_BASE 1
|
|
|
|
#define DEBUG_ALL 2
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2011-11-30 16:21:34 +04:00
|
|
|
#include <string.h>
|
2011-11-29 13:47:48 +04:00
|
|
|
#include <gammu.h>
|
|
|
|
|
2011-11-30 16:21:34 +04:00
|
|
|
// External functions
|
2011-11-29 13:47:48 +04:00
|
|
|
extern void log_event(const char *message);
|
|
|
|
extern bool check_gammu_error(GSM_Error err);
|
2011-11-30 16:21:34 +04:00
|
|
|
extern bool gammu_init();
|
|
|
|
extern bool gammu_send_sms(const char* message);
|
2011-11-29 13:47:48 +04:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char* hostname; // address of host
|
|
|
|
pid_t helper_pid; // pid of helper('pinger') child process
|
|
|
|
int fail_count; // how many times in a row host was unreachable
|
|
|
|
} host_decl;
|
|
|
|
|
2011-11-30 16:21:34 +04:00
|
|
|
// External variables
|
2011-11-29 13:47:48 +04:00
|
|
|
extern int hosts_count; // count of hosts
|
|
|
|
extern int debug_flag;
|
|
|
|
extern GSM_Error error; // structure to store possible gammu errors
|
2011-11-30 16:21:34 +04:00
|
|
|
extern GSM_StateMachine *state_machine; // structure to interact with mobile phones
|
2011-11-29 13:47:48 +04:00
|
|
|
|
|
|
|
#endif
|