os/security/securityanddataprivacytools/securitytools/certapp/encdec/capabilityset.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/securityanddataprivacytools/securitytools/certapp/encdec/capabilityset.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,51 @@
     1.4 +#ifndef __CAPABILITYSET_H__
     1.5 +#define __CAPABILITYSET_H__/*
     1.6 +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Eclipse Public License v1.0"
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: 
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#include <e32base.h>
    1.24 +#include <e32capability.h>
    1.25 +#include "encdec.h"
    1.26 +
    1.27 +/**
    1.28 + * @file
    1.29 + * @internalComponent
    1.30 + */
    1.31 +
    1.32 +const TInt KCapabilitySetMaxSize = (((TInt)ECapability_HardLimit + 7)>>3);
    1.33 +
    1.34 +class CapabilitySet
    1.35 +	{
    1.36 +public:
    1.37 +	CapabilitySet();
    1.38 +	CapabilitySet(const CapabilitySet &aRef);
    1.39 +	CapabilitySet &operator=(const CapabilitySet &aRhs);
    1.40 +	void AddCapability(TCapability aCapability);
    1.41 +	TBool HasCapability(TCapability aCapability) const;
    1.42 +	void ExternalizeL(RWriteStream &aStream) const;
    1.43 +	void InternalizeL(RReadStream &aStream);
    1.44 +
    1.45 +private:
    1.46 +	TUint32 iCaps[KCapabilitySetMaxSize / sizeof(TUint32)];
    1.47 +	};
    1.48 +
    1.49 +void EncodeHuman(REncodeWriteStream& aStream,const CapabilitySet &aCapSet);
    1.50 +void DecodeHuman(RDecodeReadStream& aStream, CapabilitySet &aCapSet);
    1.51 +
    1.52 +
    1.53 +
    1.54 +#endif