|
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 * Example usage: |
|
18 * QString service("phoneui"); |
|
19 * QString interface(""com.nokia.symbian.ICallDial"); |
|
20 * QString operation("dial(QString)"); // choose appropriate operation |
|
21 * XQApplicationManager appManager; |
|
22 * QScopedPointer<XQAiwRequest> request(appManager.create(service, interface, operation, false)); |
|
23 * if (request == NULL) { |
|
24 * //Service not found |
|
25 * } |
|
26 * QList<QVariant> args; |
|
27 * args << QString("0501234567"); // number or address |
|
28 * // add contactId and serviceId when needed by operation |
|
29 * request->setArguments(args); |
|
30 * QVariant retValue; |
|
31 * if (request->send(retValue)) { |
|
32 * //error |
|
33 * } |
|
34 * |
|
35 * Note: |
|
36 * |
|
37 */ |
|
38 |
|
39 #ifndef DIALSERVICE_H |
|
40 #define DIALSERVICE_H |
|
41 |
|
42 #include <QObject> |
|
43 #include <QString> |
|
44 #include <xqserviceprovider.h> |
|
45 #include "mpecallcontrolif.h" |
|
46 #include "mpecallsettersif.h" |
|
47 |
|
48 // FORWARD DECLARATIONS |
|
49 class XQSettingsManager; |
|
50 |
|
51 class DialService : public XQServiceProvider |
|
52 { |
|
53 Q_OBJECT |
|
54 public: |
|
55 DialService(MPECallControlIF &call, MPECallSettersIF ¶meters, QObject *parent = 0); |
|
56 ~DialService(); |
|
57 |
|
58 public slots: |
|
59 /*! |
|
60 \fn dial(const QString& number) |
|
61 |
|
62 This method makes a cellular switched dial command to |
|
63 Phone Application. It is intended to be used via Qt Highway. |
|
64 */ |
|
65 int dial(const QString& number); |
|
66 |
|
67 /*! |
|
68 \fn dial(const QString& number) |
|
69 |
|
70 This method makes a cellular switched dial command to |
|
71 Phone Application. It is intended to be used via Qt Highway. |
|
72 Caller's name is shown according to the given Phonebook contact |
|
73 identifier. |
|
74 |
|
75 */ |
|
76 int dial(const QString& number, int contactId); |
|
77 |
|
78 /*! |
|
79 \fn dialVideo(const QString& number) |
|
80 |
|
81 This method makes a video call dial command to |
|
82 Phone Application. It is intended to be used via Qt Highway. |
|
83 |
|
84 */ |
|
85 int dialVideo(const QString& number); |
|
86 |
|
87 /*! |
|
88 \fn dial(const QString& number) |
|
89 |
|
90 This method makes a video call dial command to |
|
91 Phone Application. It is intended to be used via Qt Highway. |
|
92 Caller's name is shown according to the given Phonebook contact |
|
93 identifier. |
|
94 */ |
|
95 int dialVideo(const QString& number, int contactId); |
|
96 |
|
97 /*! |
|
98 \fn dialVoip(const QString& address) |
|
99 |
|
100 This method makes a voip call dial command to |
|
101 Phone Application. It is intended to be used via Qt Highway. |
|
102 */ |
|
103 int dialVoip(const QString& address); |
|
104 |
|
105 /*! |
|
106 \fn dialVoip(const QString& address, int contactId) |
|
107 |
|
108 This method makes a voip call dial command to |
|
109 Phone Application. It is intended to be used via Qt Highway. |
|
110 Caller's name is shown according to the given Phonebook contact |
|
111 identifier. |
|
112 |
|
113 */ |
|
114 int dialVoip(const QString& address, int contactId); |
|
115 |
|
116 /*! |
|
117 \fn dialVoipService(const QString& address, int contactId) |
|
118 |
|
119 This method makes a voip call dial command to |
|
120 Phone Application. It is intended to be used via Qt Highway. |
|
121 Call is made by given service (id). |
|
122 */ |
|
123 int dialVoipService(const QString& address, int serviceId); |
|
124 |
|
125 /*! |
|
126 \fn dialVoipService(const QString& address, int serviceId, int contactId) |
|
127 |
|
128 This method makes a voip call dial command to |
|
129 Phone Application. It is intended to be used via Qt Highway. |
|
130 Call is made by given service (id). |
|
131 Caller's name is shown according to the given Phonebook contact |
|
132 identifier. |
|
133 */ |
|
134 int dialVoipService(const QString& address, int serviceId, int contactId); |
|
135 |
|
136 private: |
|
137 |
|
138 /*! |
|
139 \fn QString modifyPhoneNumber(QString& number) |
|
140 |
|
141 Returns a modified phone number string. Strips white spaces, makes prefix changes etc. |
|
142 */ |
|
143 QString modifyPhoneNumber(const QString &number) Q_REQUIRED_RESULT; |
|
144 |
|
145 /*! |
|
146 \fn QString simplified(QString& number) |
|
147 |
|
148 Returns a string that has whitespaces, '(', ')', '-', '[', and ']' chars removed |
|
149 */ |
|
150 static QString simplified(const QString &number) Q_REQUIRED_RESULT; |
|
151 |
|
152 /*! |
|
153 \fn QString japanPrefixModifications(QString& number) |
|
154 |
|
155 Returns a string that has japan specific configuration modifications made |
|
156 */ |
|
157 QString japanPrefixModifications(const QString &number) Q_REQUIRED_RESULT; |
|
158 |
|
159 |
|
160 /*! |
|
161 \fn bool hasCapability() |
|
162 |
|
163 Checks if the client has the required capabilities |
|
164 */ |
|
165 bool hasCapability(); |
|
166 |
|
167 |
|
168 private: |
|
169 MPECallControlIF &m_call; |
|
170 MPECallSettersIF &m_parameters; |
|
171 XQSettingsManager *m_settingsManager; |
|
172 }; |
|
173 |
|
174 #endif // DIALERSERVICE_H |