31 class DraftsListView; |
31 class DraftsListView; |
32 class MsgSettingsView; |
32 class MsgSettingsView; |
33 class HbAction; |
33 class HbAction; |
34 |
34 |
35 class MsgViewManager: public QObject |
35 class MsgViewManager: public QObject |
36 { |
36 { |
37 Q_OBJECT |
37 Q_OBJECT |
38 |
38 |
39 public: |
39 public: |
40 /** |
40 /** |
41 * constructor |
41 * constructor |
42 */ |
42 */ |
43 MsgViewManager(bool serviceRequest, HbMainWindow* mainWindow, QObject* parent = 0); |
43 MsgViewManager(bool serviceRequest, HbMainWindow* mainWindow, QObject* parent = 0); |
44 |
44 |
45 /** |
45 /** |
46 * Destructor. |
46 * Destructor. |
47 */ |
47 */ |
48 ~MsgViewManager(); |
48 ~MsgViewManager(); |
49 |
49 |
50 /** |
50 /** |
51 * call back function will be called from MsgServiceInterface. |
51 * call back function will be called from MsgServiceInterface. |
52 */ |
52 */ |
53 void send(const qint32 contactId, const QString phoneNumber, const QString displayName); |
53 void send(const qint32 contactId, const QString phoneNumber, const QString displayName); |
54 |
54 |
55 /** |
55 /** |
56 * call back function called from MsgServiceInterface to set service request flag. |
56 * call back function called from MsgServiceInterface to set service request flag. |
57 */ |
57 */ |
58 void setServiceRequest(bool request); |
58 void setServiceRequest(bool request); |
59 |
59 |
60 /** |
60 /** |
61 * call back function called MsgServiceInterface. |
61 * call back function called MsgServiceInterface. |
62 */ |
62 */ |
63 void open(qint64 conversationId); |
63 void open(qint64 conversationId); |
64 |
64 |
65 /** |
65 /** |
66 * call back function called MsgServiceInterface. |
66 * call back function called MsgServiceInterface. |
67 */ |
67 */ |
68 void send(QVariant data); |
68 void send(QVariant data); |
69 |
69 |
70 /** |
70 /** |
71 * depricated api. will be removed in future. |
71 * depricated api. will be removed in future. |
72 */ |
72 */ |
73 void openEditor(QString number, QString name); |
73 void openEditor(QString number, QString name); |
74 |
74 |
|
75 /** |
|
76 * call back function will be called from MsgServiceInterface. |
|
77 */ |
|
78 void send(const QString phoneNumber, const QString alias, const QString bodyText); |
|
79 |
|
80 /** |
|
81 * Opens the viewer to view the message. |
|
82 * @param msgId message id of the message. |
|
83 */ |
|
84 void view(int msgId); |
|
85 |
75 private: |
86 private: |
76 /** |
87 /** |
77 * swiches back to last view after service request is complete. |
88 * swiches back to last view after service request is complete. |
78 */ |
89 */ |
79 void switchToLastSavedView(); |
90 void switchToLastSavedView(); |
80 |
91 |
81 /** |
92 /** |
82 * find conversation id corresponding to given phone no. |
93 * find conversation id corresponding to given phone no. |
83 * @param phoneNum |
94 * @param phoneNum |
84 */ |
95 */ |
85 qint64 findConversationId(const QString phoneNum); |
96 qint64 findConversationId(const QString phoneNum); |
86 |
97 |
87 /** |
98 /** |
88 * helper method to complete back action. |
99 * helper method to complete back action. |
89 */ |
100 */ |
90 void completeServiceRequest(); |
101 void completeServiceRequest(); |
91 |
102 |
122 /* |
133 /* |
123 * handle other cases. |
134 * handle other cases. |
124 */ |
135 */ |
125 void handleDefault(const QVariantList& data); |
136 void handleDefault(const QVariantList& data); |
126 |
137 |
|
138 /** |
|
139 * handle sms and mms messge |
|
140 * @param msgId message id |
|
141 */ |
|
142 void handleSmsMmsMsg(int msgId); |
|
143 |
|
144 /** |
|
145 * handle ringtone message |
|
146 * @param msgId message id |
|
147 */ |
|
148 void handleRingtoneMsg(int msgId); |
|
149 |
|
150 /** |
|
151 * handle provisioning message |
|
152 * @param msgId message id |
|
153 */ |
|
154 void handleProvisoningMsg(int msgId); |
|
155 |
127 private slots: |
156 private slots: |
128 /** |
157 /** |
129 * this slot is called on mainwindows back action. |
158 * this slot is called on mainwindows back action. |
130 */ |
159 */ |
131 void onBackAction(); |
160 void onBackAction(); |
132 |
161 |
133 /** |
162 /** |
134 * This slot is called when switchView signal is emitted from a view. |
163 * This slot is called when switchView signal is emitted from a view. |
135 */ |
164 */ |
136 void switchView(const QVariantList& data); |
165 void switchView(const QVariantList& data); |
137 |
166 |
138 private: |
167 private: |
139 /** |
168 /** |
140 * main window reference not owned. |
169 * main window reference not owned. |
141 */ |
170 */ |
142 HbMainWindow* mMainWindow; |
171 HbMainWindow* mMainWindow; |
143 |
172 |
144 /** |
173 /** |
145 * different views. |
174 * different views. |
146 */ |
175 */ |
147 MsgUnifiedEditorView* mUniEditor; |
176 MsgUnifiedEditorView* mUniEditor; |
148 MsgListView* mListView; |
177 MsgListView* mListView; |