messagingfw/msgsrvnstore/server/inc/MSVMOVE.H
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     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(__MSVMOVE_H__)
       
    17 #define __MSVMOVE_H__
       
    18 
       
    19 #if !defined(__E32BASE_H__)
       
    20 #include <e32base.h>
       
    21 #endif
       
    22 
       
    23 #if !defined(__MSVSTD_H__)
       
    24 #include <msvstd.h>
       
    25 #endif
       
    26 
       
    27 #include "MSVCMBSE.H"
       
    28 
       
    29 class CMsvServer;
       
    30 
       
    31 //**********************************
       
    32 // CMsvMove
       
    33 //**********************************
       
    34 //
       
    35 //
       
    36 //
       
    37 
       
    38 class CMsvMove : public CActive
       
    39 /**
       
    40 @internalComponent
       
    41 @released
       
    42 */
       
    43 	{
       
    44 public:
       
    45 	static CMsvMove* NewL(CMsvServer& aServer);
       
    46 	~CMsvMove();
       
    47 	//
       
    48 	void StartL(TMsvId aId, TMsvId aTarget, TRequestStatus& aObserverStatus);
       
    49 	void StartL(TMsvId aId, TMsvId aTarget);
       
    50 	void Reset();
       
    51 	//
       
    52 protected:
       
    53 	CMsvMove(CMsvServer& aServer);
       
    54 	void ConstructL();
       
    55 	// from CActive
       
    56 	void RunL();
       
    57 	void DoCancel();
       
    58 	//
       
    59 private:
       
    60 	void CheckEntriesL();
       
    61 	void CleanupFiles(TMsvId aService);
       
    62 	void FindNextStep();
       
    63 	void StartNextStep();
       
    64 	TInt SetupFileCopy();
       
    65 	TInt SetupStoreCopy();
       
    66 	void DoRunL();
       
    67 	//
       
    68 private:
       
    69 	enum TState {EFolder, EStore, EIndex};
       
    70 	//
       
    71 private:
       
    72 	CMsvServer& iServer;
       
    73 	TRequestStatus* iObserverStatus;
       
    74 	CFileMan* iFileMan;
       
    75 	TState iState;
       
    76 	TMsvEntry* iCurrentEntry;
       
    77 	TMsvId iTargetId;
       
    78 	TMsvId iSourceId;
       
    79 	TMsvId iParentId;
       
    80 	TMsvId iTargetService;
       
    81 	TMsvId iSourceService;
       
    82 	HBufC* iTargetPath;
       
    83 	CMsvEntrySelection* iDescendents;
       
    84 	TInt iNextDescendent;
       
    85 	TInt iLockedIndex;
       
    86 
       
    87 #if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB)
       
    88 	TBool iIsDBStore;
       
    89 #endif
       
    90 	};
       
    91 
       
    92 
       
    93 //**********************************
       
    94 // CMsvMoveEntries
       
    95 //**********************************
       
    96 //
       
    97 //
       
    98 //
       
    99 
       
   100 class CMsvMoveEntries : public CMsvCopyMoveEntriesBase
       
   101 /**
       
   102 @internalComponent
       
   103 @released
       
   104 */
       
   105 	{
       
   106 public:
       
   107 	static CMsvMoveEntries* NewL(CMsvServer& aServer);
       
   108 	~CMsvMoveEntries();
       
   109 	//
       
   110 private:
       
   111 	void DoStartL(TMsvId aSourceId, TMsvId aTargetId, TRequestStatus& aObserverStatus);
       
   112 	CMsvMoveEntries();
       
   113 	void ConstructL(CMsvServer& aServer);
       
   114 	void DoCancel();
       
   115 	//
       
   116 private:
       
   117 	CMsvMove* iMove;
       
   118 	};
       
   119 
       
   120 
       
   121 #endif