le_mcc_interface.h File Reference

#include "legato.h"
#include "le_mdmDefs_interface.h"
#include "le_mcc_common.h"

Go to the source code of this file.

Typedefs

typedef void(* le_mcc_DisconnectHandler_t) (void *)
 

Functions

void le_mcc_ConnectService (void)
 
le_result_t le_mcc_TryConnectService (void)
 
LE_FULL_API void le_mcc_SetServerDisconnectHandler (le_mcc_DisconnectHandler_t disconnectHandler, void *contextPtr)
 
void le_mcc_DisconnectService (void)
 
le_mcc_CallRef_t le_mcc_Create (const char *LE_NONNULL phoneNumPtr)
 
le_result_t le_mcc_Delete (le_mcc_CallRef_t callRef)
 
le_result_t le_mcc_Start (le_mcc_CallRef_t callRef)
 
bool le_mcc_IsConnected (le_mcc_CallRef_t callRef)
 
le_result_t le_mcc_GetRemoteTel (le_mcc_CallRef_t callRef, char *telPtr, size_t telPtrSize)
 
le_mcc_TerminationReason_t le_mcc_GetTerminationReason (le_mcc_CallRef_t callRef)
 
int32_t le_mcc_GetPlatformSpecificTerminationCode (le_mcc_CallRef_t callRef)
 
le_result_t le_mcc_Answer (le_mcc_CallRef_t callRef)
 
le_result_t le_mcc_HangUp (le_mcc_CallRef_t callRef)
 
le_result_t le_mcc_HangUpAll (void)
 
le_result_t le_mcc_GetCallerIdRestrict (le_mcc_CallRef_t callRef, le_onoff_t *clirStatusPtrPtr)
 
le_result_t le_mcc_SetCallerIdRestrict (le_mcc_CallRef_t callRef, le_onoff_t clirStatus)
 
le_mcc_CallEventHandlerRef_t le_mcc_AddCallEventHandler (le_mcc_CallEventHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_mcc_RemoveCallEventHandler (le_mcc_CallEventHandlerRef_t handlerRef)
 
le_result_t le_mcc_SetCallWaitingService (bool active)
 
le_result_t le_mcc_GetCallWaitingService (bool *activePtr)
 
le_result_t le_mcc_ActivateCall (le_mcc_CallRef_t callRef)
 
le_result_t le_mcc_SetAmrWbCapability (bool enable)
 
le_result_t le_mcc_GetAmrWbCapability (bool *enabledPtr)
 

Detailed Description

Legato Modem Call Control include file.

Typedef Documentation

◆ le_mcc_DisconnectHandler_t

typedef void(* le_mcc_DisconnectHandler_t) (void *)

Type for handler called when a server disconnects.

Function Documentation

◆ le_mcc_ActivateCall()

le_result_t le_mcc_ActivateCall ( le_mcc_CallRef_t  callRef)

This function activates the specified call. Other calls are placed on hold.

Returns
  • LE_OK The function succeed.
  • LE_FAULT The function failed.
Parameters
[in]callRefThe call reference.

◆ le_mcc_AddCallEventHandler()

le_mcc_CallEventHandlerRef_t le_mcc_AddCallEventHandler ( le_mcc_CallEventHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_mcc_CallEvent'

Register an event handler that will be notified when an call's event occurs.

Returns
A reference to the new event handler object.
Note
It is a fatal error if this function does succeed. If this function fails, it will not return.
Parameters
[in]handlerPtr
[in]contextPtr

◆ le_mcc_Answer()

le_result_t le_mcc_Answer ( le_mcc_CallRef_t  callRef)

Answers incoming call.

Returns
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
A call waiting call must be answered using SetCallActive() API. This API doesn't manage call waiting supplementary service.
Parameters
[in]callRefThe call reference.

◆ le_mcc_ConnectService()

void le_mcc_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_mcc_Create()

le_mcc_CallRef_t le_mcc_Create ( const char *LE_NONNULL  phoneNumPtr)

Enumeration of the possible events that may be reported to a call event handler. Enumeration of the possible reasons for call termination. Reference type for managing active calls. Handler for call state changes.

Note
The callRef has to be deleted using le_mcc_Delete() when LE_MCC_TERMINATED event is received, except if is has to be used for a future usage (with le_mcc_profile handler for instance, or dialing again the same number). Reference type used by Add/Remove functions for EVENT 'le_mcc_CallEvent' Create a call reference.
Return NULL if call reference can't be created
If destination number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error, the function will not return.
Parameters
[in]phoneNumPtrThe target number we are going to call.

◆ le_mcc_Delete()

le_result_t le_mcc_Delete ( le_mcc_CallRef_t  callRef)

Call to free up a call reference.

Returns
  • LE_OK The function succeed.
  • LE_NOT_FOUND The call reference was not found.
  • LE_FAULT The function failed.
Parameters
[in]callRefThe call object to free.

◆ le_mcc_DisconnectService()

void le_mcc_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_mcc_GetAmrWbCapability()

le_result_t le_mcc_GetAmrWbCapability ( bool *  enabledPtr)

This function gets the audio AMR Wideband capability.

Returns
  • LE_OK The function succeeded.
  • LE_UNAVAILABLE The service is not available.
  • LE_FAULT On any other failure.
Parameters
[out]enabledPtrTrue if AMR Wideband capability is enabled, false otherwise.

◆ le_mcc_GetCallerIdRestrict()

le_result_t le_mcc_GetCallerIdRestrict ( le_mcc_CallRef_t  callRef,
le_onoff_t clirStatusPtrPtr 
)

This function return the Calling Line Identification Restriction (CLIR) status on the specific call.

The output parameter is updated with the CLIR status.

  • LE_ON Disable presentation of own phone number to remote.
  • LE_OFF Enable presentation of own phone number to remote.
Returns
  • LE_OK The function succeed.
  • LE_NOT_FOUND The call reference was not found.
  • LE_UNAVAILABLE CLIR status was not set.
Parameters
[in]callRefThe call reference.
[out]clirStatusPtrPtrthe Calling Line Identification Restriction (CLIR) status

◆ le_mcc_GetCallWaitingService()

le_result_t le_mcc_GetCallWaitingService ( bool *  activePtr)

This function gets the call waiting service status.

Returns
  • LE_OK The function succeed.
  • LE_FAULT The function failed.
Parameters
[out]activePtrThe call waiting activation.

◆ le_mcc_GetPlatformSpecificTerminationCode()

int32_t le_mcc_GetPlatformSpecificTerminationCode ( le_mcc_CallRef_t  callRef)

Called to get the platform specific termination code.

Refer to Platform specific error codes for platform specific termination code description.

Returns
The platform specific termination code.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]callRefThe call reference to read from.

◆ le_mcc_GetRemoteTel()

le_result_t le_mcc_GetRemoteTel ( le_mcc_CallRef_t  callRef,
char *  telPtr,
size_t  telPtrSize 
)

Read out the remote party telephone number associated with the call.

Output parameter is updated with the telephone number. If the Telephone number string length exceeds the value of 'len' parameter, the LE_OVERFLOW error code is returned and 'telPtr' is used until 'len-1' characters and a null-character is implicitly appended at the end of 'telPtr'. Note that 'len' sould be at least equal to LE_MDMDEFS_PHONE_NUM_MAX_BYTES, otherwise LE_OVERFLOW error code will be common.

Returns
LE_OVERFLOW The Telephone number length exceed the maximum length.
LE_OK The function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]callRefThe call reference to read from.
[out]telPtrThe telephone number string.
[in]telPtrSize

