/*===========================================================================
FILE: 
   QmiDMSAPI.h

DESCRIPTION:
   QMI Device Management Service APIs. Service type 0x02

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

#ifndef __QMI_DMS_API_H__
#define __QMI_DMS_API_H__
/*=========================================================================*/
// Definitions
/*=========================================================================*/

/** 
* \defgroup GroupDMS Device Management Service
*/
/*@{*/

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

#ifdef __cplusplus
	};
#endif

/*=========================================================================*/
// Prototypes
/*=========================================================================*/

//////////////////////////////////////////////////////////////////////////////
///
/// Enable/disable power operating mode callback function
/// QMI_DMS_SET_EVENT_REPORT_REQ 0x0001 TLV 0x10
///
/// \param	pCallback   [ I ] - Callback function
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetPowerCallback( tFNPower pCallback );

//////////////////////////////////////////////////////////////////////////////
///
/// This function enables/disables the activation status callback function with 
/// QMI_DMS_SET_EVENT_REPORT 0x0001 TLV 0x013
/// 
/// \param	pCallback   [ I ] - Callback function (0 = disable)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetActivationStatusCallback( 
   tFNActivationStatus        pCallback );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the UIM ICCID
/// QMI_DMS_UIM_GET_ICCID_MSG =						0x003C
/// 
/// \param	stringSize  [ I ] - The maximum number of characters (including NULL 
///                    terminator) that the string array can contain
/// \param	pString     [ O ] - NULL terminated string
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMGetICCID( 
   BYTE                       stringSize, 
   CHAR *                     pString );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the status of the specified facility control key
/// QMI_DMS_UIM_GET_CK_STATUS_MSG =				    0x0040
///
/// \param	id                   [ I ] - Facility ID
/// \param	pStatus              [ O ] - Control key status
/// \param	pVerifyRetriesLeft   [ O ] - The number of retries left, after which the 
///                              control key will be blocked 
/// \param	pUnblockRetriesLeft  [ O ] - The number of unblock retries left, after 
///                              which the control key  will be permanently 
///                              blocked 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMGetControlKeyStatus( 
   ULONG                      id, 
   ULONG *                    pStatus,
   ULONG *                    pVerifyRetriesLeft,
   ULONG *                    pUnblockRetriesLeft );


//////////////////////////////////////////////////////////////////////////////
///
/// This function changes the specified facility control key
/// QMI_DMS_UIM_SET_CK_PROTECTION_MSG =				0x0041
/// 
/// \param	id                   [ I ] - Facility ID
/// \param	status               [ I ] - Control key status
/// \param	pValue               [ I ] - Control key de-personalization string
/// \param	pVerifyRetriesLeft   [ O ] - Upon operational failure this will indicate 
///                             the number of retries left, after which the 
///                             control key will be blocked 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMSetControlKeyProtection( 
   ULONG                      id, 
   ULONG                      status,
   CHAR *                     pValue,
   ULONG *                    pVerifyRetriesLeft );

//////////////////////////////////////////////////////////////////////////////
///
/// This function unblocks the specified facility control key
/// QMI_DMS_UIM_UNBLOCK_CK_MSG =						0x0042
/// 
/// \param	id                   [ I ] - Facility ID
/// \param	pValue               [ I ] - Control key de-personalization string
/// \param	pUnblockRetriesLeft  [ O ] - The number of unblock retries left, after 
///                             which the control key  will be permanently 
///                             blocked 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMUnblockControlKey( 
   ULONG                      id, 
   CHAR *                     pValue,
   ULONG *                    pUnblockRetriesLeft );

//////////////////////////////////////////////////////////////////////////////
///
/// This function enables or disables protection of UIM contents by a 
/// given PIN
/// QMI_DMS_UIM_SET_PIN_PROTECTION_MSG =              0x0027
///
/// \param	id                   [ I ] - PIN ID (1/2)
///
/// \param	bEnable              [ I ] - Enable/disable PIN protection (0 = disable)?
/// \param	pValue               [ I ] - PIN value of the PIN to be enabled/disabled
/// \param	pVerifyRetriesLeft   [ O ] - Upon operational failure this will indicate 
///                             the number of retries left, after which the 
///                             PIN will be blocked (0xFFFFFFFF = unknown)
/// \param	pUnblockRetriesLeft  [ O ] - Upon operational failure this will indicate 
///                             the number of unblock retries left, after 
///                             which the PIN will be permanently blocked, 
///                             i.e. UIM is unusable (0xFFFFFFFF = unknown)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMSetPINProtection( 
   ULONG                      id, 
   ULONG                      bEnable,
   CHAR *                     pValue,
   ULONG *                    pVerifyRetriesLeft,
   ULONG *                    pUnblockRetriesLeft );

