|
1 /* |
|
2 * Copyright (c) 2007-2009 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 * Name : extensionboolparam.h |
|
16 * Part of : SIP Profile |
|
17 * Interface : private |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 /** |
|
26 @internalComponent |
|
27 */ |
|
28 |
|
29 #ifndef TEXTENSIONBOOLPARAM_H |
|
30 #define TEXTENSIONBOOLPARAM_H |
|
31 |
|
32 // INCLUDES |
|
33 #include <e32base.h> |
|
34 #include <s32strm.h> |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 |
|
38 // CLASS DECLARATION |
|
39 /** |
|
40 * This class represents an extension parameter whose value is a boolean. |
|
41 */ |
|
42 NONSHARABLE_CLASS(TExtensionBoolParam) |
|
43 { |
|
44 public: // Constructors |
|
45 |
|
46 /** |
|
47 * Default constructor |
|
48 */ |
|
49 TExtensionBoolParam(); |
|
50 |
|
51 /** |
|
52 * Copy constructor |
|
53 */ |
|
54 TExtensionBoolParam(const TExtensionBoolParam& aParam); |
|
55 |
|
56 /** |
|
57 * Constructor |
|
58 */ |
|
59 TExtensionBoolParam(TUint32 aID, TBool aValue); |
|
60 |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * De-serialize parameter from stream |
|
65 * @param aReadStream stream where data is read from |
|
66 */ |
|
67 static TExtensionBoolParam InternalizeL(RReadStream& aReadStream); |
|
68 |
|
69 /** |
|
70 * Serialize parameter to stream |
|
71 * @param aWriteStream stream where parameter is to be serialized |
|
72 */ |
|
73 void ExternalizeL(RWriteStream& aWriteStream) const; |
|
74 |
|
75 TUint ExternalizedSizeL() const; |
|
76 |
|
77 /** |
|
78 * Compare two parameters |
|
79 * @param aParameter parameter to compare to |
|
80 * @return ETrue if parameters are equal |
|
81 */ |
|
82 TBool operator==(const TExtensionBoolParam& aParam) const; |
|
83 |
|
84 TUint32 ID() const; |
|
85 |
|
86 TBool Value() const; |
|
87 |
|
88 private: // Data |
|
89 |
|
90 TUint32 iID; |
|
91 TBool iValue; |
|
92 |
|
93 private: // For testing purposes |
|
94 |
|
95 #ifdef CPPUNIT_TEST |
|
96 friend class CExtensionBoolParamTest; |
|
97 #endif |
|
98 }; |
|
99 |
|
100 #endif // TEXTENSIONBOOLPARAM_H |