equal
deleted
inserted
replaced
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-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". |
526 public: |
526 public: |
527 IMPORT_C TUsbOTGDescriptor(); |
527 IMPORT_C TUsbOTGDescriptor(); |
528 IMPORT_C static TUsbOTGDescriptor* Cast(TUsbGenericDescriptor* aOriginal); |
528 IMPORT_C static TUsbOTGDescriptor* Cast(TUsbGenericDescriptor* aOriginal); |
529 |
529 |
530 public: |
530 public: |
531 static const TInt KSizeInOctets = 3; |
531 static const TInt KSizeInOctets = 3; //OTG1.3 otg descriptor length |
532 enum TFieldOffsets |
532 enum TFieldOffsets |
533 { |
533 { |
534 EbmAttributes = 2 |
534 EbmLength = 0, |
|
535 EbmAttributes = 2, |
|
536 EbcdOTG = 3 |
535 }; |
537 }; |
536 |
538 |
537 public: |
539 public: |
538 IMPORT_C TUint8 Attributes() const; |
540 IMPORT_C TUint8 Attributes() const; |
539 IMPORT_C TBool HNPSupported() const; |
541 IMPORT_C TBool HNPSupported() const; |
540 IMPORT_C TBool SRPSupported() const; |
542 IMPORT_C TBool SRPSupported() const; |
|
543 IMPORT_C TUint16 BcdOTG() const; |
541 public: |
544 public: |
542 static TUsbOTGDescriptor* ParseL(TPtrC8& aUsbDes, TUsbGenericDescriptor* aPreviousDesc); |
545 static TUsbOTGDescriptor* ParseL(TPtrC8& aUsbDes, TUsbGenericDescriptor* aPreviousDesc); |
543 virtual TBool IsParent(TUsbGenericDescriptor& aPotentialParent); |
546 virtual TBool IsParent(TUsbGenericDescriptor& aPotentialParent); |
544 virtual TBool IsPeer(TUsbGenericDescriptor& aPotentialPeer); |
547 virtual TBool IsPeer(TUsbGenericDescriptor& aPotentialPeer); |
|
548 static TBool IsValidOTGDescriptorLength(TUint8 aLength); |
545 }; |
549 }; |
546 |
550 |
547 |
551 |
548 #endif // D32USBDESCRIPTORS_H |
552 #endif // D32USBDESCRIPTORS_H |