1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/xml/dom/xmlengserializationoptions.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,93 @@
1.4 +/*
1.5 +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Serialization options functions
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +#ifndef XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED
1.29 +#define XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED
1.30 +
1.31 +#include <e32base.h>
1.32 +
1.33 +// FORWARD DECLARATION
1.34 +class MXmlEngOutputStream;
1.35 +class MXmlEngDataSerializer;
1.36 +class MXmlEngNodeFilter;
1.37 +
1.38 +/**
1.39 + * Class allow to set serialization option during document save.
1.40 + *
1.41 + * @lib XmlEngineDOM.lib
1.42 + * @since S60 v3.1
1.43 + */
1.44 +class TXmlEngSerializationOptions
1.45 + {
1.46 +public:
1.47 + /** Use indent in output */
1.48 + static const TUint KOptionIndent = 0x01;
1.49 + /** Skip xml declaration */
1.50 + static const TUint KOptionOmitXMLDeclaration = 0x02;
1.51 + /** Add standalone in xml declaration. KOptionOmitXMLDeclaration must not be set */
1.52 + static const TUint KOptionStandalone = 0x04;
1.53 + /** Add encoding in xml declaration. KOptionOmitXMLDeclaration must not be set */
1.54 + static const TUint KOptionEncoding = 0x08;
1.55 + /** Not supported currently */
1.56 + static const TUint KOptionIncludeNsPrefixes = 0x10;
1.57 + /** Not supported currently */
1.58 + static const TUint KOptionCDATASectionElements = 0x20;
1.59 + /** Decode base64 encoded binary containers content upon XOP serialization*/
1.60 + static const TUint KOptionDecodeBinaryContainers = 0x40;
1.61 +
1.62 + /**
1.63 + * Constructor
1.64 + *
1.65 + * @since S60 v3.1
1.66 + * @param aOptionFlags Serialization options
1.67 + * @param aEncoding Serialization encoding
1.68 + */
1.69 + IMPORT_C TXmlEngSerializationOptions( TUint aOptionFlags =
1.70 + (TXmlEngSerializationOptions::KOptionIndent |
1.71 + TXmlEngSerializationOptions::KOptionStandalone |
1.72 + TXmlEngSerializationOptions::KOptionEncoding),
1.73 + const TDesC8& aEncoding = KNullDesC8);
1.74 +
1.75 + /**
1.76 + * Set node filter
1.77 + *
1.78 + * @since S60 v3.1
1.79 + * @param aFilter New node filter
1.80 + */
1.81 + IMPORT_C void SetNodeFilter(MXmlEngNodeFilter* aFilter);
1.82 +
1.83 +public:
1.84 + /** Options flag */
1.85 + TUint iOptions;
1.86 + /** Encoding */
1.87 + TPtrC8 iEncoding;
1.88 + /** Node filter */
1.89 + MXmlEngNodeFilter* iNodeFilter;
1.90 + /** Object whose serialization callback is invoked **/
1.91 + MXmlEngDataSerializer* iDataSerializer;
1.92 + };
1.93 +
1.94 +
1.95 +
1.96 +#endif /* XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED */