2 * \file gammu-callback.h
7 #ifndef __gammu_callback_h
8 #define __gammu_callback_h
11 * \defgroup Callback Callback
12 * Generic state machine callback layer.
15 #include <gammu-types.h>
16 #include <gammu-message.h>
17 #include <gammu-call.h>
20 * Callback for incoming calls.
24 typedef void (*IncomingCallCallback
) (GSM_StateMachine
* s
, GSM_Call
*call
,
28 * Callback for incoming SMS.
32 typedef void (*IncomingSMSCallback
) (GSM_StateMachine
* s
, GSM_SMSMessage
*sms
,
36 * Callback for incoming cell broadcast.
40 typedef void (*IncomingCBCallback
) (GSM_StateMachine
* s
, GSM_CBMessage
*cb
,
44 * Callback for icoming USSD.
48 typedef void (*IncomingUSSDCallback
) (GSM_StateMachine
* s
,
49 GSM_USSDMessage
*ussd
, void *user_data
);
52 * Callback for sending SMS.
56 typedef void (*SendSMSStatusCallback
) (GSM_StateMachine
* s
, int status
,
57 int MessageReference
, void *user_data
);
60 * Sets callback for incoming calls.
62 * \param s State machine.
63 * \param callback Pointer to callback function.
64 * \param user_data Second parameter which will be passed to callback.
68 void GSM_SetIncomingCallCallback(GSM_StateMachine
* s
,
69 IncomingCallCallback callback
,
73 * Sets callback for incoming SMSes.
75 * \param s State machine.
76 * \param callback Pointer to callback function.
77 * \param user_data Second parameter which will be passed to callback.
81 void GSM_SetIncomingSMSCallback(GSM_StateMachine
* s
,
82 IncomingSMSCallback callback
, void *user_data
);
85 * Sets callback for incoming CB.
87 * \param s State machine.
88 * \param callback Pointer to callback function.
89 * \param user_data Second parameter which will be passed to callback.
93 void GSM_SetIncomingCBCallback(GSM_StateMachine
* s
,
94 IncomingCBCallback callback
, void *user_data
);
97 * Sets callback for incoming USSD.
99 * \param s State machine.
100 * \param callback Pointer to callback function.
101 * \param user_data Second parameter which will be passed to callback.
105 void GSM_SetIncomingUSSDCallback(GSM_StateMachine
* s
,
106 IncomingUSSDCallback callback
,
110 * Sets callback for sending SMS.
112 * \param s State machine.
113 * \param callback Pointer to callback function.
114 * \param user_data Second parameter which will be passed to callback.
118 void GSM_SetSendSMSStatusCallback(GSM_StateMachine
* s
,
119 SendSMSStatusCallback callback
,
123 /* Editor configuration
124 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: