NativeInterface.h

This HTML document was auto-generated from NativeInterface.h

Interface: XmlDocument

/*****************************************************************
Interface: XmlDocument
Desc:	Allows access to an XML document through three methods, a 
DOM tree view, a serialized stream view, and a SAX event
view.
Notes: 
*****************************************************************/

Method: XmlDocument::getDocumentBytes

//=========================================================================
// Method:	getDocumentBytes
// Desc:	Return the XML document as a serialized byte array
// 
// Notes:
//			The encoding must be a standard XML encoding string:
//				Example: "ASCII", "UTF-8", "UTF-16"
//
//			This will return 0 if there is no data or the desired encoding
//			is not supported. "US-ASCII" shall always be supported.
//=========================================================================

C++ Signature

const unsigned char *
XmlDocument::getDocumentBytes(
	const unicode * encoding,                       //desired encoding
	int endian,                                     //
	int * length                                    //pointer to a variable to receive length of array in bytes
);


Method: XmlDocument::getDocument

//=========================================================================
// Method:	getDocument
// Desc:	Return the XML document as a DOM tree.
// 
// Notes:	The returned Document object belongs to the XmlDocument object.
//			No attempt must be made to delete it.
//=========================================================================

C++ Signature

Document *
XmlDocument::getDocument(
);


Method: XmlDocument::getDocumentSAX

//=========================================================================
// Method:	getDocumentSAX
// Desc:	Return a SAX Parser interface through which the caller can get
//			a series of events describing the document.
// 
// Notes:	The caller must also call getDocumentInputSource() to get
//			the InputSource for use with the Parser's parse() method.
//=========================================================================

C++ Signature

Parser *
XmlDocument::getDocumentSAX(
);


Method: XmlDocument::getDocumentInputSource

//=========================================================================
// Method:	getDocumentInputSource
// Desc:	Return an InputSource object for use with the Parser returned
//			from getDocumentSAX().
// 
// Notes:	The returned InputSource must only be used with the Parser
//			returned from getDocumentSAX(). The InputSource belongs to
//			the XMLDocument object and no attempt must be made to delete it.
//=========================================================================

C++ Signature

InputSource *
XmlDocument::getDocumentInputSource(
);


Method: XmlDocument::writeDocument

//=========================================================================
// Method:	writeDocument
// Desc:	Serialize the document to the passed OutputStream using
//			default settings
// 
// Notes:
//			outputStream may not be 0
//			if encoding is zero, the default encoding will be used (UTF-8)
//=========================================================================

C++ Signature

int
XmlDocument::writeDocument(
	OutputStream * outputStream,                    //stream to which to write
	const unicode * encoding,                       //character encoding to use, or 0
	int endian                                      //0 for little-endian, 1 for big-endian
);


Method: XmlDocument::getXmlWriter

//=========================================================================
// Method:	getXmlWriter
// Desc:	Return an XmlWriter interface that can be used to serialize
//			the XML document.
//
//			The XmlWriter interface has methods for more closely controlling
//			how the XML is output. For example, if the document is really
//			just text, XML output escaping can be disabled.
//
//			After the various attributes have been set, calling to
//			XmlWriter's write() method will cause the serialization to occur.
// 
// Notes:
//			outputStream may not be 0
//=========================================================================

C++ Signature

XmlWriter *
XmlDocument::getXmlWriter(
	OutputStream * outputStream                     //stream to which to write
);


Method: XmlDocument::releaseXmlWriter

//=========================================================================
// Method:	releaseXmlWriter
// Desc:	Notify the XmlDocument object that the XmlWriter object
//			returned from getXmlWriter may be freed.
// 
// Notes:
//			This must be called before the OutputStream that was passed
//			to getXmlWriter is released
//=========================================================================

C++ Signature

void
XmlDocument::releaseXmlWriter(
);


Interface: XmlQueryProcessor

/*****************************************************************
Interface: XmlQueryProcessor
Desc:	Executes an XML-encoded query and returns the XML-encoded
result. This is used for the SubscriptionShim to query NDS
and for NDS to query the PublicationShim.
Notes: 
*****************************************************************/

Method: XmlQueryProcessor::query

//=========================================================================
// Method:	query
// Desc:	Execute an XML-encoded query and return the XML-encoding result
// 
// Notes:	The passed query document is only valid during the context
//			of the call to this method.
//
//			The returned result document is only valid until the next call
//			to this method.
//=========================================================================

C++ Signature

XmlDocument *
Query::query(
	XmlDocument * document                          //Xml-encoded query
);


Interface: XmlCommandProcessor

/*****************************************************************
Interface: XmlCommandProcessor
Desc:	Executes an XDS-encoded commandand returns the XDS-encoded
result. This is used for NDS to send events to the
SubscriptionShim and for the PublicationShim to send events to
NDS.
Notes: 
*****************************************************************/

