|
1 /** |
|
2 * Copyright (c) 1997-2009 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * TRemoteLinkStatus |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @file |
|
26 @deprecated Obselete |
|
27 */ |
|
28 |
|
29 inline TRemoteLinkStatus::TRemoteLinkStatus() |
|
30 /** |
|
31 C++ constructor |
|
32 */ |
|
33 { iStatus=EDisabled; iRemoteVersion=0; } |
|
34 |
|
35 ////////////////////////////////////////////////////////////////////////////// |
|
36 // |
|
37 // RRemoteLink Deprecated methods |
|
38 // |
|
39 ////////////////////////////////////////////////////////////////////////////// |
|
40 |
|
41 inline TInt RRemoteLink::Enable(TBps aBaud, const TDesC& aPort, const TDesC& aModule, TBool /*aLowPowerMode*/) |
|
42 /** |
|
43 Set up the RRemoteLink configuration parameters and initiate a connection |
|
44 |
|
45 @param aBaud The baud rate |
|
46 @param aPort The port number |
|
47 @param aModule The module name |
|
48 @param aLowPowerMode Boolean representing low power mode |
|
49 @return KErrNone on success, standard error code on failure |
|
50 */ |
|
51 { |
|
52 |
|
53 TPlpConfigPkgSerial pkg(aBaud,aPort,aModule); |
|
54 TInt ret = SetConfig(pkg); |
|
55 return ret; |
|
56 } |
|
57 |
|
58 inline TInt RRemoteLink::Disable() |
|
59 /** |
|
60 Disable the remote link |
|
61 |
|
62 @return KErrNone on success, standard error code on failure |
|
63 */ |
|
64 { |
|
65 |
|
66 TInt ret = Disconnect(); |
|
67 return ret; |
|
68 } |
|
69 |
|
70 inline TInt RRemoteLink::Config(TBps* aBaud /*=NULL*/, TDesC* aPort /*=NULL*/, TDesC* aModule /*=NULL*/, TBool* /*aLowPowerMode*/) |
|
71 /** |
|
72 Read the current RRemoteLink configuration |
|
73 |
|
74 @param aBaud The bard rate |
|
75 @param aPort The port number |
|
76 @param aModule The module name |
|
77 @param aLowPowerMode Boolean representing if low power mode is enabled |
|
78 @return KErrNone on success, standard error code on failure |
|
79 */ |
|
80 { |
|
81 |
|
82 TPlpConfigPkgSerial pkg; |
|
83 TInt ret = Config(pkg); |
|
84 if (ret!=KErrNone) |
|
85 return ret; |
|
86 |
|
87 if (aBaud) |
|
88 *aBaud = pkg.Baud(); |
|
89 if (aPort) |
|
90 *(TDes*)aPort = pkg.PortName(); |
|
91 if (aModule) |
|
92 *(TDes*)aModule = pkg.ModuleName(); |
|
93 return KErrNone; |
|
94 } |
|
95 |
|
96 inline TInt RRemoteLink::LoadLocalServer(TPlpServiceName& aResult, const TDesC& aFileName, const TDesC& aArgs /*=TPtrC()*/, TInt aReserved /*=0*/) |
|
97 /** |
|
98 Load a local server |
|
99 |
|
100 @param aResult The service name |
|
101 @param aFileName The file name |
|
102 @param aArgs Arguments |
|
103 @param aReserved The reserved flag |
|
104 @return KErrNone on success, standard error code on failure |
|
105 */// |
|
106 // |
|
107 // |
|
108 { |
|
109 |
|
110 TRequestStatus status; |
|
111 LoadLocalServer(status,aResult,aFileName,aArgs,aReserved); |
|
112 User::WaitForRequest(status); |
|
113 return status.Int(); |
|
114 } |
|
115 |
|
116 inline TInt RRemoteLink::UnloadLocalServer(const TDesC& aFileName) |
|
117 /** |
|
118 Unload the local server |
|
119 |
|
120 @param aFileName The local server file name |
|
121 @return KErrNone on success, standard error code on failure |
|
122 */ |
|
123 { |
|
124 |
|
125 TRequestStatus status; |
|
126 UnloadLocalServer(status,aFileName); |
|
127 User::WaitForRequest(status); |
|
128 return status.Int(); |
|
129 } |
|
130 |
|
131 inline TInt RRemoteLink::EnableFileAccess(TBool /*aEnable=ETrue*/) |
|
132 /** |
|
133 Dummy implementation |
|
134 |
|
135 @param aEnable Enable file access boolean flag |
|
136 @return KErrNone on success, standard error code on failure |
|
137 */ |
|
138 { |
|
139 |
|
140 return KErrNone; |
|
141 } |
|
142 |
|
143 inline void RRemoteLink::WaitForConnect(TRequestStatus& aStatus, TRemoteLinkStatusBuf& aBuf) |
|
144 /** |
|
145 Wait for connection to complete |
|
146 |
|
147 @param aStatus The request status |
|
148 @param aBuf The remote link status buffer |
|
149 */ |
|
150 { |
|
151 |
|
152 Connect(aStatus,aBuf); |
|
153 } |