equal
deleted
inserted
replaced
|
1 #ifndef __CAPABILITYSET_H__ |
|
2 #define __CAPABILITYSET_H__/* |
|
3 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of the License "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <e32capability.h> |
|
22 #include "encdec.h" |
|
23 |
|
24 /** |
|
25 * @file |
|
26 * @internalComponent |
|
27 */ |
|
28 |
|
29 const TInt KCapabilitySetMaxSize = (((TInt)ECapability_HardLimit + 7)>>3); |
|
30 |
|
31 class CapabilitySet |
|
32 { |
|
33 public: |
|
34 CapabilitySet(); |
|
35 CapabilitySet(const CapabilitySet &aRef); |
|
36 CapabilitySet &operator=(const CapabilitySet &aRhs); |
|
37 void AddCapability(TCapability aCapability); |
|
38 TBool HasCapability(TCapability aCapability) const; |
|
39 void ExternalizeL(RWriteStream &aStream) const; |
|
40 void InternalizeL(RReadStream &aStream); |
|
41 |
|
42 private: |
|
43 TUint32 iCaps[KCapabilitySetMaxSize / sizeof(TUint32)]; |
|
44 }; |
|
45 |
|
46 void EncodeHuman(REncodeWriteStream& aStream,const CapabilitySet &aCapSet); |
|
47 void DecodeHuman(RDecodeReadStream& aStream, CapabilitySet &aCapSet); |
|
48 |
|
49 |
|
50 |
|
51 #endif |