tstaskmonitor/client/s60/src/tsscreenshotclientimpl.cpp
changeset 83 156f692b1687
child 99 7aaf39b772ac
equal deleted inserted replaced
80:397d00875918 83:156f692b1687
       
     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 
       
    18 #include <e32base.h>
       
    19 
       
    20 #include "tsscreenshotclientimpl.h"
       
    21 
       
    22 CTsScreenshotClientImpl* CTsScreenshotClientImpl::NewL()
       
    23 {
       
    24     CTsScreenshotClientImpl* self = NewLC();
       
    25     CleanupStack::Pop(self);
       
    26     return self;
       
    27 }
       
    28 
       
    29 CTsScreenshotClientImpl* CTsScreenshotClientImpl::NewLC()
       
    30 {
       
    31     CTsScreenshotClientImpl* self = new (ELeave) CTsScreenshotClientImpl;
       
    32     CleanupStack::PushL(self);
       
    33     self->ConstructL();
       
    34     return self;
       
    35 }
       
    36 
       
    37 CTsScreenshotClientImpl::CTsScreenshotClientImpl()
       
    38 {
       
    39 }
       
    40 
       
    41 CTsScreenshotClientImpl::~CTsScreenshotClientImpl()
       
    42 {
       
    43     iSession.Close();
       
    44 }
       
    45 
       
    46 void CTsScreenshotClientImpl::ConstructL()
       
    47 {
       
    48     User::LeaveIfError(iSession.Connect());
       
    49 }
       
    50 
       
    51 TInt CTsScreenshotClientImpl::RegisterScreenshot(CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority)
       
    52 {
       
    53     return iSession.RegisterScreenshot(screenshot, wgId, priority);
       
    54 }
       
    55 
       
    56 void CTsScreenshotClientImpl::RegisterScreenshot(TRequestStatus &status, CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority)
       
    57 {
       
    58     iSession.RegisterScreenshot(status, screenshot, wgId, priority);
       
    59 }
       
    60 
       
    61 TInt CTsScreenshotClientImpl::UnregisterScreenshot(TInt wgId)
       
    62 {
       
    63     return iSession.UnregisterScreenshot(wgId);
       
    64 }