DWFToolkit::DWFSignatureReader Class Reference
[DWF Package API]

#include "dwf/package/reader/SignatureReader.h"

Collaboration diagram for DWFToolkit::DWFSignatureReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class implements the required XML parsing handlers to compose toolkit signature objects from the signature resource documents and provide them via the typed callbacks.

Since:
7.2.0
This class contains the processing logic particular to the known versions of the signature documents. The algorithm is tuned specifically for this schema and is not intended to be generic.

Definition at line 61 of file SignatureReader.h.

Public Types

typedef enum DWFToolkit::DWFSignatureReader::teProviderType teProviderType
typedef DWFXMLBuildable::tUnresolvedList tUnresolvedList
 Defined data type to collect unresolved attributes during the parsing process.
enum  teProviderType {
  eProvideNone = 0x00, eProvideSignatureID = 0x01, eProvideSignature = 0x10, eProvideAttributes = 0x0F,
  eProvideElements = 0xF0, eProvideAll = 0xFF
}

Public Member Functions

_DWFTK_API DWFSignatureReader (DWFPackageReader *pPackageReader=NULL, unsigned int nProviderFlags=eProvideAll) throw ()
virtual _DWFTK_API ~DWFSignatureReader () throw ()
_DWFTK_API void setResourceObjectID (const DWFString &zObjectID) throw ()
_DWFTK_API DWFSignatureReaderfilter () const throw ()
_DWFTK_API void setFilter (DWFSignatureReader *pFilter) throw ()
_DWFTK_API void notifyStartElement (const char *zName, const char **ppAttributeList) throw ()
_DWFTK_API void notifyEndElement (const char *zName) throw ()
_DWFTK_API void notifyStartNamespace (const char *, const char *) throw ()
_DWFTK_API void notifyEndNamespace (const char *) throw ()
_DWFTK_API void notifyCharacterData (const char *zCData, int nLength) throw ()
virtual _DWFTK_API const char * provideSignatureID (const char *zId) throw ( DWFException )
virtual _DWFTK_API const DWFStringprovideReference (const DWFString &zReferenceURI) throw ( DWFException )
virtual _DWFTK_API const DWFStringprovideSignatureMethod (const DWFString &zSigMethod) throw ( DWFException )
virtual _DWFTK_API const DWFStringprovideSignatureValue (const DWFString &zSigValue) throw ( DWFException )
virtual _DWFTK_API X509DataprovideX509Data (X509Data *pX509Data) throw ( DWFException )
virtual _DWFTK_API const DWFStringprovideDigestMethod (const DWFString &zDigestMethod) throw ( DWFException )
virtual _DWFTK_API const DWFStringprovideDigestValue (const DWFString &zDigestValue) throw ( DWFException )
virtual _DWFTK_API const DWFSignatureReader::RSAKeyValueStringsprovideRSAKeyValueStrings (const DWFSignatureReader::RSAKeyValueStrings &rRSAKeyValueStrings) throw ( DWFException )
virtual _DWFTK_API const DWFSignatureReader::DSAKeyValueStringsprovideDSAKeyValueStrings (const DWFSignatureReader::DSAKeyValueStrings &pDSAKeyValueStrings) throw ( DWFException )
virtual _DWFTK_API const DWFStringprovideKeyName (const DWFString &zKeyName) throw ( DWFException )

Protected Attributes

DWFPackageReader_pPackageReader
DWFXMLElementBuilder _oDefaultElementBuilder
DWFXMLElementBuilder_pElementBuilder

Classes

struct  DSAKeyValueStrings
struct  RSAKeyValueStrings


Member Typedef Documentation

typedef enum DWFToolkit::DWFSignatureReader::teProviderType DWFToolkit::DWFSignatureReader::teProviderType
 

These enumeration flags alter the behavior of the parser by restricting which elements are inflated into runtime objects. Generally these only prevent unwanted object creation (and thus memory allocations) but in some cases, additional data processing can be avoided.


Member Enumeration Documentation

enum DWFToolkit::DWFSignatureReader::teProviderType
 

These enumeration flags alter the behavior of the parser by restricting which elements are inflated into runtime objects. Generally these only prevent unwanted object creation (and thus memory allocations) but in some cases, additional data processing can be avoided.

Enumerator:
eProvideNone  Parse the document only (no data objects will be created; no callbacks will be invoked.)
eProvideSignatureID  Invoke the provideSignatureID() callback.
eProvideSignature  Invoke the provideSignature() element callback.
eProvideAttributes  Equivalent to (eProvideSignatureID)
eProvideElements  Equivalent to (eProvideSignatures)
eProvideAll  Equivalent to (eProvideElements | eProvideAttributes)

Definition at line 72 of file SignatureReader.h.


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFSignatureReader::DWFSignatureReader DWFPackageReader pPackageReader = NULL,
unsigned int  nProviderFlags = eProvideAll
throw ()
 

Constructor

Parameters:
pPackageReader Provides the signature document stream.
nProviderFlags A combination of teProviderType flags.
Exceptions:
None 

virtual _DWFTK_API DWFToolkit::DWFSignatureReader::~DWFSignatureReader  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API DWFSignatureReader* DWFToolkit::DWFSignatureReader::filter  )  const throw () [inline]
 

User defined filter on the signature reader. The filter is used to modify the parsing behavior.

