|
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: Message Application service interface used for interfacing between |
|
15 * QT highway and other applications |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef MSGSERVICEINTERFACE_H_ |
|
20 #define MSGSERVICEINTERFACE_H_ |
|
21 |
|
22 // INCLUDES |
|
23 #include <xqserviceprovider.h> |
|
24 #include <qvariant.h> |
|
25 #include <qmobilityglobal.h> |
|
26 |
|
27 //TODO: to be deprecated |
|
28 #include <QStringList> |
|
29 class ConvergedMessageAddress; |
|
30 |
|
31 QTM_BEGIN_NAMESPACE |
|
32 class QContactManager; |
|
33 QTM_END_NAMESPACE |
|
34 |
|
35 QTM_USE_NAMESPACE |
|
36 |
|
37 struct ContactDetail |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Constructor |
|
42 */ |
|
43 ContactDetail():contactId(-1),firstName(QString()), |
|
44 lastName(QString()){}; |
|
45 public: |
|
46 int contactId; |
|
47 QString firstName; |
|
48 QString lastName; |
|
49 QStringList addressList; |
|
50 }; |
|
51 |
|
52 class MsgViewManager; |
|
53 class MsgServiceInterface : public XQServiceProvider |
|
54 { |
|
55 Q_OBJECT |
|
56 |
|
57 public: |
|
58 /* |
|
59 * Constructor |
|
60 */ |
|
61 MsgServiceInterface(QObject* parent=0, MsgViewManager* manager =0); |
|
62 |
|
63 /* |
|
64 * Destructor |
|
65 */ |
|
66 ~MsgServiceInterface(); |
|
67 |
|
68 public slots: |
|
69 |
|
70 /** |
|
71 * send called from phone book. |
|
72 */ |
|
73 void send(const QString phoneNumber, const qint32 contactId, const QString displayName); |
|
74 |
|
75 /** |
|
76 * called from indications. |
|
77 */ |
|
78 void open(qint64 conversationId); |
|
79 |
|
80 /** |
|
81 * called from send UI. |
|
82 */ |
|
83 void send(QVariant data); |
|
84 |
|
85 /** |
|
86 * depricated api. will be removed in future. |
|
87 */ |
|
88 void openConversationView(QString number, QString name); |
|
89 |
|
90 signals: |
|
91 |
|
92 private: |
|
93 //TODO: to be deprecated |
|
94 bool resolveContact(const ConvergedMessageAddress &address, |
|
95 ContactDetail &contactDetail); |
|
96 |
|
97 private: |
|
98 MsgViewManager* mViewManager; |
|
99 |
|
100 }; |
|
101 |
|
102 |
|
103 #endif /* MsgServiceInterface_H_ */ |