messagingfw/msgsrvnstore/server/inc/MSVCMBSE.H
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 1999-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(__MSVCMBSE_H__)
       
    17 #define __MSVCMBSE_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 //**********************************
       
    28 // CMsvCopyMoveEntriesBase
       
    29 //**********************************
       
    30 //
       
    31 //
       
    32 //
       
    33 
       
    34 class CMsvCopyMoveEntriesBase : public CActive
       
    35 /**
       
    36 @internalComponent
       
    37 @released
       
    38 */
       
    39 	{
       
    40 public:
       
    41 	~CMsvCopyMoveEntriesBase();
       
    42 	//
       
    43 	void StartL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aObserverStatus);
       
    44 	//
       
    45 	inline const CMsvEntrySelection& FailedIds() const;
       
    46 	inline const CMsvEntrySelection& CompletedIds() const;
       
    47 	inline TMsvId TargetId() const;
       
    48 	//
       
    49 protected:
       
    50 	CMsvCopyMoveEntriesBase();
       
    51 	void ConstructL();
       
    52 	//
       
    53 	virtual void DoStartL(TMsvId aSourceId, TMsvId aTargetId, TRequestStatus& aObserverStatus)=0;
       
    54 	void RunL();
       
    55 	//
       
    56 private:
       
    57 	TBool StartNext();
       
    58 	void DoStartNextL();
       
    59 	//
       
    60 protected:
       
    61 	TRequestStatus* iObserverStatus;
       
    62 private:
       
    63 	CMsvEntrySelection* iFailedIds;
       
    64 	CMsvEntrySelection* iCompletedIds;
       
    65 	TInt iCurrentIndex;
       
    66 	TMsvId iTargetId;
       
    67 	TInt iError;
       
    68 	};
       
    69 
       
    70 inline const CMsvEntrySelection& CMsvCopyMoveEntriesBase::FailedIds() const
       
    71 	{
       
    72 	return *iFailedIds;
       
    73 	}
       
    74 
       
    75 inline const CMsvEntrySelection& CMsvCopyMoveEntriesBase::CompletedIds() const
       
    76 	{
       
    77 	return *iCompletedIds;
       
    78 	}
       
    79 
       
    80 inline TMsvId CMsvCopyMoveEntriesBase::TargetId() const
       
    81 	{
       
    82 	return iTargetId;
       
    83 	}
       
    84 
       
    85 #endif