|
1 /* |
|
2 * Copyright (c) 2005 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: CLocalOperationFactory |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __LOCALOPERATIONFACTORY__ |
|
22 #define __LOCALOPERATIONFACTORY__ |
|
23 |
|
24 #include <e32base.h> |
|
25 #include "XdmOperationFactory.h" |
|
26 |
|
27 _LIT( KLocalOpLogFile, "LocalOperations" ); |
|
28 const TInt KLocalProtLogBufferMaxSize = 2000; |
|
29 |
|
30 //FORWARD DECLARATION |
|
31 class CXdmDocument; |
|
32 class MXdmOperation; |
|
33 class CXdmLogWriter; |
|
34 class CXdmDocumentNode; |
|
35 |
|
36 //CLASS DECLARATION |
|
37 NONSHARABLE_CLASS( CLocalOperationFactory ) : public CXdmOperationFactory |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 * @param CXdmProtocolInfo Protocol info |
|
44 * @return CXdmProtocol |
|
45 */ |
|
46 static CLocalOperationFactory* NewL(); |
|
47 |
|
48 /** |
|
49 * Destructor. A simple wrapper to the C++ destructor. |
|
50 * |
|
51 */ |
|
52 virtual ~CLocalOperationFactory(); |
|
53 |
|
54 private: //From CXdmoperationFactory |
|
55 |
|
56 /** |
|
57 * Return an operation object that knows how to manipulate |
|
58 * whole documents |
|
59 */ |
|
60 MXdmOperation* FetchL( CXdmDocument& aTargetDocument, |
|
61 CXdmDocumentNode* aTargetNode = NULL ) const; |
|
62 |
|
63 /** |
|
64 * Return an operation object that knows how to manipulate |
|
65 * partial document |
|
66 */ |
|
67 MXdmOperation* InsertL( CXdmDocument& aTargetDocument, |
|
68 CXdmDocumentNode* aTargetNode ) const; |
|
69 |
|
70 /** |
|
71 * Return an operation object that knows how to manipulate |
|
72 * partial document |
|
73 */ |
|
74 MXdmOperation* ReplaceL( CXdmDocument& aOldDocument, |
|
75 CXdmDocumentNode* aNewNode, |
|
76 CXdmDocumentNode* aOldNode ) const; |
|
77 |
|
78 /** |
|
79 * Return an operation object that knows how to manipulate |
|
80 * partial document |
|
81 */ |
|
82 MXdmOperation* AppendL( CXdmDocument& aTargetDocument, |
|
83 CXdmDocumentNode* aTargetNode ) const; |
|
84 |
|
85 /** |
|
86 * Return an operation object that knows how to manipulate |
|
87 * partial document |
|
88 */ |
|
89 MXdmOperation* DeletionL( CXdmDocument& aTargetDocument, |
|
90 CXdmDocumentNode* aTargetNode ) const; |
|
91 |
|
92 public: |
|
93 |
|
94 /** |
|
95 * Logging function |
|
96 * @param TRefByValue<const TDesC8> aFmt,... |
|
97 * @return void |
|
98 */ |
|
99 void WriteToLog( TRefByValue<const TDesC8> aFmt,... ); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ constructor |
|
105 * @return CImpsTcpCirWatcher |
|
106 */ |
|
107 void ConstructL(); |
|
108 |
|
109 /** |
|
110 * C++ constructor |
|
111 * @return CImpsTcpCirWatcher |
|
112 */ |
|
113 CLocalOperationFactory(); |
|
114 |
|
115 private: //Data |
|
116 |
|
117 CXdmLogWriter* iLogWriter; |
|
118 }; |
|
119 |
|
120 #endif |