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: IRS.H $
|
williamr@2
|
15 |
// $Author: Stevep $
|
williamr@2
|
16 |
// $Revision: 3 $
|
williamr@2
|
17 |
// $Date: 9/11/01 15:29 $
|
williamr@2
|
18 |
//
|
williamr@2
|
19 |
//
|
williamr@2
|
20 |
|
williamr@2
|
21 |
|
williamr@2
|
22 |
#if !defined(__IRS_H__)
|
williamr@2
|
23 |
#define __IRS_H__
|
williamr@2
|
24 |
|
williamr@2
|
25 |
#include <obexservermtm.h>
|
williamr@2
|
26 |
#include <ircmtm.h> // STimeouts
|
williamr@2
|
27 |
#include <obexconstants.h>
|
williamr@2
|
28 |
|
williamr@2
|
29 |
class CIrHeader;
|
williamr@2
|
30 |
|
williamr@2
|
31 |
class CIrSrvMtm : public CObexSrvMtm
|
williamr@2
|
32 |
/**
|
williamr@2
|
33 |
@internalTechnology
|
williamr@2
|
34 |
@released
|
williamr@2
|
35 |
*/
|
williamr@2
|
36 |
{
|
williamr@2
|
37 |
public:
|
williamr@2
|
38 |
|
williamr@2
|
39 |
/**
|
williamr@2
|
40 |
* NewL factory function. Calls ReleaseLibrary() if construction fails.
|
williamr@2
|
41 |
*
|
williamr@2
|
42 |
* @param aRegisteredMtmDll Registration data for MTM DLL.
|
williamr@2
|
43 |
* @param aEntry Context on which to operate.
|
williamr@2
|
44 |
* @return Pointer to a newly constructed CIrSrvMtm.
|
williamr@2
|
45 |
* @leave KErrXXX System-wide error codes
|
williamr@2
|
46 |
*/
|
williamr@2
|
47 |
|
williamr@2
|
48 |
IMPORT_C static CIrSrvMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry);
|
williamr@2
|
49 |
|
williamr@2
|
50 |
/**
|
williamr@2
|
51 |
* Instantiates and initiates a CIrServerSemdOperation class to begin sending the specified OBEX object
|
williamr@2
|
52 |
* via Infrared. Called in response to InvokeAsyncFunctionL() in the client MTM, and passes through
|
williamr@2
|
53 |
* all the arguments passed in to that function. Only supports aCommand==EIrMtmCmdSend
|
williamr@2
|
54 |
* @param aSelection Entry to operate on.
|
williamr@2
|
55 |
* @param aCommand Command to start. Only EIrMtmCmdSend is supported.
|
williamr@2
|
56 |
* @param aParameter Package buffer containing timeout, port and password info needed for the send operation.
|
williamr@2
|
57 |
* @param aStatus Used to notify observer of completion.
|
williamr@2
|
58 |
* @leave KErrNotSupported if aCommand!=EIrMtmCmdSend
|
williamr@2
|
59 |
* @leave KErrXXX if aCommand!= EIrMtmCmdSend
|
williamr@2
|
60 |
*/
|
williamr@2
|
61 |
|
williamr@2
|
62 |
IMPORT_C virtual void StartCommandL ( CMsvEntrySelection& aSelection,
|
williamr@2
|
63 |
TInt aCommand,
|
williamr@2
|
64 |
const TDesC8& aParameter,
|
williamr@2
|
65 |
TRequestStatus& aStatus);
|
williamr@2
|
66 |
|
williamr@2
|
67 |
/**
|
williamr@2
|
68 |
* Destructor. Deletes the header member
|
williamr@2
|
69 |
*/
|
williamr@2
|
70 |
|
williamr@2
|
71 |
IMPORT_C ~CIrSrvMtm();
|
williamr@2
|
72 |
|
williamr@2
|
73 |
/**
|
williamr@2
|
74 |
* Obtains progress information, which, if valid, results in calling Send()
|
williamr@2
|
75 |
*/
|
williamr@2
|
76 |
|
williamr@2
|
77 |
IMPORT_C void DoRunL();
|
williamr@2
|
78 |
|
williamr@2
|
79 |
private:
|
williamr@2
|
80 |
|
williamr@2
|
81 |
/**
|
williamr@2
|
82 |
* Constructor. Calls CObexSrvMtm's constructor in initialisation list.
|
williamr@2
|
83 |
* @param aRegisteredMtmDll Registration data for MTM DLL.
|
williamr@2
|
84 |
* @param aEntry Context on which to operate.
|
williamr@2
|
85 |
*/
|
williamr@2
|
86 |
|
williamr@2
|
87 |
CIrSrvMtm::CIrSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry);
|
williamr@2
|
88 |
|
williamr@2
|
89 |
/**
|
williamr@2
|
90 |
* Creates a server send operation to perform the send
|
williamr@2
|
91 |
*/
|
williamr@2
|
92 |
|
williamr@2
|
93 |
void SendL();
|
williamr@2
|
94 |
|
williamr@2
|
95 |
private:
|
williamr@2
|
96 |
CIrClientMtm::STimeouts iTimeouts; ///< Timeout structure contains connect timeout and a put timeout
|
williamr@2
|
97 |
CIrHeader* iHeader; ///< Infrared OBEX header information
|
williamr@2
|
98 |
TBool iFirstSendAttempt; ///< Boolean value ETrue if it is the first send attempt
|
williamr@2
|
99 |
TObexIrProtocolInfo iProtocolInfo; ///< Protocol info to initialise the CObexClient. Non-const because the CObexClient's NewL() takes a non-const reference
|
williamr@2
|
100 |
};
|
williamr@2
|
101 |
|
williamr@2
|
102 |
#endif // __IRS_H__
|