#ifndef AEEREGISTRY_H
#define AEEREGISTRY_H
/*=====================================================================
FILE:  AEERegistry.h

SERVICES:  BREW Registry Interface

DESCRIPTION:  Base level definitions, typedefs, etc. for BREW Registry

PUBLIC CLASSES: Not Applicable

INITIALIZATION AND SEQUENCING REQUIREMENTS: Not Applicable
        
        Copyright © 1999-2002 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
=====================================================================*/

#include "AEE.h"

//---------------------------------------------------------------------
// Type Declarations
//---------------------------------------------------------------------

typedef struct _IRegistry IRegistry;

typedef struct _AEERegItem
{
   AEECLSID       clsType;
   AEECLSID       clsHandler;
   const char *   pszMime;
   flg            bActive:1;     // Class is the default handler...
   flg            bRestricted:1; // Class is not available to app...
} AEERegItem;

typedef boolean (*PFNREGENUM)(void * pUser, AEERegItem * pi);

QINTERFACE(IRegistry)
{
   DECLARE_IBASE(IRegistry)

   AEECLSID    (*GetHandler)(IRegistry * po,AEECLSID clsType, const char * pszMime);
   int         (*SetHandler)(IRegistry * po,AEECLSID clsType, const char * pszMime,AEECLSID cls);
   void        (*Enum)(IRegistry * po,PFNREGENUM pfn, void * pUser, boolean bAll);
};

//---------------------------------------------------------------------
// Access Macros
//---------------------------------------------------------------------

#define IREGISTRY_AddRef(p)                        GET_PVTBL(p,IRegistry)->AddRef((p))
#define IREGISTRY_Release(p)                       GET_PVTBL(p,IRegistry)->Release((p))
#define IREGISTRY_GetHandler(p,ct,psz)             GET_PVTBL(p,IRegistry)->GetHandler((p),(ct),(psz))
#define IREGISTRY_SetHandler(p,ct,psz,ch)          GET_PVTBL(p,IRegistry)->SetHandler((p),(ct),(psz),(ch))
#define IREGISTRY_Enum(p,pfn,pu,b)                 GET_PVTBL(p,IRegistry)->Enum((p),(pfn),(pu),(b))

#endif   // AEEREGISTRY_H
