Gammu internals  1.38.0
Callback

Typedefs

typedef void(* IncomingCallCallback) (GSM_StateMachine *s, GSM_Call *call, void *user_data)
 
typedef void(* IncomingSMSCallback) (GSM_StateMachine *s, GSM_SMSMessage *sms, void *user_data)
 
typedef void(* IncomingCBCallback) (GSM_StateMachine *s, GSM_CBMessage *cb, void *user_data)
 
typedef void(* IncomingUSSDCallback) (GSM_StateMachine *s, GSM_USSDMessage *ussd, void *user_data)
 
typedef void(* SendSMSStatusCallback) (GSM_StateMachine *s, int status, int MessageReference, void *user_data)
 

Functions

void GSM_SetIncomingCallCallback (GSM_StateMachine *s, IncomingCallCallback callback, void *user_data)
 
void GSM_SetIncomingSMSCallback (GSM_StateMachine *s, IncomingSMSCallback callback, void *user_data)
 
void GSM_SetIncomingCBCallback (GSM_StateMachine *s, IncomingCBCallback callback, void *user_data)
 
void GSM_SetIncomingUSSDCallback (GSM_StateMachine *s, IncomingUSSDCallback callback, void *user_data)
 
void GSM_SetSendSMSStatusCallback (GSM_StateMachine *s, SendSMSStatusCallback callback, void *user_data)
 

Detailed Description

Generic state machine callback layer.

Typedef Documentation

§ IncomingCallCallback

typedef void(* IncomingCallCallback) (GSM_StateMachine *s, GSM_Call *call, void *user_data)

Callback for incoming calls.

Definition at line 28 of file gammu-callback.h.

§ IncomingCBCallback

typedef void(* IncomingCBCallback) (GSM_StateMachine *s, GSM_CBMessage *cb, void *user_data)

Callback for incoming cell broadcast.

Definition at line 44 of file gammu-callback.h.

§ IncomingSMSCallback

typedef void(* IncomingSMSCallback) (GSM_StateMachine *s, GSM_SMSMessage *sms, void *user_data)

Callback for incoming SMS.

Definition at line 36 of file gammu-callback.h.

§ IncomingUSSDCallback

typedef void(* IncomingUSSDCallback) (GSM_StateMachine *s, GSM_USSDMessage *ussd, void *user_data)

Callback for icoming USSD.

Definition at line 52 of file gammu-callback.h.

§ SendSMSStatusCallback

typedef void(* SendSMSStatusCallback) (GSM_StateMachine *s, int status, int MessageReference, void *user_data)

Callback for sending SMS.

Definition at line 60 of file gammu-callback.h.

Function Documentation

§ GSM_SetIncomingCallCallback()

void GSM_SetIncomingCallCallback ( GSM_StateMachine s,
IncomingCallCallback  callback,
void *  user_data 
)

Sets callback for incoming calls.

Parameters
sState machine.
callbackPointer to callback function.
user_dataSecond parameter which will be passed to callback.

Definition at line 1647 of file gsmstate.c.

References _GSM_User::IncomingCall, _GSM_User::IncomingCallUserData, and _GSM_StateMachine::User.

1648 {
1649  s->User.IncomingCall = callback;
1650  s->User.IncomingCallUserData = user_data;
1651 }
void * IncomingCallUserData
Definition: gsmstate.h:1386
IncomingCallCallback IncomingCall
Definition: gsmstate.h:1381

§ GSM_SetIncomingCBCallback()

void GSM_SetIncomingCBCallback ( GSM_StateMachine s,
IncomingCBCallback  callback,
void *  user_data 
)

Sets callback for incoming CB.

Parameters
sState machine.
callbackPointer to callback function.
user_dataSecond parameter which will be passed to callback.

Definition at line 1659 of file gsmstate.c.

References _GSM_User::IncomingCB, _GSM_User::IncomingCBUserData, and _GSM_StateMachine::User.

1660 {
1661  s->User.IncomingCB = callback;
1662  s->User.IncomingCBUserData = user_data;
1663 }
IncomingCBCallback IncomingCB
Definition: gsmstate.h:1383
void * IncomingCBUserData
Definition: gsmstate.h:1388

§ GSM_SetIncomingSMSCallback()

void GSM_SetIncomingSMSCallback ( GSM_StateMachine s,
IncomingSMSCallback  callback,
void *  user_data 
)

Sets callback for incoming SMSes.

Parameters
sState machine.
callbackPointer to callback function.
user_dataSecond parameter which will be passed to callback.

Definition at line 1653 of file gsmstate.c.

References _GSM_User::IncomingSMS, _GSM_User::IncomingSMSUserData, and _GSM_StateMachine::User.

1654 {
1655  s->User.IncomingSMS = callback;
1656  s->User.IncomingSMSUserData = user_data;
1657 }
void * IncomingSMSUserData
Definition: gsmstate.h:1387
IncomingSMSCallback IncomingSMS
Definition: gsmstate.h:1382

§ GSM_SetIncomingUSSDCallback()

void GSM_SetIncomingUSSDCallback ( GSM_StateMachine s,
IncomingUSSDCallback  callback,
void *  user_data 
)

Sets callback for incoming USSD.

Parameters
sState machine.
callbackPointer to callback function.
user_dataSecond parameter which will be passed to callback.

Definition at line 1665 of file gsmstate.c.

References _GSM_User::IncomingUSSD, _GSM_User::IncomingUSSDUserData, and _GSM_StateMachine::User.

1666 {
1667  s->User.IncomingUSSD = callback;
1668  s->User.IncomingUSSDUserData = user_data;
1669 }
IncomingUSSDCallback IncomingUSSD
Definition: gsmstate.h:1384
void * IncomingUSSDUserData
Definition: gsmstate.h:1389

§ GSM_SetSendSMSStatusCallback()

void GSM_SetSendSMSStatusCallback ( GSM_StateMachine s,
SendSMSStatusCallback  callback,
void *  user_data 
)

Sets callback for sending SMS.

Parameters
sState machine.
callbackPointer to callback function.
user_dataSecond parameter which will be passed to callback.

Definition at line 1671 of file gsmstate.c.

References _GSM_User::SendSMSStatus, _GSM_User::SendSMSStatusUserData, and _GSM_StateMachine::User.

1672 {
1673  s->User.SendSMSStatus = callback;
1674  s->User.SendSMSStatusUserData = user_data;
1675 }
SendSMSStatusCallback SendSMSStatus
Definition: gsmstate.h:1385
void * SendSMSStatusUserData
Definition: gsmstate.h:1390