syncmlfw/dm/hostserver/dmhostservers/inc/nsmldmhostserver3.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:  Specialized DM Host Server. In practice differs from 
       
    15 *				 the other servers only on the capability and the name. 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __NSMLDMHOSTSERVER3_H__
       
    21 #define __NSMLDMHOSTSERVER3_H__
       
    22 
       
    23 // ------------------------------------------------------------------------------------------------
       
    24 // Includes
       
    25 // ------------------------------------------------------------------------------------------------
       
    26 #include <e32base.h>
       
    27 #include "nsmldmhostserver.h"
       
    28 
       
    29 /**
       
    30 * Class CNSmlDMHostServer3.
       
    31 *
       
    32 * @lib In order to use this class, launch nsmldmhostserver3 (.exe)
       
    33 */
       
    34 class CNSmlDMHostServer3 : public CNSmlDMHostServer
       
    35 	{
       
    36 public:
       
    37 
       
    38    	/**
       
    39 	* Launches the server.
       
    40 	*  Calls the common code part (InitHostServer) of all specialized DM Host Servers.
       
    41 	* @param (TAny*). Not used in this function. 
       
    42 	*				  Kept here for possible future needs.
       
    43 	* @return TInt. Return value from InitHostServer function.
       
    44 	*/
       
    45     static TInt LaunchServer ( TAny* );
       
    46 
       
    47    	/**
       
    48 	* Calls the NewL for creating the DM Host Server 3 instance.
       
    49 	*  This ThreadFunction is called when the 'common initialization actions' 
       
    50 	*  are successfully run.
       
    51 	*  Launches the active scheduler.
       
    52 	* @param aStarted. Not used.
       
    53 	* @return TInt. Returns always KErrNone.
       
    54 	*/
       
    55     static TInt ThreadFunction ( TAny* aStarted );
       
    56 
       
    57    	/**
       
    58 	* Creates a new instance of DM Host Server 3.
       
    59 	*  Adds the server with the specified name to the active scheduler, 
       
    60 	*  and issues the first request for messages. 
       
    61 	*  Signals the global semaphore, which releases the client (DM Tree Module)
       
    62 	*  from the waiting state.
       
    63 	* @param aServerName. The name of the server: "nsmldmhostserver3".
       
    64 	* @return CNSmlDMHostServer3*. The created server instance.
       
    65 	*/
       
    66 	static CNSmlDMHostServer3* NewL ( const TDesC& aServerName );
       
    67 
       
    68 	/**
       
    69 	* Destructor.
       
    70 	*/
       
    71 	~CNSmlDMHostServer3();
       
    72 private:
       
    73 
       
    74 	/**
       
    75 	* C++ constructor.
       
    76 	*/
       
    77     CNSmlDMHostServer3();
       
    78 
       
    79    	/**
       
    80 	* Panics the server.
       
    81 	*  This is called if the instance creation of DM Host Server 3 leaves,
       
    82 	*  e.g. due to call 'StartL' CServer2 -function.
       
    83 	* @param aPanic. The panic reason code.
       
    84 	*/
       
    85     static void PanicServer ( TNSmlDmHostServerPanic aPanic );
       
    86 
       
    87    	/**
       
    88 	* Calls CallNewSessionL.
       
    89 	* @param aVersion. The version of the server.
       
    90 	* @param aMessage. An object which encapsulates a client request.
       
    91 	* @return CSession2*. The created new session instance.
       
    92 	*/
       
    93     CSession2* NewSessionL ( const TVersion& aVersion, const RMessage2& aMessage ) const;
       
    94 	};
       
    95 
       
    96 #endif // __NSMLDMHOSTSERVER3_H__