|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #ifndef CMTPCOPYOBJECT_H |
|
22 #define CMTPCOPYOBJECT_H |
|
23 |
|
24 #include "cmtprequestprocessor.h" |
|
25 #include "mmtptransactionproxy.h" |
|
26 #include "rmtpframework.h" |
|
27 |
|
28 class MMTPRequestProcessor; |
|
29 class CMTPObjectBrowser; |
|
30 class CMTPTypeArray; |
|
31 |
|
32 /** |
|
33 Implements the proxy data provider CopyObject request processor. |
|
34 @internalComponent |
|
35 |
|
36 */ |
|
37 class CMTPCopyObject : public CMTPRequestProcessor, public MMTPTransactionProxy |
|
38 { |
|
39 public: |
|
40 static MMTPRequestProcessor* NewL(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection); |
|
41 ~CMTPCopyObject(); |
|
42 |
|
43 private: // From CMTPRequestProcessor |
|
44 void ServiceL(); |
|
45 |
|
46 private: // From MMTPTransactionProxy |
|
47 void ProxyReceiveDataL(MMTPType& aData, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus); |
|
48 void ProxySendDataL(const MMTPType& aData, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus); |
|
49 void ProxySendResponseL(const TMTPTypeResponse& aResponse, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus); |
|
50 void ProxyTransactionCompleteL(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection); |
|
51 |
|
52 private: // From CActive |
|
53 void RunL(); |
|
54 TInt RunError(TInt aError); |
|
55 |
|
56 private: |
|
57 CMTPCopyObject(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection); |
|
58 void ConstructL(); |
|
59 |
|
60 void SendResponseL(TUint16 aCode); |
|
61 void Schedule(TInt aError); |
|
62 |
|
63 void BrowseHandlesL(); |
|
64 void NextObjectHandleL(); |
|
65 static void OnBrowseObjectL( TAny* aSelf, TUint aHandle, TUint32 aCurDepth ); |
|
66 |
|
67 private: |
|
68 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
69 |
|
70 RMTPFramework iSingletons; |
|
71 TUint iOwnerDp; |
|
72 |
|
73 CMTPObjectBrowser* iObjBrowser; |
|
74 RArray< TUint32 > iHandles; |
|
75 RArray< TUint32 > iHandleDepths; |
|
76 RArray< TUint32 > iNewHandleParentStack; |
|
77 TInt iCurrentHandle; |
|
78 TMTPTypeRequest iCurrentRequest; |
|
79 TBool iIsCopyingFolder; |
|
80 TUint32 iRespHandle; |
|
81 RArray<TUint> iTargetDps; |
|
82 }; |
|
83 |
|
84 #endif // CMTPCOPYOBJECT_H |
|
85 |