logsui/tsrc/callservicesimulation/src/serviceapp.h
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 #ifndef PHONESERVICE_H
       
    19 #define PHONESERVICE_H
       
    20 
       
    21 #include <QWidget>
       
    22 #include <QModelIndex>
       
    23 #include <QMap>
       
    24 #include <QStringList>
       
    25 #include <xqserviceprovider.h>
       
    26 
       
    27 class QLineEdit;
       
    28 class QPushButton;
       
    29 class DialerService;
       
    30 class QLabel;
       
    31 
       
    32 class ServiceApp : public QWidget
       
    33 {
       
    34     Q_OBJECT
       
    35 public:
       
    36     ServiceApp( QWidget *parent = 0, Qt::WFlags f = 0 );
       
    37     ~ServiceApp();
       
    38 
       
    39     void setLabelNumber(QString label,QString number);
       
    40 
       
    41 public slots:    
       
    42     void endCall();
       
    43     
       
    44 private slots:
       
    45     void quit();
       
    46 private:
       
    47     QLabel *mLabel;
       
    48     QLabel *mNumber;
       
    49     //QPushButton *mEndCallButton;
       
    50     DialerService* mService;
       
    51 };
       
    52 
       
    53 class DialerService : public XQServiceProvider
       
    54 {
       
    55     Q_OBJECT
       
    56 public:
       
    57     DialerService( ServiceApp *parent = 0 );
       
    58     ~DialerService();
       
    59     
       
    60     void complete(QString number);
       
    61     bool asyncAnswer() {return mAsyncAnswer;}
       
    62 public slots:
       
    63     void dial(const QString& number);
       
    64     void dial(const QString& number,int contactId);
       
    65     void dialVideo(const QString& number);
       
    66     void dialVideo(const QString& number,int contactId);
       
    67     
       
    68 private:
       
    69     ServiceApp* mServiceApp;
       
    70     QString mNumber;
       
    71     bool mAsyncAnswer;
       
    72 };
       
    73 
       
    74 #endif