TUsbGenericDescriptor Class Reference
class TUsbGenericDescriptor |
Base class for USB descriptors. All USB descriptors contain type and length, and may have peers and children.
Intended to be available to 3rd parties later
Constructor & Destructor Documentation
TUsbGenericDescriptor()
IMPORT_C | TUsbGenericDescriptor | ( | ) | |
Member Functions Documentation
Cleanup(TAny *)
IMPORT_C void | Cleanup | ( | TAny * | aPtr | ) | [private, static] |
Parameters
TAny * aPtr | The TUsbGenericDescriptor that is to be cleaned up. |
DestroyTree()
IMPORT_C void | DestroyTree | ( | ) | |
Deletes all child and peer descriptors. Does not delete this descriptor, the caller is responsible for doing this separately.
IsChild(TUsbGenericDescriptor &)
This function determines whether the given USB descriptor is a child of the descriptor the method is called on. The implementation may be specialised for each type of descriptor to ensure the tree is correctly built up.
IsParent(TUsbGenericDescriptor &)
This function determines whether the given USB descriptor is a parent of the descriptor the method is called on. The implementation may be specialised for each type of descriptor to ensure the tree is correctly built up.
IsPeer(TUsbGenericDescriptor &)
This function determines whether the given USB descriptor is a peer of the descriptor the method is called on. The implementation may be specialised for each type of descriptor to ensure the tree is correctly built up.
TUint16At(TInt)
Utility method to retrieve a TUint16 value from a given offset in the descriptor.
Parameters
TInt aOffset | The offset in the binary blob at which to retrieve the value. |
TUint32At(TInt)
Utility method to retrieve a TUint32 value from a given offset in the descriptor.
Parameters
TInt aOffset | The offset in the binary blob at which to retrieve the value. |
TUint8At(TInt)
Utility method to retrieve a TUint8 value from a given offset in the descriptor.
Parameters
TInt aOffset | The offset in the binary blob at which to retrieve the value. |
WalkAndDelete(TUsbGenericDescriptor *)
operator TCleanupItem()
operator TCleanupItem | ( | ) | [inline] |
operator=(const TUsbGenericDescriptor &)
Member Enumerations Documentation
Enum TUsbGenericDescriptorFlags
The flag to indicate whether the USB descriptor has been recognised and parsed.
Enumerators
EUnrecognised = 0x00 | |
ERecognised = 0x01 | |
Member Data Documentation
const TInt KbDescriptorTypeOffset
const TInt | KbDescriptorTypeOffset | [static] |
The offset in a standard USB descriptor to the bDescriptorType field.
const TInt KbLengthOffset
const TInt | KbLengthOffset | [static] |
The offset in a standard USB descriptor to the bLength field.
TPtrC8
iBlob
The binary blob that contains this descriptor
TUsbGenericDescriptor * iFirstChild
A pointer to the first child of this descriptor, or NULL. As an example, an interface descriptor will contain a pointer to the first endpoint descriptor on the interface. The iNextPeer member can then be used to examine other endpoints on the interface.
TUsbGenericDescriptor * iNextPeer
A pointer to the next peer of this descriptor, or NULL. As an example, an endpoint descriptor will contain pointers to any other endpoint descriptors on the same interface.
TUsbGenericDescriptor * iParent
A pointer to the parent to this descriptor, or NULL. As an example an endpoint descriptor from a configuration bundle will have the interface that it is a member of as it's parent.
TUint8
iRecognisedAndParsed
Flag to show if the descriptor has been recognised and parsed, or if its data can only be represented as a binary blob. This field should particularly be checked if writing code which may run on older versions of the operating system, where a (now) known descriptor may not have been parsed, or before parsing a new descriptor from a blob, where later versions of the operating system may have already extracted the fields.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.