radiohswidget/stub/xqapplicationmanager.cpp
branchRCL_3
changeset 20 93c594350b9a
parent 19 cce62ebc198e
equal deleted inserted replaced
19:cce62ebc198e 20:93c594350b9a
     1 /*
       
     2 * Copyright (c) 2010 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:  XQApplicationManager stub for FM Radio home screen widget
       
    15 *               unit testing.
       
    16 *
       
    17 */
       
    18 
       
    19 // User includes
       
    20 #include "xqapplicationmanager.h"
       
    21 #include "xqaiwrequest.h"
       
    22 #include "radioservicedef.h"
       
    23 #include "radiologger.h"
       
    24 
       
    25 XQAiwRequest *application_manager_mock_refresh_request = new XQAiwRequest("interface", "operation", false);
       
    26 XQAiwRequest *application_manager_mock_monitor_request = new XQAiwRequest("interface", "operation2", false);
       
    27 
       
    28 /*!
       
    29     \class XQApplicationManager
       
    30     \brief Stub implementation of XQApplicationManager for unit testing
       
    31 */
       
    32 
       
    33 // ======== MEMBER FUNCTIONS ========
       
    34 
       
    35 XQApplicationManager::XQApplicationManager()
       
    36 {
       
    37     LOG_METHOD_ENTER;
       
    38 }
       
    39 
       
    40 XQApplicationManager::~XQApplicationManager()
       
    41 {
       
    42     LOG_METHOD_ENTER;
       
    43 }
       
    44 
       
    45 XQAiwRequest* XQApplicationManager::create(const QString& interface, const QString& operation, bool embedded)
       
    46 {
       
    47     LOG_METHOD_ENTER;
       
    48     if (operation.compare(RADIO_MONITOR_SERVICE_REFRESH_OPERATION) == 0) {
       
    49         application_manager_mock_refresh_request = new XQAiwRequest(interface, operation, embedded);
       
    50         return application_manager_mock_refresh_request;
       
    51     } else if (operation.compare(RADIO_MONITOR_SERVICE_OPERATION) == 0) {
       
    52         application_manager_mock_monitor_request = new XQAiwRequest(interface, operation, embedded);
       
    53         return application_manager_mock_monitor_request;
       
    54     }
       
    55     return NULL; 
       
    56 }