Enqueues SMS message in SMS daemon queue.
Parameters:
- Config -
SMSD configuration pointer.
- sms -
Message data to send.
- NewID -
Pointer to string where ID of new message will be written. Can be NULL and then it is ignored.
Return: Error code
Gets SMSD status via shared memory.
Parameters:
- Config -
SMSD configuration pointer.
- status -
pointer where status will be copied
Return: Error code
Flags SMSD daemon to terminate itself gracefully.
Parameters:
- Config -
Pointer to SMSD configuration data.
Return: Error code
Reads SMSD configuration.
Parameters:
- filename -
File name of configuration.
- Config -
Pointer to SMSD configuration data.
- uselog -
Whether to log errors to configured log.
Return: Error code
Main SMS daemon loop. It connects to phone, scans for messages and sends messages from inbox. Can be interrupted by SMSD_Shutdown.
Parameters:
- Config -
Pointer to SMSD configuration data.
- exit_on_failure -
Whether failure should lead to terminaton of program.
- max_failures -
Maximal number of failures after which SMSD will terminate. Use 0 to not terminate on failures.
See: Return: Error code
Creates new SMSD configuration.
Parameters:
- name -
Name of process, will be used for logging. If NULL, gammu-smsd text is used.
Return: Pointer to SMSD configuration data block.
Frees SMSD configuration.
Parameters:
- config -
Pointer to SMSD configuration data.
Status structure, which can be found in shared memory (if supported on platform).
Public Membersint Version
Version of this structure (1 for now).
char PhoneID[SMSD_TEXT_LENGTH+1]
PhoneID from configuration.
char Client[SMSD_TEXT_LENGTH+1]
Client software name.
GSM_BatteryCharge Charge
Current phone battery state.
GSM_SignalQuality Network
Current network state.
int Received
Number of received messages.
int Sent
Number of sent messages.
int Failed
Number of messages which failed to be send.
char IMEI[GSM_MAX_IMEI_LENGTH+1]
Phone IMEI.
typedef struct _GSM_SMSDConfig GSM_SMSDConfig
SMSD configuration data, these are not expected to be manipulated directly by application.