taskswitcher/utils/src/tsresourcemanager.cpp
changeset 125 26079c1bb561
parent 123 d1dadafc5584
child 126 efda7c0771b9
equal deleted inserted replaced
123:d1dadafc5584 125:26079c1bb561
     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 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 CTsResourceManager::~CTsResourceManager()
       
    46 {
       
    47     mApaSeesion.Close();
       
    48     mWsSession.Close();
       
    49 }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 RWsSession& CTsResourceManager::WsSession()
       
    56 {
       
    57     return mWsSession;
       
    58 }
       
    59 
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 // -----------------------------------------------------------------------------
       
    63 //
       
    64 RApaLsSession& CTsResourceManager::ApaSession()
       
    65 {
       
    66     return mApaSeesion;
       
    67 }