/*===========================================================================
FILE: 
   SwiOMADMEX.h

DESCRIPTION:
   Sierra Wireless OMADM-EX APIs. Service type 0xF4

Copyright (C) 2015 Sierra Wireless Incorporated. All rights reserved.
                   Sierra Wireless Proprietary/GTDR
==========================================================================*/

#ifndef __SWI_OMADMEX_API_H__
#define __SWI_OMADMEX_API_H__
/*=========================================================================*/
// Definitions
/*=========================================================================*/

/** 
* \defgroup GroupSWIOMADMEX Sierra Wireless OMADM-EX APIs
*/
/*@{*/

/*=========================================================================*/
// Structs
/*=========================================================================*/
#ifdef __cplusplus
	extern "C" {
#endif

#ifdef __cplusplus
	};
#endif

/*=========================================================================*/
// Prototypes
/*=========================================================================*/
//////////////////////////////////////////////////////////////////////////////
///
/// This message requests the device to perform an OMA-DM session. The 
/// success response of this message indicates that the activation request 
/// has been accepted, but it does not sure that the session will be invoked
/// at last, it just means this request has been put into the waiting queue 
/// of OMA session.
/// When the there is a pending retrying HFA DC, this interface can be used 
/// to activate the HFA session immediately.
/// QMI_SWIOMA_EX_SESSION_START_MSG =          0x0001
///
/// \param	pSessionType
/// [I]
/// \li 0 – CI DC
/// \li 1 – CI FUMO
/// \li 2 - device initiated FUMO session
/// \li 3 - device initiated DM session
/// \li 4 – CI PRL
/// \li 5 - user initiated HFA
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
SWIIMPORT ULONG SWICMAPI SWIOMAEXSessionStart(BYTE* pSessionType);

//////////////////////////////////////////////////////////////////////////////
///
/// This message used to send a cancel command to OMA module.
/// QMI_SWIOMA_EX_SESSION_CANCEL_MSG =         0x0002;
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
SWIIMPORT ULONG SWICMAPI SWIOMAEXSessionCancel();

//////////////////////////////////////////////////////////////////////////////
///
/// This message used to get the currently information of OMA module.
/// QMI_SWIOMA_EX_SESSION_GETINFO_MSG =        0x0003
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////

SWIIMPORT ULONG SWICMAPI SWIOMAEXSessionGetInfo(omaSessionInfo*		pOMAInfo);

//////////////////////////////////////////////////////////////////////////////
///
/// This message is sent by the service to a control point to output the 
/// information of OMA.
/// QMI_SWIOMA_EX_EVENT_IND_MSG =        0x0004
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
SWIIMPORT ULONG SWICMAPI SetSWIOMAEXEventCallback(tFNSwiOmaExEvent pCallback);

//////////////////////////////////////////////////////////////////////////////
///
/// This message is used for inputting user selection to OMA module.
/// QMI_SWIOMA_EX_SELECTION_MSG =        		 0x0005
///
/// \param  pSelection
/// \li 0 – user selects “NO”
/// \li 1 – user selects “YES/OK”
/// \li 2 – user selects “Delay”
/// \li 3 – user selects “Delay one hour”
/// \li 4 – user selects “Delay four hours”
/// \li 5 – user selects “delay until 2:00 AM”
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
SWIIMPORT ULONG SWICMAPI SWIOMAEXSelection(BYTE* pSelection);

//////////////////////////////////////////////////////////////////////////////
///
/// This message used to get the currently settings of OMA module.
/// QMI_SWIOMA_EX_GET_SETTINGS_MSG =     		 0x0006
///
/// \param  BYTE*		pFOTA_AutoDownload,
/// \li 0 – FOTA auto download disable
/// \li 1 – FOTA auto download enable
/// \param  BYTE*		pFOTA_AutoUpdate,
/// \li 0 – FOTA auto update disable
/// \li 1 – FOTA auto update enable
/// \param  BYTE*		pOMADM,
/// \li 0 –OMA DM disable
/// \li 1 – OMA DM enable
/// \param  BYTE*		pFUMO,
/// \li 0 –FUMO disable
/// \li 1 – FUMO enable
/// \param  BYTE*		pOMALog,
/// \li 0 –OMA log disable
/// \li 1 – OMA log enable
/// \param  BYTE*		pPRL
/// \li 0 – PRL disable
/// \li 1 – PRL enable
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
SWIIMPORT ULONG SWICMAPI SWIOMAEXGetSettings(BYTE*		pFOTA_AutoDownload,
											BYTE*		pFOTA_AutoUpdate,
											BYTE*		pOMADM,
											BYTE*		pFUMO,
											BYTE*		pOMALog,
											BYTE*		pPRL);
											
//////////////////////////////////////////////////////////////////////////////
///
/// This message used to set the control switch of OMA module.											
/// QMI_SWIOMA_EX_SET_SETTINGS_MSG =     		 0x0007
///
/// \param  BYTE*		pFOTA_AutoDownload,
/// \li 0 – FOTA auto download disable
/// \li 1 – FOTA auto download enable
/// \param  BYTE*		pFOTA_AutoUpdate,
/// \li 0 – FOTA auto update disable
/// \li 1 – FOTA auto update enable
/// \param  BYTE*		pOMADM,
/// \li 0 –OMA DM disable
/// \li 1 – OMA DM enable
/// \param  BYTE*		pFUMO,
/// \li 0 –FUMO disable
/// \li 1 – FUMO enable
/// \param  BYTE*		pOMALog,
/// \li 0 –OMA log disable
/// \li 1 – OMA log enable
/// \param  BYTE*		pPRL
/// \li 0 – PRL disable
/// \li 1 – PRL enable
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
SWIIMPORT ULONG SWICMAPI SWIOMAEXSetSettings(BYTE*		pFOTA_AutoDownload,
											BYTE*		pFOTA_AutoUpdate,
											BYTE*		pOMADM,
											BYTE*		pFUMO,
											BYTE*		pOMALog,
											BYTE*		pPRL);

//////////////////////////////////////////////////////////////////////////////
///											
/// This message registers QMI to the OMA module, after registration, device can put 
/// OMA information to host through SWIOMADM_CMD_VAL_EVENT_IND message.								
/// QMI_SWIOMA_EX_SET_EVENT_REPORT_MSG =       0x0008
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
SWIIMPORT ULONG SWICMAPI SWIOMAEXSetEventReport();
/*@}*/ // End of SwiOMADMEX group
#endif