◆ le_mcc_GetTerminationReason()

le_mcc_TerminationReason_t le_mcc_GetTerminationReason ( le_mcc_CallRef_t  callRef)

Called to get the termination reason.

Returns
The termination reason.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]callRefThe call reference to read from.

◆ le_mcc_HangUp()

le_result_t le_mcc_HangUp ( le_mcc_CallRef_t  callRef)

Disconnect, or hang up, the specifed call. Any active call handlers will be notified.

Returns
LE_FAULT The function failed.
LE_TIMEOUT No response was received from the Modem.
LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
this API can also be used to disconnect a waiting or on hold call.
Parameters
[in]callRefThe call to end.

◆ le_mcc_HangUpAll()

le_result_t le_mcc_HangUpAll ( void  )

This function will disconnect, or hang up all the ongoing calls. Any active call handlers will be notified.

Returns
LE_FAULT The function failed.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.

◆ le_mcc_IsConnected()

bool le_mcc_IsConnected ( le_mcc_CallRef_t  callRef)

Allow the caller to know if the given call is actually connected or not.

Returns
TRUE if the call is connected, FALSE otherwise.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]callRefThe call reference to read.

◆ le_mcc_RemoveCallEventHandler()

void le_mcc_RemoveCallEventHandler ( le_mcc_CallEventHandlerRef_t  handlerRef)

Remove handler function for EVENT 'le_mcc_CallEvent'

Parameters
[in]handlerRef

◆ le_mcc_SetAmrWbCapability()

le_result_t le_mcc_SetAmrWbCapability ( bool  enable)

This function enables/disables the audio AMR Wideband capability.

Returns
  • LE_OK The function succeeded.
  • LE_UNAVAILABLE The service is not available.
  • LE_FAULT On any other failure.
Note
The capability setting takes effect immediately and is not persistent to reset.
Parameters
[in]enableTrue enables the AMR Wideband capability, false disables it.

◆ le_mcc_SetCallerIdRestrict()

le_result_t le_mcc_SetCallerIdRestrict ( le_mcc_CallRef_t  callRef,
le_onoff_t  clirStatus 
)

This function set the Calling Line Identification Restriction (CLIR) status on the specific call. By default the CLIR status is not set.

Returns
  • LE_OK The function succeed.
  • LE_NOT_FOUND The call reference was not found.
Parameters
[in]callRefThe call reference.
[in]clirStatusThe Calling Line Identification Restriction (CLIR) status.

◆ le_mcc_SetCallWaitingService()

le_result_t le_mcc_SetCallWaitingService ( bool  active)

This function activates or deactivates the call waiting service.

Returns
  • LE_OK The function succeed.
  • LE_FAULT The function failed.
Parameters
[in]activeThe call waiting activation.

◆ le_mcc_SetServerDisconnectHandler()

LE_FULL_API void le_mcc_SetServerDisconnectHandler ( le_mcc_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_mcc_Start()

le_result_t le_mcc_Start ( le_mcc_CallRef_t  callRef)

Start a call attempt.

Asynchronous due to possible time to connect.

As the call attempt proceeds, the profile's registered call event handler receives events.

Returns
  • LE_OK Function succeed.
  • LE_BUSY The call is already in progress
  • Note
    As this is an asynchronous call, a successful only confirms a call has been started. Don't assume a call has been successful yet.
    If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]callRefReference to the call object.

◆ le_mcc_TryConnectService()

le_result_t le_mcc_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.