move phone variables to gammu-related part of yasnd library
This commit is contained in:
parent
6aefa54e73
commit
de38500b8f
@ -14,9 +14,6 @@ char pidfile[]="/var/run/yasnd.pid"; // pidfile path
|
|||||||
host_decl* hosts=NULL; // structure with hosts' definitions
|
host_decl* hosts=NULL; // structure with hosts' definitions
|
||||||
int hosts_count=0; // count of hosts
|
int hosts_count=0; // count of hosts
|
||||||
bool sms_enable=false; // use SMS messages for control and reports?
|
bool sms_enable=false; // use SMS messages for control and reports?
|
||||||
char* phone_device=NULL; // phone device for gammu, for example: "/dev/ttyACM0"
|
|
||||||
char* phone_model=NULL; // gammu phone model, for example: "at"
|
|
||||||
char* phone_connection=NULL; // gammu phone connection type, for example: "at"
|
|
||||||
char* recipient_number=NULL; // recipient of sms alerts
|
char* recipient_number=NULL; // recipient of sms alerts
|
||||||
bool loop_locked=false; // flag for locking main loop while config re-reading
|
bool loop_locked=false; // flag for locking main loop while config re-reading
|
||||||
int failures_first=0; // count of failures while hosts checking, that triggers SMS sending
|
int failures_first=0; // count of failures while hosts checking, that triggers SMS sending
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
#include "yasnd.h"
|
#include "yasnd.h"
|
||||||
#include "yasnd-log.h"
|
#include "yasnd-log.h"
|
||||||
|
|
||||||
|
char* phone_device=NULL; // phone device for gammu, for example: "/dev/ttyACM0"
|
||||||
|
char* phone_model=NULL; // gammu phone model, for example: "at"
|
||||||
|
char* phone_connection=NULL; // gammu phone connection type, for example: "at"
|
||||||
GSM_Error error; // structure to store possible gammu errors
|
GSM_Error error; // structure to store possible gammu errors
|
||||||
GSM_StateMachine *state_machine=NULL; // structure to interact with mobile phones
|
GSM_StateMachine *state_machine=NULL; // structure to interact with mobile phones
|
||||||
volatile gboolean gammu_shutdown=FALSE; // variable that indicates gammu shutdown
|
volatile gboolean gammu_shutdown=FALSE; // variable that indicates gammu shutdown
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
#ifndef YASND_GAMMU_H
|
#ifndef YASND_GAMMU_H
|
||||||
#define YASND_GAMMU_H
|
#define YASND_GAMMU_H
|
||||||
|
|
||||||
|
// External variables
|
||||||
|
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"
|
||||||
|
|
||||||
// External functions
|
// External functions
|
||||||
extern bool gammu_init();
|
extern bool gammu_init();
|
||||||
extern bool gammu_send_sms(const char* message);
|
extern bool gammu_send_sms(const char* message);
|
||||||
|
3
yasnd.h
3
yasnd.h
@ -41,9 +41,6 @@ extern int send_message(int qid, mymsgbuf* qbuf);
|
|||||||
// External variables
|
// External variables
|
||||||
extern int hosts_count; // count of hosts
|
extern int hosts_count; // count of hosts
|
||||||
extern char* recipient_number;
|
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"
|
|
||||||
extern bool sms_enable;
|
extern bool sms_enable;
|
||||||
extern int qid;
|
extern int qid;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user