taskswitcher/contextengine/tsfswpreviewprovider/inc/tspropertylistener.h
changeset 4 4d54b72983ae
child 15 ff572dfe6d86
equal deleted inserted replaced
3:fb3763350a08 4:4d54b72983ae
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 */
       
     9 
       
    10 
       
    11 #ifndef TSPROPERTYLISTENER_H
       
    12 #define TSPROPERTYLISTENER_H
       
    13 
       
    14 #include <e32base.h>
       
    15 #include <e32property.h>
       
    16 
       
    17 #include "tspreviewobserver.h"
       
    18 
       
    19 // Publish & subscribe UID (akncapserver.exe SID so that it can define the keys)
       
    20 const TUid KPSUidPreviewProvider = { 0x10207218 };
       
    21 
       
    22 // P&S keys
       
    23 const TUint32 KPSKeyWgId = 0x20016BE1;
       
    24 const TUint32 KPSKeyFbsBitmapId = 0x20016BE2;
       
    25 const TUint32 KPSKeyOperation = 0x20016BE3;
       
    26 /**
       
    27  * Operation which will be done after P&S keys have changed.
       
    28  */
       
    29 enum TPreviewOperation
       
    30     {
       
    31     EOperationNone,
       
    32     EOperationUnregister,
       
    33     EOperationBitmapUpdated
       
    34     };
       
    35 
       
    36 /**
       
    37  * CPropertyListener
       
    38  */
       
    39 NONSHARABLE_CLASS( CTsPropertyListener ) : public CActive
       
    40     {
       
    41 public:
       
    42     static CTsPropertyListener* NewL( MTsFastSwapPreviewObserver& aObs );
       
    43     virtual ~CTsPropertyListener();
       
    44     
       
    45 protected:
       
    46     CTsPropertyListener( MTsFastSwapPreviewObserver& aObs );
       
    47     void ConstructL();  
       
    48 
       
    49 private: // From CActive
       
    50     void RunL();
       
    51     void DoCancel();
       
    52     
       
    53 private:    
       
    54     void ReadPropertiesL();
       
    55     void DefinePropertyL( TInt aPSKey ); 
       
    56     void Subscribe();
       
    57 
       
    58 private:
       
    59     MTsFastSwapPreviewObserver& iObs;
       
    60     RProperty iProperty;
       
    61    
       
    62     TInt iWgId;
       
    63     TInt iFbsBitmapId;
       
    64     
       
    65     TPreviewOperation iOperation;
       
    66     };
       
    67 
       
    68 #endif // TSPROPERTYLISTENER_H
       
    69 
       
    70 // End of file