os/kernelhwsrv/userlibandfileserver/fileserver/smassstorage/inc/rusbmassstorage.inl
Update contrib.
1 // Copyright (c) 2004-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 the License "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Implementation of client API of mass storage file server
16 // WARNING: This file contains some APIs which are internal and are subject
17 // to change without noticed. Such APIs should therefore not be used
18 // outside the Kernel and Hardware Services package.
26 inline RUsbMassStorage::RUsbMassStorage()
28 // Intentionally left blank
31 inline TVersion RUsbMassStorage::Version() const
33 return(TVersion(KUsbMsSrvMajorVersionNumber,KUsbMsSrvMinorVersionNumber,KUsbMsSrvBuildVersionNumber));
36 inline TInt RUsbMassStorage::Connect()
38 // 1: only a single session is required
39 #ifdef __T_MS_CLISVR__
40 static _LIT_SECURITY_POLICY_S0(KFileServerPolicy,0x101F7774);
42 static _LIT_SECURITY_POLICY_S0(KFileServerPolicy,KFileServerUidValue);
44 return CreateSession(KUsbMsServerName, Version(), 1, EIpcSession_Unsharable,&KFileServerPolicy,0);
48 @capability NetworkControl
50 inline TInt RUsbMassStorage::Start(const TMassStorageConfig& aMsConfig)
52 return SendReceive(EUsbMsStart, TIpcArgs(&aMsConfig.iVendorId, &aMsConfig.iProductId, &aMsConfig.iProductRev));
56 @capability NetworkControl
58 inline TInt RUsbMassStorage::Stop()
60 return SendReceive(EUsbMsStop);
64 @capability NetworkControl
66 inline TInt RUsbMassStorage::Shutdown()
68 return SendReceive(EUsbMsShutdown);