#ifndef IDIAGFILTER_H
#define IDIAGFILTER_H
/*=====================================================================
FILE:  IDiagFilter.h

SERVICES:  Diag Filter Interface

DESCRIPTION:  
	Base level definitions, typedefs, etc. for DemoExtension interface
        
        Copyright © 1999-2002 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
=====================================================================*/

#include "AEE.h"        // Standard AEE definitions

/*===============================================================================
Type Declarations
===============================================================================*/

typedef struct IDiagFilter IDiagFilter;

AEEINTERFACE(IDiagFilter)
{
   INHERIT_IBase(IDiagFilter);
   boolean (*HandleEvent)(IDiagFilter * pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam);
   void    (*SetActive)(IDiagFilter * pMe, boolean bActive);
   boolean (*IsActive)(IDiagFilter * pMe);
   int     (*SetUseApplet)(IDiagFilter * pMe, AEECLSID cls);
};

/*===============================================================================
Access Macros
===============================================================================*/

#define IDIAGFILTER_AddRef(p)                  AEEGETPVTBL(p,IDiagFilter)->AddRef(p)
#define IDIAGFILTER_Release(p)                 AEEGETPVTBL(p,IDiagFilter)->Release(p)
#define IDIAGFILTER_HandleEvent(p, e, w, dw)   AEEGETPVTBL(p,IDiagFilter)->HandleEvent(p, e,w, dw)
#define IDIAGFILTER_SetActive(p, b)            AEEGETPVTBL(p,IDiagFilter)->SetActive(p, b)
#define IDIAGFILTER_IsActive(p)                AEEGETPVTBL(p,IDiagFilter)->IsActive(p)
#define IDIAGFILTER_SetUseApplet(p, c)         AEEGETPVTBL(p,IDiagFilter)->SetUseApplet(p, c)

#endif    // IDIAGFILTER_H


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

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

FUNCTION IDIAGFILTER_AddRef
  
DESCRIPTION
   This function increases the reference count for the IDiagFilter object
   
PROTOTYPE:
   uint32 IDIAGFILTER_AddRef(IDiagFilter * pMe);
   
PARAMETERS:
   pMe: Pointer to IDiagFilter interface whos reference count is to be incremented
   
DEPENDENCIES
   none
   
RETURN VALUE
   The updated reference count:
   
SIDE EFFECTS
   none
=============================================================================

FUNCTION IDIAGFILTER_Release
  
DESCRIPTION
   This function decreases the reference count for the IDiagFilter object. If
   the reference count reaches zero, it does the required cleanup
   
PROTOTYPE:
   uint32 IDIAGFILTER_Release(IDiagFilter * pMe);
   
PARAMETERS:
   pMe: Pointer to the IDiagFilter interface whose reference count needs to be
   decremented.
   
DEPENDENCIES
   none
   
RETURN VALUE
   The updated reference count
   
SIDE EFFECTS
   none
=============================================================================

FUNCTION IDIAGFILTER_HandleEvent
  
DESCRIPTION
   This is the EventHandler for this Extension. 

PROTOTYPE:
   boolean IDIAGFILTER_HandleEvent(IDiagFilter * pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
   
PARAMETERS:
   pMe     : Pointer to the IDiagFilter structure. 
   eCode   : Specifies the Event sent to this applet
   wParam  : Event specific 16 bit data.
   dwParam : Event specific 32 bit data.
   
DEPENDENCIES
   none
   
RETURN VALUE
   TRUE : If the app has processed the event
   FALSE: If the app did not process the event
   
SIDE EFFECTS
   none
=============================================================================

FUNCTION IDIAGFILTER_SetActive
  
DESCRIPTION
   
PROTOTYPE:
   void IDIAGFILTER_SetActive(IDiagFilter * pMe, boolean bActive);
   
PARAMETERS:
   pIDiagFilter : Pointer to the IDiagFilter structure. 
   bActive      : TRUE : Activate
                : FALSE: Inactivate
   
DEPENDENCIES
   none
   
RETURN VALUE
   none
   
SIDE EFFECTS
   none
=============================================================================

FUNCTION IDIAGFILTER_IsActive
  
DESCRIPTION
   
PROTOTYPE:
   boolean IDIAGFILTER_IsActive(IDiagFilter * pMe);
   
PARAMETERS:
   pIDiagFilter : Pointer to the IDiagFilter structure. 
   
DEPENDENCIES
   none
   
RETURN VALUE
   TRUE : Active
   FALSE: Inactive
   
SIDE EFFECTS
   none
=============================================================================

FUNCTION IDIAGFILTER_SetUseApplet
  
DESCRIPTION
   
PROTOTYPE:
   int IDIAGFILTER_SetUseApplet(IDiagFilter * pMe, AEECLSID cls);
   
PARAMETERS:
   pMe : Pointer to the IDiagFilter structure. 
   cls : class ID using this extension.
   
DEPENDENCIES
   none
   
RETURN VALUE
   SUCCESS
   
SIDE EFFECTS
   none
===========================================================================*/
