Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_voicecall_common.h File Reference
#include "legato.h"
#include "taf_types_common.h"

Go to the source code of this file.

Macros

#define IFGEN_TAF_VOICECALL_PROTOCOL_ID   "9d88c6710fe7cde0980776c02d1464d1"
 
#define IFGEN_TAF_VOICECALL_MSG_SIZE   38
 
#define TAF_VOICECALL_EVENT_CONNECTED   2
 
#define TAF_VOICECALL_EVENT_TERMINATED   3
 
#define TAF_VOICECALL_EVENT_BUSY   5
 
#define TAF_VOICECALL_TERM_NETWORK_FAIL   1
 
#define TAF_VOICECALL_TERM_BAD_ADDRESS   2
 
#define TAF_VOICECALL_TERM_BUSY   3
 
#define TAF_VOICECALL_TERM_LOCAL_ENDED   4
 
#define TAF_VOICECALL_TERM_REMOTE_ENDED   5
 
#define TAF_VOICECALL_TERM_UNDEFINED   6
 

Typedefs

typedef struct taf_voicecall_Call * taf_voicecall_CallRef_t
 
typedef struct taf_voicecall_StateHandler * taf_voicecall_StateHandlerRef_t
 
typedef void(* taf_voicecall_StateHandlerFunc_t) (taf_voicecall_CallRef_t reference, const char *LE_NONNULL identifer, taf_voicecall_Event_t event, void *contextPtr)
 

Enumerations

enum  taf_voicecall_Event_t {
  TAF_VOICECALL_EVENT_ALERTING = 1, TAF_VOICECALL_EVENT_ACTIVE = 2, TAF_VOICECALL_EVENT_ENDED = 3, TAF_VOICECALL_EVENT_OFFLINE = 4,
  TAF_VOICECALL_EVENT_WAITING = 5, TAF_VOICECALL_EVENT_RESOURCE_BUSY = 6, TAF_VOICECALL_EVENT_CALL_END_FAILED = 7, TAF_VOICECALL_EVENT_CALL_ANSWER_FAILED = 8,
  TAF_VOICECALL_EVENT_INCOMING = 9, TAF_VOICECALL_EVENT_ONHOLD = 10, TAF_VOICECALL_EVENT_DIALING = 11, TAF_VOICECALL_EVENT_CALL_HOLD_FAILED = 12,
  TAF_VOICECALL_EVENT_CALL_RESUME_FAILED = 13, TAF_VOICECALL_EVENT_CALL_SWAP_FAILED = 14
}
 
enum  taf_voicecall_CallEndCause_t {
  TAF_VOICECALL_END_NORMAL = 0, TAF_VOICECALL_END_NETWORK_FAIL = 1, TAF_VOICECALL_END_UNOBTAINABLE_NUMBER = 2, TAF_VOICECALL_END_BUSY = 3,
  TAF_VOICECALL_END_LOCAL = 4, TAF_VOICECALL_END_REMOTE = 5, TAF_VOICECALL_END_UNDEFINED = 6, TAF_VOICECALL_END_REJECTED = 7,
  TAF_VOICECALL_END_NORESPONSE = 8
}
 

Functions

LE_SHARED bool ifgen_taf_voicecall_HasLocalBinding (void)
 
LE_SHARED void ifgen_taf_voicecall_InitCommonData (void)
 
LE_SHARED void ifgen_taf_voicecall_CleanupCommonData (le_msg_SessionRef_t _ifgen_sessionRef)
 
LE_SHARED le_result_t ifgen_taf_voicecall_OpenSession (le_msg_SessionRef_t _ifgen_sessionRef, bool isBlocking)
 
LE_SHARED taf_voicecall_StateHandlerRef_t ifgen_taf_voicecall_AddStateHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_StateHandlerFunc_t handlerPtr, void *contextPtr)
 
LE_SHARED void ifgen_taf_voicecall_RemoveStateHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_StateHandlerRef_t handlerRef)
 
LE_SHARED taf_voicecall_CallRef_t ifgen_taf_voicecall_Start (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL destinationID, uint8_t phoneId)
 
LE_SHARED le_result_t ifgen_taf_voicecall_End (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_CallRef_t reference)
 
LE_SHARED le_result_t ifgen_taf_voicecall_Delete (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_CallRef_t reference)
 
LE_SHARED le_result_t ifgen_taf_voicecall_Answer (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_CallRef_t reference)
 
LE_SHARED le_result_t ifgen_taf_voicecall_GetEndCause (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_CallRef_t reference, taf_voicecall_CallEndCause_t *causePtr)
 
LE_SHARED le_result_t ifgen_taf_voicecall_Hold (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_CallRef_t reference)
 
