equal
deleted
inserted
replaced
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of the License "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
381 EControlRemoveStringDescriptor, |
381 EControlRemoveStringDescriptor, |
382 EControlSetOtgDescriptor, |
382 EControlSetOtgDescriptor, |
383 EControlGetOtgDescriptor, |
383 EControlGetOtgDescriptor, |
384 EControlGetOtgFeatures, |
384 EControlGetOtgFeatures, |
385 EControlRealizeInterface, |
385 EControlRealizeInterface, |
386 EControlStartNextInAlternateSetting |
386 EControlStartNextInAlternateSetting |
387 }; |
387 }; |
388 |
388 |
389 |
389 |
390 // const static TUint KFieldIdPos = 0; |
390 // const static TUint KFieldIdPos = 0; |
391 const static TUint KFieldIdMask = 0xFF; |
391 const static TUint KFieldIdMask = 0xFF; |
397 |
397 |
398 public: |
398 public: |
399 |
399 |
400 #ifndef __KERNEL_MODE__ |
400 #ifndef __KERNEL_MODE__ |
401 |
401 |
|
402 |
402 /** Opens a channel. |
403 /** Opens a channel. |
403 |
404 |
404 @param aUnit This should be 0 (zero). |
405 @param aUnit This should be 0 (zero). |
405 |
406 @param aShare if this channel can be used in another process. |
406 @return KErrNone if successful. |
407 |
407 */ |
408 @return KErrNone if successful. |
408 inline TInt Open(TInt aUnit); |
409 */ |
|
410 inline TInt Open(TInt aUnit, TBool aShare=ETrue); |
|
411 |
|
412 /** Opens a channel which has created. |
|
413 |
|
414 @param aMsg client-server message contain the handle of this channel. |
|
415 @param aPos index of message slot that contain handle. |
|
416 @param aType ownership type of the handle. |
|
417 |
|
418 @return KErrNone if successful. |
|
419 */ |
|
420 |
|
421 inline TInt Open(RMessagePtr2 aMsg, TInt aIndex, TOwnerType aType=EOwnerProcess); |
409 |
422 |
410 inline TVersion VersionRequired() const; |
423 inline TVersion VersionRequired() const; |
411 |
424 |
412 /** Stalls ep0 to signal command fault to the host. |
425 /** Stalls ep0 to signal command fault to the host. |
413 |
426 |
1293 |
1306 |
1294 @param aChunk aChunk will point to RChunk currently in use by BIL |
1307 @param aChunk aChunk will point to RChunk currently in use by BIL |
1295 @return KErrNone on success otherwise a system wide error code, if an error has occurred. |
1308 @return KErrNone on success otherwise a system wide error code, if an error has occurred. |
1296 */ |
1309 */ |
1297 IMPORT_C TInt GetDataTransferChunk(RChunk*& aChunk); |
1310 IMPORT_C TInt GetDataTransferChunk(RChunk*& aChunk); |
|
1311 /** |
|
1312 Call this function to reset alternate setting related data to initial state, |
|
1313 this API should be called when device state goes to undefined. |
|
1314 */ |
|
1315 IMPORT_C void ResetAltSetting(); |
|
1316 |
|
1317 |
1298 |
1318 |
1299 private: |
1319 private: |
|
1320 /** @internalTechnology */ |
|
1321 TInt Empty(TUint aBufferOffset); |
1300 /** @internalTechnology */ |
1322 /** @internalTechnology */ |
1301 TInt Drain(TUint aBuffer); |
1323 TInt Drain(TUint aBuffer); |
1302 /** @internalTechnology */ |
1324 /** @internalTechnology */ |
1303 TInt Peek(TUint aBuffer); |
1325 TInt Peek(TUint aBuffer); |
1304 /** @internalTechnology */ |
1326 /** @internalTechnology */ |
1485 |
1507 |
1486 @returns the endpoint number opened by this object. |
1508 @returns the endpoint number opened by this object. |
1487 */ |
1509 */ |
1488 inline TInt GetEndpointNumber(); |
1510 inline TInt GetEndpointNumber(); |
1489 |
1511 |
|
1512 inline TInt BufferNumber(); |
|
1513 |
1490 private: |
1514 private: |
1491 /** @internalTechnology */ |
1515 /** @internalTechnology */ |
1492 void Construct(RDevUsbcScClient* aClient, TUint8* aBaseAddr, const TUsbcScHdrEndpointRecord* aEpType, |
1516 void Construct(RDevUsbcScClient* aClient, TUint8* aBaseAddr, const TUsbcScHdrEndpointRecord* aEpType, |
1493 TInt aEndpointNumber, SUsbcScBufferHeader* aEndpointHdr=NULL); |
1517 TInt aEndpointNumber, SUsbcScBufferHeader* aEndpointHdr=NULL); |
1494 |
1518 |