2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
29 inline TRemoteLinkStatus::TRemoteLinkStatus()
33 { iStatus=EDisabled; iRemoteVersion=0; }
35 //////////////////////////////////////////////////////////////////////////////
37 // RRemoteLink Deprecated methods
39 //////////////////////////////////////////////////////////////////////////////
41 inline TInt RRemoteLink::Enable(TBps aBaud, const TDesC& aPort, const TDesC& aModule, TBool /*aLowPowerMode*/)
43 Set up the RRemoteLink configuration parameters and initiate a connection
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
53 TPlpConfigPkgSerial pkg(aBaud,aPort,aModule);
54 TInt ret = SetConfig(pkg);
58 inline TInt RRemoteLink::Disable()
60 Disable the remote link
62 @return KErrNone on success, standard error code on failure
66 TInt ret = Disconnect();
70 inline TInt RRemoteLink::Config(TBps* aBaud /*=NULL*/, TDesC* aPort /*=NULL*/, TDesC* aModule /*=NULL*/, TBool* /*aLowPowerMode*/)
72 Read the current RRemoteLink configuration
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
82 TPlpConfigPkgSerial pkg;
83 TInt ret = Config(pkg);
90 *(TDes*)aPort = pkg.PortName();
92 *(TDes*)aModule = pkg.ModuleName();
96 inline TInt RRemoteLink::LoadLocalServer(TPlpServiceName& aResult, const TDesC& aFileName, const TDesC& aArgs /*=TPtrC()*/, TInt aReserved /*=0*/)
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
110 TRequestStatus status;
111 LoadLocalServer(status,aResult,aFileName,aArgs,aReserved);
112 User::WaitForRequest(status);
116 inline TInt RRemoteLink::UnloadLocalServer(const TDesC& aFileName)
118 Unload the local server
120 @param aFileName The local server file name
121 @return KErrNone on success, standard error code on failure
125 TRequestStatus status;
126 UnloadLocalServer(status,aFileName);
127 User::WaitForRequest(status);
131 inline TInt RRemoteLink::EnableFileAccess(TBool /*aEnable=ETrue*/)
135 @param aEnable Enable file access boolean flag
136 @return KErrNone on success, standard error code on failure
143 inline void RRemoteLink::WaitForConnect(TRequestStatus& aStatus, TRemoteLinkStatusBuf& aBuf)
145 Wait for connection to complete
147 @param aStatus The request status
148 @param aBuf The remote link status buffer
152 Connect(aStatus,aBuf);