le_mcc_interface.h File Reference
Go to the source code of this file.
Typedefs | |
typedef struct le_mcc_Call * | le_mcc_CallRef_t |
typedef struct le_mcc_CallEventHandler * | le_mcc_CallEventHandlerRef_t |
typedef void(* | le_mcc_CallEventHandlerFunc_t) (le_mcc_CallRef_t callRef, le_mcc_Event_t event, void *contextPtr) |
Detailed Description
Legato Modem Call Control include file.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
Typedef Documentation
typedef void(* le_mcc_CallEventHandlerFunc_t) (le_mcc_CallRef_t callRef, le_mcc_Event_t event, void *contextPtr) |
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).
- Parameters
-
callRef The call reference. event Call event. contextPtr
typedef struct le_mcc_CallEventHandler* le_mcc_CallEventHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_mcc_CallEvent'
typedef struct le_mcc_Call* le_mcc_CallRef_t |
Reference type for managing active calls.
Enumeration Type Documentation
enum le_mcc_Event_t |
Enumeration of the possible events that may be reported to a call event handler.
Enumeration of the possible reasons for call termination.
Function Documentation
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] callRef The call reference.
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_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] callRef The call reference.
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_CallRef_t le_mcc_Create | ( | const char * | phoneNumPtr | ) |
Create a call reference.
- Note
- 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] phoneNumPtr The target number we are going to call.
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] callRef The call object to free.
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_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.
- Parameters
-
[in] callRef The call reference. [out] clirStatusPtrPtr the Calling Line Identification Restriction (CLIR) status
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] activePtr The call waiting activation.
int32_t le_mcc_GetPlatformSpecificTerminationCode | ( | le_mcc_CallRef_t | callRef | ) |
Called to get the platform specific termination code.
- 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] callRef The call reference to read from.
le_result_t le_mcc_GetRemoteTel | ( | le_mcc_CallRef_t | callRef, |
char * | telPtr, | ||
size_t | telPtrNumElements | ||
) |
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] callRef The call reference to read from. [out] telPtr The telephone number string. [in] telPtrNumElements
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] callRef The call reference to read from.
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] callRef The call to end.
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.
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] callRef The call reference to read.
void le_mcc_RemoveCallEventHandler | ( | le_mcc_CallEventHandlerRef_t | addHandlerRef | ) |
Remove handler function for EVENT 'le_mcc_CallEvent'
- Parameters
-
[in] addHandlerRef
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. Default value is 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.
- Parameters
-
[in] callRef The call reference. [in] clirStatus The Calling Line Identification Restriction (CLIR) status.
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] active The call waiting activation.
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] callRef Reference to the call object.
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.