controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofilemonitor.cpp
changeset 40 593f946f4fec
parent 22 a5692c68d772
equal deleted inserted replaced
22:a5692c68d772 40:593f946f4fec
     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 "cpprofilemonitor.h"
       
    19 
       
    20 #include <CProfileChangeNotifyHandler.h>
       
    21 
       
    22 CpProfileMonitor::CpProfileMonitor(QObject *parent)
       
    23     :QObject(parent),mProfileNotifier(0)
       
    24 {
       
    25     mProfileNotifier = CProfileChangeNotifyHandler::NewL(this);    
       
    26 }
       
    27 
       
    28 CpProfileMonitor::~CpProfileMonitor()
       
    29 {    
       
    30     delete mProfileNotifier;        
       
    31 }
       
    32 
       
    33 void CpProfileMonitor::HandleActiveProfileEventL(TProfileEvent aProfileEvent, TInt aProfileId)
       
    34 {
       
    35     if (EProfileNewActiveProfile == aProfileEvent) {
       
    36         emit profileActivated(aProfileId);
       
    37     }
       
    38 }