williamr@2
|
1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
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
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
// $Workfile: obexServerMtm.h $
|
williamr@2
|
15 |
// $Author: Stevep $
|
williamr@2
|
16 |
// $Revision: 9 $
|
williamr@2
|
17 |
// $Date: 12/12/01 15:56 $
|
williamr@2
|
18 |
//
|
williamr@2
|
19 |
//
|
williamr@2
|
20 |
|
williamr@2
|
21 |
|
williamr@2
|
22 |
#if !defined(__OBEXSERVERMTM_H__)
|
williamr@2
|
23 |
#define __OBEXSERVERMTM_H__
|
williamr@2
|
24 |
|
williamr@2
|
25 |
|
williamr@2
|
26 |
#if !defined(__MTSR_H__)
|
williamr@2
|
27 |
#include <mtsr.h>
|
williamr@2
|
28 |
#endif
|
williamr@2
|
29 |
|
williamr@2
|
30 |
#include <obexclientmtm.h>
|
williamr@2
|
31 |
|
williamr@2
|
32 |
class CObexServerSendOperation;
|
williamr@2
|
33 |
class CObexSrvMtm : public CBaseServerMtm
|
williamr@2
|
34 |
/**
|
williamr@2
|
35 |
@internalTechnology
|
williamr@2
|
36 |
@released
|
williamr@2
|
37 |
*/
|
williamr@2
|
38 |
{
|
williamr@2
|
39 |
public:
|
williamr@2
|
40 |
enum TObexMtmOperations
|
williamr@2
|
41 |
{
|
williamr@2
|
42 |
EObexMtmUiNullOp,
|
williamr@2
|
43 |
EObexMtmUiObexSend
|
williamr@2
|
44 |
};
|
williamr@2
|
45 |
|
williamr@2
|
46 |
public:
|
williamr@2
|
47 |
|
williamr@2
|
48 |
/**
|
williamr@2
|
49 |
* Destructor: Cancels active object (this)s
|
williamr@2
|
50 |
*/
|
williamr@2
|
51 |
|
williamr@2
|
52 |
IMPORT_C ~CObexSrvMtm();
|
williamr@2
|
53 |
|
williamr@2
|
54 |
IMPORT_C virtual void CopyToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
|
williamr@2
|
55 |
IMPORT_C virtual void MoveToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
|
williamr@2
|
56 |
|
williamr@2
|
57 |
|
williamr@2
|
58 |
/**
|
williamr@2
|
59 |
* Copies a selection of entries from a local location to a remote location
|
williamr@2
|
60 |
* N.B. Leaves as not supported
|
williamr@2
|
61 |
*
|
williamr@2
|
62 |
* @param aSelection The collection of message index entries for which the copy is required
|
williamr@2
|
63 |
* @param aServiceId The entry ID of the service by which the entries should be transferred
|
williamr@2
|
64 |
* @param aStatus Indicates operation completion
|
williamr@2
|
65 |
*/
|
williamr@2
|
66 |
|
williamr@2
|
67 |
IMPORT_C virtual void CopyFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
|
williamr@2
|
68 |
IMPORT_C virtual void MoveFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
|
williamr@2
|
69 |
IMPORT_C virtual void CopyWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
|
williamr@2
|
70 |
IMPORT_C virtual void MoveWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
|
williamr@2
|
71 |
IMPORT_C void DeleteL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);
|
williamr@2
|
72 |
IMPORT_C virtual void DeleteAllL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);
|
williamr@2
|
73 |
IMPORT_C virtual void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
|
williamr@2
|
74 |
IMPORT_C virtual void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
|
williamr@2
|
75 |
//
|
williamr@2
|
76 |
//STP now defined in the base classes
|
williamr@2
|
77 |
//IMPORT_C virtual void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus);
|
williamr@2
|
78 |
//
|
williamr@2
|
79 |
IMPORT_C virtual TBool CommandExpected();
|
williamr@2
|
80 |
|
williamr@2
|
81 |
/**
|
williamr@2
|
82 |
* Obtains progress from the send operation and copies it into the iProgress member
|
williamr@2
|
83 |
*
|
williamr@2
|
84 |
* @return a TBufPckg<TImSmtpProgress maintained by the instantiated CMsgImOutboxSend object
|
williamr@2
|
85 |
*/
|
williamr@2
|
86 |
|
williamr@2
|
87 |
IMPORT_C virtual const TDesC8& Progress();
|
williamr@2
|
88 |
|
williamr@2
|
89 |
/**
|
williamr@2
|
90 |
* Sets message entry to be sent to aEntry
|
williamr@2
|
91 |
*
|
williamr@2
|
92 |
* @param aEntry message server entry (service)
|
williamr@2
|
93 |
*/
|
williamr@2
|
94 |
|
williamr@2
|
95 |
IMPORT_C void SetInitialEntry(CMsvServerEntry* aEntry);
|
williamr@2
|
96 |
|
williamr@2
|
97 |
protected:
|
williamr@2
|
98 |
|
williamr@2
|
99 |
/**
|
williamr@2
|
100 |
* Constructor
|
williamr@2
|
101 |
*
|
williamr@2
|
102 |
* @param aRegisterMtmDll registration data for MTM dll
|
williamr@2
|
103 |
* @param aEntry Message Server entry to operate upon
|
williamr@2
|
104 |
*/
|
williamr@2
|
105 |
|
williamr@2
|
106 |
IMPORT_C CObexSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry);
|
williamr@2
|
107 |
|
williamr@2
|
108 |
/**
|
williamr@2
|
109 |
* Second phase constructor adds Obex server Mtm (this) to the active scheduler
|
williamr@2
|
110 |
*/
|
williamr@2
|
111 |
|
williamr@2
|
112 |
IMPORT_C void ConstructL();
|
williamr@2
|
113 |
|
williamr@2
|
114 |
/**
|
williamr@2
|
115 |
* Cancels the obex send operation
|
williamr@2
|
116 |
*/
|
williamr@2
|
117 |
|
williamr@2
|
118 |
IMPORT_C virtual void DoCancel();
|
williamr@2
|
119 |
IMPORT_C virtual void DoRunL();
|
williamr@2
|
120 |
IMPORT_C virtual void DoComplete(TInt aError);
|
williamr@2
|
121 |
|
williamr@2
|
122 |
protected:
|
williamr@2
|
123 |
CMsvServerEntry* iEntry; //< entry to send
|
williamr@2
|
124 |
CObexServerSendOperation* iSendOperation; //< used by the derived classes to hold the send operation of the appropriate derived type
|
williamr@2
|
125 |
TRequestStatus* iReportStatus;
|
williamr@2
|
126 |
|
williamr@2
|
127 |
|
williamr@2
|
128 |
private:
|
williamr@2
|
129 |
TPckgBuf<TObexMtmProgress> iProgress; //<progress buffer holds a local copy of iSendOperation's progress
|
williamr@2
|
130 |
};
|
williamr@2
|
131 |
|
williamr@2
|
132 |
#endif // __OBEXSERVERMTM_H__
|