lafagnosticuifoundation/graphicseffects/ClientInc/PolicyHandler.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 // Copyright (c) 2006-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 _POLICYHANDLER_H_
       
    17 #define _POLICYHANDLER_H_
       
    18 
       
    19 #include "GfxTransDataType.h"
       
    20 
       
    21 /**
       
    22 Implementation of the policy handler
       
    23 
       
    24 @internalTechnology
       
    25 */
       
    26 NONSHARABLE_CLASS(CPolicyHandler) : public CBase
       
    27 {
       
    28 public:
       
    29 	CPolicyHandler();
       
    30 	~CPolicyHandler();
       
    31 	TPolicy GetPolicy(TUid aUid, TUint aAction);
       
    32 	void UpdatePolicy(TUid aUid, TUint aAction, TPolicy aPolicy);
       
    33 	void SetTransitionPolicies(TControlPolicy* aPolicies, TInt aNum);
       
    34 private: 
       
    35 	class TActionPolicy
       
    36 		{
       
    37 		public:
       
    38 		TUint iAction;
       
    39 		TPolicy iPolicy;
       
    40 		};
       
    41 	class CControlPolicy
       
    42 		{
       
    43 		public:
       
    44 		~CControlPolicy()
       
    45 			{
       
    46 			iActions.Reset();
       
    47 			iActions.Close();
       
    48 			}
       
    49 		RArray<TActionPolicy> iActions;
       
    50 		TUid iUid;
       
    51 		};
       
    52 	RPointerArray<CControlPolicy> iPolicies;
       
    53 	TInt FindControlPolicy(TUid aUid);
       
    54 	TInt FindActionPolicy(CControlPolicy* aControlPolicy, TUint aAction);
       
    55 	
       
    56 };
       
    57 
       
    58 #endif //_POLICYHANDLER_H_