simpleengine/xmlutils/inc/simplexmlfactory.h
changeset 0 c8caa15ef882
equal deleted inserted replaced
-1:000000000000 0:c8caa15ef882
       
     1 /*
       
     2 * Copyright (c) 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 "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    SIMPLE Engine XML utils factory
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef simplexmlfactory_H
       
    22 #define simplexmlfactory_H
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATION
       
    28 class MSimpleDocument;
       
    29 class MSimpleWinfo;
       
    30 class MSimpleElement;
       
    31 class MSimpleNamespace;
       
    32 class MSimpleFilterDocument;
       
    33 class MSimplePresenceList;
       
    34 class MSimpleContent;
       
    35 
       
    36 /**
       
    37  * SIMPLE Engine XML utils factory
       
    38  *
       
    39  * @lib simplexmlutils 
       
    40  * @since S60 3.2
       
    41  */ 
       
    42 class TSimpleXmlFactory
       
    43     {
       
    44 
       
    45 public:
       
    46 
       
    47     /**
       
    48      * Create new simple Element entity.
       
    49      * @since S60 3.2
       
    50      * @return MSimpleElement, ownership is transferred.
       
    51      */
       
    52     IMPORT_C static MSimpleElement* NewElementL(
       
    53         const TDesC8& aNsUri,
       
    54         const TDesC8& aLocalName );
       
    55 
       
    56     /**
       
    57      * Create new simple NameSpace entity.
       
    58      * @since S60 3.2
       
    59      * @param aPrefix prefix to be used
       
    60      * @param aUri URI
       
    61      * @return MSimpleNameSpace, ownership is transferred.
       
    62      */
       
    63     IMPORT_C static MSimpleNamespace* NewNamespaceL(
       
    64         const TDesC8& aPrefix,
       
    65         const TDesC8& aUri );
       
    66 
       
    67     /**
       
    68      * Create new simple Document entity from scratch.
       
    69      * @since S60 3.2
       
    70      * @return MSimpleDocument, ownership is transferred.
       
    71      */
       
    72     IMPORT_C static MSimpleDocument* NewDocumentL( );
       
    73 
       
    74     /**
       
    75      * Create new simple Document entity from xml-document.
       
    76      * @since S60 3.2
       
    77      * @param aXml a valid XML document in PIDF format.
       
    78      * @return MSimpleDocument, ownership is transferred.
       
    79      */
       
    80     IMPORT_C static MSimpleDocument* NewDocumentL( const TDesC8& aXml );
       
    81     
       
    82     /**
       
    83      * Create new simple Document entity from MIME multipart
       
    84      * @since S60 3.2
       
    85      * @param aData MIME multipart data
       
    86      * @param aBoundary MIME multipart boundary
       
    87      * @param aStart MIME multipart start content-id
       
    88      * @return MSimpleDocument, ownership is transferred.
       
    89      */
       
    90     IMPORT_C static MSimpleDocument* NewDocumentInMultiPartL(
       
    91         const TDesC8& aData, const TDesC8& aBoundary, const TDesC8& aStart );        
       
    92 
       
    93     /**
       
    94      * Create new simple FilterDocument entity.
       
    95      * @since S60 3.2
       
    96      * @return MSimpleFilterDocument, ownership is transferred.
       
    97      */
       
    98     IMPORT_C static MSimpleFilterDocument* NewFilterDocumentL();
       
    99     
       
   100     /**
       
   101      * Create new simple FilterDocument entity.
       
   102      * @since S60 3.2
       
   103      * @param aXml a valid XML document in PIDF format.     
       
   104      * @return MSimpleFilterDocument, ownership is transferred.
       
   105      */
       
   106     IMPORT_C static MSimpleFilterDocument* NewFilterDocumentL( const TDesC8& aXml );    
       
   107 
       
   108     /**
       
   109      * Create new presence list (resource list)
       
   110      * @since S60 3.2
       
   111      * @param aData MIME multipart data
       
   112      * @param aBoundary MIME multipart boundary
       
   113      * @param aStart MIME multipart start content-id
       
   114      * @return MSimplePresenceList, ownership is transferred.
       
   115      */
       
   116     IMPORT_C static MSimplePresenceList* NewPresenceListL(
       
   117         const TDesC8& aData, const TDesC8& aBoundary, const TDesC8& aStart );
       
   118 
       
   119     /**
       
   120      * Create new winfo document
       
   121      * @since S60 3.2
       
   122      * @return MSimpleWinfo, ownership is transferred.
       
   123      */
       
   124     IMPORT_C static MSimpleWinfo* NewWinfoL();
       
   125     
       
   126     /**
       
   127      * Create new winfo document
       
   128      * @since S60 3.2
       
   129      * @param aXml XML document
       
   130      * @return MSimpleWinfo, ownership is transferred.
       
   131      */
       
   132     IMPORT_C static MSimpleWinfo* NewWinfoL( const TDesC8& aXml );
       
   133     
       
   134     IMPORT_C static MSimpleContent* NewContentL( 
       
   135         const TDesC8& aContentID, const TDesC8& aContentType );    
       
   136     };
       
   137 
       
   138 
       
   139 #endif      // simplexmlfactory_H
       
   140 
       
   141 // End of File