XBinder XML Runtime  XBinder Version 3.0.x
OSXMLMessageBuffer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2022 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
28 #ifndef _OSXMLMESSAGEBUFFER_H_
29 #define _OSXMLMESSAGEBUFFER_H_
30 
31 #include "rtxsrc/OSRTMsgBuf.h"
32 #include "rtxmlsrc/osrtxml.h"
33 
42 class EXTXMLCLASS OSXMLMessageBuffer : public OSRTMessageBuffer {
43  protected:
53  EXTXMLMETHOD OSXMLMessageBuffer (Type bufferType, OSRTContext* pContext = 0);
54 
55  public:
60  EXTXMLMETHOD virtual void* getAppInfo ();
61 
68  EXTXMLMETHOD int getIndent ();
69 
77  EXTXMLMETHOD int getIndentChar ();
78 
85  EXTXMLMETHOD OSBOOL getWriteBOM ();
86 
97  EXTXMLMETHOD virtual void setNamespace
98  (const OSUTF8CHAR* prefix, const OSUTF8CHAR* uri,
99  OSRTDList* pNSAttrs = 0);
100 
108  EXTXMLMETHOD virtual void setAppInfo (void* pXMLInfo);
109 
122  EXTXMLMETHOD void setFormatting (OSBOOL doFormatting);
123 
129  EXTXMLMETHOD void setIndent (OSUINT8 indent);
130 
136  EXTXMLMETHOD void setIndentChar (char indentChar);
137 
144  EXTXMLMETHOD void setWriteBOM (OSBOOL write);
145 
146 } ;
147 
148 
153 class EXTXMLCLASS OSXMLEncodeBase : public OSXMLMessageBuffer {
154 
155  protected:
163  EXTXMLMETHOD OSXMLEncodeBase (OSRTContext* pContext = 0);
164 
165 
166  public:
167 
178  EXTXMLMETHOD int encodeAttr
179  (const OSUTF8CHAR* name, const OSUTF8CHAR* value);
180 
192  EXTXMLMETHOD int encodeText (const OSUTF8CHAR* value);
193 
198  EXTXMLMETHOD int endDocument ();
199 
209  EXTXMLMETHOD int endElement
210  (const OSUTF8CHAR* elemName, OSXMLNamespace* pNS = 0);
211 
216  EXTXMLMETHOD int startDocument ();
217 
233  EXTXMLMETHOD int startElement
234  (const OSUTF8CHAR* elemName, OSXMLNamespace* pNS = 0,
235  OSRTDList* pNSAttrs = 0, OSBOOL terminate = FALSE);
236 
249  EXTXMLMETHOD int termStartElement ();
250 };
251 
252 
253 #endif
254 
The XML message buffer class is derived from the OSMessageBuffer base class.
XML low-level C encode/decode functions.
OSXMLEncodeBase is a base class for the XML encode buffer and stream classes, OSXMLEncodeBuffer and O...