|
1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CNATFWUNSAFICECONTROLLEDATTRIBUTE_H |
|
22 #define CNATFWUNSAFICECONTROLLEDATTRIBUTE_H |
|
23 |
|
24 #include "natfwunsafattribute.h" |
|
25 |
|
26 /** |
|
27 * Class for ICE-CONTROLLED attribute. |
|
28 * |
|
29 * @lib natfwunsafprotocols.lib |
|
30 * @since S60 3.2 |
|
31 */ |
|
32 class CNATFWUNSAFIceControlledAttribute : public CNATFWUNSAFAttribute |
|
33 { |
|
34 public: // Constructors and destructor |
|
35 /** |
|
36 * Creates a new instance of CNATFWUNSAFIceControlledAttribute |
|
37 * @param aIceControlled IceControlled |
|
38 * @return A new instance of CNATFWUNSAFIceControlledAttribute |
|
39 * ownership is transferred. |
|
40 */ |
|
41 IMPORT_C static CNATFWUNSAFIceControlledAttribute* |
|
42 NewL(TUint64 aIceControlled); |
|
43 |
|
44 /** |
|
45 * Creates a new instance of CNATFWUNSAFIceControlledAttribute and |
|
46 * pushes it to the CleanupStack. |
|
47 * @param aIceControlled IceControlled value |
|
48 * @return A new instance of CNATFWUNSAFIceControlledAttribute, |
|
49 * ownership is transferred. |
|
50 */ |
|
51 IMPORT_C static CNATFWUNSAFIceControlledAttribute* |
|
52 NewLC(TUint64 aIceControlled); |
|
53 |
|
54 /** |
|
55 * Decodes a UNSAF attribute from a byte stream. |
|
56 * This version is for lookup table. |
|
57 * @param aByteStream Byte stream, containing attribute type, length and |
|
58 * value. |
|
59 * @return Decoded UNSAF attribute, ownership is transferred. |
|
60 */ |
|
61 static CNATFWUNSAFAttribute* DecodeAttributeL( |
|
62 const TDesC8& aByteStream); |
|
63 |
|
64 /** |
|
65 * Destructor, deletes the resources of CNATFWUNSAFIceControlledAttribute. |
|
66 */ |
|
67 ~CNATFWUNSAFIceControlledAttribute(); |
|
68 |
|
69 public: // From CNATFWUNSAFAttribute |
|
70 |
|
71 CNATFWUNSAFAttribute::TType Type() const; |
|
72 |
|
73 HBufC8* EncodeValueL() const; |
|
74 |
|
75 public: // New functions |
|
76 |
|
77 /** |
|
78 * Returns the IceControlled value. |
|
79 * @return IceControlled value |
|
80 */ |
|
81 IMPORT_C TUint64 IceControlled() const; |
|
82 |
|
83 private: |
|
84 |
|
85 enum TEncodedValue |
|
86 { |
|
87 //Size in bytes of the attribute value |
|
88 EAttributeValueSize = 8 |
|
89 }; |
|
90 |
|
91 private: // Constructors |
|
92 |
|
93 CNATFWUNSAFIceControlledAttribute(TUint64 aIceControlled); |
|
94 |
|
95 private: // Data |
|
96 |
|
97 TUint64 iIceControlled; |
|
98 |
|
99 }; |
|
100 |
|
101 #endif // CNATFWUNSAFICECONTROLLEDATTRIBUTE_H |
|
102 |
|
103 |