|
1 /* |
|
2 * Copyright (c) 2003-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 : SdpCodecParseUtil.h |
|
16 * Part of : SDP Codec |
|
17 * Interface : - |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 /** |
|
26 @internalComponent |
|
27 */ |
|
28 |
|
29 #ifndef CSDPCODECPARSEUTIL_H |
|
30 #define CSDPCODECPARSEUTIL_H |
|
31 |
|
32 // INCLUDES |
|
33 #include <e32base.h> |
|
34 #include <stringpool.h> |
|
35 #include "_sdpdefs.h" |
|
36 #include <e32std.h> |
|
37 #include "badesca.h" |
|
38 class CSdpTimeField; |
|
39 class CSdpBandwidthField; |
|
40 class CSdpAttributeField; |
|
41 class CSdpMediaField; |
|
42 class CSdpOriginField; |
|
43 class CUri8; |
|
44 class CSdpConnectionField; |
|
45 class CSdpKeyField; |
|
46 class RReadStream; |
|
47 class RWriteStream; |
|
48 |
|
49 // CLASS DECLARATION |
|
50 /** |
|
51 * Common utilities used in the implementation of the SDP codec. |
|
52 */ |
|
53 class CSdpCodecParseUtil :public CBase |
|
54 { |
|
55 public: // Constructors and destructor |
|
56 |
|
57 /** |
|
58 * Construct a new, CSdpCodecParseUtil object. |
|
59 * @return The new instance. |
|
60 */ |
|
61 static CSdpCodecParseUtil* NewL(RStringPool aPool,const TDesC8& aValue, |
|
62 TInt aErrCode); |
|
63 |
|
64 /** |
|
65 * Construct a new, CSdpCodecParseUtil object. |
|
66 * @return The new instance. |
|
67 */ |
|
68 static CSdpCodecParseUtil* NewLC(RStringPool aPool,const TDesC8& aValue, |
|
69 TInt aErrCode); |
|
70 |
|
71 ~CSdpCodecParseUtil(); |
|
72 |
|
73 public: // New functions |
|
74 |
|
75 static TPtrC8 FieldLineValueL(const TDesC8& aValue); |
|
76 static RArray<TPtrC8> CheckFieldNameL(RStringPool aPool, |
|
77 TInt aIndex, |
|
78 const TDesC8& aValue, |
|
79 TInt aErrCode); |
|
80 static RArray<TPtrC8> CheckOptionalFieldNameL(RStringPool aPool, |
|
81 TInt aIndex, |
|
82 const TDesC8& aValue, |
|
83 TInt aErrCode); |
|
84 TUint ParseSessionVersionL(TInt aErrCode); |
|
85 CSdpOriginField* ParseSessionOwnerL(TInt aErrCode); |
|
86 const TDesC8& ParseSessionNameL(TInt aErrCode); |
|
87 const TDesC8& ParseInformationL(TInt aErrCode); |
|
88 CUri8* ParseUriL(TInt aErrCode); |
|
89 CDesC8ArraySeg* ParseEmailL(TInt aErrCode); |
|
90 CDesC8ArraySeg* ParsePhoneL(TInt aErrCode); |
|
91 CSdpConnectionField* ParseConnectionL(TInt aErrCode); |
|
92 RPointerArray<CSdpBandwidthField>* ParseBandwidthL(TInt aErrCode); |
|
93 RPointerArray<CSdpConnectionField>* ParseConnectionFieldsL(TInt aErrCode); |
|
94 RPointerArray<CSdpTimeField>* ParseTimeFieldL(TInt aErrCode); |
|
95 const TDesC8& ParseZoneAdjustmentL(TInt aErrCode); |
|
96 CSdpKeyField* ParseEncryptionKeyL(TInt aErrCode); |
|
97 RPointerArray<CSdpAttributeField>* ParseAttributeFieldL(TInt aErrCode); |
|
98 RPointerArray<CSdpMediaField>* ParseMediaLevelL (); |
|
99 RArray<TPtrC8> FirstLineArrayElementL(RStringPool aPool, |
|
100 TInt aIndex, |
|
101 TInt aErrCode); |
|
102 |
|
103 RArray<TPtrC8>& LineArray(); |
|
104 |
|
105 private: |
|
106 |
|
107 CSdpCodecParseUtil(); |
|
108 |
|
109 void ConstructL(RStringPool aPool,const TDesC8& aValue,TInt aErrCode); |
|
110 |
|
111 private: // Data |
|
112 RArray<TPtrC8> iLineArray; |
|
113 RArray<TPtrC8> iElementArray; |
|
114 RStringPool iPool; |
|
115 RPointerArray<CSdpTimeField>* iTimeFields; |
|
116 RPointerArray<CSdpBandwidthField>* iBandwidthFields; |
|
117 RPointerArray<CSdpAttributeField>* iAttributeFields; |
|
118 RPointerArray<CSdpMediaField>* iMediaFields; |
|
119 RPointerArray<CSdpConnectionField>* iConnectionFields; |
|
120 CDesC8ArraySeg* iEmailFields; |
|
121 CDesC8ArraySeg* iPhoneFields; |
|
122 HBufC8* iToken; |
|
123 TPtrC8 iData; |
|
124 }; |
|
125 |
|
126 #endif // CSDPCODECPARSEUTIL_H |