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

FILE:      AEEkModTable.h

SERVICES:  Domain-safe CreateInstance()

GENERAL DESCRIPTION:
   Types and function declarations for domain-safe
  

PUBLIC CLASSES AND STATIC FUNCTIONS:

    AEEkShell_CreateInstance()

INITIALIZATION & SEQUENCING REQUIREMENTS:

	See Exported Routines

        Copyright © 2004 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
=====================================================*/
#ifndef AEEKMODTABLE_H
#define AEEKMODTABLE_H

#include "AEEkShell.h"


/*
  ||  "Kernel" Internal Class Table - This table is used to support 
  ||    compile-time optionally included classes.
  || 
  ||  The classes in this list must be able to run in any process, any
  ||   any thread.  This means that all the APIs and interfaces that 
  ||   the implementation of this class depends upon must *also*
  ||   meet these requirements.
  ||
  ||  See AEEkShell.h for more information.
  ||
*/
typedef struct AEEkStaticClass
{
   AEECLSID   cls;   // classid this function supports
   AEEkPFNCI  pfnCreateInstance;

} AEEkStaticClass;


/*=====================================================================
  DATA STRUCTURE DOCUMENTATION
=======================================================================

=======================================================================
AEEkStaticClass

Description: 

   AEEkStaticClass holds an association between an AEECLSID and a
   "CreateInstance" function.  BREW consults a table of these
   structures (returned by OEMkMod_GetStaticClassLists()) in
   IKSHELL_CreateInstance() to instantiate the requested class.

   The list of classes that subscribe to this creation signature must
   support instantiation from any thread, any process (including
   supervisor mode).

Definition:
   typedef struct AEEkStaticClass
   {
      AEECLSID   cls;
      AEEkPFNCI  pfnCreateInstance;
   } AEEkStaticClass;

Members:
    cls: the class supported by CreateInstance
    pfnCreateInstance: the function to call to instantiate cls.  
                 

Comments:
    The pfnCreateInstance function is treated as "synchronized", i.e.
    only one thread per process will enter the function at a time, 
    though the thread may re-enter the function (if CreateInstance()
    chains to another CreateInstance()...)  This is done to allow
    process-local and module-local storage to be allocated in a 
    safe way.

Version:
   Introduced BREW PK 3.1

See Also:
    IKSHELL_CreateInstance()
    AEEkPFNCI

======================================================================= 

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

#endif /* #ifndef AEEKMODTABLE_H */