//////////////////////////////////////////////////////////////////////////////
///
/// This function verifies the PIN before accessing the UIM contents
/// QMI_DMS_UIM_VERIFY_PIN_MSG =                      0x0028
/// 
/// \param	id                   [ I ] - PIN ID (1/2)
/// \param	pValue               [ I ] - PIN value of the PIN to verify
/// \param	pVerifyRetriesLeft   [ O ] - Upon operational failure this will indicate 
///                             the number of retries left, after which the 
///                             PIN will be blocked (0xFFFFFFFF = unknown)
/// \param	pUnblockRetriesLeft  [ O ] - Upon operational failure this will indicate 
///                             the number of unblock retries left, after 
///                             which the PIN will be permanently blocked, 
///                             i.e. UIM is unusable (0xFFFFFFFF = unknown)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMVerifyPIN( 
   ULONG                      id, 
   CHAR *                     pValue,
   ULONG *                    pVerifyRetriesLeft,
   ULONG *                    pUnblockRetriesLeft );

//////////////////////////////////////////////////////////////////////////////
///
/// DMSUIMUnblockPIN
/// 
/// This function unblocks a blocked PIN
/// QMI_DMS_UIM_UNBLOCK_PIN_MSG =                     0x0029
/// 
/// \param	id                   [ I ] - PIN ID (1/2)
/// \param	pPUKValue            [ I ] - PUK value of the PIN to unblock
/// \param	pNewValue            [ I ] - New PIN value of the PIN to unblock
/// \param	pVerifyRetriesLeft   [ O ] - Upon operational failure this will indicate 
///                             the number of retries left, after which the 
///                             PIN will be blocked (0xFFFFFFFF = unknown)
/// \param	pUnblockRetriesLeft  [ O ] - Upon operational failure this will indicate 
///                             the number of unblock retries left, after 
///                             which the PIN will be permanently blocked, 
///                             i.e. UIM is unusable (0xFFFFFFFF = unknown)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMUnblockPIN( 
   ULONG                      id, 
   CHAR *                     pPUKValue,
   CHAR *                     pNewValue,
   ULONG *                    pVerifyRetriesLeft,
   ULONG *                    pUnblockRetriesLeft );

//////////////////////////////////////////////////////////////////////////////
///
/// This function change the PIN value
/// QMI_DMS_UIM_CHANGE_PIN_MSG =                      0x002A
/// 
/// \param	id                   [ I ] - PIN ID (1/2)
/// \param	pOldValue            [ I ] - Old PIN value of the PIN to change
/// \param	pNewValue            [ I ] - New PIN value of the PIN to change
/// \param	pVerifyRetriesLeft   [ O ] - Upon operational failure this will indicate 
///                             the number of retries left, after which the 
///                             PIN will be blocked (0xFFFFFFFF = unknown)
/// \param	pUnblockRetriesLeft  [ O ] - Upon operational failure this will indicate 
///                             the number of unblock retries left, after 
///                             which the PIN will be permanently blocked, 
///                             i.e. UIM is unusable (0xFFFFFFFF = unknown)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMChangePIN( 
   ULONG                      id, 
   CHAR *                     pOldValue,
   CHAR *                     pNewValue,
   ULONG *                    pVerifyRetriesLeft,
   ULONG *                    pUnblockRetriesLeft );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the status of the pin
/// QMI_DMS_UIM_GET_PIN_STATUS_MSG =                  0x002B
///
/// \param	id                   [ I ] - PIN ID (1/2)
/// \param	idpStatus              [ O ] - PIN status (0xFFFFFFFF = unknown)
/// \param	idpVerifyRetriesLeft   [ O ] - The number of retries left, after which the 
///                            PIN will be blocked (0xFFFFFFFF = unknown)
/// \param	idpUnblockRetriesLeft  [ O ] - The number of unblock retries left, after 
///                            which the PIN will be permanently blocked, 
///                            i.e. UIM is unusable (0xFFFFFFFF = unknown)
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI DMSUIMGetPINStatus( 
   ULONG                      id, 
   ULONG *                    pStatus,
   ULONG *                    pVerifyRetriesLeft,
   ULONG *                    pUnblockRetriesLeft );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the device hardware revision
