ximpfw/core/srcrootserver/ximprootserver.h
changeset 51 61fad867f68e
equal deleted inserted replaced
-1:000000000000 51:61fad867f68e
       
     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:  Root server implementation
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef CXIMPROOTSERVER_H
       
    19 #define CXIMPROOTSERVER_H
       
    20 
       
    21 #include "ximpsrv.h"
       
    22 #include <e32base.h>
       
    23 #include <ximpbase.h>
       
    24 
       
    25 class CXIMPGlobals;
       
    26 class MXIMPSrvTestListener;
       
    27 
       
    28 /**
       
    29  * Presence Root server implementation.
       
    30  * There exists one root server.
       
    31  */
       
    32 class CXIMPRootServer : public CPolicyServer,
       
    33                         public MXIMPSrv
       
    34     {
       
    35 public:     // Execution and destructor
       
    36 
       
    37     static void ExecuteL();
       
    38     virtual ~CXIMPRootServer();
       
    39 
       
    40 
       
    41 private:    //Constructors
       
    42 
       
    43     static CXIMPRootServer* NewLC();
       
    44     CXIMPRootServer();
       
    45     void ConstructL();
       
    46 
       
    47 
       
    48 public:     // From CPolicyServer
       
    49 
       
    50     CSession2* NewSessionL( const TVersion& aVersion,
       
    51                             const RMessage2& aMessage ) const;
       
    52 
       
    53 
       
    54 private:     // From MXIMPSrv
       
    55 
       
    56     void SessionCreated();
       
    57     void SessionDied();    
       
    58 
       
    59 private:    //Data
       
    60 
       
    61     // OWN: Count of sessions
       
    62     TInt iSessionCount;
       
    63 
       
    64     // OWN: pointer to globals singleton
       
    65     CXIMPGlobals* iGlobals;
       
    66 
       
    67     // Always increasing session id counter. Stays unique per server for
       
    68     // up to 2^32-1 invocations of NewSessionL.
       
    69     TUint32 iSessionIdCounter;
       
    70     };
       
    71 
       
    72 #endif      // CXIMPROOTSERVER_H
       
    73 
       
    74 
       
    75 
       
    76