1 // Copyright (c) 2001-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // $Workfile: obexServerMtm.h $
17 // $Date: 12/12/01 15:56 $
22 #if !defined(__OBEXSERVERMTM_H__)
23 #define __OBEXSERVERMTM_H__
26 #if !defined(__MTSR_H__)
30 #include <obexclientmtm.h>
32 class CObexServerSendOperation;
33 class CObexSrvMtm : public CBaseServerMtm
40 enum TObexMtmOperations
49 * Destructor: Cancels active object (this)s
52 IMPORT_C ~CObexSrvMtm();
54 IMPORT_C virtual void CopyToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
55 IMPORT_C virtual void MoveToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
59 * Copies a selection of entries from a local location to a remote location
60 * N.B. Leaves as not supported
62 * @param aSelection The collection of message index entries for which the copy is required
63 * @param aServiceId The entry ID of the service by which the entries should be transferred
64 * @param aStatus Indicates operation completion
67 IMPORT_C virtual void CopyFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
68 IMPORT_C virtual void MoveFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
69 IMPORT_C virtual void CopyWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
70 IMPORT_C virtual void MoveWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
71 IMPORT_C void DeleteL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);
72 IMPORT_C virtual void DeleteAllL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);
73 IMPORT_C virtual void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
74 IMPORT_C virtual void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
76 //STP now defined in the base classes
77 //IMPORT_C virtual void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus);
79 IMPORT_C virtual TBool CommandExpected();
82 * Obtains progress from the send operation and copies it into the iProgress member
84 * @return a TBufPckg<TImSmtpProgress maintained by the instantiated CMsgImOutboxSend object
87 IMPORT_C virtual const TDesC8& Progress();
90 * Sets message entry to be sent to aEntry
92 * @param aEntry message server entry (service)
95 IMPORT_C void SetInitialEntry(CMsvServerEntry* aEntry);
102 * @param aRegisterMtmDll registration data for MTM dll
103 * @param aEntry Message Server entry to operate upon
106 IMPORT_C CObexSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry);
109 * Second phase constructor adds Obex server Mtm (this) to the active scheduler
112 IMPORT_C void ConstructL();
115 * Cancels the obex send operation
118 IMPORT_C virtual void DoCancel();
119 IMPORT_C virtual void DoRunL();
120 IMPORT_C virtual void DoComplete(TInt aError);
123 CMsvServerEntry* iEntry; //< entry to send
124 CObexServerSendOperation* iSendOperation; //< used by the derived classes to hold the send operation of the appropriate derived type
125 TRequestStatus* iReportStatus;
129 TPckgBuf<TObexMtmProgress> iProgress; //<progress buffer holds a local copy of iSendOperation's progress
132 #endif // __OBEXSERVERMTM_H__