/*******************************************************************************
*                              Openwave Systems.                               *
*                            Device Products Group                             *
*                            Melbourne,  AUSTRALIA                             *
********************************************************************************
   DESCRIPTION:
   This is the API for the BREW OEM customisation extension.
   Each OEM provides their own versions of these functions to customise aspects
   of the Openwave Mobile Browser V6.  The OEM must not modify this header file,
   but can freely modify the source code to suit their individual customisation
   requirements.


   REVISION HISTORY:
   Date:       Who:               Email:
      - Details:
--------------------------------------------------------------------------------
   10 Nov 2004 Richard Willis     richard.willis@openwave.com
      - Initial version

*******************************************************************************/
/*******************************************************************************
*                  Copyright (c) Openwave Systems 1995-2004                    *
*                            All rights reserved.                              *
*                                                                              *
*     THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Openwave Systems Inc.     *
*               The copyright notice above does not evidence any               *
*              actual or intended publication of such source code.             *
*******************************************************************************/

#ifndef _OPWVIIMG_H
#define _OPWVIIMG_H


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

	INCLUDES

==============================================================================*/
#ifndef PREPROCESSING_ONLY //don't include if we're only pre-processing to expand the macros
#include <aee.h>
#include <aeeimage.h>
#include <aeeinterface.h>
#endif //ndef PREPROCESSING_ONLY

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

	DEFINES

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

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

	TYPES

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


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

	INTERFACE

==============================================================================*/
#ifndef PREPROCESSING_ONLY //don't define if we're only pre-processing to expand the macros

/* This is the interface to the Openwave IImage extension.  It is returned when
   the extension is created with a call to ISHELL_CreateInstance with a class
   ID of @ref AEECLSID_OPWVIIMAGE.*/
typedef struct stOPWVIImage IOPWVIImage;


//This is the definition of the virtual function structure
AEEINTERFACE( OPWVIImage )
{
   //declare our virtual functions using macro expansion
   #define FUNCTION( RETURNS, NAME )   RETURNS (*NAME)(
   #define NO_PARAM                    void
   #define FIRST_PARAM( TYPE, NAME )   TYPE NAME
   #define NEXT_PARAM( TYPE, NAME )    , TYPE NAME
   #define END_FUNCTION                );
   #include "opwviimg.m"
};

#endif //ndef PREPROCESSING_ONLY


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

	CUSTOM VIRTUAL FUNCTION ACCESSORS
	All the normal IImage function accessors will work, these are the Openwave
	custom ones.

==============================================================================*/
#ifndef PREPROCESSING_ONLY //don't define if we're only pre-processing to expand the macros

#define OPWVIIMG_vLoadOpwvBmp( psOPWVIImage, pvUPCBmp, iImageLen ) AEEGETPVTBL( (psOPWVIImage), OPWVIImage )->vLoadOpwvBmp( psOPWVIImage, pvUPCBmp, iImageLen )


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

	FUNCTION DECLARATIONS

==============================================================================*/
/**@ingroup grp_lifecycle
@DESCRIPTION
 This function is used by the BREW core to load an instance of the class.  It
 is never called directly by an application.  Instead, it is called by BREW when
 an application requests an instance of this class via ISHELL_CreateInstance().\n\n
 The OEM should add this function to the BREW class table to allow
 ISHELL_CreateInstance() to create an instance of this extension.
@PARAMETERS
 @param[in] psIShell Contains pointer to the IShell interface. 
 @param[in] lwClassID Specifies the ClassID of the applet which is being loaded
 @param[in] ppsMe On return, points to a valid instance of the class provided
   this function returns SUCCESS.  If an error occurs, this will return NULL.
@RETURNS
 SUCCESS if the extension initialised ok, otherwise an error explaining the
 reason for the initialisation failure.
*/
int Opwv_IImage_New( IShell *psIShell, AEECLSID lwClassID, void **ppsMe );


#endif //ndef PREPROCESSING_ONLY

#endif /* _OPWVIIMG_H */