/// QMI_DMS_GET_DEVICE_HARDWARE_REV_MSG =             0x002C;
/// 
/// \param	stringSize  [ I ] - The maximum number of characters (including NULL 
///                     terminator) that the string array can contain
/// \param	pString     [ O ] - NULL terminated string
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetHardwareRevision( 
   BYTE                       stringSize, 
   CHAR *                     pString );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the version of the active Preferred Roaming List 
/// (PRL) in use by the device
/// QMI_DMS_GET_PRL_VER_MSG =			                0x0030
///
/// \param	pPRLVersion [ O ] - The PRL version number
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetPRLVersion( WORD * pPRLVersion );

//////////////////////////////////////////////////////////////////////////////
///
/// This command returns the ERI file that is stored in EFS on the device
/// QMI_DMS_READ_ERI_FILE_MSG =			            0x0039
///
/// \param	pFileSize   [I/O] - Upon input the maximum number of bytes that the file 
///                    contents array can contain.  Upon successful output 
///                    the actual number of bytes written to the file contents 
///                    array
/// \param	pFile       [ O ] - The file contents
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetERIFile( 
   ULONG *                    pFileSize, 
   BYTE *                     pFile );

//////////////////////////////////////////////////////////////////////////////
///
/// This function requests the device to perform automatic service activation
/// QMI_DMS_ACTIVATE_AUTOMATIC_MSG =			        0x0032
/// 
/// \param	pActivationCode   [ I ] - Activation code (maximum string length of 12) 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI ActivateAutomatic( CHAR * pActivationCode );

//////////////////////////////////////////////////////////////////////////////
///
/// This function requests the device perform manual service activation,
/// after a successful request the device is then asked to reset
/// QMI_DMS_ACTIVATE_MANUAL_MSG =			            0x0033
/// 
/// \param	pSPC        [ I ] - NULL terminated string representing the six digit 
///                       service programming code
/// \param	sid         [ I ] - System identification number
/// \param	pMDN        [ I ] - Mobile Directory Number string
/// \param	pMIN        [ I ] - Mobile Identification Number string
/// \param	prlSize     [ I ] - (Optional) Size of PRL file array
/// \param	pPRL        [ I ] - (Optional) The PRL file contents
/// \param	pMNHA       [ I ] - (Optional) MN-HA string
/// \param	pMNAAA      [ I ] - (Optional) MN-AAA string
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI ActivateManual( 
   CHAR *                     pSPC,
   WORD                       sid, 
   CHAR *                     pMDN,
   CHAR *                     pMIN, 
   ULONG                      prlSize, 
   BYTE *                     pPRL, 
   CHAR *                     pMNHA,
   CHAR *                     pMNAAA );

//////////////////////////////////////////////////////////////////////////////
///
/// This function requests the device reset configuration to factory defaults,
/// after a successful request the device is then asked to reset
/// QMI_DMS_RESTORE_FACTORY_DEFAULTS_MSG =			0x003A
/// 
/// \param	pSPC        [ I ] - NULL terminated string representing the six digit 
///                    service programming code
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI ResetToFactoryDefaults( CHAR * pSPC );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the device activation state
/// QMI_DMS_GET_ACTIVATION_STATE_MSG =			    0x0031
///
/// \param	pActivationState  [ O ] - Service activation state
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetActivationState( ULONG * pActivationState );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the operating mode of the device
/// QMI_DMS_SET_OPERATING_MODE_MSG =                  0x002E
///
/// \param	powerMode   [ I ] - Selected operating mode
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetPower( ULONG powerMode );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the operating mode of the device
/// QMI_DMS_GET_OPERATING_MODE_MSG =                  0x002D
///
/// \param	pPowerMode  [ O ] - Current operating mode
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetPower( ULONG * pPowerMode );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the reason why the operating mode of the device
/// is currently offline
/// QMI_DMS_GET_OPERATING_MODE_MSG =                  0x002D
///
/// \param	pReasonMask [ O ] - Bitmask of offline reasons
/// \param	pbPlatform  [ O ] - Offline due to being platform retricted?
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetOfflineReason( 
   ULONG *                    pReasonMask,
   ULONG *                    pbPlatform );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the current time of the device
