Gammu API  1.31.91
SMSD

Data Structures

struct  GSM_SMSDStatus

Typedefs

typedef struct _GSM_SMSDConfig GSM_SMSDConfig

Functions

GSM_Error SMSD_InjectSMS (GSM_SMSDConfig *Config, GSM_MultiSMSMessage *sms, char *NewID)
GSM_Error SMSD_GetStatus (GSM_SMSDConfig *Config, GSM_SMSDStatus *status)
GSM_Error SMSD_Shutdown (GSM_SMSDConfig *Config)
GSM_Error SMSD_ReadConfig (const char *filename, GSM_SMSDConfig *Config, gboolean uselog)
GSM_Error SMSD_MainLoop (GSM_SMSDConfig *Config, gboolean exit_on_failure, int max_failures)
GSM_SMSDConfigSMSD_NewConfig (const char *name)
void SMSD_FreeConfig (GSM_SMSDConfig *config)

Detailed Description

SMS daemon manipulations


Typedef Documentation

typedef struct _GSM_SMSDConfig GSM_SMSDConfig

SMSD configuration data, these are not expected to be manipulated directly by application.

Definition at line 25 of file gammu-smsd.h.


Function Documentation

void SMSD_FreeConfig ( GSM_SMSDConfig config)

Frees SMSD configuration.

Parameters:
configPointer to SMSD configuration data.
GSM_Error SMSD_GetStatus ( GSM_SMSDConfig Config,
GSM_SMSDStatus status 
)

Gets SMSD status via shared memory.

Parameters:
ConfigSMSD configuration pointer.
statuspointer where status will be copied
Returns:
Error code
GSM_Error SMSD_InjectSMS ( GSM_SMSDConfig Config,
GSM_MultiSMSMessage sms,
char *  NewID 
)

Enqueues SMS message in SMS daemon queue.

Parameters:
ConfigSMSD configuration pointer.
smsMessage data to send.
NewIDPointer to string where ID of new message will be written. Can be NULL and then it is ignored.
Returns:
Error code
GSM_Error SMSD_MainLoop ( GSM_SMSDConfig Config,
gboolean  exit_on_failure,
int  max_failures 
)

Main SMS daemon loop. It connects to phone, scans for messages and sends messages from inbox. Can be interrupted by SMSD_Shutdown.

See also:
SMSD_Shutdown
Parameters:
ConfigPointer to SMSD configuration data.
exit_on_failureWhether failure should lead to terminaton of program.
max_failuresMaximal number of failures after which SMSD will terminate. Use 0 to not terminate on failures.
Returns:
Error code
GSM_SMSDConfig* SMSD_NewConfig ( const char *  name)

Creates new SMSD configuration.

Parameters:
nameName of process, will be used for logging. If NULL, gammu-smsd text is used.
Returns:
Pointer to SMSD configuration data block.
GSM_Error SMSD_ReadConfig ( const char *  filename,
GSM_SMSDConfig Config,
gboolean  uselog 
)

Reads SMSD configuration.

Parameters:
filenameFile name of configuration.
ConfigPointer to SMSD configuration data.
uselogWhether to log errors to configured log.
Returns:
Error code

Flags SMSD daemon to terminate itself gracefully.

Parameters:
ConfigPointer to SMSD configuration data.
Returns:
Error code