1 /* |
|
2 * Copyright (c) 2002-2004 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: WebDAV Lock method response body parser |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CRSFWLOCKQUERYPARSER_H |
|
20 #define CRSFWLOCKQUERYPARSER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <xml/contenthandler.h> |
|
24 #include <xml/attribute.h> // needed for RAttributeArray |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CRsfwDavFileInfo; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * WebDAV Lock operation response body parser |
|
33 * |
|
34 * @lib davaccess.lib |
|
35 * @since Series 60 3.1 |
|
36 */ |
|
37 |
|
38 class CRsfwLockQueryParser: public CBase, public Xml::MContentHandler |
|
39 { |
|
40 // DATA TYPES |
|
41 enum TLockType |
|
42 { |
|
43 EWriteLock |
|
44 }; |
|
45 |
|
46 enum TLockScope |
|
47 { |
|
48 ESharedLock, |
|
49 EExclLock |
|
50 }; |
|
51 |
|
52 enum TState |
|
53 { |
|
54 ELooking, |
|
55 ELockToken, |
|
56 ELockScope, |
|
57 EDepth, |
|
58 ETimeout, |
|
59 ELockType, |
|
60 EHrefToken |
|
61 }; |
|
62 |
|
63 public: // Constructors and destructor |
|
64 /** |
|
65 * Two-phased constructor. |
|
66 */ |
|
67 static CRsfwLockQueryParser* NewL(); |
|
68 static CRsfwLockQueryParser* NewLC(); |
|
69 |
|
70 /** |
|
71 * Destructor. |
|
72 */ |
|
73 virtual ~CRsfwLockQueryParser(); |
|
74 |
|
75 public: // Functions from base classes |
|
76 // From Xml::MContentHandler |
|
77 void OnStartDocumentL(const Xml::RDocumentParameters& aDocParam, |
|
78 TInt aErrorCode); |
|
79 void OnEndDocumentL(TInt aErrorCode); |
|
80 void OnStartElementL(const Xml::RTagInfo& aElement, |
|
81 const Xml::RAttributeArray& aAttributes, |
|
82 TInt aErrorCode); |
|
83 void OnEndElementL(const Xml::RTagInfo& aElement, TInt aErrorCode); |
|
84 void OnContentL(const TDesC8& aBytes, TInt aErrorCode); |
|
85 void OnStartPrefixMappingL(const RString& aPrefix, |
|
86 const RString& aUri, |
|
87 TInt aErrorCode); |
|
88 void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode); |
|
89 void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode); |
|
90 void OnSkippedEntityL(const RString& aName, TInt aErrorCode); |
|
91 void OnProcessingInstructionL(const TDesC8& aTarget, |
|
92 const TDesC8& aData, |
|
93 TInt aErrorCode); |
|
94 void OnError(TInt aErrorCode); |
|
95 TAny* GetExtendedInterface(const TInt32 aUid); |
|
96 |
|
97 public: // New functions |
|
98 /** |
|
99 Set file information container to be filled |
|
100 @param aFileInfo file info |
|
101 */ |
|
102 void SetDavFileInfo(CRsfwDavFileInfo* aDavFileInfo); |
|
103 |
|
104 TInt GetLastError(); |
|
105 |
|
106 private: |
|
107 void ConstructL(); |
|
108 |
|
109 private: // Data |
|
110 TState iParseState; |
|
111 CRsfwDavFileInfo* iDavFileInfo; |
|
112 HBufC8* iContentString; |
|
113 TInt iError; |
|
114 }; |
|
115 |
|
116 #endif // CRSFWLOCKQUERYPARSER_H |
|
117 |
|
118 // End of File |
|