xml/libxml2libs/inc/xmlengineutils/xmlengxestd.h
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This file contains methods definition
       
    15 // that to add/remove XmlEngine user
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @publishedPartner
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef XMLENGXESTD_H
       
    27 #define XMLENGXESTD_H
       
    28 
       
    29 #include <e32base.h>
       
    30 
       
    31 /**
       
    32 Leaves with the specified error code.
       
    33 @param aCode Leave code
       
    34 @leave - Leaves with the specified error code
       
    35 */
       
    36 IMPORT_C void XmlEngLeaveL(TInt aCode);
       
    37 
       
    38 /**
       
    39 Initializes the global data required for libxml2 and pushes a cleanup 
       
    40 item for XML Engine internal data to the CleanupStack.
       
    41  
       
    42 This function should be used before any use of the DOM Parser or
       
    43 RXmlEngDocument::SaveL() method.
       
    44 
       
    45 This function should have matching call to XmlEnginePopAndClose().
       
    46 
       
    47 @see XmlEnginePopAndClose
       
    48 @see XmlEngineCleanup
       
    49 @see XmlEngineAttachL
       
    50 
       
    51 @leave KErrNoMemory Memory allocation error
       
    52 */
       
    53 IMPORT_C void XmlEnginePushL();
       
    54 
       
    55 /**
       
    56 Removes a cleanup item for XML Engine internal data from the CLeanupStack
       
    57 and frees any memory allocated by XML Engine's internals
       
    58 
       
    59 @see XmlEnginePushL
       
    60 */
       
    61 IMPORT_C void XmlEnginePopAndClose();
       
    62 
       
    63 /**
       
    64 Adds a user of Xml Engine and gets or initializes the global data required for libxml2.
       
    65 It does NOT put a cleanup item on the CleanupStack. 
       
    66 
       
    67 A "user" here is any processing entity that will use XML Engine's API (SAX,
       
    68 DOM, XPath, etc)).  If several instances of XML parser are used within one
       
    69 thread, then XmlEngineAttach() should be called for each of them.
       
    70 
       
    71 Every call to this method should be matched with a call to XmlEngineCleanup().
       
    72 
       
    73 @see XmlEngineCleanup
       
    74 @see XmlEnginePushL
       
    75 */
       
    76 IMPORT_C void XmlEngineAttachL();
       
    77 
       
    78 /**
       
    79 Cleans up resources internally allocated by XML parser and (optionally) frees a
       
    80 parser context provided as an argument.  Does NOT pop a cleanup item off the 
       
    81 CleanupStack
       
    82 
       
    83 This function is to be used as a TCleanupItem on the CleanupStack
       
    84 and may be invoked directly.
       
    85 
       
    86 Libxml2 uses the Symbian implementation of POSIX standard libraries. During
       
    87 closure of XmlEngine library, the standard library is also closed by
       
    88 default.User can choose not to close the standard library when XmlEngine shuts
       
    89 down, by using overloaded XmlEngineCleanup(TBool) method instead.
       
    90 
       
    91 @see XmlEngineAttachL
       
    92 @see XmlEnginePopAndClose
       
    93 
       
    94 @param aParserContext A pointer to xmlParserCtxt
       
    95 */
       
    96 IMPORT_C void XmlEngineCleanup(TAny* aParserContext = NULL);
       
    97 
       
    98 #endif // XMLENGXESTD_H
       
    99