/*===========================================================================
                    IMPORTANT NOTICE

            Not to be distributed in source format.

FILE:  bridle_GSM1xMessage.h

SERVICES:  Bridle'd GSM1xMessage calls. 

GENERAL DESCRIPTION:
   Contains inlined code that does swi into Supervisor mode and invokes
   appropriate routine.

        Copyright © 2003 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
===========================================================================*/

#ifndef __BRIDLE_GSM1XMESSAGE_H__
#define __BRIDLE_GSM1XMESSAGE_H__

#include "OEMGSM1xMessage_SVC.h"
#include "AEEBridle.h"


/* Subroutine Id to map different functions invoked in Supervisor mode. */
enum {
    BRIDLE_GSM1XMESSAGE_INIT,
    BRIDLE_GSM1XMESSAGE_RELEASESMSTRANSACTION,
    BRIDLE_GSM1XMESSAGE_SENDSIGMESSAGE,
    BRIDLE_GSM1XMESSAGE_SENDSMSMESSAGE,
    BRIDLE_GSM1XMESSAGE_APPCLOSEDNOTIFICATION,
    BRIDLE_GSM1XMESSAGE_MAX
};


extern uint32 bridle_oemGSM1xMessage_swi;


/* inlined functions packbridle_* and unpackbridle_* */

BRIDLE0_VOID(
    OEMGSM1xMessage_SVC_Init,
    bridle_oemGSM1xMessage_swi, 
    BRIDLE_GSM1XMESSAGE_INIT
    )

BRIDLE0_VOID(
    OEMGSM1xMessage_SVC_ReleaseSMSTransaction,
    bridle_oemGSM1xMessage_swi, 
    BRIDLE_GSM1XMESSAGE_RELEASESMSTRANSACTION
    )

BRIDLE3_RET(
    int, // return value type
    OEMGSM1xMessage_SVC_SendSIGMessage,
    byte, BRIDLE_CHECK_NONE, 0,
    const byte *, BRIDLE_CHECK_READACCESS, UNPACKBRIDLE_PARAM_1*sizeof(byte),
    boolean, BRIDLE_CHECK_NONE, 0,
    bridle_oemGSM1xMessage_swi,
    BRIDLE_GSM1XMESSAGE_SENDSIGMESSAGE
    )

BRIDLE5_RET(
    int, // return value type
    OEMGSM1xMessage_SVC_SendSMSMessage,
    boolean, BRIDLE_CHECK_NONE, 0,
    void *, BRIDLE_CHECK_NONE, 0,
    byte, BRIDLE_CHECK_NONE, 0,
    const byte *, BRIDLE_CHECK_READACCESS, UNPACKBRIDLE_PARAM_3*sizeof(byte),
    boolean, BRIDLE_CHECK_NONE, 0,
    bridle_oemGSM1xMessage_swi, BRIDLE_GSM1XMESSAGE_SENDSMSMESSAGE)

BRIDLE1_VOID(
    OEMGSM1xMessage_SVC_AppClosedNotification,
    uint32, BRIDLE_CHECK_NONE, 0,
    bridle_oemGSM1xMessage_swi, 
    BRIDLE_GSM1XMESSAGE_APPCLOSEDNOTIFICATION
    )


#endif // __BRIDLE_GSM1XMESSAGE_H__