LE_SHARED le_result_t ifgen_taf_voicecall_Resume (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_CallRef_t reference)
 
LE_SHARED le_result_t ifgen_taf_voicecall_Swap (le_msg_SessionRef_t _ifgen_sessionRef, taf_voicecall_CallRef_t reference)
 

Macro Definition Documentation

◆ IFGEN_TAF_VOICECALL_PROTOCOL_ID

#define IFGEN_TAF_VOICECALL_PROTOCOL_ID   "9d88c6710fe7cde0980776c02d1464d1"

◆ IFGEN_TAF_VOICECALL_MSG_SIZE

#define IFGEN_TAF_VOICECALL_MSG_SIZE   38

◆ TAF_VOICECALL_EVENT_CONNECTED

#define TAF_VOICECALL_EVENT_CONNECTED   2

Legacy event suppport.

◆ TAF_VOICECALL_EVENT_TERMINATED

#define TAF_VOICECALL_EVENT_TERMINATED   3

◆ TAF_VOICECALL_EVENT_BUSY

#define TAF_VOICECALL_EVENT_BUSY   5

◆ TAF_VOICECALL_TERM_NETWORK_FAIL

#define TAF_VOICECALL_TERM_NETWORK_FAIL   1

Legacy term support.

◆ TAF_VOICECALL_TERM_BAD_ADDRESS

#define TAF_VOICECALL_TERM_BAD_ADDRESS   2

◆ TAF_VOICECALL_TERM_BUSY

#define TAF_VOICECALL_TERM_BUSY   3

◆ TAF_VOICECALL_TERM_LOCAL_ENDED

#define TAF_VOICECALL_TERM_LOCAL_ENDED   4

◆ TAF_VOICECALL_TERM_REMOTE_ENDED

#define TAF_VOICECALL_TERM_REMOTE_ENDED   5

◆ TAF_VOICECALL_TERM_UNDEFINED

#define TAF_VOICECALL_TERM_UNDEFINED   6

Typedef Documentation

◆ taf_voicecall_CallRef_t

typedef struct taf_voicecall_Call* taf_voicecall_CallRef_t

Uses the call reference returned from start defined in le_voicecall.api

◆ taf_voicecall_StateHandlerRef_t

typedef struct taf_voicecall_StateHandler* taf_voicecall_StateHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'taf_voicecall_State'

◆ taf_voicecall_StateHandlerFunc_t

typedef void(* taf_voicecall_StateHandlerFunc_t) (taf_voicecall_CallRef_t reference, const char *LE_NONNULL identifer, taf_voicecall_Event_t event, void *contextPtr)

Enumeration Type Documentation

◆ taf_voicecall_Event_t

Call events.

Enumerator
TAF_VOICECALL_EVENT_ALERTING 

Alerting call; MO only.

TAF_VOICECALL_EVENT_ACTIVE 

Active call; map to legacy connected.

TAF_VOICECALL_EVENT_ENDED 

Call end.

TAF_VOICECALL_EVENT_OFFLINE 

Not supported.

TAF_VOICECALL_EVENT_WAITING 

Waiting call; map to legacy busy.

TAF_VOICECALL_EVENT_RESOURCE_BUSY 

Not supported.

TAF_VOICECALL_EVENT_CALL_END_FAILED 

Call end failed.

TAF_VOICECALL_EVENT_CALL_ANSWER_FAILED 

Call answer failed.

TAF_VOICECALL_EVENT_INCOMING 

Incoming call; not answered yet.

TAF_VOICECALL_EVENT_ONHOLD 

On hold call.

TAF_VOICECALL_EVENT_DIALING 

MO call; dialing.

TAF_VOICECALL_EVENT_CALL_HOLD_FAILED 

Call hold failed.

TAF_VOICECALL_EVENT_CALL_RESUME_FAILED 

Call resume failed.

TAF_VOICECALL_EVENT_CALL_SWAP_FAILED 

Call swap failed.

◆ taf_voicecall_CallEndCause_t

Call end causes.

Enumerator
TAF_VOICECALL_END_NORMAL 

Normal call end.

TAF_VOICECALL_END_NETWORK_FAIL 

Map to legacy network fail.

TAF_VOICECALL_END_UNOBTAINABLE_NUMBER 

Map to legacy bad address.

TAF_VOICECALL_END_BUSY 

Remote busy.

TAF_VOICECALL_END_LOCAL 

Not supported.

TAF_VOICECALL_END_REMOTE 

Not supported.

TAF_VOICECALL_END_UNDEFINED 

End cause undefined for TelAF.

TAF_VOICECALL_END_REJECTED 

Call rejected.

TAF_VOICECALL_END_NORESPONSE 

No remote response.

Function Documentation

◆ ifgen_taf_voicecall_HasLocalBinding()

