author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 10:15:32 +0300 | |
changeset 40 | 320ec5cd0227 |
parent 22 | bde600d88860 |
permissions | -rw-r--r-- |
22 | 1 |
// Copyright (c) 1998-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 |
#if !defined(__MSVROPS_H__) |
|
17 |
#define __MSVROPS_H__ |
|
18 |
||
19 |
#if !defined(__E32BASE_H__) |
|
20 |
#include <e32base.h> |
|
21 |
#endif |
|
22 |
||
23 |
#if !defined(__MSVOP_H__) |
|
24 |
#include "MSVOP.H" |
|
25 |
#endif |
|
26 |
||
27 |
class CBaseServerMtm; |
|
28 |
||
29 |
//********************************** |
|
30 |
// CMsvMtmOperation |
|
31 |
//********************************** |
|
32 |
// |
|
33 |
// |
|
34 |
// |
|
35 |
class CMsvMtmOperation : public CMsvServerOperation |
|
36 |
/** |
|
37 |
@internalComponent |
|
38 |
@released |
|
39 |
*/ |
|
40 |
{ |
|
41 |
private: |
|
42 |
enum TMtmOpType { EMtmOpNone, |
|
43 |
EMtmOpCopyToLocal, |
|
44 |
EMtmOpCopyFromLocal, |
|
45 |
EMtmOpCopyWithinService, |
|
46 |
EMtmOpMoveToLocal, |
|
47 |
EMtmOpMoveFromLocal, |
|
48 |
EMtmOpMoveWithinService, |
|
49 |
EMtmOpDeleteAll, |
|
50 |
EMtmOpCreate, |
|
51 |
EMtmOpChange, |
|
40
320ec5cd0227
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
52 |
EMtmOpCommand, |
320ec5cd0227
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
53 |
EMtmOpChangeEntries}; |
22 | 54 |
public: |
55 |
static CMsvMtmOperation* NewL(const RMessage2& aMessage, TMsvOp aId, TUid aMtmUid, TMsvId aServiceId, TInt aSessionId, MMsvOperationObserver& aOpObserver); |
|
56 |
~CMsvMtmOperation(); |
|
57 |
// from CMsvServerOperation |
|
58 |
const TDesC8& Progress(); |
|
59 |
TInt SystemProgress(TMsvSystemProgress& aSysProgress); |
|
60 |
// general start function |
|
61 |
void Start(CBaseServerMtm& aMtm, TBool aCapabilityCheck); |
|
62 |
void Failed(TInt aError); |
|
63 |
// |
|
64 |
// various operation that can be done |
|
65 |
inline void CopyToLocal(CMsvEntrySelection* aSelection, TMsvId aDestination); |
|
66 |
inline void CopyFromLocal(CMsvEntrySelection* aSelection, TMsvId aDestination); |
|
67 |
inline void CopyWithinService(CMsvEntrySelection* aSelection, TMsvId aDestination); |
|
68 |
inline void MoveToLocal(CMsvEntrySelection* aSelection, TMsvId aDestination); |
|
69 |
inline void MoveFromLocal(CMsvEntrySelection* aSelection, TMsvId aDestination); |
|
70 |
inline void MoveWithinService(CMsvEntrySelection* aSelection, TMsvId aDestination); |
|
71 |
inline void DeleteAll(CMsvEntrySelection* aSelection); |
|
72 |
inline void CreateL(const TMsvEntry& aNewEntry); |
|
73 |
inline void ChangeL(const TMsvEntry& aNewEntry); |
|
40
320ec5cd0227
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
74 |
inline void ChangeEntriesL(CMsvEntrySelection* aSelection, TInt aMark); |
22 | 75 |
inline void StartCommand(CMsvEntrySelection* aSelection, TInt aCommand, HBufC8* aParameter); |
76 |
#if (defined SYMBIAN_USER_PROMPT_SERVICE) |
|
77 |
inline void SetThreadId(TThreadId aThreadId); |
|
78 |
inline void SetCapability(TBool aCap); |
|
79 |
inline TBool Capability(); |
|
80 |
#endif |
|
81 |
// |
|
82 |
protected: |
|
83 |
void DoCancel(); |
|
84 |
void RunL(); |
|
85 |
// |
|
86 |
private: |
|
87 |
CMsvMtmOperation(const RMessage2& aMessage, TMsvOp aId, TUid aMtmUid, TMsvId aServiceId, TInt aSessionId, MMsvOperationObserver& aOpObserver); |
|
88 |
void ConstructL(); |
|
89 |
// |
|
90 |
void StoreParametersL(TMtmOpType aOpType, const TMsvEntry& aNewEntry); |
|
91 |
void StoreParameters(TMtmOpType aOpType, CMsvEntrySelection* aSelection, TInt aIntParam, HBufC8* aDesParam); |
|
92 |
void DoStartL(TBool aCapabilityCheck); |
|
93 |
// |
|
94 |
private: |
|
95 |
TMtmOpType iOpType; |
|
96 |
CBaseServerMtm* iServerMtm; |
|
97 |
MMsvOperationObserver& iOpObserver; |
|
98 |
// |
|
99 |
TMsvEntry* iEntry; |
|
100 |
CMsvEntrySelection* iSelection; |
|
101 |
TInt iIntParam; |
|
102 |
HBufC* iBuf1; |
|
103 |
HBufC* iBuf2; |
|
104 |
HBufC8* iDesParam; |
|
105 |
#if (defined SYMBIAN_USER_PROMPT_SERVICE) |
|
106 |
TThreadId iThreadId; |
|
107 |
TBool iHasCapability; |
|
108 |
#endif |
|
109 |
}; |
|
110 |
||
111 |
#include "MSVROPS.INL" |
|
112 |
||
113 |
#endif |