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

               OEM/CARRIER DISTRIBUTION ONLY

The contents of this file are provided under legal agreement
between QUALCOMM Incorporated and selected licensed carrier
and handset OEM partners. Under the terms of that agreement, 
this file MUST NOT be distributed in full or in part to anyone
not specifically authorized by QUALCOMM Incorporated.

FILE:  AEE_MIF.h

SERVICES:  AEE OEM Interface header

GENERAL DESCRIPTION:


PUBLIC CLASSES:

None.

INITIALIZATION AND SEQUENCING REQUIREMENTS
None.

        Copyright ｩ 1999-2002 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
=====================================================*/
#if !defined(AEE_MIF_H) 
#define AEE_MIF_H  1

//
// A MIF is a special resource file.  The following IDs are the fixed IDs for 
// MIF resources...
//

#define IDB_MIF_HEADER     0     // MIF Header
#define IDB_MIF_CLASSES    1     // Non-App Classes, List of AEECLSID
#define IDB_MIF_APPLETS    2     // Applets, List of AEEAppInfo
#define IDB_MIF_EXTCLASSES 3     // External classes, List of AEECLSID
#define IDB_MIF_NOTIFY     4     // Notify Structure, List of MIFNotify
#define IDB_MIF_MIMETYPE   5     // MIME Registration structure, List of MIFMIMEType
// PTX633 Brew 3.0 Porting AEEShell.h との二重定義対処
//#define IDS_MIF_COMPANY    6     // Company Name
//#define IDS_MIF_COPYRIGHT  7     // Copyright Date


//
// Various MIF related file extensions and paths...
//

// PTX633 Brew 3.0 Porting ディレクトリ参照方法変更による修正
//#define MIF_PATH           "brew"
#define MIF_PATH           "fs:/mif"
#define AEE_MOD_EXT        ".mod"
#define AEE_MIF_EXT        ".mif"
#define AEE_MIF_MASK_EXT   ".mi~"
#define AEE_CAT_EXT        ".cat"
#define AEE_SIG_EXT        ".sig"   // One more extension for the signature file

//
// MIF Header - This is the header of the MIF found on disk...
//

//temporary change by Mahesh. Without this, none of the old MIFs will work. We need
//to ability to MIF editor to recover from older versions of MIF. If not, the SDK Beta
//customers will not be able to re-use any of the MIF files that they have already
//created.
#if 0
#define MIF_VERSION  (0x00001001)
#else
#define MIF_VERSION  (0x00001000)
#endif

#define MIF_ROOT_LEN 15
#define MIF_MIME_TYPE_LEN 31

#define MIF_COMPANY_NAME_SIZE	23
#define MIF_COPYRIGHT_SIZE		23

#define PL_FILE            (0x0001)       // IFileMgr, IDBMgr
#define PL_NETWORK         (0x0002)       // INetMgr
#define PL_TAPI            (0x0004)       // ITAPI (simple) Access
#define PL_WEB             (0x0008)       // IWeb Access (Also available if PL_NETWORK)
#define PL_DOWNLOAD        (0x0020)       // IDownload
#define PL_SHARED_WRITE    (0x0040)       // Write Access - Shared Directory
#define PL_POS_LOCATION    (0x0080)       // Position location access (ISHELL_GetLocation)
#define PL_RINGER_WRITE    (0x0100)       // Write Access - Ringer Directory
#define PL_ADDRBOOK        (0x0200)       // Access to Address Book
#define PL_SECTORINFO      (0x0400)       // GetSectorInfo
#define PL_SYSTEM          (0xffff)


//
// MIFNotify
// 

typedef PACKED struct
{
   AEECLSID       clsType;
   AEECLSID       clsNotify;
   uint32         dwMask;
} MIFNotify;

//
// MIFMIMEType
// 

typedef PACKED struct
{
   AEECLSID       clsHandler;
   char           szMIMEType[MIF_MIME_TYPE_LEN + 1];  // MIME Type handled by clsHandler
} MIFMIMEType;
   
//
// MIF
//

typedef struct
{
   uint32         version;                         // MIF version
   uint32         dwID;                            // MIF ID (matches filename.mif)
   byte           bPad[16];						   // Padding ..this was previously used by Root Name
   // Privilidge Level...
   
   uint16         wPrivLevel;

   // Used to determine the size of associated MIF data...

   uint16         wClasses;                        // Number of classes
   uint16         wApplets;                        // Number of applets
   uint16         wExtClasses;                     // Number of external modules
   uint16         wNotify;                         // Number of notifications
   uint16         wMIMETypes;                      // Number of MIME Type handlers

   // Padding, to keep it the same size as version 0x00001000 MIF
   uint32         dwPad;
} MIF;

/*=====================================================================
  DATA STRUCTURE DOCUMENTATION
======================================================================= 
AEE Privilege Levels

Description:
These flags define the privilege levels that an application can have. An application
can have zero or more privilege levels, which are stored internally in a bit vector.
These flags can be used to test and set the value of each privilege bit in this
vector.

Definition:
 
PL_FILE:          The application has create and write access to files and databases
PL_NETWORK:       The application has access to the functions in the INetMgr Interface and ISocket
                  Interface.
PL_TAPI:          The application has access to telephony functionality (not supported at present).
PL_DOWNLOAD:      The application has access to the IDownload interface, which contains functions
                  for accessing BREW application download servers (this privilege level is only available
                  to carriers and device manufacturers).
PL_SHARED_WRITE:  The application has access to the shared application directory, which allows applications
                  to share files.
PL_POS_LOCATION:  The application has access to position-location functionality (not supported at
                  present).
PL_SYSTEM:        The application has all of the above privilege levels and additional functionality
                  (this privilege level is only available to carriers and device manufacturers).

Members:
None

Comments:
None

See Also:
ISHELL_CheckPrivLevel() 

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

#endif // AEE_MIF_H
