phoneapp/phoneuiqtviewadapter/inc/telephonyservice.h
branchRCL_3
changeset 61 41a7f70b3818
equal deleted inserted replaced
58:40a3f856b14d 61:41a7f70b3818
       
     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:  Telephony Service API to be used through Qt Highway.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TELEPHONYSERVICE_H
       
    19 #define TELEPHONYSERVICE_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QString>
       
    23 #include <xqserviceprovider.h>
       
    24 
       
    25 class PhoneUIQtViewAdapter;
       
    26 
       
    27 
       
    28 class TelephonyService : public XQServiceProvider
       
    29 {
       
    30     Q_OBJECT
       
    31 public:
       
    32     TelephonyService(PhoneUIQtViewAdapter *phoneView, QObject *parent = 0);
       
    33     ~TelephonyService();
       
    34     
       
    35 public slots:
       
    36 
       
    37     /*!
       
    38         \fn void start()
       
    39         
       
    40         Start launches telephony UI service.
       
    41         serviceId '0': Brings phoneapp to foreground.
       
    42         serviceId '1': Starts incall dialer, note if there is no ongoing calls and client uses value '1'
       
    43                        then dialer launches on top of empty call handling.
       
    44         
       
    45         Usage example:
       
    46         QString service("phoneui");
       
    47         QString interface(""com.nokia.symbian.IStart");
       
    48         QString operation("start(int)");
       
    49         XQApplicationManager appManager;
       
    50         QScopedPointer<XQAiwRequest> request(appManager.create(service, interface, operation, false));
       
    51         if (request == NULL) {
       
    52             //Service not found 
       
    53         }
       
    54         QList<QVariant> args;
       
    55         args << 1; // open dialpad
       
    56         request->setArguments(args);
       
    57         if (request->send()) {
       
    58            //error
       
    59         }
       
    60     */
       
    61     void start(const int serviceId);
       
    62     
       
    63 private:
       
    64     
       
    65     PhoneUIQtViewAdapter *m_viewAdapter;
       
    66 };
       
    67 
       
    68 #endif // TELEPHONYSERVICE_H