Returns:
A pointer to a filter, an object of a class derived from the signature reader with user defined behavior.
Exceptions:
None 

Definition at line 173 of file SignatureReader.h.

_DWFTK_API void DWFToolkit::DWFSignatureReader::notifyCharacterData const char *  zCData,
int  nLength
throw ()
 

_DWFTK_API void DWFToolkit::DWFSignatureReader::notifyEndElement const char *  zName  )  throw ()
 

_DWFTK_API void DWFToolkit::DWFSignatureReader::notifyEndNamespace const char *   )  throw () [inline]
 

Definition at line 218 of file SignatureReader.h.

_DWFTK_API void DWFToolkit::DWFSignatureReader::notifyStartElement const char *  zName,
const char **  ppAttributeList
throw ()
 

_DWFTK_API void DWFToolkit::DWFSignatureReader::notifyStartNamespace const char *  ,
const char * 
throw () [inline]
 

Definition at line 209 of file SignatureReader.h.

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSignatureReader::provideDigestMethod const DWFString zDigestMethod  )  throw ( DWFException ) [virtual]
 

Accepts digest method strings.

Parameters:
zDigestMethod The digest method value.
Returns:
The filtered digest method value.
Exceptions:
DWFException 

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSignatureReader::provideDigestValue const DWFString zDigestValue  )  throw ( DWFException ) [virtual]
 

Accepts digest value strings.

Parameters:
zDigestValue The digest value.
Returns:
The filtered digest value.
Exceptions:
DWFException 

virtual _DWFTK_API const DWFSignatureReader::DSAKeyValueStrings& DWFToolkit::DWFSignatureReader::provideDSAKeyValueStrings const DWFSignatureReader::DSAKeyValueStrings pDSAKeyValueStrings  )  throw ( DWFException ) [virtual]
 

Accepts DSA Key Value strings.

Parameters:
pDSAKeyValueStrings The DSA Key Value strings.
Returns:
The filtered DSA Key Value strings.
Exceptions:
DWFException 

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSignatureReader::provideKeyName const DWFString zKeyName  )  throw ( DWFException ) [virtual]
 

Accepts KeyInfo KeyName strings.

Parameters:
zKeyName The KeyName string.
Returns:
The filtered KeyName string.
Exceptions:
DWFException 

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSignatureReader::provideReference const DWFString zReferenceURI  )  throw ( DWFException ) [virtual]
 

Accepts references.

Parameters:
zReferenceURI The reference URI.
Returns:
The filtered reference URI.
Exceptions:
DWFException 

virtual _DWFTK_API const DWFSignatureReader::RSAKeyValueStrings& DWFToolkit::DWFSignatureReader::provideRSAKeyValueStrings const DWFSignatureReader::RSAKeyValueStrings rRSAKeyValueStrings  )  throw ( DWFException ) [virtual]
 

Accepts RSA Key Value strings.

Parameters:
rRSAKeyValueStrings The RSA Key Value strings.
Returns:
The filtered RSA Key Value strings.
Exceptions:
DWFException 

virtual _DWFTK_API const char* DWFToolkit::DWFSignatureReader::provideSignatureID const char *  zId  )  throw ( DWFException ) [virtual]
 

Accepts the signature id attribute.

Parameters:
zId The signature id.
Returns:
The filtered signature id.
Exceptions:
DWFException 

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSignatureReader::provideSignatureMethod const DWFString zSigMethod  )  throw ( DWFException ) [virtual]
 

Accepts signature method strings.

Parameters:
zSigMethod The signature method.
Returns:
The filtered signature method.
Exceptions:
DWFException 

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSignatureReader::provideSignatureValue const DWFString zSigValue  )  throw ( DWFException ) [virtual]
 

Accepts signature value strings.

Parameters:
zSigValue The signature value.
Returns:
The filtered signature value.
Exceptions:
DWFException 

virtual _DWFTK_API X509Data* DWFToolkit::DWFSignatureReader::provideX509Data X509Data pX509Data  )  throw ( DWFException ) [virtual]
 

Accepts X509 Data Elements.

Note that the recipient of this call must take ownership of the X509Data object, and eventually free it by calling DWFCORE_FREE_OBJECT.

Parameters:
pX509Data The X509 Data Element.
Returns:
The filtered X509 Data Element.
Exceptions:
DWFException 

_DWFTK_API void DWFToolkit::DWFSignatureReader::setFilter DWFSignatureReader pFilter  )  throw ()
 

Use this to set the filter on the reader to modify the parsing behavior.

Exceptions:
None 

_DWFTK_API void DWFToolkit::DWFSignatureReader::setResourceObjectID const DWFString zObjectID  )  throw ()
 

To read a resource using the signature reader, the reader needs to know the object ID of the resource it will read. If this is null the reader will throw an exception later.

Parameters:
zObjectID The object ID of the resource being read in.
Exceptions:
None 


Member Data Documentation

DWFXMLElementBuilder DWFToolkit::DWFSignatureReader::_oDefaultElementBuilder [protected]
 

Default building behavior and element object allocator for readers.

Definition at line 399 of file SignatureReader.h.

DWFXMLElementBuilder* DWFToolkit::DWFSignatureReader::_pElementBuilder [protected]
 

This will point to the default builder initially. But implementation classes can alter this pointer as necessary but they should all use only this pointer to do the actual work.

Definition at line 406 of file SignatureReader.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:40:32 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5