taskswitcher/server/src/tsresourcemanagerimp.cpp
changeset 125 26079c1bb561
child 127 7b66bc3c6dc9
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 "tsresourcemanagerimp.h"
       
    18 #include "tswindowgroupsmonitorimp.h"
       
    19 
       
    20 // -----------------------------------------------------------------------------
       
    21 //
       
    22 // -----------------------------------------------------------------------------
       
    23 //
       
    24 CTsResourceManager* CTsResourceManager::NewL()
       
    25 {
       
    26     CTsResourceManager* self =new(ELeave) CTsResourceManager();
       
    27     CleanupStack::PushL(self);
       
    28     self->ConstructL();
       
    29     CleanupStack::Pop(self);
       
    30     return self;
       
    31 }
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 void CTsResourceManager::ConstructL()
       
    38 {
       
    39     User::LeaveIfError(mWsSession.Connect());
       
    40     User::LeaveIfError(mApaSeesion.Connect());
       
    41     iMonitor = CTsWindowGroupsMonitor::NewL(*this);
       
    42 }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CTsResourceManager::~CTsResourceManager()
       
    49 {
       
    50     delete iMonitor;
       
    51     mApaSeesion.Close();
       
    52     mWsSession.Close();
       
    53 }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 RWsSession& CTsResourceManager::WsSession()
       
    60 {
       
    61     return mWsSession;
       
    62 }
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 RApaLsSession& CTsResourceManager::ApaSession()
       
    69 {
       
    70     return mApaSeesion;
       
    71 }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 MTsWindowGroupsMonitor& CTsResourceManager::WsMonitor()
       
    75     {
       
    76     return *iMonitor;
       
    77     }