LE_SHARED bool ifgen_taf_voicecall_HasLocalBinding ( void  )

Get if this client bound locally.

◆ ifgen_taf_voicecall_InitCommonData()

LE_SHARED void ifgen_taf_voicecall_InitCommonData ( void  )

Init data that is common across all threads

◆ ifgen_taf_voicecall_CleanupCommonData()

LE_SHARED void ifgen_taf_voicecall_CleanupCommonData ( le_msg_SessionRef_t  _ifgen_sessionRef)

Cleanup the data of a session

◆ ifgen_taf_voicecall_OpenSession()

LE_SHARED le_result_t ifgen_taf_voicecall_OpenSession ( le_msg_SessionRef_t  _ifgen_sessionRef,
bool  isBlocking 
)

Perform common initialization and open a session

◆ ifgen_taf_voicecall_AddStateHandler()

LE_SHARED taf_voicecall_StateHandlerRef_t ifgen_taf_voicecall_AddStateHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_StateHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_voicecall_State'

Parameters
[in]handlerPtr
[in]contextPtr

◆ ifgen_taf_voicecall_RemoveStateHandler()

LE_SHARED void ifgen_taf_voicecall_RemoveStateHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_StateHandlerRef_t  handlerRef 
)

Remove handler function for EVENT 'taf_voicecall_State'

Parameters
[in]handlerRef

◆ ifgen_taf_voicecall_Start()

LE_SHARED taf_voicecall_CallRef_t ifgen_taf_voicecall_Start ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  destinationID,
uint8_t  phoneId 
)

Starts a call according to a given phone number and slot ID.

Returns
  • Reference to the voice call.
  • NULL if the voice call can not be processed.
Parameters
[in]destinationIDDestination phone number for
[in]phoneIdSIM slot ID.

◆ ifgen_taf_voicecall_End()

LE_SHARED le_result_t ifgen_taf_voicecall_End ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_CallRef_t  reference 
)

Stops a call according to the given reference ID.

Returns
  • LE_OK – Succeeded.
  • Others – Failed.
Parameters
[in]referenceThe call reference.

◆ ifgen_taf_voicecall_Delete()

LE_SHARED le_result_t ifgen_taf_voicecall_Delete ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_CallRef_t  reference 
)

Deletes a call according to the given call reference.

Returns
  • LE_OK – Succeeded.
  • Others – Failed.
Parameters
[in]referenceThe call reference.

◆ ifgen_taf_voicecall_Answer()

LE_SHARED le_result_t ifgen_taf_voicecall_Answer ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_CallRef_t  reference 
)

Answers an incoming or a waiting call. The call reference can be retrieved from the call state handler.If a Waiting call is being answered and the existing call is Active, then the existing call will move to Hold state. If the existing call is on Hold already, then it will remain on Hold. The waiting call state transitions from Waiting to Active. If a Waiting call is being answered and the existing call is Active, then the existing call will move to Hold state. If the existing call is on Hold already, then it will remain on Hold. The waiting call state transitions from Waiting to Active.

Returns
  • LE_OK – Succeeded.
  • Others – Failed.
Parameters
[in]referenceThe call reference.

◆ ifgen_taf_voicecall_GetEndCause()

LE_SHARED le_result_t ifgen_taf_voicecall_GetEndCause ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_CallRef_t  reference,
taf_voicecall_CallEndCause_t causePtr 
)

Gets the call end reason according to the call reference. This call should be in the END state. The call should be in the idle state when calling this API.

Returns
  • LE_OK – Succeeded.
  • Others – Failed.
Parameters
[in]referenceThe call reference.
[out]causePtrThe end cause enumeration.

◆ ifgen_taf_voicecall_Hold()

LE_SHARED le_result_t ifgen_taf_voicecall_Hold ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_CallRef_t  reference 
)

Holds the active call. This call should be in the ACTIVE state.

Returns
  • LE_OK – Succeeded.
  • Others – Failed.
Parameters
[in]referenceThe call reference.

◆ ifgen_taf_voicecall_Resume()

LE_SHARED le_result_t ifgen_taf_voicecall_Resume ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_CallRef_t  reference 
)

Resumes the holding call. This call should be in the HOLD state.

Returns
  • LE_OK – Succeeded.
  • Others – Failed.
Parameters
[in]referenceThe call reference.

◆ ifgen_taf_voicecall_Swap()

LE_SHARED le_result_t ifgen_taf_voicecall_Swap ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_voicecall_CallRef_t  reference 
)

Swaps calls to make one active and put the another on hold. This should be two calls, where one is in the holding state and the another is in the active state.

Returns
  • LE_OK – Succeeded.
  • Others – Failed.
Parameters
[in]referenceThe call reference.