|
1 /* |
|
2 * Copyright (c) 2002 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 server internal server module |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // --------------------------------------------------------------------------------------- |
|
21 // Include |
|
22 // --------------------------------------------------------------------------------------- |
|
23 #include <nsmldebug.h> |
|
24 #include <nsmlobexclientsession.h> |
|
25 #include "nsmlobexdefs.h" |
|
26 |
|
27 // --------------------------------------------------------------------------------------- |
|
28 // RNSmlObexClientSession::DoConnect( const TDesC& aServerName ) |
|
29 // --------------------------------------------------------------------------------------- |
|
30 TInt RNSmlObexClientSession::DoConnect( const TDesC& aServerName ) |
|
31 { |
|
32 return CreateSession( aServerName, TVersion(KNSmlObexCommServerVersionMajor, KNSmlObexCommServerVersionMinor, 0) ); |
|
33 } |
|
34 |
|
35 // --------------------------------------------------------------------------------------- |
|
36 // RNSmlObexClientSession::Close() |
|
37 // --------------------------------------------------------------------------------------- |
|
38 EXPORT_C void RNSmlObexClientSession::Close() |
|
39 { |
|
40 RSessionBase::Close(); |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------------------------------------- |
|
44 // RNSmlObexClientSession::Disconnect() |
|
45 // --------------------------------------------------------------------------------------- |
|
46 EXPORT_C void RNSmlObexClientSession::Disconnect() |
|
47 { |
|
48 _DBG_FILE("RNSmlObexClientSession::Disconnect(): begin"); |
|
49 SendReceive(ENSmlObexCommCommandDisconnect, TIpcArgs ( TIpcArgs::ENothing )); |
|
50 _DBG_FILE("RNSmlObexClientSession::Disconnect(): end"); |
|
51 } |
|
52 |
|
53 // --------------------------------------------------------------------------------------- |
|
54 // RNSmlObexClientSession::Send( const TDesC8& aStartPtr ) |
|
55 // --------------------------------------------------------------------------------------- |
|
56 EXPORT_C void RNSmlObexClientSession::Send( const TDesC8& aStartPtr ) |
|
57 { |
|
58 _DBG_FILE("RNSmlObexClientSession::Send(): begin"); |
|
59 SendReceive(ENSmlObexCommCommandSend, TIpcArgs ( &aStartPtr )); |
|
60 _DBG_FILE("RNSmlObexClientSession::Send(): end"); |
|
61 } |
|
62 |
|
63 // --------------------------------------------------------------------------------------- |
|
64 // RNSmlObexClientSession::Receive( TDes8& aStartPtr, TRequestStatus& aStatus ) |
|
65 // --------------------------------------------------------------------------------------- |
|
66 EXPORT_C void RNSmlObexClientSession::Receive( TDes8& aStartPtr, TRequestStatus& aStatus ) |
|
67 { |
|
68 _DBG_FILE("RNSmlObexClientSession::Receive(): begin"); |
|
69 SendReceive(ENSmlObexCommCommandReceive, TIpcArgs ( &aStartPtr ), aStatus); |
|
70 _DBG_FILE("RNSmlObexClientSession::Receive(): end"); |
|
71 } |
|
72 |
|
73 // --------------------------------------------------------------------------------------- |
|
74 // RNSmlObexClientSession::CancelReceive() |
|
75 // --------------------------------------------------------------------------------------- |
|
76 EXPORT_C void RNSmlObexClientSession::CancelReceive() |
|
77 { |
|
78 _DBG_FILE("RNSmlObexClientSession::CancelReceive(): begin"); |
|
79 SendReceive(ENSmlObexCommCommandCancelReceive, TIpcArgs ( TIpcArgs::ENothing )); |
|
80 _DBG_FILE("RNSmlObexClientSession::CancelReceive(): end"); |
|
81 } |
|
82 // --------------------------------------------------------------------------------------- |
|
83 // RNSmlDSObexClientSession |
|
84 // --------------------------------------------------------------------------------------- |
|
85 |
|
86 // --------------------------------------------------------------------------------------- |
|
87 // TInt RNSmlDSObexClientSession::Connect() |
|
88 // --------------------------------------------------------------------------------------- |
|
89 EXPORT_C TInt RNSmlDSObexClientSession::Connect() |
|
90 { |
|
91 _DBG_FILE("RNSmlDSObexClientSession::Connect()"); |
|
92 return DoConnect( KNSmlDSObexCommServerName() ); |
|
93 } |
|
94 |
|
95 // --------------------------------------------------------------------------------------- |
|
96 // RNSmlDMObexClientSession |
|
97 // --------------------------------------------------------------------------------------- |
|
98 |
|
99 // --------------------------------------------------------------------------------------- |
|
100 // TInt RNSmlDMObexClientSession::Connect() |
|
101 // --------------------------------------------------------------------------------------- |
|
102 EXPORT_C TInt RNSmlDMObexClientSession::Connect() |
|
103 { |
|
104 _DBG_FILE("RNSmlDMObexClientSession::Connect()"); |
|
105 return DoConnect( KNSmlDMObexCommServerName() ); |
|
106 } |