|
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 : extensiondescrarrayparam.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 CEXTENSIONDESCRARRAYPARAM_H |
|
30 #define CEXTENSIONDESCRARRAYPARAM_H |
|
31 |
|
32 // INCLUDES |
|
33 #include <e32base.h> |
|
34 #include <s32strm.h> |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class MDesC8Array; |
|
38 class CDesC8ArrayFlat; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 /** |
|
42 * This class represents an extension parameter whose value |
|
43 * is a descriptor array. |
|
44 */ |
|
45 NONSHARABLE_CLASS(CExtensionDescrArrayParam) : public CBase |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Constructor |
|
51 */ |
|
52 static CExtensionDescrArrayParam* |
|
53 NewLC(TUint32 aID, const MDesC8Array& aValue); |
|
54 |
|
55 ~CExtensionDescrArrayParam(); |
|
56 |
|
57 public: // New functions |
|
58 |
|
59 /** |
|
60 * De-serialize parameter from stream |
|
61 * @param aReadStream stream where data is read from |
|
62 */ |
|
63 static CExtensionDescrArrayParam* |
|
64 InternalizeL(RReadStream& aReadStream); |
|
65 |
|
66 /** |
|
67 * Serialize parameter to stream |
|
68 * @param aWriteStream stream where parameter is to be serialized |
|
69 */ |
|
70 void ExternalizeL(RWriteStream& aWriteStream) const; |
|
71 |
|
72 TUint ExternalizedSizeL() const; |
|
73 |
|
74 /** |
|
75 * Compare two parameters |
|
76 * @param aParameter parameter to compare to |
|
77 * @return ETrue if parameters are equal |
|
78 */ |
|
79 TBool operator==(const CExtensionDescrArrayParam& aParam) const; |
|
80 |
|
81 TUint32 ID() const; |
|
82 |
|
83 const MDesC8Array& Value() const; |
|
84 |
|
85 private: // Constructors |
|
86 |
|
87 CExtensionDescrArrayParam(TUint32 aID); |
|
88 |
|
89 void ConstructL(const MDesC8Array& aValue); |
|
90 |
|
91 private: // Data |
|
92 |
|
93 TUint32 iID; |
|
94 CDesC8ArrayFlat* iValue; // owned |
|
95 |
|
96 private: // For testing purposes |
|
97 |
|
98 #ifdef CPPUNIT_TEST |
|
99 friend class CExtensionDescrArrayParamTest; |
|
100 #endif |
|
101 }; |
|
102 |
|
103 #endif // CEXTENSIONDESCRARRAYPARAM_H |