Gammu internals  1.38.0
Divert

Data Structures

struct  GSM_CallDivert
 
struct  GSM_MultiCallDivert
 

Enumerations

enum  GSM_Divert_DivertTypes { GSM_DIVERT_Busy = 0x01, GSM_DIVERT_NoAnswer, GSM_DIVERT_OutOfReach, GSM_DIVERT_AllTypes }
 
enum  GSM_Divert_CallTypes { GSM_DIVERT_VoiceCalls = 0x01, GSM_DIVERT_FaxCalls, GSM_DIVERT_DataCalls, GSM_DIVERT_AllCalls }
 

Functions

GSM_Error GSM_GetCallDivert (GSM_StateMachine *s, GSM_CallDivert *request, GSM_MultiCallDivert *result)
 
GSM_Error GSM_SetCallDivert (GSM_StateMachine *s, GSM_CallDivert *divert)
 
GSM_Error GSM_CancelAllDiverts (GSM_StateMachine *s)
 

Detailed Description

Diversion entries manipulations.

Enumeration Type Documentation

§ GSM_Divert_CallTypes

Which type of calls should be diverted.

Enumerator
GSM_DIVERT_VoiceCalls 

Voice calls.

GSM_DIVERT_FaxCalls 

Fax calls.

GSM_DIVERT_DataCalls 

Data calls.

GSM_DIVERT_AllCalls 

All calls.

Definition at line 134 of file gammu-call.h.

§ GSM_Divert_DivertTypes

Defines when diversion is active.

Enumerator
GSM_DIVERT_Busy 

Divert when busy.

GSM_DIVERT_NoAnswer 

Divert when not answered.

GSM_DIVERT_OutOfReach 

Divert when phone off or no coverage.

GSM_DIVERT_AllTypes 

Divert all calls without ringing.

Definition at line 110 of file gammu-call.h.

Function Documentation

§ GSM_CancelAllDiverts()

GSM_Error GSM_CancelAllDiverts ( GSM_StateMachine s)

Cancels all diverts.

Parameters
sState machine pointer.
Returns
Error code

Cancels all diverts.

Definition at line 1001 of file api.c.

References GSM_Phone_Functions::CancelAllDiverts, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1002 {
1003  GSM_Error err;
1004 
1006 
1007  err = s->Phone.Functions->CancelAllDiverts(s);
1008  PRINT_LOG_ERROR(err);
1009  return err;
1010 }
GSM_Error(* CancelAllDiverts)(GSM_StateMachine *s)
Definition: gsmstate.h:1043
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetCallDivert()

GSM_Error GSM_GetCallDivert ( GSM_StateMachine s,
GSM_CallDivert request,
GSM_MultiCallDivert result 
)

Gets call diverts.

Parameters
sState machine pointer.
requestWhich diverts to get.
resultStorage for diversions information.
Returns
Error code

Gets call diverts.

Definition at line 975 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetCallDivert, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

976 {
977  GSM_Error err;
978 
980 
981  err = s->Phone.Functions->GetCallDivert(s, request, result);
982  PRINT_LOG_ERROR(err);
983  return err;
984 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* GetCallDivert)(GSM_StateMachine *s, GSM_CallDivert *request, GSM_MultiCallDivert *result)
Definition: gsmstate.h:1035

§ GSM_SetCallDivert()

GSM_Error GSM_SetCallDivert ( GSM_StateMachine s,
GSM_CallDivert divert 
)

Sets call diverts.

Parameters
sState machine pointer.
divertDiversions information to set.
Returns
Error code

Sets call diverts.

Definition at line 988 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetCallDivert.

989 {
990  GSM_Error err;
991 
993 
994  err = s->Phone.Functions->SetCallDivert(s, divert);
995  PRINT_LOG_ERROR(err);
996  return err;
997 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Error(* SetCallDivert)(GSM_StateMachine *s, GSM_CallDivert *divert)
Definition: gsmstate.h:1039
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373