activityfw/tsutils/src/tsresourcemanager.cpp
changeset 116 305818acdca4
parent 112 dbfb5e38438b
child 119 50e220be30d1
equal deleted inserted replaced
112:dbfb5e38438b 116:305818acdca4
     1 /*
       
     2  * Copyright (c) 2009 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 :
       
    15  *
       
    16  */
       
    17 #include "tswindowgroupsobserver.h"
       
    18 // -----------------------------------------------------------------------------
       
    19 //
       
    20 // -----------------------------------------------------------------------------
       
    21 //
       
    22 EXPORT_C CTsResourceManager* CTsResourceManager::NewL()
       
    23 {
       
    24     CTsResourceManager* self =new(ELeave) CTsResourceManager();
       
    25     CleanupStack::PushL(self);
       
    26     self->ConstructL();
       
    27     CleanupStack::Pop(self);
       
    28     return self;
       
    29 }
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 void CTsResourceManager::ConstructL()
       
    36 {
       
    37     User::LeaveIfError(mWsSession.Connect());
       
    38     User::LeaveIfError(mApaSeesion.Connect());
       
    39 }
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 // -----------------------------------------------------------------------------
       
    44 //
       
    45 EXPORT_C CTsResourceManager::~CTsResourceManager()
       
    46 {
       
    47     mApaSeesion.Close();
       
    48     mWsSession.Close();
       
    49 }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 EXPORT_C RWsSession& CTsResourceManager::WsSession()
       
    56 {
       
    57     return mWsSession;
       
    58 }
       
    59 
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 // -----------------------------------------------------------------------------
       
    63 //
       
    64 EXPORT_C RApaLsSession& CTsResourceManager::ApaSession()
       
    65 {
       
    66     return mApaSeesion;
       
    67 }