/*======================================================
FILE:  bridle_GSMSMS.c

SERVICES:  BRIDLE SWI Handler for GSMSMS.

GENERAL DESCRIPTION:
   Implements the supervisor mode handler for BRIDLE GSMSMS

PUBLIC CLASSES AND STATIC FUNCTIONS:

INITIALIZATION & SEQUENCING REQUIREMENTS:

   See Exported Routines

        Copyright © 1999-2003 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
=====================================================*/
#include "BRIDLEInit.h"
#include "OEMFeatures.h"
#if defined(FEATURE_GSM1x)
#define _BRIDLE_GSMSMS_IMPL
#include "bridle_GSMSMS.h"
#include "AEEBRIDLE.h"


#if __ARMCC_VERSION >= 120000
#pragma arm section zidata = "bridle_svc_rw_usr_ro"
#endif
uint32 bridle_oemGSMSMS_swi;
#if __ARMCC_VERSION >= 120000
#pragma arm section zidata
#endif


/* List of handlers that patch calls to actual routines. The order 
** corresponds to the subroutine ids enumerated in the enum in bridle_GSMSMS.h */
static const PFNSWIHANDLER gPtrTable[BRIDLE_GSMSMS_MAX] = { 
   (PFNSWIHANDLER)unpackbridle_OEMGSMSMS_SVC_Init,
   (PFNSWIHANDLER)unpackbridle_OEMGSMSMS_SVC_GetSMSMessage,
   (PFNSWIHANDLER)unpackbridle_OEMGSMSMS_SVC_ProcessMessage
};

/*===========================================================================

FUNCTION   
   bridle_GSMSMS_swihandler

DESCRIPTION
   Invokes the appropriate unpack routine and passes its arguments.
  
DEPENDENCIES
   This is invoked by SWI handler.

RETURN VALUE

SIDE EFFECTS

===========================================================================*/
uint32 bridle_GSMSMS_swihandler( uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5 )
{
   return bridle_generic_swihandler( arg1, arg2, arg3, arg4, arg5, 
                                     BRIDLE_GSMSMS_MAX, gPtrTable );
}

/*===========================================================================

FUNCTION   
   RegisterGSMSMSForSWI

DESCRIPTION
   Registers with SWI handler and obtains ID for GSMSMS Module.
  
DEPENDENCIES

RETURN VALUE

SIDE EFFECTS

===========================================================================*/
int RegisterGSMSMSForSWI(void *po)
{
   return bridle_RegisterSubSystem( bridle_GSMSMS_swihandler, &bridle_oemGSMSMS_swi );
}
#endif // FEATURE_GSM1x
