UsbDescriptorParser Class Reference
class UsbDescriptorParser
|
The Symbian USB Descriptor Parsing Framework class.
This class is to aid users of USBDI by providing the facilities to parse the raw descriptor data into wrapper classes that allow access to the fields in the descriptor bodies, and pointers to map the serial data blob into the tree structure that descriptors logically have.
Intended to be available to 3rd parties later
Member Functions Documentation
BuildTreeL(TUsbGenericDescriptor &, TUsbGenericDescriptor &)
FindParserAndParseAndCheckL(TPtrC8 &, TUsbGenericDescriptor *)
FindParserAndParseL(TPtrC8 &, TUsbGenericDescriptor *)
FindSuitableParentL(TUsbGenericDescriptor &, TUsbGenericDescriptor &)
Parse(const TDesC8 &, TUsbGenericDescriptor *&)
The main parsing function of the USB descriptor parsing framework.
This will perform a best effort parse of a USB descriptor tree. It is best effort in the fact that upon encountering a form of syntatic corruption in the source data it will error the parse attempt, but also return the incomplete descriptor tree up to the parsing error.
Parameters
const
TDesC8
& aUsbDes
|
The source data that will be parsed.
|
TUsbGenericDescriptor
*& aDesc
|
The pointer that will be updated to the top-level descriptor.
|
ParseDescriptorTreeL(TPtrC8 &, TUsbGenericDescriptor &)
RegisterCustomParserL(TUsbDescriptorParserL)
The function to register a custom parsing routine in the USB descriptor parser framework.
The routine is registered locally to the current thread, and so if an application wishes to perform the same custom parsing in multiple threads, it must call this function with the appropriate routine in each thread context.
If the custom routine becomes unapplicable after being registered, the application may unregister it using the
UsbDescriptorParser::UnregisterCustomParser
function.
UsbDescriptorParser::UnregisterCustomParser
Parameters
TUsbDescriptorParserL
aParserFunc
|
The routine which will be added to the USB descriptor parsing framework.
|
UnknownUsbDescriptorParserL(TPtrC8 &, TUsbGenericDescriptor *)
UnregisterCustomParser(TUsbDescriptorParserL)
The function to unregister a custom parsing routine in the USB descriptor parser framework.
This routine will only unregister the routine from the current thread context. If the routine is registered in multiple threads and it is no longer wanted in any thread, an application must call this function in each thread context that the routine is registered.
It is safe to call this function even if RegisterCustomParserL has never been called successfully.
UsbDescriptorParser::RegisterCustomParserL
Parameters
TUsbDescriptorParserL
aParserFunc
|
The routine which will be removed from the USB descriptor parsing framework.
|
Member Type Definitions Documentation
Typedef TUsbDescriptorParserL
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.