1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptomgmtlibs/cryptotokenfw/inc/securitydefs.inl Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,130 @@
1.4 +/*
1.5 +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +/**
1.22 + @file
1.23 + @publishedAll
1.24 + @released
1.25 +*/
1.26 +
1.27 +
1.28 +/**
1.29 + *
1.30 + *
1.31 + * @param aLeft
1.32 + * @param aRight
1.33 + * @return
1.34 +*/
1.35 +inline TKeyUsagePKCS15 operator|(TKeyUsagePKCS15 aLeft, TKeyUsagePKCS15 aRight)
1.36 + {
1.37 + return static_cast<TKeyUsagePKCS15>(static_cast<TUint>(aLeft) | static_cast<TUint>(aRight));
1.38 + }
1.39 +
1.40 +
1.41 +/**
1.42 + *
1.43 + *
1.44 + * @param aLeft
1.45 + * @param aRight
1.46 + * @return
1.47 + */
1.48 +inline TKeyUsagePKCS15 operator&(TKeyUsagePKCS15 aLeft, TKeyUsagePKCS15 aRight)
1.49 + {
1.50 + return static_cast<TKeyUsagePKCS15>(static_cast<TUint>(aLeft) & static_cast<TUint>(aRight));
1.51 + }
1.52 +
1.53 +
1.54 +/**
1.55 + *
1.56 + *
1.57 + * @param aLeft
1.58 + * @param aRight
1.59 + * @return
1.60 + */
1.61 +inline const TKeyUsagePKCS15& operator|=(TKeyUsagePKCS15& aLeft, TKeyUsagePKCS15 aRight)
1.62 + {
1.63 + aLeft = aLeft | aRight;
1.64 + return aLeft;
1.65 + }
1.66 +
1.67 +
1.68 +/**
1.69 + *
1.70 + *
1.71 + * @param aLeft
1.72 + * @param aRight
1.73 + * @return
1.74 + */
1.75 +inline const TKeyUsagePKCS15& operator&=(TKeyUsagePKCS15& aLeft, TKeyUsagePKCS15 aRight)
1.76 + {
1.77 + aLeft = aLeft & aRight;
1.78 + return aLeft;
1.79 + }
1.80 +
1.81 +
1.82 +/**
1.83 + *
1.84 + *
1.85 + * @param aLeft
1.86 + * @param aRight
1.87 + * @return
1.88 + */
1.89 +inline TKeyUsageX509 operator|(TKeyUsageX509 aLeft, TKeyUsageX509 aRight)
1.90 + {
1.91 + return static_cast<TKeyUsageX509>(static_cast<TUint>(aLeft) | static_cast<TUint>(aRight));
1.92 + }
1.93 +
1.94 +
1.95 +/**
1.96 + *
1.97 + *
1.98 + * @param aLeft
1.99 + * @param aRight
1.100 + * @return
1.101 + */
1.102 +inline TKeyUsageX509 operator&(TKeyUsageX509 aLeft, TKeyUsageX509 aRight)
1.103 + {
1.104 + return static_cast<TKeyUsageX509>(static_cast<TUint>(aLeft) & static_cast<TUint>(aRight));
1.105 + }
1.106 +
1.107 +
1.108 +/**
1.109 + *
1.110 + *
1.111 + * @param aLeft
1.112 + * @param aRight
1.113 + * @return
1.114 + */
1.115 +inline const TKeyUsageX509& operator|=(TKeyUsageX509& aLeft, TKeyUsageX509 aRight)
1.116 + {
1.117 + aLeft = aLeft | aRight;
1.118 + return aLeft;
1.119 + }
1.120 +
1.121 +
1.122 +/**
1.123 + *
1.124 + *
1.125 + * @param aLeft
1.126 + * @param aRight
1.127 + * @return
1.128 + */
1.129 +inline const TKeyUsageX509& operator&=(TKeyUsageX509& aLeft, TKeyUsageX509 aRight)
1.130 + {
1.131 + aLeft = aLeft & aRight;
1.132 + return aLeft;
1.133 + }