epoc32/include/xml/dom/xmlengbinarycontainer.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
2:2fe1408b6811 3:e1b950c65cb4
       
     1 /*
       
     2 * Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     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
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:       All binary data functions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef XMLENGINE_BINARYCONTAINER_H_INCLUDED
       
    25 #define XMLENGINE_BINARYCONTAINER_H_INCLUDED
       
    26 
       
    27 #include "xmlengdatacontainer.h"
       
    28 
       
    29 /**
       
    30 * Instance of TXmlEngBinaryContainer class represents binary data in 
       
    31 * DOM tree.
       
    32 *
       
    33 * Binary data is treated in general as text nodes in DOM tree. 
       
    34 * Some of the fields in xmlNode structure are reused in order to save memory. 
       
    35 * Data is stored in process's heap memory.
       
    36 *
       
    37 * Sample code for creating binary container:
       
    38 * @code  
       
    39 *      RXmlEngDOMImplementation domImpl;
       
    40 *      domImpl.OpenL();        ///< opening DOM implementation object 
       
    41 *      RXmlEngDocument iDoc; 
       
    42 *      ///< create document element
       
    43 *      TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc"));
       
    44 *      ///< create binary container from buffer (str1) and CID equals cid
       
    45 *      TXmlEngBinaryContainer binData=iDoc.CreateBinaryContainerL(cid,*str1);  
       
    46 *      elem.AppendChildL(binData);      ///< append container to the dom tree       
       
    47 *      iDoc.Close();               ///< closing all opened objects
       
    48 *      domImpl.Close();
       
    49 * @endcode 
       
    50 *
       
    51 * @lib XmlEngineDOM.lib
       
    52 * @since S60 v3.2
       
    53 */
       
    54 class TXmlEngBinaryContainer : public TXmlEngDataContainer
       
    55 {
       
    56 public:
       
    57 
       
    58     /**
       
    59      * Get content of the container.
       
    60      *
       
    61      * @since S60 v3.2
       
    62      * @return TPtrC8 with container content
       
    63      * 
       
    64      */
       
    65     IMPORT_C TPtrC8 Contents() const;
       
    66     
       
    67     /**
       
    68      * Sets contents of binary container
       
    69      *
       
    70      * @since S60 v3.2
       
    71      * @param aNewContents  The actual value to store
       
    72      */
       
    73     IMPORT_C void SetContentsL( const TDesC8& aNewContents );
       
    74 
       
    75     /**
       
    76      * Appends contents to binary container
       
    77      *
       
    78      * @since S60 v3.2
       
    79      * @param aData  Content to be appended to current content
       
    80      */    
       
    81     EXPORT_C void AppendContentsL( const TDesC8& aData );
       
    82 
       
    83     /**
       
    84      * Default constructor
       
    85 	 *
       
    86      * @since S60 v3.1
       
    87      */
       
    88 	inline TXmlEngBinaryContainer(); 
       
    89 
       
    90 protected:
       
    91 
       
    92     /**
       
    93      * Constructor
       
    94      *
       
    95      * @since S60 v3.1
       
    96      * @param aInternal node pointer
       
    97      */
       
    98 	inline TXmlEngBinaryContainer(void* aInternal);
       
    99 };
       
   100 
       
   101 #include "xmlengbinarycontainer.inl"
       
   102 
       
   103 #endif /* XMLENGINE_BINARYCONTAINER_H_INCLUDED */