taskswitcher/testapplications/parentembedded/embedded/testservicehandler.cpp
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     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 "testservicehandler.h"
       
    19 
       
    20 
       
    21 
       
    22 TestServiceHandler::TestServiceHandler(QObject *parent):
       
    23     XQServiceProvider(QLatin1String("com.nokia.services.embeddedservices.requestSetTitle"), parent),
       
    24     mCurrentRequestIndex(0), mTitle("Embedded")
       
    25 {
       
    26     publishAll();
       
    27 }
       
    28 
       
    29 TestServiceHandler::~TestServiceHandler()
       
    30 {
       
    31 }
       
    32 
       
    33 void TestServiceHandler::completeRequestSetTitle(const QString& title)
       
    34 {
       
    35     QVariant retValue;
       
    36     retValue.setValue(title);
       
    37     bool ok = completeRequest(mCurrentRequestIndex, retValue);
       
    38     mCurrentRequestIndex = 0;
       
    39 }
       
    40 
       
    41 
       
    42 void TestServiceHandler::requestSetTitle(const QString &title)
       
    43 {
       
    44     mTitle = title;
       
    45     mCurrentRequestIndex = setCurrentRequestAsync();
       
    46     emit launchSetTitle(title);
       
    47 }
       
    48 
       
    49 QString TestServiceHandler::title()
       
    50 {
       
    51     return mTitle;
       
    52 }
       
    53