/// QMI_DMS_VALIDATE_SERVICE_PROGRAMMING_CODE_MSG =	0x003B
///
/// \param	pTimeCount  [ O ] - Count of 1.25ms that have elapsed from the start 
///                    of GPS time (Jan 6, 1980)
/// \param	pTimeSource [ O ] - Source of the timestamp
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetNetworkTime( 
   ULONGLONG *                pTimeCount,  
   ULONG *                    pTimeSource );

//////////////////////////////////////////////////////////////////////////////
///
/// This function validates the service programming code
/// QMI_DMS_VALIDATE_SERVICE_PROGRAMMING_CODE_MSG =	0x003B
/// 
/// pSPC        [ I ] - Six digit service programming code
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI ValidateSPC( CHAR * pSPC );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets device capabilities
/// QMI_DMS_GET_DEVICE_CAP_MSG =                      0x0020
/// 
/// \param	pMaxTXChannelRate       [ O ] - Maximum transmission rate (bps) 
/// \param	pMaxRXChannelRate       [ O ] - Maximum reception rate (bps)
/// \param	pDataServiceCapability  [ O ] - CS/PS data service capability
/// \param	pSimCapability          [ O ] - Device SIM support
/// \param	pRadioIfacesSize        [I/O] - Upon input the maximum number of elements 
///                                that the radio interfaces can contain.  
///                                Upon successful output the actual number 
///                                of elements in the radio interface array
/// \param	pRadioIfaces            [ O ] - The radio interface array
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetDeviceCapabilities( 
   ULONG *                    pMaxTXChannelRate, 
   ULONG *                    pMaxRXChannelRate, 
   ULONG *                    pDataServiceCapability, 
   ULONG *                    pSimCapability, 
   ULONG *                    pRadioIfacesSize, 
   BYTE *                     pRadioIfaces );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the device manufacturer name
/// QMI_DMS_GET_DEVICE_MFR_MSG =                      0x0021
/// 
/// \param	stringSize  [ I ] - The maximum number of characters (including NULL 
///                    terminator) that the string array can contain
/// \param	pString     [ O ] - NULL terminated string
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetManufacturer( 
   BYTE                       stringSize, 
   CHAR *                     pString );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the device model ID
/// QMI_DMS_GET_DEVICE_MODEL_ID_MSG =                 0x0022
/// 
/// \param	stringSize  [ I ] - The maximum number of characters (including NULL 
///                    terminator) that the string array can contain
/// \param	pString     [ O ] - NULL terminated string
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetModelID( 
   BYTE                       stringSize, 
   CHAR *                     pString );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the device firmware revision
///
/// \param	stringSize  [ I ] - The maximum number of characters (including NULL 
///                   terminator) that the string array can contain
/// \param	pString     [ O ] - NULL terminated string
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetFirmwareRevision( 
   BYTE                       stringSize, 
   CHAR *                     pString );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the device firmware (AMSS, boot, and PRI)
/// revisions
/// QMI_DMS_GET_DEVICE_REV_ID_MSG =                   0x0023
///
/// \param	amssSize    [ I ] - The maximum number of characters (including NULL 
///                   terminator) that the AMSS string array can contain
/// \param	pAMSSString [ O ] - NULL terminated AMSS revision string
/// \param	bootSize    [ I ] - The maximum number of characters (including NULL 
///                   terminator) that the boot string array can contain
/// \param	pBootString [ O ] - NULL terminated boot code revision string  
/// \param	priSize     [ I ] - The maximum number of characters (including NULL 
///                   terminator) that the PRI string array can contain
/// \param	pPRIString  [ O ] - NULL terminated PRI revision string  
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetFirmwareRevisions( 
   BYTE                       amssSize, 
   CHAR *                     pAMSSString,
   BYTE                       bootSize, 
   CHAR *                     pBootString,
   BYTE                       priSize, 
   CHAR *                     pPRIString );

//////////////////////////////////////////////////////////////////////////////
///
/// Returns image information obtained from the current device firmware
/// QMI_DMS_GET_DEVICE_REV_ID_MSG =                   0x0023
/// 
/// \param	pFirmwareID    [ O ] - Firmware ID obtained from the firmware image
/// \param	pTechnology    [ O ] - Technology (0xFFFFFFFF if unknown)
/// \param	pCarrier       [ O ] - Carrier (0xFFFFFFFF if unknown)
/// \param	pRegion        [ O ] - Region (0xFFFFFFFF if unknown)
/// \param	pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetFirmwareInfo( 
   ULONG *                    pFirmwareID,
   ULONG *                    pTechnology,
   ULONG *                    pCarrier,
   ULONG *                    pRegion,
   ULONG *                    pGPSCapability );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the voice number in use by the device
