#ifndef YASND_H #define YASND_H // Debug verbosity #define DEBUG_BASE 1 #define DEBUG_ALL 2 #include #include #include // External functions extern void log_event(const char *message); extern void log_debug(const char *message,int verbosity); extern bool check_gammu_error(GSM_Error err); extern bool gammu_init(); extern bool gammu_send_sms(const char* message); 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 bool alert_sent; // variable, that changed when host goes online/offline } host_decl; // External variables extern int hosts_count; // count of hosts extern int debug_flag; extern GSM_Error error; // structure to store possible gammu errors extern GSM_StateMachine *state_machine; // structure to interact with mobile phones extern char* recipient_number; extern char* phone_device; // phone device for gammu, for example: "/dev/ttyACM0" extern char* phone_model; // gammu phone model, for example: "at" extern char* phone_connection; // gammu phone connection type, for example: "at" #endif