#ifndef _OEMDEVICENOTIFIER_H_
#define _OEMDEVICENOTIFIER_H_
/*======================================================
FILE:      oemdevicenotifier.h

SERVICES:  Device Level Notifier.

GENERAL DESCRIPTION:

   Device-level notification for such as flip and keyguard events.

PUBLIC CLASSES AND STATIC FUNCTIONS:

    IDeviceNotifier

INITIALIZATION & SEQUENCING REQUIREMENTS:

	See Exported Routines

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

#include "AEEComdef.h"
#include "AEEInterface.h"
#include "AEEDeviceNotifier.h"

typedef struct _IDeviceNotifier IDeviceNotifier;

AEEINTERFACE(IDeviceNotifier)
{
   INHERIT_INotifier(IDeviceNotifier);
};

#define IDEVICENOTIFIER_AddRef(o)         AEEGETPVTBL((o),IDeviceNotifier)->AddRef((o))
#define IDEVICENOTIFIER_Release(o)        AEEGETPVTBL((o),IDeviceNotifier)->Release((o))
#define IDEVICENOTIFIER_SetMask(o,m)      AEEGETPVTBL((o),IDeviceNotifier)->SetMask((o),(m))


#define AEE_SEND_FLIP_EVT(p) {\
   (void) AEE_Event(EVT_FLIP,(p)->wParam,(p)->dwParam); \
   (void) ISHELL_Notify(AEE_GetShell(),AEECLSID_DEVICENOTIFIER,NMASK_DEVICENOTIFIER_FLIP,p);}

#define AEE_SEND_KEYGUARD_EVT(p) {\
   (void) AEE_Event(EVT_KEYGUARD,(p)->wParam,(p)->dwParm); \
   (void) ISHELL_Notify(AEE_GetShell(),AEECLSID_DEVICENOTIFIER,NMASK_DEVICENOTIFIER_KEYGUARD,p);}

#define AEE_SEND_HEADSET_EVT(p) {\
   (void) AEE_Event(EVT_HEADSET,(p)->wParam,0); \
   (void) ISHELL_Notify(AEE_GetShell(),AEECLSID_DEVICENOTIFIER,NMASK_DEVICENOTIFIER_HEADSET,p);}

#define AEE_SEND_SCRROTATE_EVT(p) {\
   (void) AEE_Event(EVT_SCRROTATE,(p)->wParam,(p)->dwParm); \
   (void) ISHELL_Notify(AEE_GetShell(),AEECLSID_DEVICENOTIFIER,NMASK_DEVICENOTIFIER_SCRROTATE,p);}



/*=====================================================================
  DATA STRUCTURES DOCUMENTATION
=======================================================================
 
=======================================================================
   INTERFACES DOCUMENTATION
=======================================================================

IDeviceNotifier Interface

Description:
   This is the interface for device-level notifications for EVT_FLI, EVT_KEYGUARD,
   EVT_HEADSET and EVT_SCR_ROTATE. This interface derives from INotifier.  

See Also:
   INotifier Interface

======================================================================= 
IDeviceNotifier_AddRef()
This function is inherited from IBASE_AddRef().
======================================================================= 
IDeviceNotifier_Release()
This function is inherited from IBASE_AddRef().
======================================================================= 
IDeviceNotifier_SetMask()
This function is inhereited from INOTIFIER_SetMask()
======================================================================= 

AEE_SEND_FLIP_EVT()

Description:
   Sends EVT_FLIP to the active BREW app and notifies all the registered
   application.

Prototype:
   void AEE_SEND_FLIP_EVT(AEEDeviceNotify * p);

Parameters:
   p [in]: Pointer to a AEEDeviceNotify variable where AEEDeviceNotify::wParam
           and AEEDeviceNotify::dwParam are set to wParam and dwParam of EVT_FLIP.

Return Value:
   None

Comments:
   None

Side Effects:
   None

See Also:
   EVT_FLIP   

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

AEE_SEND_KEYGUARD_EVT()

Description:
   Sends EVT_KEYGUARD to the active BREW app and notifies all the registered
   application.

Prototype:
   void AEE_SEND_KEYGAURD_EVT(AEEDeviceNotify * p);

Parameters:
   p [in]: Pointer to a AEEDeviceNotify variable where AEEDeviceNotify::wParam
           and AEEDeviceNotify::dwParam are set to wParam and dwParam of EVT_KEYGUARD.

Return Value:
   None

Comments:
   None

Side Effects:
   None

See Also:
   EVT_KEYGUARD 

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

AEE_SEND_HEADSET_EVT()

Description:
   Sends EVT_HEADSET to the active BREW app and notifies all the registered
   application.

Prototype:
   void AEE_SEND_HEADSET_EVT(AEEDeviceNotify * p);

Parameters:
   p [in]: Pointer to a AEEDeviceNotify variable where AEEDeviceNotify::wParam
           and AEEDeviceNotify::dwParam are set to wParam and dwParam of EVT_HEADSET.

Return Value:
   None

Comments:
   None

Side Effects:
   None

See Also:
   EVT_HEADSET

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

AEE_SEND_SCRROTATE_EVT()

Description:
   Sends EVT_SCR_ROTATE to the active BREW app and notifies all the registered
   application.

Prototype:
   void AEE_SEND_SCRROTATE_EVT(AEEDeviceNotify * p);

Parameters:
   p [in]: Pointer to a AEEDeviceNotify variable where AEEDeviceNotify::wParam
           and AEEDeviceNotify::dwParam are set to wParam and dwParam of EVT_SCR_ROTATE.

Return Value:
   None

Comments:
   None

Side Effects:
   None

See Also:
   EVT_SCR_ROTATE 

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

#endif /* _OEMDEVICENOTIFIER_H_ */