/// QMI_DMS_GET_MSISDN_MSG =                          0x0024
///
/// \param	voiceNumberSize   [ I ] - The maximum number of characters (including NULL 
///                          terminator) that the voice number array can 
///                          contain
/// \param	pVoiceNumber      [ O ] - Voice number (MDN or ISDN) string
/// \param	minSize           [ I ] - The maximum number of characters (including NULL 
///                          terminator) that the MIN array can contain
/// \param	pMIN              [ O ] - MIN string (empty string returned when MIN is
///                          not supported/programmed)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetVoiceNumber( 
   BYTE                       voiceNumberSize, 
   CHAR *                     pVoiceNumber,
   BYTE                       minSize, 
   CHAR *                     pMIN );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the device IMSI
///
/// \param	stringSize  [ I ] - The maximum number of characters (including NULL 
///                       terminator) that the string array can contain
/// \param	pString     [ O ] - NULL terminated string
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetIMSI( 
   BYTE                       stringSize, 
   CHAR *                     pString );

//////////////////////////////////////////////////////////////////////////////
///
/// This command returns all serial numbers assigned to the device
/// QMI_DMS_GET_DEVICE_SERIAL_NUMBERS_MSG =           0x0025
///
/// \param	esnSize     [ I ] - The maximum number of characters (including NULL 
///                   terminator) that the ESN array can contain
/// \param	pESNString  [ O ] - ESN string (empty string returned when ESN is
///                   not supported/programmed)
/// \param	imeiSize    [ I ] - The maximum number of characters (including NULL 
///                    terminator) that the IMEI array can contain
/// \param	pIMEIString [ O ] - IMEI string (empty string returned when IMEI is
///                   not supported/programmed)
/// \param	meidSize    [ I ] - The maximum number of characters (including NULL 
///                   terminator) that the MEID array can contain
/// \param	pMEIDString [ O ] - MEID string (empty string returned when MEID is
///                    not supported/programmed)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetSerialNumbers( 
   BYTE                       esnSize, 
   CHAR *                     pESNString, 
   BYTE                       imeiSize, 
   CHAR *                     pIMEIString, 
   BYTE                       meidSize, 
   CHAR *                     pMEIDString );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the list of images stored on the device
/// QMI_DMS_LIST_STORED_IMAGES_MSG =                  0x0049
/// \param	pImageListSize [I/O] - Upon input the size in BYTEs of the image list 
///                       array.  Upon success the actual number of BYTEs 
///                       copied to the image list array
/// \param	pImageList     [ O ] - The image info list array 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBIAPI GetStoredImages( 
   ULONG *                    pImageListSize, 
   BYTE *                     pImageList );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the current images preference
/// QMI_DMS_SET_FIRMWARE_PREF_MSG =                   0x0048
///
/// \param	imageListSize     [ I ] - The size in BYTEs of the image list array
/// \param	pImageList        [ I ] - The image list array
/// \param	bForceDownload    [ I ] - Force device to download images from host?
/// \param	modemIndex        [ I ] - Desired storage index for downloaded modem image
/// \param	pImageTypesSize   [I/O] - Upon input the maximum number of elements that 
///                          the download image types array can contain.  
///                          Upon successful output the actual number of 
///                           elements in the download image types array 
/// \param	pImageTypes       [ O ] - The download image types array 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBIAPI SetImagesPreference( 
   ULONG                      imageListSize, 
   BYTE *                     pImageList,
   ULONG                      bForceDownload,
   BYTE                       modemIndex,
   ULONG *                    pImageTypesSize, 
   BYTE *                     pImageTypes );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the current images preference
/// QMI_DMS_GET_FIRMWARE_PREF_MSG =                   0x0047;
///
/// \param	pCallbackpImageListSize [I/O] - Upon input the size in BYTEs of the image list 
///                       array.  Upon success the actual number of BYTEs 
///                       copied to the image list array
/// \param	pImageList     [ O ] - The image info list array 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBIAPI GetImagesPreference( 
   ULONG *                    pImageListSize, 
   BYTE *                     pImageList );   

//////////////////////////////////////////////////////////////////////////////
///
/// This function resets the device
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBIAPI ResetDevice();
/*@}*/ // End of DMS group
#endif