All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
le_mcc_profile_interface.h File Reference
#include "legato.h"
#include "le_audio_interface.h"
#include "le_mcc_call_interface.h"

Go to the source code of this file.

Typedefs

typedef struct le_mcc_profile_Obj * le_mcc_profile_ObjRef_t
 
typedef struct
le_mcc_profile_StateChangeHandler * 
le_mcc_profile_StateChangeHandlerRef_t
 
typedef struct
le_mcc_profile_CallEventHandler * 
le_mcc_profile_CallEventHandlerRef_t
 
typedef void(* le_mcc_profile_StateChangeHandlerFunc_t )(le_mcc_profile_State_t newState, void *contextPtr)
 
typedef void(* le_mcc_profile_CallEventHandlerFunc_t )(le_mcc_call_ObjRef_t callRef, le_mcc_call_Event_t event, void *contextPtr)
 

Enumerations

enum  le_mcc_profile_State_t {
  LE_MCC_PROFILE_NOT_AVAILABLE, LE_MCC_PROFILE_IDLE, LE_MCC_PROFILE_FORWARDED, LE_MCC_PROFILE_DND,
  LE_MCC_PROFILE_IN_USE
}
 

Functions

void le_mcc_profile_StartClient (const char *serviceInstanceName)
 
void le_mcc_profile_StopClient (void)
 
le_mcc_profile_StateChangeHandlerRef_t le_mcc_profile_AddStateChangeHandler (le_mcc_profile_ObjRef_t profileRef, le_mcc_profile_StateChangeHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_mcc_profile_RemoveStateChangeHandler (le_mcc_profile_StateChangeHandlerRef_t addHandlerRef)
 
le_mcc_profile_CallEventHandlerRef_t le_mcc_profile_AddCallEventHandler (le_mcc_profile_ObjRef_t profileRef, le_mcc_profile_CallEventHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_mcc_profile_RemoveCallEventHandler (le_mcc_profile_CallEventHandlerRef_t addHandlerRef)
 
le_mcc_profile_ObjRef_t le_mcc_profile_GetByName (const char *profileNamePtr)
 
void le_mcc_profile_Release (le_mcc_profile_ObjRef_t profileRef)
 
le_mcc_profile_State_t le_mcc_profile_GetState (le_mcc_profile_ObjRef_t profileRef)
 
le_mcc_call_ObjRef_t le_mcc_profile_CreateCall (le_mcc_profile_ObjRef_t profileRef, const char *destinationPtr)
 

Detailed Description

Legato Modem Call Control Profile include file.

Copyright (C) Sierra Wireless, Inc. 2014. Use of this work is subject to license.

Typedef Documentation

typedef void(* le_mcc_profile_CallEventHandlerFunc_t)(le_mcc_call_ObjRef_t callRef, le_mcc_call_Event_t event, void *contextPtr)

Handler for call state changes.

Parameters
callRefCall associated with the event.
eventCall event.
contextPtr
typedef struct le_mcc_profile_CallEventHandler* le_mcc_profile_CallEventHandlerRef_t

Reference type for le_mcc_profile_CallEventHandler handler ADD/REMOVE functions

typedef struct le_mcc_profile_Obj* le_mcc_profile_ObjRef_t

Reference type to represent profiles capable sending and receiving calls.

typedef void(* le_mcc_profile_StateChangeHandlerFunc_t)(le_mcc_profile_State_t newState, void *contextPtr)

Handler for profile state changes.

Parameters
newStateNew state profile.
contextPtr
typedef struct le_mcc_profile_StateChangeHandler* le_mcc_profile_StateChangeHandlerRef_t

Reference type for le_mcc_profile_StateChangeHandler handler ADD/REMOVE functions

Enumeration Type Documentation

Enumeration to convey current status of a given profile.

Enumerator
LE_MCC_PROFILE_NOT_AVAILABLE 

This profile is not available.

LE_MCC_PROFILE_IDLE 

This profile is available, nothing is currently happening on it.

LE_MCC_PROFILE_FORWARDED 

This profile is currently being forwarded to another number.

LE_MCC_PROFILE_DND 

This profile is in "Do Not Disturb" mode.

LE_MCC_PROFILE_IN_USE 

This profile is currently in use.

Function Documentation

le_mcc_profile_CallEventHandlerRef_t le_mcc_profile_AddCallEventHandler ( le_mcc_profile_ObjRef_t  profileRef,
le_mcc_profile_CallEventHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

le_mcc_profile_CallEventHandler handler ADD function

Parameters
[in]profileRefThe profile to update.
[in]handlerPtr
[in]contextPtr
le_mcc_profile_StateChangeHandlerRef_t le_mcc_profile_AddStateChangeHandler ( le_mcc_profile_ObjRef_t  profileRef,
le_mcc_profile_StateChangeHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

le_mcc_profile_StateChangeHandler handler ADD function

Parameters
[in]profileRefThe profile reference.
[in]handlerPtr
[in]contextPtr
le_mcc_call_ObjRef_t le_mcc_profile_CreateCall ( le_mcc_profile_ObjRef_t  profileRef,
const char *  destinationPtr 
)

Create a new call object with a destination telephone number.

le_mcc_call_Start() must still initiate the call when ready.

Returns
A reference to the new Call object.
Note
On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
If destination number is too long (max 17 digits), it is a fatal error, the function will not return.
Parameters
[in]profileRefThe profile to create a new call on.
[in]destinationPtrThe target number we are going to call.
le_mcc_profile_ObjRef_t le_mcc_profile_GetByName ( const char *  profileNamePtr)

Access a particular profile by name.

Returns
The profileRef or NULL if profileName is not found.
Note
If profil name is too long (max 100 digits), it is a fatal error, the function will not return.
Parameters
[in]profileNamePtrThe name of the profile to search for.
le_mcc_profile_State_t le_mcc_profile_GetState ( le_mcc_profile_ObjRef_t  profileRef)

Used to determine the current state of a given profile.

Returns
Current state of the profile.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]profileRefThe profile reference to read.
void le_mcc_profile_Release ( le_mcc_profile_ObjRef_t  profileRef)

Must be called to release a Call Profile.

Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]profileRefThe Call profile reference.
void le_mcc_profile_RemoveCallEventHandler ( le_mcc_profile_CallEventHandlerRef_t  addHandlerRef)

le_mcc_profile_CallEventHandler handler REMOVE function

Parameters
[in]addHandlerRef
void le_mcc_profile_RemoveStateChangeHandler ( le_mcc_profile_StateChangeHandlerRef_t  addHandlerRef)

le_mcc_profile_StateChangeHandler handler REMOVE function

Parameters
[in]addHandlerRef
void le_mcc_profile_StartClient ( const char *  serviceInstanceName)

Start the service for the client main thread

Parameters
[in]serviceInstanceName
void le_mcc_profile_StopClient ( void  )

Stop the service for the current client thread