epoc32/include/obexservermtm.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // $Workfile: obexServerMtm.h $
    15 // $Author: Stevep $
    16 // $Revision: 9 $
    17 // $Date: 12/12/01 15:56 $
    18 // 
    19 //
    20 
    21 
    22 #if !defined(__OBEXSERVERMTM_H__)
    23 #define __OBEXSERVERMTM_H__
    24 
    25 
    26 #if !defined(__MTSR_H__)
    27 #include <mtsr.h>
    28 #endif
    29 
    30 #include <obexclientmtm.h>
    31 
    32 class CObexServerSendOperation;
    33 class CObexSrvMtm : public CBaseServerMtm
    34 /**
    35 @internalTechnology
    36 @released
    37 */
    38 	{
    39 public:
    40 	enum TObexMtmOperations
    41 		{
    42 		EObexMtmUiNullOp,
    43 		EObexMtmUiObexSend
    44 		};
    45 
    46 public:
    47 	
    48 	/**
    49 	 * Destructor: Cancels active object (this)s
    50 	 */
    51 	
    52 	IMPORT_C ~CObexSrvMtm();
    53 
    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);
    56 	
    57 	
    58 	/**
    59 	 * Copies a selection of entries from a local location to a remote location
    60 	 * N.B. Leaves as not supported
    61 	 *
    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
    65 	 */
    66 	
    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);
    75 	//
    76 	//STP now defined in the base classes
    77 	//IMPORT_C virtual void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus);
    78 	//
    79 	IMPORT_C virtual TBool CommandExpected();
    80 	
    81 	/**
    82 	 * Obtains progress from the send operation and copies it into the iProgress member
    83 	 * 
    84 	 * @return a TBufPckg<TImSmtpProgress maintained by the instantiated CMsgImOutboxSend object
    85 	 */
    86 
    87 	IMPORT_C virtual const TDesC8& Progress();
    88 	
    89 	/**
    90 	 * Sets message entry to be sent to aEntry
    91 	 *
    92 	 * @param aEntry message server entry (service)
    93 	 */
    94 	
    95 	IMPORT_C void SetInitialEntry(CMsvServerEntry* aEntry);
    96 
    97 protected:
    98 
    99 	/**
   100 	 * Constructor
   101 	 *
   102 	 * @param aRegisterMtmDll	registration data for MTM dll
   103 	 * @param aEntry			Message Server entry to operate upon
   104 	 */
   105 
   106 	IMPORT_C CObexSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry);
   107 	
   108 	/**
   109 	 * Second phase constructor adds Obex server Mtm (this) to the active scheduler
   110 	 */
   111 
   112 	IMPORT_C void ConstructL();
   113 	
   114 	/**
   115 	 * Cancels the obex send operation
   116 	 */
   117 	
   118 	IMPORT_C virtual void DoCancel();
   119 	IMPORT_C virtual void DoRunL();
   120 	IMPORT_C virtual void DoComplete(TInt aError);
   121 
   122 protected:
   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;
   126 
   127 
   128 private:
   129 	TPckgBuf<TObexMtmProgress>	iProgress;	//<progress buffer holds a local copy of iSendOperation's progress
   130 	};
   131 
   132 #endif  // __OBEXSERVERMTM_H__