resourcemgmt/hwresourcesmgr/common/inc/hwrmuipluginservice.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15  
       
    16 #ifndef HWRMUIPLUGINSERVICE_H
       
    17 #define HWRMUIPLUGINSERVICE_H
       
    18 
       
    19 // INCLUDES
       
    20 #include <e32base.h>
       
    21 
       
    22 
       
    23 // CONSTANTS
       
    24 /** ECOM Plugin interface UID */
       
    25 const TUid KHwrmUiPluginServiceInterfaceUid = { 0x102857B5 };                                                       
       
    26 
       
    27 /**
       
    28 * A callback interface for foreground observer.
       
    29 *
       
    30 * @publishedPartner
       
    31 * @released
       
    32 */
       
    33 class MHwrmForegroundObserver
       
    34     {
       
    35 public:       
       
    36     /** 
       
    37     * Called when the client window gets the focus.
       
    38     */
       
    39    	virtual void HandleGainingForeground() = 0;
       
    40 	
       
    41     /** 
       
    42     * Called when the client window looses the focus.
       
    43     */
       
    44 	  virtual void HandleLosingForeground() = 0;	
       
    45     };
       
    46     
       
    47 
       
    48 /**
       
    49 *  UI Plugin interface class to be implemented by the foreground observer.
       
    50 *
       
    51 * @publishedPartner
       
    52 * @released
       
    53 */
       
    54 class CHwrmUiPluginService : public CBase
       
    55 	{
       
    56 public:
       
    57     /**
       
    58     * Factory method to create implementation. Implementation is found via ECom.
       
    59     */
       
    60     static CHwrmUiPluginService* NewL();
       
    61 
       
    62     /**
       
    63     * Factory method to create implementation. Implementation is found via ECom.
       
    64     */
       
    65     inline virtual ~CHwrmUiPluginService();
       
    66 
       
    67     /**
       
    68     * Update UI foreground observer
       
    69     *
       
    70     */
       
    71     void  virtual AddForegroundObserverL(MHwrmForegroundObserver* aObserver) = 0;
       
    72 	
       
    73     /**
       
    74     * Returns the foreground state of the window
       
    75     *
       
    76     * @return ETrue if the window is on focus otherwise EFalse
       
    77     *
       
    78     */
       
    79     TBool virtual InForeground() const = 0;
       
    80     
       
    81 protected:	
       
    82     TUid iDestructorIDKey;
       
    83 	};
       
    84 
       
    85 #include <hwrm/hwrmuipluginservice.inl>
       
    86 
       
    87 #endif  // HWRMUIPLUGINSERVICE_H