epoc32/include/xml/dom/xmlengserializationoptions.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 /*
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). 
     2 // All rights reserved.
     3 * All rights reserved.
     3 // This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 * 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
     5 // which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 *
     8 // Initial Contributors:
     9 * Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    10 //
    11 *
    11 // Contributors:
    12 * Contributors:
    12 //
    13 *
    13 // Description:
    14 * Description:       Serialization options functions
    14 // Serialization options functions
    15 *
    15 //
    16 */
       
    17 
    16 
    18 
    17 
    19 
    18 
       
    19 /**
       
    20  @file
       
    21  @publishedAll
       
    22  @released
       
    23 */
    20 
    24 
    21 
    25 #ifndef XMLENGSERIALIZATIONOPTIONS_H
    22 
    26 #define XMLENGSERIALIZATIONOPTIONS_H
    23 
       
    24 
       
    25 #ifndef XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED
       
    26 #define XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED
       
    27 
    27 
    28 #include <e32base.h>
    28 #include <e32base.h>
    29 
    29 
    30 // FORWARD DECLARATION
       
    31 class MXmlEngOutputStream;
    30 class MXmlEngOutputStream;
    32 class MXmlEngDataSerializer;
    31 class MXmlEngDataSerializer;
    33 class MXmlEngNodeFilter;
    32 class MXmlEngNodeFilter;
    34 
    33 
    35 /**
    34 /**
    36  * Class allow to set serialization option during document save.
    35 This class stores serialization options to be used when a document is
    37  * 
    36 serialized.
    38  * @lib XmlEngineDOM.lib
    37 @see RXmlEngDocument::SaveL()
    39  * @since S60 v3.1
    38 */
    40  */
       
    41 class TXmlEngSerializationOptions 
    39 class TXmlEngSerializationOptions 
    42 	{
    40 	{
    43 public:
    41 public:
    44     /** Use indent in output */
    42     /** Use indent in output */
    45     static const TUint KOptionIndent                 = 0x01;
    43     static const TUint KOptionIndent                 = 0x01;
    47 	static const TUint KOptionOmitXMLDeclaration     = 0x02;
    45 	static const TUint KOptionOmitXMLDeclaration     = 0x02;
    48 	/** Add standalone in xml declaration. KOptionOmitXMLDeclaration must not be set */
    46 	/** Add standalone in xml declaration. KOptionOmitXMLDeclaration must not be set */
    49 	static const TUint KOptionStandalone             = 0x04;
    47 	static const TUint KOptionStandalone             = 0x04;
    50 	/** Add encoding in xml declaration. KOptionOmitXMLDeclaration must not be set */
    48 	/** Add encoding in xml declaration. KOptionOmitXMLDeclaration must not be set */
    51 	static const TUint KOptionEncoding               = 0x08;
    49 	static const TUint KOptionEncoding               = 0x08;
    52 	/** Not supported currently */
    50 	/** Not supported */
    53 	static const TUint KOptionIncludeNsPrefixes      = 0x10;
    51 	static const TUint KOptionIncludeNsPrefixes      = 0x10;
    54 	/** Not supported currently */
    52 	/** Not supported */
    55 	static const TUint KOptionCDATASectionElements   = 0x20;
    53 	static const TUint KOptionCDATASectionElements   = 0x20;
    56 	/** Decode base64 encoded binary containers content upon XOP serialization*/
    54 	/** Decode base64 encoded binary containers content upon XOP serialization */
    57 	static const TUint KOptionDecodeBinaryContainers		 = 0x40;	
    55 	static const TUint KOptionDecodeBinaryContainers		 = 0x40;	
    58     
    56     
    59 	/**
    57 	/**
    60      * Constructor
    58     Constructor
    61      *
    59 	@param aOptionFlags Serialization options
    62      * @since S60 v3.1
    60 	@param aEncoding Serialization encoding.  If KNullDesC8, the document
    63 	 * @param aOptionFlags Serialization options
    61 	encoding is used.
    64      * @param aEncoding Serialization encoding
    62     */
    65      */
       
    66     IMPORT_C TXmlEngSerializationOptions( TUint aOptionFlags = 
    63     IMPORT_C TXmlEngSerializationOptions( TUint aOptionFlags = 
    67     								   (TXmlEngSerializationOptions::KOptionIndent | 
    64     								   (TXmlEngSerializationOptions::KOptionIndent | 
    68     									TXmlEngSerializationOptions::KOptionStandalone |
    65     									TXmlEngSerializationOptions::KOptionStandalone |
    69     									TXmlEngSerializationOptions::KOptionEncoding), 
    66     									TXmlEngSerializationOptions::KOptionEncoding), 
    70                                     const TDesC8& aEncoding = KNullDesC8);
    67                                     const TDesC8& aEncoding = KNullDesC8);
    71 
    68 
    72 	/**
    69 	/**
    73      * Set node filter
    70 	Sets a node filter.  The node filter is used to choose which nodes from the
    74      *
    71 	tree are serialized.  Ownership of the node filter is not transferred and
    75      * @since S60 v3.1
    72 	the caller is responsible for freeing aFilter.
    76 	 * @param aFilter New node filter
    73 
    77      */
    74 	@param aFilter The node filter to set
       
    75     */
    78     IMPORT_C void SetNodeFilter(MXmlEngNodeFilter* aFilter);  
    76     IMPORT_C void SetNodeFilter(MXmlEngNodeFilter* aFilter);  
       
    77 
       
    78 	/**
       
    79 	Sets a data serializer.  Ownership of the data serializer is not
       
    80 	transferred and the caller is responsbile for freeing aSerializer.
       
    81 
       
    82 	@param aSerializer The data serializer to set
       
    83     */
       
    84     IMPORT_C void SetDataSerializer(MXmlEngDataSerializer* aSerializer);  
    79 
    85 
    80 public:
    86 public:
    81 	/** Options flag */
    87 	/** Options flag */
    82     TUint iOptions;
    88     TUint iOptions;
    83 	/** Encoding */
    89 	/** Encoding */
    84     TPtrC8 iEncoding;
    90     TPtrC8 iEncoding;
    85 	/** Node filter */
    91 	/** Node filter */
    86     MXmlEngNodeFilter* iNodeFilter;
    92     MXmlEngNodeFilter* iNodeFilter;
    87     /** Object whose serialization callback is invoked **/
    93     /** Data serializer */
    88     MXmlEngDataSerializer* iDataSerializer;
    94     MXmlEngDataSerializer* iDataSerializer;
    89 	};
    95 	};
    90 
    96 
    91 
    97 
       
    98 #endif /* XMLENGSERIALIZATIONOPTIONS_H */
    92 
    99 
    93 #endif /* XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED */