syncmlfw/ds/hostserver/dshostservers/inc/nsmlhostserver2.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2005 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:  DS Host Server 2
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __NSMLHOSTSERVER2_H__
       
    20 #define __NSMLHOSTSERVER2_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "Nsmldshostserver.h"
       
    25 
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 * class CNSmlDSHostServerNull
       
    30 *
       
    31 * @lib nsmldshostservernull.lib
       
    32 */
       
    33 class CNSmlDSHostServer2 : public CNSmlDSHostServer
       
    34 	{
       
    35 	public: // constructors and destructor
       
    36 
       
    37 		/**
       
    38 		* Two-phased constructor.
       
    39 		* @param aServerName. The server's name.
       
    40 		* @return created server instance.
       
    41 		*/
       
    42 		static CNSmlDSHostServer2* NewL( const TDesC& aServerName );
       
    43 
       
    44 		/**
       
    45 		* Destructor.
       
    46 		*/
       
    47 		~CNSmlDSHostServer2();
       
    48 
       
    49 	public: // new functions
       
    50 
       
    51    		/**
       
    52 		* Launches the server.
       
    53 		*/		
       
    54 		static TInt LaunchServer( TAny* );
       
    55 
       
    56 		/**
       
    57 		* Thread function where the active scheduler runs.
       
    58 		* @param aStarted. Not used.
       
    59 		* @return. KErrNone.
       
    60 		*/
       
    61 		static TInt ThreadFunctionL( TAny* aStarted );
       
    62 
       
    63    		/**
       
    64 		* Panics the server
       
    65 		* @param aPanic. Panic reason.
       
    66 		*/
       
    67 		static void PanicServer( TNSmlHostServerErrors aPanic );
       
    68 
       
    69 	protected:
       
    70 
       
    71 		/**
       
    72 		* Constructor.
       
    73 		*/
       
    74 		CNSmlDSHostServer2();
       
    75 
       
    76 	private: // functions from base classes
       
    77 
       
    78 		/**
       
    79 		* Returns session for the server.
       
    80 		* @param aVersion. Version for session
       
    81 		* @param aMessage. Message to identify the client.
       
    82 		*/
       
    83 		CSession2* NewSessionL( const TVersion& aVersion, const RMessage2& aMessage ) const;
       
    84 	};
       
    85 
       
    86 #endif // __NSMLHOSTSERVER2_H__
       
    87 
       
    88 // End of File