author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 17 Sep 2010 08:28:39 +0300 | |
changeset 70 | a15d9966050f |
parent 31 | ebfee66fde93 |
permissions | -rw-r--r-- |
31 | 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 notifier main class. |
|
15 |
* Handles calling notifications and inidcations. |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
#ifndef MSGNOTIFIER_H |
|
20 |
#define MSGNOTIFIER_H |
|
21 |
||
22 |
// SYSTEM INCLUDES |
|
23 |
#include <QObject> |
|
24 |
#include <QString> |
|
25 |
#include <QQueue> |
|
26 |
#include "msginfodefs.h" |
|
27 |
||
28 |
// CLASS DECLARATION |
|
29 |
class MsgNotifierPrivate; |
|
30 |
class MsgSimNumDetector; |
|
70
a15d9966050f
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
31 |
class MsgErrorWatcher; |
31 | 32 |
|
33 |
/** |
|
34 |
* Stores the data required for notification. |
|
35 |
* Its used to pass information from |
|
36 |
* private class to qt - class. |
|
37 |
*/ |
|
38 |
class NotificationData |
|
39 |
{ |
|
40 |
public: |
|
41 |
/** |
|
42 |
* constrcutor |
|
43 |
*/ |
|
44 |
NotificationData() : |
|
45 |
mConversationId(-1), mMsgType(-1) |
|
46 |
{ |
|
47 |
} |
|
48 |
||
49 |
/** |
|
50 |
* Conversation id |
|
51 |
*/ |
|
52 |
int mConversationId; |
|
53 |
||
54 |
/** |
|
55 |
* Message type |
|
56 |
*/ |
|
57 |
int mMsgType; |
|
58 |
||
59 |
/** |
|
60 |
* Description |
|
61 |
*/ |
|
62 |
QString mDescription; |
|
63 |
||
64 |
/** |
|
65 |
* Display name |
|
66 |
*/ |
|
67 |
QString mDisplayName; |
|
68 |
||
69 |
/** |
|
70 |
* Contact Number |
|
71 |
*/ |
|
72 |
QString mContactNum; |
|
73 |
||
74 |
/** |
|
75 |
* MsvEntry Id |
|
76 |
*/ |
|
77 |
int msvEntryId; |
|
78 |
}; |
|
79 |
||
80 |
||
81 |
class MsgNotifier: public QObject |
|
82 |
{ |
|
83 |
Q_OBJECT |
|
84 |
||
85 |
public: |
|
86 |
/** |
|
87 |
* Constructor |
|
88 |
*/ |
|
89 |
MsgNotifier(QObject* parent = 0); |
|
90 |
||
91 |
/** |
|
92 |
* Destructor |
|
93 |
*/ |
|
94 |
~MsgNotifier(); |
|
95 |
||
96 |
public: |
|
97 |
/** |
|
98 |
* displayNewMessageNotification |
|
99 |
* Calls the notificaiton display frame work |
|
100 |
* for displaying the new message notification. |
|
101 |
*/ |
|
102 |
void displayNewMessageNotification(NotificationData& data); |
|
103 |
||
104 |
/** |
|
105 |
* updateUnreadIndications |
|
106 |
* Activate/Deactivate message indications based on unread message count. |
|
107 |
* if unreadCount is zero then deactivate else activate. |
|
108 |
* @param unreadCount unread count. |
|
109 |
*/ |
|
110 |
void updateUnreadIndications(int unreadCount); |
|
111 |
||
112 |
/** |
|
113 |
* updateOutboxIndications |
|
114 |
* Activate/Deactivate message indications based on outbox |
|
115 |
* message count. |
|
116 |
* @param indicatorData The indicator data for displaying the indication. |
|
117 |
*/ |
|
118 |
void updateOutboxIndications(MsgInfo& indicatorData); |
|
119 |
||
120 |
private: |
|
121 |
||
122 |
/** |
|
123 |
* Get display-name of a contact from VCard. |
|
124 |
* @param filePath, VCard file-path |
|
125 |
* @return display-name |
|
126 |
*/ |
|
127 |
QString getVcardDisplayName(const QString& filePath); |
|
128 |
||
129 |
private: |
|
130 |
||
131 |
/** |
|
132 |
* Object of private implementation. |
|
133 |
* Owned. |
|
134 |
*/ |
|
135 |
MsgNotifierPrivate* d_ptr; |
|
136 |
||
137 |
/** |
|
138 |
* Sim settings handler |
|
139 |
*/ |
|
140 |
MsgSimNumDetector* mSimHandler; |
|
70
a15d9966050f
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
141 |
|
a15d9966050f
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
142 |
/** |
a15d9966050f
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
143 |
* Pointer to error watcher |
a15d9966050f
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
144 |
* Own |
a15d9966050f
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
145 |
*/ |
a15d9966050f
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
146 |
MsgErrorWatcher* mErrorWatcher; |
31 | 147 |
}; |
148 |
||
149 |
#endif // MSGNOTIFIER_H |
|
150 |
//EOF |