logsui/logsservices/src/logsservices.cpp
changeset 21 2f0af9ba7665
parent 18 acd4e87b24b4
equal deleted inserted replaced
18:acd4e87b24b4 21:2f0af9ba7665
     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 <xqservicerequest.h>
       
    19 #include <logsservices.h>
       
    20 #include "logslogger.h"
       
    21 
       
    22 /*!
       
    23     \deprecated LogsServices::start(LogsView activatedView, bool showDialpad, const QString& number)
       
    24         is deprecated. Use XQApplicationManager and
       
    25         "com.nokia.symbian.ILogsView" interface instead
       
    26 */
       
    27 int LogsServices::start(LogsView activatedView, bool showDialpad, const QString& number)
       
    28 {
       
    29     LOGS_QDEBUG_2( "LogsServices::start ->", activatedView )
       
    30     // Need to do request in async manner, otherwise new logs ui process
       
    31     // will be started due bug(?) in highway.
       
    32     
       
    33     bool res( false );
       
    34     int retValue = -1; 
       
    35     if ( number.isEmpty() ){
       
    36         XQServiceRequest snd("com.nokia.services.logsservices.starter",
       
    37                 "start(int,bool)", false);
       
    38         snd << (int)activatedView;
       
    39         snd << showDialpad;
       
    40         res=snd.send(retValue);
       
    41         LOGS_QDEBUG_3( "LogsServices::start <-", activatedView, retValue )
       
    42     } else {
       
    43         XQServiceRequest snd("com.nokia.services.logsservices.starter",
       
    44                 "startWithNum(int,bool,QString)", false);
       
    45         snd << (int)activatedView;
       
    46         snd << showDialpad;
       
    47         snd << number;
       
    48         res=snd.send(retValue);
       
    49         LOGS_QDEBUG_3( "LogsServices::start <-", activatedView, retValue )
       
    50     }
       
    51     return res ? retValue : -1;
       
    52 }