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