1 siptokenheaderbase.h |
1 /* |
|
2 * Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Name : siptokenheaderbase.h |
|
16 * Part of : SIP Codec |
|
17 * Interface : SDK API, SIP Codec API |
|
18 * Version : SIP/4.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef CSIPTOKENHEADERBASE_H |
|
26 #define CSIPTOKENHEADERBASE_H |
|
27 |
|
28 // INCLUDES |
|
29 #include "sipheaderbase.h" |
|
30 #include "_sipcodecdefs.h" |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * @publishedAll |
|
35 * @released |
|
36 * |
|
37 * A base class for SIP headers having form "Name: token *(COMMA token)" |
|
38 * |
|
39 * @lib sipcodec.lib |
|
40 */ |
|
41 class CSIPTokenHeaderBase : public CSIPHeaderBase |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Destructor, deletes the resources of CSIPTokenHeaderBase. |
|
47 */ |
|
48 IMPORT_C virtual ~CSIPTokenHeaderBase(); |
|
49 |
|
50 |
|
51 public: // New functions |
|
52 |
|
53 /** |
|
54 * Sets the header value as a token |
|
55 * @param aValue a value to set |
|
56 */ |
|
57 IMPORT_C void SetValueL(RStringF aValue); |
|
58 |
|
59 /** |
|
60 * Gets the header value as a token |
|
61 * @return the header value |
|
62 */ |
|
63 IMPORT_C RStringF Value() const; |
|
64 |
|
65 |
|
66 public: // From CSIPHeaderBase |
|
67 |
|
68 /** |
|
69 * From CSIPHeaderBase ToTextValueL |
|
70 */ |
|
71 IMPORT_C HBufC8* ToTextValueL() const; |
|
72 |
|
73 |
|
74 public: // From CSIPHeaderBase, for internal use |
|
75 |
|
76 /** |
|
77 * @internalComponent |
|
78 */ |
|
79 virtual TBool MoreThanOneAllowed() const; |
|
80 |
|
81 protected: // Constructors |
|
82 |
|
83 CSIPTokenHeaderBase(); |
|
84 CSIPTokenHeaderBase(const CSIPTokenHeaderBase& aHeader); |
|
85 void ConstructL(const TDesC8& aValue, TBool aEmptyValueAllowed=EFalse); |
|
86 void ConstructL(RStringF aValue, TBool aEmptyValueAllowed=EFalse); |
|
87 |
|
88 protected: // New functions |
|
89 |
|
90 void DoInternalizeValueL(RReadStream& aReadStream); |
|
91 |
|
92 protected: // Data |
|
93 |
|
94 /** |
|
95 * @internalComponent |
|
96 */ |
|
97 RStringF iValue; |
|
98 |
|
99 private: // From CSIPHeaderBase |
|
100 |
|
101 void ExternalizeValueL(RWriteStream& aWriteStream) const; |
|
102 |
|
103 private: // New functions |
|
104 |
|
105 void SetValueL(const TDesC8& aValue); |
|
106 |
|
107 private: // For testing purposes |
|
108 |
|
109 UNIT_TEST(CSIPTokenHeaderBaseTest) |
|
110 }; |
|
111 |
|
112 #endif // CSIPTOKENHEADERBASE_H |
|
113 |
|
114 // End of File |