simpleengine/engine/src/simplefactory.cpp
changeset 0 c8caa15ef882
child 12 e6a66db4e9d0
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
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 
       
    23 #include <e32std.h>
       
    24 
       
    25 // own simple
       
    26 #include "simplecommon.h"
       
    27 #include "simplexmlfactory.h"
       
    28 #include "simplefactory.h"
       
    29 
       
    30 #include "simplenamespace.h"
       
    31 #include "simpleelement.h"
       
    32 #include "simpledocument.h"
       
    33 #include "simplefilter.h"
       
    34 #include "simpleconnection.h"
       
    35 #include "simplepublisher.h"
       
    36 #include "simplewatcher.h"
       
    37 #include "simplewinfowatcher.h"
       
    38 #include "simpleengineimhandler.h"
       
    39 
       
    40 #include "msimplenamespace.h"
       
    41 #include "msimpleelement.h"
       
    42 #include "msimpledocument.h"
       
    43 #include "msimplefilterdocument.h"
       
    44 #include "msimpleconnection.h"
       
    45 #include "msimplepublisher.h"
       
    46 #include "msimplewatcher.h"
       
    47 #include "msimplewinfowatcher.h"
       
    48 #include "simpleinstantmessage.h"
       
    49 
       
    50 #ifdef _DEBUG
       
    51 #include "simpledebugutils.h"
       
    52 #endif
       
    53 
       
    54 class MSimpleConnectionObserver;
       
    55 class MSimplePublishObserver;
       
    56 class MSimpleWatcherObserver;
       
    57 class MSimpleWinfoObserver;
       
    58 class MSimplePublishObserver;
       
    59 
       
    60 class MSimpleContent;
       
    61 
       
    62 
       
    63 // ================= MEMBER FUNCTIONS =======================
       
    64 //
       
    65 
       
    66 EXPORT_C MSimpleNamespace* TSimpleFactory::NewNamespaceL(
       
    67     const TDesC8& aPrefix,
       
    68     const TDesC8& aUri )
       
    69     {
       
    70     return TSimpleXmlFactory::NewNamespaceL( aPrefix, aUri );
       
    71     }
       
    72 
       
    73 EXPORT_C MSimpleElement* TSimpleFactory::NewElementL(
       
    74     const TDesC8& aNsUri,
       
    75     const TDesC8& aLocalName )
       
    76     {
       
    77     return TSimpleXmlFactory::NewElementL( aNsUri, aLocalName );
       
    78     }
       
    79 
       
    80 EXPORT_C MSimpleDocument* TSimpleFactory::NewDocumentL( )
       
    81     {
       
    82     return TSimpleXmlFactory::NewDocumentL( );
       
    83     }
       
    84 
       
    85 EXPORT_C MSimpleDocument* TSimpleFactory::NewDocumentL( const TDesC8& aXml )
       
    86     {
       
    87     return TSimpleXmlFactory::NewDocumentL( aXml );
       
    88     }
       
    89 
       
    90 EXPORT_C MSimpleFilterDocument* TSimpleFactory::NewFilterDocumentL()
       
    91     {
       
    92     return TSimpleXmlFactory::NewFilterDocumentL();
       
    93     }
       
    94 
       
    95 EXPORT_C MSimpleConnection* TSimpleFactory::NewConnectionL(
       
    96     MSimpleConnectionObserver& aObserver)
       
    97     {
       
    98     #ifdef _DEBUG
       
    99     TSimpleLogger::Log(_L("TSimpleFactory::NewConnectionL" ) );
       
   100     #endif
       
   101     return CSimpleConnection::NewL( aObserver );
       
   102     }
       
   103 
       
   104 EXPORT_C MSimplePublisher* TSimpleFactory::NewPublisherL(
       
   105     MSimpleConnection& aConn,
       
   106     MSimplePublishObserver& aObserver )
       
   107     {
       
   108     return CSimplePublisher::NewL( aConn, aObserver );
       
   109     }
       
   110 
       
   111 EXPORT_C MSimpleInstantMessage* TSimpleFactory::NewInstantMessageL(
       
   112     MSimpleConnection& aConn,
       
   113     MSimpleInstantMsgObserver& aObserver )
       
   114     {
       
   115     return CSimpleEngineImHandler::NewL( aConn, aObserver );
       
   116     }
       
   117 
       
   118 EXPORT_C MSimpleWatcher* TSimpleFactory::NewWatcherL(
       
   119     MSimpleConnection& aConn,
       
   120     MSimpleWatcherObserver& aObserver )
       
   121     {
       
   122     return CSimpleWatcher::NewL( aConn, aObserver );
       
   123     }
       
   124 
       
   125 EXPORT_C MSimpleWinfoWatcher* TSimpleFactory::NewWinfoWatcherL(
       
   126     MSimpleConnection& aConn,
       
   127     MSimpleWinfoObserver& aObserver )
       
   128     {
       
   129     return CSimpleWinfoWatcher::NewL( aConn, aObserver );
       
   130     }
       
   131     
       
   132 EXPORT_C MSimpleFilterDocument* TSimpleFactory::NewFilterDocumentL( const TDesC8& aXml )
       
   133     {
       
   134     return TSimpleXmlFactory::NewFilterDocumentL( aXml );
       
   135     }    
       
   136     
       
   137 EXPORT_C MSimpleContent* TSimpleFactory::NewContentL( 
       
   138     const TDesC8& aContentID, const TDesC8& aContentType )
       
   139     {
       
   140     return TSimpleXmlFactory::NewContentL( 
       
   141         aContentID, aContentType );    
       
   142     }
       
   143       
       
   144 EXPORT_C MSimpleConnection* TSimpleFactory::NewConnectionL(
       
   145     MSimpleConnectionObserver& aObserver, TInt32 aServiceId )
       
   146     {
       
   147     return CSimpleConnection::NewL( aObserver, aServiceId );
       
   148     }
       
   149 
       
   150 
       
   151