#ifndef AEEMODULESUPPORT_H
#define AEEMODULESUPPORT_H
/*===========================================================================
FILE:     AEEModuleSupport.h                 
 
SERVICES: AEE Module Support services for dynamically loaded modules

DESCRIPTION:
   Provides services to dynamically loaded modules that allow them to
   initialize themselves and provide transparent library services.

PUBLIC CLASSES
   Not Applicable

INITIALIZATION AND SEQUENCING REQUIREMENTS
   Not Applicable


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


/*=============================================================================
// INCLUDES AND VARIABLE DEFINITIONS
=============================================================================*/

#ifdef __cplusplus
extern "C" {
#endif

/*---------------------------------------------------------------------------*
// Defines
 *---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------*
// Include Files
 *---------------------------------------------------------------------------*/

#include "AEE.h"
#include "AEEModuleDefs.h"

/*---------------------------------------------------------------------------*
// Type Declarations
 *---------------------------------------------------------------------------*/
 
/*---------------------------------------------------------------------------*
// Global Constant Declarations
 *---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------*
// Global Data Declarations
 *---------------------------------------------------------------------------*/

/*=============================================================================
// FUNCTION DECLARATIONS and INLINE FUNCTION DEFINITIONS
=============================================================================*/

/*---------------------------------------------------------------------------*
// Interface Definitions - C Style
 *---------------------------------------------------------------------------*/

typedef struct _IModuleSupport IModuleSupport;

/*****************************************************************************
//
// IModuleSupport Interface
//
******************************************************************************/

QINTERFACE(IModuleSupport)
{
   DECLARE_IBASE(IModuleSupport)

   const AEEModuleSupportInfo *(*GetInfo)(IModuleSupport *pIModuleSupport);
};

/*
 * Access Macros
 */
#define IMODULESUPPORT_AddRef(p)    GET_PVTBL(p,IModuleSupport)->AddRef(p)
#define IMODULESUPPORT_Release(p)   GET_PVTBL(p,IModuleSupport)->Release(p)
#define IMODULESUPPORT_GetInfo(p)   GET_PVTBL(p,IModuleSupport)->GetInfo(p)

/*=============================================================================
  INTERFACES   DOCUMENTATION
===============================================================================

Interface Name: IModuleSupport

Description:
   Provides module support services to dynamically loaded modules.

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

Function: IMODULESUPPORT_AddRef()

Description:
   This function increments the reference count for the Module Support object

Prototype:
   uint32 IMODULESUPPORT_AddRef(IModuleSupport * pIModuleSupport)

Parameters:
   pIModuleSupport: Pointer to IModuleSupport interface instance

Return Value:
   The updated reference count

Comments:  
   None

Side Effects: 
   None

Version:
   Introduced BREW Client 3.0

See Also:
   None

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

Function: IMODULESUPPORT_Release()

Description:
   This function decrements the reference count for the Module Support object
   and does appropriate cleanup if the reference count reaches zero.

Prototype:
   uint32 IMODULESUPPORT_Release(IModuleSupport * pIModuleSupport)

Parameters:
   pIModuleSupport: Pointer to IModuleInterface interface instance

Return Value:
   The updated reference count

Comments: 
   None

Side Effects: 
   None

Version:
   Introduced BREW Client 3.0

See Also:
   None

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

Function: IMODULESUPPORT_GetInfo()

Description:
   Returns a pointer to module support info needed by dynamically loaded
   modules.  This function cannot fail.

Prototype:
   const AEEModuleSupportInfo *IMODULESUPPORT_GetInfo(IModuleSupport * pIModuleSupport)

Parameters:
   pIModuleSupport: Pointer to IModuleInterface interface instance

Return Value:
   Pointer to the AEEModuleSupportInfo

Comments: 
   None

Side Effects: 
   None

Version:
   Introduced BREW Client 3.0

See Also:
   None

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

#ifdef __cplusplus
}
#endif

#endif   /* AEEMODULESUPPORT_H */

