logsui/logsservices/src/logsservices.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 11 Jun 2010 13:38:41 +0300
changeset 6 41c0a814d878
parent 0 4a5361db8937
permissions -rw-r--r--
Revision: 201021 Kit: 2010123

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

#include <xqservicerequest.h>
#include <logsservices.h>
#include "logslogger.h"

/*!
    \deprecated LogsServices::start(LogsView activatedView, bool showDialpad, const QString& number)
        is deprecated. Use XQApplicationManager and
        "com.nokia.symbian.ILogsView" interface instead
*/
int LogsServices::start(LogsView activatedView, bool showDialpad, const QString& number)
{
    LOGS_QDEBUG_2( "LogsServices::start ->", activatedView )
    // Need to do request in async manner, otherwise new logs ui process
    // will be started due bug(?) in highway.
    
    bool res( false );
    int retValue = -1; 
    if ( number.isEmpty() ){
        XQServiceRequest snd("com.nokia.services.logsservices.starter",
                "start(int,bool)", false);
        snd << (int)activatedView;
        snd << showDialpad;
        res=snd.send(retValue);
        LOGS_QDEBUG_3( "LogsServices::start <-", activatedView, retValue )
    } else {
        XQServiceRequest snd("com.nokia.services.logsservices.starter",
                "startWithNum(int,bool,QString)", false);
        snd << (int)activatedView;
        snd << showDialpad;
        snd << number;
        res=snd.send(retValue);
        LOGS_QDEBUG_3( "LogsServices::start <-", activatedView, retValue )
    }
    return res ? retValue : -1;
}