Method: XmlCommandProcessor::execute

//=========================================================================
// Method:	execute
// Desc:	Execute an XML-encoded request and return the XML-encoded result.
// 
// Notes:	The passed request document is only valid during the context
//			of the call to this method.
//
//			The passed Query interface is only valid during the context of
//			the call to this method.
//
//			The returned result document is only valid until the next call
//			to this method.
//=========================================================================

C++ Signature

XmlDocument *
Execute::execute(
	XmlDocument * document,                         //request document
	XmlQueryProcessor * queryInterface              //Interface through which callee may query caller
);


Interface: SubscriptionShim

Inherits from XmlCommandProcessor
/*****************************************************************
Interface: SubscriptionShim
Desc:	The interface through which NDS sends events to an
application.
Notes: 
*****************************************************************/

Method: SubscriptionShim::init

//=========================================================================
// Method:	init
// Desc:	Allow the shim to perform any necessary initialization before
//			accepting requests.
// 
// Notes:	
//=========================================================================

C++ Signature

XmlDocument *
SubscriptionShim::init(
	XmlDocument * shimParameters                    //shim initialization parms
);


Interface: PublicationShim

/*****************************************************************
Interface: PublicationShim
Desc:	The interface through which an application sends events
to NDS.
Notes: 
*****************************************************************/

Method: PublicationShim::init

//=========================================================================
// Method:	init
// Desc:	Allow the shim to perform any necessary initialization before
//			accepting requests.
// 
// Notes:	This will be called on a different thread than the 
//			DriverShim::init() and SubscriptionShim::init() and 
//			SubscriptionShim::execute() calls (but the same thread as
//			PublicationShim::start())
//=========================================================================

C++ Signature

XmlDocument *
PublicationShim::init(
	XmlDocument * shimParameters                    //shim initialization parms
);


Method: PublicationShim::start

//=========================================================================
// Method:	start
// Desc:	Pass control to the publisher shim so that the shim can start
//			publishing application events.
// 
// Notes:	This method must not return until driver shutdown, unless it
//			returns with a fatal error status.
//			This will be called on a different thread than the 
//			DriverShim::init() and SubscriptionShim::init() and 
//			SubscriptionShim::execute() calls (but the same thread as
//			PublicationShim::init())
//=========================================================================

C++ Signature

XmlDocument *
PublicationShim::start(
	XmlCommandProcessor * ndsExecute                //The NDS XmlCommandProcessor interface for publication
);


Interface: DriverShim

/*****************************************************************
Interface: DriverShim
Desc:	The abstraction of a DirXML driver for a single application.
Notes: 
*****************************************************************/

Method: DriverShim::init

//=========================================================================
// Method:	init
// Desc:	Allow the driver to perform an shim-independent initialization.
// 
// Notes:	
//=========================================================================

C++ Signature

XmlDocument *
DriverShim::init(
	XmlDocument * shimParameters                    //Parameters for shims
);


Method: DriverShim::shutdown

//=========================================================================
// Method:	shutdown
// Desc:	Command the driver to shutdown in preparation for being unloaded.
// 
// Notes:	
//=========================================================================

C++ Signature

XmlDocument *
DriverShim::shutdown(
	XmlDocument * reason                            //XML-encoded reason for shutdown
);


Method: DriverShim::getSubscriptionShim

//=========================================================================
// Method:	getSubscriptionShim
// Desc:	Get a pointer to the SubscriptionShim interface from the 
//			driver.
// 
// Notes:	Return must not be null.
//=========================================================================

C++ Signature

SubscriptionShim *
DriverShim::getSubscriptionShim(
);


Method: DriverShim::getPublicationShim

//=========================================================================
// Method:	getPublicationShim
// Desc:	Get a pointer to the PublicationShim interface from the 
//			driver.
// 
// Notes:	Return must not be null.
//=========================================================================

C++ Signature

PublicationShim *
DriverShim::getPublicationShim(
);


Method: DriverShim::getSchema

//=========================================================================
// Method:	getSchema
// Desc:	Get an XML representation of the application schema from the
//			driver. This will not be called if init()/shutdown() are called
//			for a driver instance, and vice-versa.
// 
// Notes:	
//=========================================================================

C++ Signature

XmlDocument *
DriverShim::getSchema(
	XmlDocument * initParameters                    //Parameters for (driver init, subscriber init, and publisher init params)
);


Method: DriverShim::destroy

//=========================================================================
// Method:	destroy
// Desc:	Free any resources allocated by the driver, including the
//			driver object itself.
// 
// Notes:	This will be called after shutdown() (assuming init() succeeds)
//=========================================================================

C++ Signature

void
DriverShim::destroy(
);