le_voicecall_interface.h File Reference
Go to the source code of this file.
Typedefs | |
typedef void(* | le_voicecall_DisconnectHandler_t) (void *) |
typedef struct le_voicecall_Call * | le_voicecall_CallRef_t |
typedef struct le_voicecall_StateHandler * | le_voicecall_StateHandlerRef_t |
typedef void(* | le_voicecall_StateHandlerFunc_t) (le_voicecall_CallRef_t reference, const char *LE_NONNULL identifier, le_voicecall_Event_t event, void *contextPtr) |
Detailed Description
Legato Voice Call Service include file.
Copyright (C) Sierra Wireless Inc.
Typedef Documentation
◆ le_voicecall_CallRef_t
typedef struct le_voicecall_Call* le_voicecall_CallRef_t |
Reference returned by Start function and used by End function
◆ le_voicecall_DisconnectHandler_t
typedef void(* le_voicecall_DisconnectHandler_t) (void *) |
Type for handler called when a server disconnects.
◆ le_voicecall_StateHandlerFunc_t
typedef void(* le_voicecall_StateHandlerFunc_t) (le_voicecall_CallRef_t reference, const char *LE_NONNULL identifier, le_voicecall_Event_t event, void *contextPtr) |
Handler for voice call state changes.
◆ le_voicecall_StateHandlerRef_t
typedef struct le_voicecall_StateHandler* le_voicecall_StateHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_voicecall_State'
Enumeration Type Documentation
◆ le_voicecall_Event_t
enum le_voicecall_Event_t |
Voice call establishment states.
◆ le_voicecall_TerminationReason_t
Voice call termination reason.
Function Documentation
◆ le_voicecall_AddStateHandler()
le_voicecall_StateHandlerRef_t le_voicecall_AddStateHandler | ( | le_voicecall_StateHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_voicecall_State'
This event provides information on voice call state changes
- Parameters
-
[in] handlerPtr [in] contextPtr
◆ le_voicecall_Answer()
le_result_t le_voicecall_Answer | ( | le_voicecall_CallRef_t | reference | ) |
Answer to incoming voice call.
- Returns
- LE_OK if the incoming voice call can be answered
- LE_NOT_FOUND if the incoming voice call object reference is not found.
- Parameters
-
[in] reference Incoming voice call object reference to answer.
◆ le_voicecall_ConnectService()
void le_voicecall_ConnectService | ( | void | ) |
Connect the current client thread to the service providing this API. Block until the service is available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.
This function is created automatically.
◆ le_voicecall_Delete()
le_result_t le_voicecall_Delete | ( | le_voicecall_CallRef_t | reference | ) |
Delete voice call object reference create by le_voicecall_Start() or an incoming voice call.
- Returns
- LE_OK if the delete of voice call can be processed.
- LE_FAULT if the voice call is not terminated.
- LE_NOT_FOUND if the voice call object reference is not found.
- Parameters
-
[in] reference Voice call object reference to delete.
◆ le_voicecall_DisconnectService()
void le_voicecall_DisconnectService | ( | void | ) |
Disconnect the current client thread from the service providing this API.
Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.
This function is created automatically.
◆ le_voicecall_End()
le_result_t le_voicecall_End | ( | le_voicecall_CallRef_t | reference | ) |
Release a voice call.
- Returns
- LE_OK if the end of voice call can be processed.
- LE_NOT_FOUND if the voice call object reference is not found.
- Parameters
-
[in] reference Voice call object reference to hang-up.
◆ le_voicecall_GetRxAudioStream()
le_audio_StreamRef_t le_voicecall_GetRxAudioStream | ( | le_voicecall_CallRef_t | reference | ) |
Called to get the received audio stream. All audio received from the other end of the call is received on this stream.
- Returns
- Received audio stream reference.
- Parameters
-
[in] reference Voice call object reference to read from.
◆ le_voicecall_GetTerminationReason()
le_result_t le_voicecall_GetTerminationReason | ( | le_voicecall_CallRef_t | reference, |
le_voicecall_TerminationReason_t * | reasonPtr | ||
) |
Get the termination reason of a voice call reference.
- Returns
- LE_OK if the termination reason is got
- LE_NOT_FOUND if the incoming voice call object reference is not found.
- LE_FAULT if the voice call is not terminated.
- Parameters
-
[in] reference Voice call object reference to read from. [out] reasonPtr Termination reason of the voice call.
◆ le_voicecall_GetTxAudioStream()
le_audio_StreamRef_t le_voicecall_GetTxAudioStream | ( | le_voicecall_CallRef_t | reference | ) |
Called to get the transmitted audio stream. All audio generated on this end of the call is sent on this stream.
- Returns
- Transmitted audio stream reference.
- Parameters
-
[in] reference Voice call object reference to read from.
◆ le_voicecall_RemoveStateHandler()
void le_voicecall_RemoveStateHandler | ( | le_voicecall_StateHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'le_voicecall_State'
- Parameters
-
[in] handlerRef
◆ le_voicecall_SetServerDisconnectHandler()
void le_voicecall_SetServerDisconnectHandler | ( | le_voicecall_DisconnectHandler_t | disconnectHandler, |
void * | contextPtr | ||
) |
Set handler called when server disconnection is detected.
When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.
◆ le_voicecall_Start()
le_voicecall_CallRef_t le_voicecall_Start | ( | const char *LE_NONNULL | DestinationID | ) |
Start a voice call.
- Returns
- Reference to the voice call (to be used later for releasing the voice call)
- NULL if the voice call could not be processed
- Parameters
-
[in] DestinationID Destination identifier for the voice call establishment.
◆ le_voicecall_TryConnectService()
le_result_t le_voicecall_TryConnectService | ( | void | ) |
Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.
This function is created automatically.
- Returns
- LE_OK if the client connected successfully to the service.
- LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
- LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
- LE_COMM_ERROR if the Service Directory cannot be reached.