|
1 /* |
|
2 * Copyright (c) 2005-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 : CSIPHeaderLookupTable.h |
|
16 * Part of : SIP Codec |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 |
|
29 #ifndef CSIPHEADERLOOKUPTABLE_H |
|
30 #define CSIPHEADERLOOKUPTABLE_H |
|
31 |
|
32 #include <e32base.h> |
|
33 #include <s32mem.h> |
|
34 #include <stringpool.h> |
|
35 #include "TSIPHeaderLookupEntry.h" |
|
36 |
|
37 |
|
38 class CSIPHeaderLookupTable : public CBase |
|
39 { |
|
40 public: |
|
41 |
|
42 static CSIPHeaderLookupTable* NewL (); |
|
43 static CSIPHeaderLookupTable* NewLC (); |
|
44 |
|
45 ~CSIPHeaderLookupTable (); |
|
46 |
|
47 TBool IsSupported (RStringF aHeaderName) const; |
|
48 |
|
49 CSIPHeaderBase* InternalizeL (RStringF aHeaderName, |
|
50 RReadStream& aReadStream); |
|
51 |
|
52 TBool InternalizeSupported (RStringF aName) const; |
|
53 |
|
54 RPointerArray<CSIPHeaderBase> |
|
55 CreateHeaderL (RStringF aName, const TDesC8& aValue); |
|
56 |
|
57 void IncrementUsageCount (); |
|
58 void DecrementUsageCount (); |
|
59 TUint UsageCount (); |
|
60 TBool ConvertToSIPURI(); |
|
61 void SetConvertToSIPURI(TBool aNewValue); |
|
62 |
|
63 private: |
|
64 |
|
65 CSIPHeaderLookupTable (); |
|
66 void ConstructL (); |
|
67 |
|
68 void AddL (RStringF aFullName, |
|
69 RPointerArray<CSIPHeaderBase>(*aDecode)(const TDesC8&), |
|
70 CSIPHeaderBase*(*aInternalize)(RReadStream&) = 0); |
|
71 |
|
72 void AddL (RStringF aFullName, |
|
73 RStringF aCompactName, |
|
74 RPointerArray<CSIPHeaderBase>(*aDecode)(const TDesC8&), |
|
75 CSIPHeaderBase*(*aInternalize)(RReadStream&) = 0); |
|
76 |
|
77 TInt FindIndex (RStringF aName) const; |
|
78 |
|
79 |
|
80 private: // Data |
|
81 |
|
82 RArray<TSIPHeaderLookupEntry> iLookupTable; |
|
83 TUint iUsageCount; |
|
84 TBool iConvertToSIPURI; |
|
85 }; |
|
86 |
|
87 #endif // CSIPHEADERLOOKUPTABLE_H |
|
88 |
|
89 // End of File |