ximpfw/core/srcpscserver/ximpserversessionadapter.cpp
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     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:  PSC server session adapter
       
    15  *
       
    16 */
       
    17 
       
    18 #include "ximpserversessionadapter.h"
       
    19 #include "ximpserverdefs.h"
       
    20 #include "ximpsrvmessage.h"
       
    21 #include "ximpcontextsession.h"
       
    22 #include "ximpsrv.h"
       
    23 #include <e32base.h>
       
    24 
       
    25 
       
    26 //Include PSC server namespace
       
    27 using namespace NXIMPSrv;
       
    28 
       
    29 
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CXIMPServerSessionAdapter::NewL()
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 CXIMPServerSessionAdapter* CXIMPServerSessionAdapter::NewL( 
       
    36     TUint32 aSessionId,
       
    37     MXIMPSrv& aServer )
       
    38     {
       
    39     CXIMPServerSessionAdapter* self = 
       
    40             new( ELeave ) CXIMPServerSessionAdapter( aSessionId,
       
    41                                                         aServer );
       
    42     return self;
       
    43     }
       
    44 
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CXIMPServerSessionAdapter::~CXIMPServerSessionAdapter()
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 CXIMPServerSessionAdapter::~CXIMPServerSessionAdapter()
       
    51     {
       
    52     }
       
    53 
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CXIMPServerSessionAdapter::CXIMPServerSessionAdapter()
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 CXIMPServerSessionAdapter::CXIMPServerSessionAdapter( 
       
    60     TUint32 aSessionId,
       
    61     MXIMPSrv& aServer )
       
    62     : CXIMPSrvSessionAdapter( aServer ),
       
    63       iSessionId( aSessionId )
       
    64     {
       
    65     }
       
    66 
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // CXIMPServerSessionAdapter::DoInstantiateSessionL()
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 MXIMPSrvSession* CXIMPServerSessionAdapter::DoInstantiateSessionL( 
       
    73     const MXIMPSrvMessage& aMessage )
       
    74     {
       
    75     switch( aMessage.Function() )
       
    76         {
       
    77         case NRequest::EBecomeCtxSession:
       
    78             {
       
    79             return CXIMPContextSession::NewL( iSessionId );
       
    80             }
       
    81         default:
       
    82             {
       
    83             return NULL;
       
    84             }        
       
    85         }
       
    86     }
       
    87 
       
    88 // End of file