|
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 "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 // $Workfile: btsmtm.h $ |
|
15 // $Author: Stevep $ |
|
16 // $Revision: 4 $ |
|
17 // $Date: 9/11/01 15:36 $ |
|
18 // |
|
19 // |
|
20 |
|
21 |
|
22 #if !defined(__BTS_H__) |
|
23 #define __BTS_H__ |
|
24 |
|
25 #include <obexservermtm.h> |
|
26 #include <btcmtm.h> // STimeouts |
|
27 |
|
28 class CBtSrvMtm : public CObexSrvMtm |
|
29 /** |
|
30 @class |
|
31 |
|
32 Provides thin implementation of a Bluetooth server MTM over the top of the CObexSrvMtm. |
|
33 |
|
34 Implements StartCommandL() to respond to a send request from the client MTM by starting off a |
|
35 CBtServerSendOperation. |
|
36 |
|
37 @internalTechnology |
|
38 @released |
|
39 */ |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * NewL factory function. Calls ReleaseLibrary() if construction fails. |
|
45 * |
|
46 * @param aRegisteredMtmDll Registration data for MTM DLL. |
|
47 * @param aEntry Context on which to operate. |
|
48 * @return Pointer to a newly constructed CBtSrvMtm. |
|
49 * @leave KErrXXX System-wide error codes |
|
50 */ |
|
51 |
|
52 IMPORT_C static CBtSrvMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry); |
|
53 |
|
54 /** |
|
55 * Instantiates and initiates a CBtServerSemdOperation class to begin sending the specified OBEX object |
|
56 * via Bluetooth. Called in response to InvokeAsyncFunctionL() in the client MTM, and passes through |
|
57 * all the arguments passed in to that function. Only supports aCommand==CBtClientMtm::EBtcCmdSend |
|
58 * |
|
59 * @param aSelection Entry to operate on. |
|
60 * @param aCommand Command to start. Only CBtClientMtm::EBtcCmdSend is supported. |
|
61 * @param aParameter Package buffer containing timeout, port and password info needed for the send operation. |
|
62 * @param aStatus Used to notify observer of completion. |
|
63 * @leave KErrNotSupported if aCommand!=CBtClientMtm::EBtcCmdSend |
|
64 * @leave KErrXXX System-wide error codes |
|
65 */ |
|
66 |
|
67 IMPORT_C virtual void StartCommandL ( CMsvEntrySelection& aSelection, |
|
68 TInt aCommand, |
|
69 const TDesC8& aParameter, |
|
70 TRequestStatus& aStatus); |
|
71 private: |
|
72 |
|
73 /** |
|
74 * Constructor. Calls CObexSrvMtm's constructor in initialisation list. |
|
75 * @param aRegisteredMtmDll Registration data for MTM DLL. |
|
76 * @param aEntry Context on which to operate. |
|
77 */ |
|
78 |
|
79 CBtSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry); |
|
80 |
|
81 private: |
|
82 CBtClientMtm::STimeouts iTimeouts; //< Timeouts structure. One for connect and another for put. |
|
83 |
|
84 }; |
|
85 |
|
86 #endif // __BTS_H__ |