phoneengine/phoneservices/inc/dialservice.h
changeset 36 2eacb6118286
parent 30 ebdbd102c78a
child 37 ba76fc04e6c2
equal deleted inserted replaced
30:ebdbd102c78a 36:2eacb6118286
     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:  Dial API to be used through Qt Highway.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DIALSERVICE_H
       
    19 #define DIALSERVICE_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QString>
       
    23 #include <xqserviceprovider.h>
       
    24 #include "mpecallcontrolif.h"
       
    25 #include "mpecallsettersif.h"
       
    26 
       
    27 class DialService : public XQServiceProvider
       
    28 {
       
    29     Q_OBJECT
       
    30 public:
       
    31     DialService(MPECallControlIF &call, MPECallSettersIF &parameters, QObject *parent = 0);
       
    32     ~DialService();
       
    33     
       
    34 public slots:
       
    35     /*!
       
    36         \fn dial(const QString& number)
       
    37         
       
    38         This method makes a cellular switched dial command to
       
    39         Phone Application. It is intended to be used via Qt Highway.
       
    40         
       
    41         Usage example:
       
    42         XQServiceRequest snd("com.nokia.symbian.ICallDial","dial(QString)");
       
    43         snd << "0501234567";        
       
    44     */
       
    45     int dial(const QString& number);
       
    46     
       
    47     /*!
       
    48         \fn dial(const QString& number)
       
    49         
       
    50         This method makes a cellular switched dial command to
       
    51         Phone Application. It is intended to be used via Qt Highway.
       
    52         Caller's name is shown according to the given Phonebook contact
       
    53         identifier.
       
    54         
       
    55         Usage example:
       
    56         XQServiceRequest snd("com.nokia.symbian.ICallDial","dial(QString,int)");
       
    57         snd << "0501234567" << 123456;        
       
    58     */
       
    59     int dial(const QString& number, int contactId);
       
    60     
       
    61     /*!
       
    62         \fn dialVideo(const QString& number)
       
    63         
       
    64         This method makes a video call dial command to
       
    65         Phone Application. It is intended to be used via Qt Highway.
       
    66         
       
    67         Usage example:
       
    68         XQServiceRequest snd("com.nokia.symbian.ICallDial","dial(QString)");
       
    69         snd << "0501234567";        
       
    70     */
       
    71     void dialVideo(const QString& number);
       
    72 
       
    73     /*!
       
    74         \fn dial(const QString& number)
       
    75         
       
    76         This method makes a video call dial command to
       
    77         Phone Application. It is intended to be used via Qt Highway.
       
    78         Caller's name is shown according to the given Phonebook contact
       
    79         identifier.
       
    80         
       
    81         Usage example:
       
    82         XQServiceRequest snd("com.nokia.symbian.ICallDial","dial(QString,int)");
       
    83         snd << "0501234567" << 123456;        
       
    84     */
       
    85     void dialVideo(const QString& number, int contactId);
       
    86     
       
    87     /*!
       
    88         \fn dialVoip(const QString& address)
       
    89         
       
    90         This method makes a voip call dial command to
       
    91         Phone Application. It is intended to be used via Qt Highway.
       
    92         
       
    93         Usage example:
       
    94         XQServiceRequest snd("com.nokia.symbian.ICallDial","dialVoip(QString)");
       
    95         snd << "address@domain";        
       
    96     */
       
    97     void dialVoip(const QString& address);
       
    98     
       
    99     /*!
       
   100         \fn dialVoip(const QString& address, int contactId)
       
   101         
       
   102         This method makes a voip call dial command to
       
   103         Phone Application. It is intended to be used via Qt Highway.
       
   104         Caller's name is shown according to the given Phonebook contact
       
   105         identifier.
       
   106         
       
   107         Usage example:
       
   108         XQServiceRequest snd("com.nokia.symbian.ICallDial","dialVoip(QString,int)");
       
   109         snd << "address@domain" << 123456;        
       
   110     */
       
   111     void dialVoip(const QString& address, int contactId);
       
   112     
       
   113     /*!
       
   114         \fn dialVoipService(const QString& address, int contactId)
       
   115         
       
   116         This method makes a voip call dial command to
       
   117         Phone Application. It is intended to be used via Qt Highway.
       
   118         Call is made by given service (id).
       
   119         
       
   120         Usage example:
       
   121         XQServiceRequest snd("com.nokia.symbian.ICallDial","dialVoipService(QString,int)");
       
   122         snd << "address@domain" << 123;        
       
   123     */
       
   124     void dialVoipService(const QString& address, int serviceId);
       
   125     
       
   126     /*!
       
   127         \fn dialVoipService(const QString& address, int serviceId, int contactId)
       
   128         
       
   129         This method makes a voip call dial command to
       
   130         Phone Application. It is intended to be used via Qt Highway.
       
   131         Call is made by given service (id).
       
   132         Caller's name is shown according to the given Phonebook contact
       
   133         identifier.
       
   134         
       
   135         Usage example:
       
   136         XQServiceRequest snd("com.nokia.symbian.ICallDial","dialVoipService(QString,int,int)");
       
   137         snd << "address@domain" << 123 << 12345;        
       
   138     */
       
   139     void dialVoipService(const QString& address, int serviceId, int contactId);
       
   140     
       
   141 private:
       
   142     /*!
       
   143         \fn QString simplified(QString& number)
       
   144         
       
   145         Returns a string that has whitespaces, '(', ')', '-', '[', and ']' chars removed 
       
   146     */
       
   147     static QString simplified(const QString &number) Q_REQUIRED_RESULT;
       
   148 
       
   149 
       
   150 private:
       
   151     MPECallControlIF &m_call;
       
   152     MPECallSettersIF &m_parameters;    
       
   153 };
       
   154 
       
   155 #endif // DIALERSERVICE_H