logsui/logsapp/src/logsservicehandlerold.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 //USER
       
    18 #include "logsservicehandlerold.h"
       
    19 #include "logslogger.h"
       
    20 #include <xqserviceutil.h>
       
    21 
       
    22 //SYSTEM
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // LogsServiceHandlerOld::LogsServiceHandlerOld
       
    26 // deprecated Use "logs.com.nokia.symbian.ILogsView" interface and 
       
    27 //            "show(QVariantMap)" operation instead
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 LogsServiceHandlerOld::LogsServiceHandlerOld()
       
    31     : XQServiceProvider(QLatin1String("com.nokia.services.logsservices.starter"),0)
       
    32 {
       
    33     LOGS_QDEBUG( "logs [UI] -> LogsServiceHandlerOld::LogsServiceHandlerOld()" )
       
    34     
       
    35     publishAll();
       
    36     mIsAppStartedUsingService = XQServiceUtil::isService();
       
    37     
       
    38     LOGS_QDEBUG_2( 
       
    39         "logs [UI] <- LogsServiceHandlerOld::LogsServiceHandlerOld(), is service",
       
    40         mIsAppStartedUsingService )
       
    41 }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // LogsServiceHandlerOld::~LogsServiceHandlerOld
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 LogsServiceHandlerOld::~LogsServiceHandlerOld()
       
    48 {
       
    49     LOGS_QDEBUG( "logs [UI] <-> LogsServiceHandlerOld::~LogsServiceHandlerOld()" )
       
    50 }
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // LogsServiceHandlerOld::start
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 int LogsServiceHandlerOld::start(int activatedView, bool showDialpad)
       
    57 {
       
    58     LOGS_QDEBUG_2( "logs [UI] -> LogsServiceHandlerOld::start(), view:", activatedView )
       
    59     
       
    60     if ( activatedView < XQService::LogsViewAll || 
       
    61          activatedView > XQService::LogsViewMissed ){
       
    62         LOGS_QDEBUG( "logs [UI] <- LogsServiceHandlerOld::start(), incorrect view" )
       
    63         return -1;
       
    64     }
       
    65     mIsAppStartedUsingService = true;
       
    66     
       
    67     emit activateView((XQService::LogsViewIndex)activatedView, showDialpad, QString());
       
    68 
       
    69     LOGS_QDEBUG( "logs [UI] <- LogsServiceHandlerOld::start()" )
       
    70     return 0;
       
    71 }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // LogsServiceHandlerOld::startWithNum
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 int LogsServiceHandlerOld::startWithNum(int activatedView, bool showDialpad, QString dialpadText)
       
    78 {
       
    79     LOGS_QDEBUG_2( "logs [UI] -> LogsServiceHandlerOld::startWithNum(), view:", activatedView )
       
    80     
       
    81     Q_UNUSED(showDialpad);
       
    82     
       
    83     if ( activatedView < XQService::LogsViewAll || 
       
    84          activatedView > XQService::LogsViewMissed ){
       
    85         LOGS_QDEBUG( "logs [UI] <- LogsServiceHandlerOld::startWithNum(), incorrect view" )
       
    86         return -1;
       
    87     }
       
    88     mIsAppStartedUsingService = true;
       
    89     
       
    90     emit activateView(dialpadText);
       
    91 
       
    92     LOGS_QDEBUG( "logs [UI] <- LogsServiceHandlerOld::startWithNum()" )
       
    93     return 0;
       
    94 }
       
    95 
       
    96 // -----------------------------------------------------------------------------
       
    97 // LogsServiceHandlerOld::isStartedUsingService
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 bool LogsServiceHandlerOld::isStartedUsingService() const
       
   101 {
       
   102     return mIsAppStartedUsingService;
       
   103 }
       
   104