utilities/mpapplicationmonitor/src/mpapplicationmonitor.cpp
changeset 55 f3930dda3342
equal deleted inserted replaced
51:560ce2306a17 55:f3930dda3342
       
     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: Music Player now playing widget - private implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "mpapplicationmonitor.h"
       
    19 #include "mpapplicationmonitor_p.h"
       
    20 #include "mptrace.h"
       
    21 
       
    22 /*!
       
    23     \class MpApplicationMonitor
       
    24     \brief Application monitor.
       
    25 
       
    26     This utility monitors an application status, i.e. whether the application
       
    27     is running or not.
       
    28 */
       
    29 
       
    30 /*!
       
    31     \fn applicationStatusChanged( bool isRunning )
       
    32 
       
    33     This signal is emitted when the application status changes. Application
       
    34     status is indicated with \a isRunning.
       
    35 */
       
    36 
       
    37 /*!
       
    38  Constructs the utility. Default monitored application is Music Player.
       
    39  */
       
    40 MpApplicationMonitor::MpApplicationMonitor( quint32 clientSecureId, QObject *parent )
       
    41     : QObject(parent)
       
    42 {
       
    43     d_ptr = new MpApplicationMonitorPrivate(this);
       
    44     d_ptr->init( clientSecureId );
       
    45 }
       
    46 
       
    47 /*!
       
    48  Destructs the utility.
       
    49  */
       
    50 MpApplicationMonitor::~MpApplicationMonitor()
       
    51 {
       
    52     delete d_ptr;
       
    53 }
       
    54 
       
    55 /*!
       
    56  Returns whether the monitoring application is running.
       
    57  */
       
    58 bool MpApplicationMonitor::isApplicationRunning()
       
    59 {
       
    60     return d_ptr->isApplicationRunning();
       
    61 }
       
    62