|
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 CNATFWUNSAFXORONLYATTRIBUTE_H |
|
22 #define CNATFWUNSAFXORONLYATTRIBUTE_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "natfwunsafattribute.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Class for STUN XOR-ONLY attribute. |
|
32 */ |
|
33 class CNATFWUNSAFXorOnlyAttribute : public CNATFWUNSAFAttribute |
|
34 { |
|
35 public: // Constructors and destructor |
|
36 /** |
|
37 * Creates a new instance of CNATFWUNSAFXorOnlyAttribute |
|
38 * @return A new instance of CNATFWUNSAFXorOnlyAttribute |
|
39 * ownership is transferred. |
|
40 */ |
|
41 IMPORT_C static CNATFWUNSAFXorOnlyAttribute* NewL(); |
|
42 |
|
43 /** |
|
44 * Creates a new instance of CNATFWUNSAFXorOnlyAttribute and |
|
45 * pushes it to the CleanupStack. |
|
46 * @return A new instance of CNATFWUNSAFXorOnlyAttribute, |
|
47 * ownership is transferred. |
|
48 */ |
|
49 IMPORT_C static CNATFWUNSAFXorOnlyAttribute* NewLC(); |
|
50 |
|
51 /** |
|
52 * Decodes a UNSAF attribute from a byte stream. |
|
53 * This version is for lookup table. |
|
54 * @param aByteStream Byte stream, containing attribute type, length and |
|
55 * value. |
|
56 * @return Decoded UNSAF attribute, ownership is transferred. |
|
57 */ |
|
58 static CNATFWUNSAFAttribute* DecodeAttributeL( |
|
59 const TDesC8& aByteStream); |
|
60 |
|
61 /** |
|
62 * Destructor, deletes the resources of CNATFWUNSAFXorOnlyAttribute. |
|
63 */ |
|
64 ~CNATFWUNSAFXorOnlyAttribute(); |
|
65 |
|
66 public: // From CNATFWUNSAFAttribute |
|
67 |
|
68 CNATFWUNSAFAttribute::TType Type() const; |
|
69 |
|
70 HBufC8* EncodeValueL() const; |
|
71 |
|
72 private: // Constructors |
|
73 |
|
74 CNATFWUNSAFXorOnlyAttribute(); |
|
75 }; |
|
76 |
|
77 #endif // CNATFWUNSAFXORONLYATTRIBUTE_H |
|
78 |
|
79 |