Update contrib.
1 // Copyright (c) 2005-2010 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef t_logsecuritypolicy_h
17 #define t_logsecuritypolicy_h
22 TCompiledSecurityPolicy is a test class used for accessing private data members
23 of TSecurityPolicy class. It uses the fact that TSecurityPolicy class has a friend class,
24 which name is TCompiledSecurityPolicy.
27 class TCompiledSecurityPolicy
30 TCompiledSecurityPolicy(const TSecurityPolicy& aSecurityPolicy) :
31 iSecurityPolicy(aSecurityPolicy)
34 TSecurityPolicy::TType Type() const
36 return static_cast <TSecurityPolicy::TType> (iSecurityPolicy.iType);
38 TUint32 SecureId() const
40 return iSecurityPolicy.iSecureId;
42 TUint32 VendorId() const
44 return iSecurityPolicy.iVendorId;
46 TCapability Capability(TInt aIndex) const
50 return static_cast <TCapability> (iSecurityPolicy.iCaps[aIndex]);
54 return static_cast <TCapability> (iSecurityPolicy.iExtraCaps[aIndex - 3]);
57 return ECapability_None;
61 const TSecurityPolicy& iSecurityPolicy;
65 inline TBool operator==(const TCompiledSecurityPolicy& aLeft, const TCompiledSecurityPolicy& aRight)
67 return aLeft.Type() == aRight.Type() &&
68 aLeft.SecureId() == aRight.SecureId() &&
69 aLeft.VendorId() == aRight.VendorId() &&
70 aLeft.Capability(0) == aRight.Capability(0) &&
71 aLeft.Capability(1) == aRight.Capability(1) &&
72 aLeft.Capability(2) == aRight.Capability(2) &&
73 aLeft.Capability(3) == aRight.Capability(3) &&
74 aLeft.Capability(4) == aRight.Capability(4) &&
75 aLeft.Capability(5) == aRight.Capability(5) &&
76 aLeft.Capability(6) == aRight.Capability(6);
79 #endif//t_logsecuritypolicy_h