#ifndef BREWSHIMAPPLET_H
#define BREWSHIMAPPLET_H
/*===========================================================================
                          BrewShimApplet.h

  BrewShimApplet Implementation

  This file contains implementation of the BrewShimApplet

        Copyright ｩ 1999-2002 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
============================================================================*/
 /*===========================================================================

                        EDIT HISTORY FOR MODULE

when         who            what, where, why
----------   ----------     ---------------------------------------------------
[ PTX-804向け ]
2004/12/20   NJK 牧瀬       新規作成
2005/04/26   NJK 牧瀬       btob連携対応
2005/07/21   NJK 牧瀬       TRK4147対応

[ PTX-805向け ]
2005/09/21   NJK 高橋       [PTX-805 BREW201]
                            メーラ連携(atmailview)対応
===========================================================================*/

#include "AEE.h"
#include "AEEClassIDs.h"

#define SHIM_NEXTCLSID	"Shim/Next"

#define BREWSHIM_CFG_VER          0x0001

/* APIBREW⇒ベースアプレットのユーザイベント定義 */
#define EVT_USER_SHIM_END			EVT_USER
#define EVT_USER_NATIVESTART		EVT_USER+1		/* Native連携要求   */

//暫定対応
extern unsigned long gShimPrefs;

#define BrewShimApplet_GetNextClsID(p)	ISHELL_GetHandler(p, AEECLSID_APP, SHIM_NEXTCLSID)
//#define BrewShimApplet_InitNextClsID(p)	\
//	{unsigned long Shim_UsedFlg = NULL;\
//	ISHELL_RegisterHandler(p, AEECLSID_APP, "ez2urlto*", 0);\
//	ISHELL_RegisterHandler(p, AEECLSID_APP, "ez2urlto*", AEECLSID_KDDI_SHIM_MIN);\
//	ISHELL_RegisterHandler(p, AEECLSID_APP, "at2mailto*", 0);\
//	ISHELL_RegisterHandler(p, AEECLSID_APP, "at2mailto*", AEECLSID_KDDI_SHIM_MIN);\
//	ISHELL_RegisterHandler(p, AEECLSID_APP, SHIM_NEXTCLSID, AEECLSID_KDDI_SHIM_MIN);\
//	ISHELL_SetPrefs(p, AEECLSID_KDDI_SHIM, BREWSHIM_CFG_VER, &Shim_UsedFlg, sizeof(Shim_UsedFlg));\
//	}
/*** ▼PTX-805 BREW201 atmailview追加 ***/
#define BrewShimApplet_InitNextClsID(p)	\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "btob", 0);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "btob", AEECLSID_KDDI_SHIM_MIN);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "ez2urlto*", 0);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "ez2urlto*", AEECLSID_KDDI_SHIM_MIN);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "at2mailto*", 0);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "at2mailto*", AEECLSID_KDDI_SHIM_MIN);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "atmailview", 0);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "atmailview", AEECLSID_KDDI_SHIM_MIN);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "shim2native*", 0);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, "shim2native*", AEECLSID_KDDI_SHIM_MIN);\
	ISHELL_RegisterHandler(p, AEECLSID_APP, SHIM_NEXTCLSID, AEECLSID_KDDI_SHIM_MIN);\
	gShimPrefs=0x00000000;
/*** ▲PTX-805 BREW201 atmailview追加 ***/
#define BrewShimApplet_ConvClsID(clsid)	\
	((clsid<AEECLSID_KDDI_SHIM_MIN||clsid>AEECLSID_KDDI_SHIM_MAX) ? clsid : AEECLSID_KDDI_SHIM)

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

FUNCTION: BrewShimApplet_GetNextClsID

DESCRIPTION

PROTOTYPE:
   AEECLSID BrewShimApplet_GetNextClsID(IShell* pIShell)

PARAMETERS:
   pIShell :[in] : Contains pointer to the IShell interface.

RETURN VALUE
    AEECLSID of the associated Shim Applet to use next.

    0 (zero), if otherwise.

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

FUNCTION: BrewShimApplet_InitNextClsID

DESCRIPTION

PROTOTYPE:
   void BrewShimApplet_InitNextClsID(IShell* pIShell)

PARAMETERS:
   pIShell :[in] : Contains pointer to the IShell interface.

RETURN VALUE
   none

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

FUNCTION: BrewShimApplet_ConvClsID

DESCRIPTION

PROTOTYPE:
   AEECLSID BrewShimApplet_ConvClsID(AEECLSID ClsID)

PARAMETERS:
   pIShell :[in] : Contains pointer to the IShell interface.

RETURN VALUE
   AEECLSID of the converted Shim Applet,or non-converted ClsID.

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


#endif   // BREWSHIMAPPLET_H
