|
1 /* |
|
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: SyncML Obex plugin for Device Management |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "NSmlObexDMplugin.h" |
|
22 |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CNSmlObexPacketWaiter::CNSmlObexPacketWaiter |
|
28 // |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CNSmlObexPacketWaiter::CNSmlObexPacketWaiter(RNSmlDMObexServerSession& aSession) |
|
32 : iSession(aSession), iPtr(NULL, 0) |
|
33 { |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CNSmlObexPacketWaiter::~CNSmlObexPacketWaiter() |
|
38 // |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CNSmlObexPacketWaiter::~CNSmlObexPacketWaiter() |
|
42 { |
|
43 delete iData; |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CNSmlObexPacketWaiter::ConstructL() |
|
48 // |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 void CNSmlObexPacketWaiter::ConstructL() |
|
52 { |
|
53 iData = HBufC8::NewL(KNSmlDefaultWorkspaceSize); |
|
54 iPtr.Set( iData->Des() ); |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // CNSmlObexPacketWaiter::WaitForGetData() |
|
59 // |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 TInt CNSmlObexPacketWaiter::WaitForGetData() |
|
63 { |
|
64 TInt err( KErrNone ); |
|
65 iPtr.SetLength(0); |
|
66 err = iSession.GetSendPacket( iPtr ); |
|
67 return err; |
|
68 } |