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: Feeder class for unified viewer. Fetches data from the
|
|
15 |
* message store for the given message store id.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#include "univiewerfeeder.h"
|
|
20 |
#include "univiewerfeeder_p.h"
|
|
21 |
|
|
22 |
//---------------------------------------------------------------------------
|
|
23 |
// UniViewerFeeder::UniViewerFeeder
|
|
24 |
// Default Constructor.
|
|
25 |
//---------------------------------------------------------------------------
|
|
26 |
UniViewerFeeder::UniViewerFeeder(qint32 msgId,
|
|
27 |
QObject *parent) :
|
|
28 |
QObject(parent)
|
|
29 |
{
|
|
30 |
d_ptr = new UniViewerFeederPrivate(msgId, this);
|
|
31 |
}
|
|
32 |
|
|
33 |
//---------------------------------------------------------------------------
|
|
34 |
// UniViewerFeeder::~UniViewerFeeder()
|
|
35 |
// Desctuctor
|
|
36 |
//---------------------------------------------------------------------------
|
|
37 |
UniViewerFeeder::~UniViewerFeeder()
|
|
38 |
{
|
|
39 |
if (d_ptr)
|
|
40 |
{
|
|
41 |
delete d_ptr;
|
|
42 |
d_ptr = NULL;
|
|
43 |
}
|
|
44 |
}
|
|
45 |
|
|
46 |
//---------------------------------------------------------------------------
|
|
47 |
// UniViewerFeeder::updateContent()
|
|
48 |
//
|
|
49 |
//---------------------------------------------------------------------------
|
|
50 |
void UniViewerFeeder::updateContent(qint32 msgId)
|
|
51 |
{
|
|
52 |
d_ptr->updateContent(msgId);
|
|
53 |
}
|
|
54 |
|
|
55 |
// ---------------------------------------------------------------------------
|
|
56 |
// UniViewerFeeder::emitMsgBody
|
|
57 |
// Emits msgBody signal with msgBody as argument
|
|
58 |
// ---------------------------------------------------------------------------
|
|
59 |
void UniViewerFeeder::emitMsgBody(QString body)
|
|
60 |
{
|
|
61 |
emit msgBody(body);
|
|
62 |
}
|
|
63 |
|
|
64 |
// ---------------------------------------------------------------------------
|
|
65 |
// UniViewerFeeder::fetchDetails
|
|
66 |
// Fetches message details from the store.
|
|
67 |
// ---------------------------------------------------------------------------
|
|
68 |
void UniViewerFeeder::fetchDetails()
|
|
69 |
{
|
|
70 |
d_ptr->fetchDetails();
|
|
71 |
}
|
|
72 |
|
|
73 |
// ---------------------------------------------------------------------------
|
|
74 |
// UniViewerFeeder::msgType
|
|
75 |
// Returns the message type.
|
|
76 |
// ---------------------------------------------------------------------------
|
|
77 |
qint32 UniViewerFeeder::msgType()
|
|
78 |
{
|
|
79 |
return d_ptr->msgType();
|
|
80 |
}
|
|
81 |
|
|
82 |
// ---------------------------------------------------------------------------
|
|
83 |
// UniViewerFeeder::timeStamp
|
|
84 |
// Returns the time stamp.
|
|
85 |
// ---------------------------------------------------------------------------
|
|
86 |
QDateTime UniViewerFeeder::timeStamp()
|
|
87 |
{
|
|
88 |
return d_ptr->timeStamp();
|
|
89 |
}
|
|
90 |
|
|
91 |
// ---------------------------------------------------------------------------
|
|
92 |
// UniViewerFeeder::hasAttachments
|
|
93 |
// @see header file
|
|
94 |
// ---------------------------------------------------------------------------
|
|
95 |
bool UniViewerFeeder::hasAttachments()
|
|
96 |
{
|
|
97 |
return d_ptr->hasAttachments();
|
|
98 |
}
|
|
99 |
|
|
100 |
// ---------------------------------------------------------------------------
|
|
101 |
// UniViewerFeeder::attachmentsList
|
|
102 |
// @see header file
|
|
103 |
// ---------------------------------------------------------------------------
|
|
104 |
UniMessageInfoList UniViewerFeeder::attachmentsList()
|
|
105 |
{
|
|
106 |
return d_ptr->attachmentsList();
|
|
107 |
}
|
|
108 |
|
|
109 |
// ---------------------------------------------------------------------------
|
|
110 |
// UniViewerFeeder::attachmentCount
|
|
111 |
// @see header file
|
|
112 |
// ---------------------------------------------------------------------------
|
|
113 |
int UniViewerFeeder::attachmentCount()
|
|
114 |
{
|
|
115 |
return d_ptr->attachmentCount();
|
|
116 |
}
|
|
117 |
|
|
118 |
// ---------------------------------------------------------------------------
|
|
119 |
// UniViewerFeeder::objectsList
|
|
120 |
// @see header file
|
|
121 |
// ---------------------------------------------------------------------------
|
|
122 |
|
|
123 |
UniMessageInfoList UniViewerFeeder::objectsList()
|
|
124 |
{
|
|
125 |
return d_ptr->objectsList();
|
|
126 |
}
|
|
127 |
|
|
128 |
// ---------------------------------------------------------------------------
|
|
129 |
// UniViewerFeeder::objectCount
|
|
130 |
// @see header file
|
|
131 |
// ---------------------------------------------------------------------------
|
|
132 |
int UniViewerFeeder::objectCount()
|
|
133 |
{
|
|
134 |
return d_ptr->objectCount();
|
|
135 |
}
|
|
136 |
|
|
137 |
// ---------------------------------------------------------------------------
|
|
138 |
// UniViewerFeeder::slideCount
|
|
139 |
// @see header file
|
|
140 |
// ---------------------------------------------------------------------------
|
|
141 |
int UniViewerFeeder::slideCount()
|
|
142 |
{
|
|
143 |
return d_ptr->slideCount();
|
|
144 |
}
|
|
145 |
|
|
146 |
// ---------------------------------------------------------------------------
|
|
147 |
// UniViewerFeeder::slideContent
|
|
148 |
// @see header file
|
|
149 |
// ---------------------------------------------------------------------------
|
|
150 |
UniMessageInfoList UniViewerFeeder::slideContent(int slidenum)
|
|
151 |
{
|
|
152 |
return d_ptr->slideContent(slidenum);
|
|
153 |
}
|
|
154 |
|
|
155 |
ConvergedMessageAddressList UniViewerFeeder::toAddressList()
|
|
156 |
{
|
|
157 |
return d_ptr->toAddressList();
|
|
158 |
}
|
|
159 |
|
|
160 |
// ---------------------------------------------------------------------------
|
|
161 |
// UniViewerFeeder::ccAddressList
|
|
162 |
// @see header file
|
|
163 |
// ---------------------------------------------------------------------------
|
|
164 |
ConvergedMessageAddressList UniViewerFeeder::ccAddressList()
|
|
165 |
{
|
|
166 |
return d_ptr->ccAddressList();
|
|
167 |
}
|
|
168 |
|
|
169 |
// ---------------------------------------------------------------------------
|
|
170 |
// UniViewerFeeder::messageSize
|
|
171 |
// @see header file
|
|
172 |
// ---------------------------------------------------------------------------
|
|
173 |
int UniViewerFeeder::messageSize()
|
|
174 |
{
|
|
175 |
return d_ptr->messageSize();
|
|
176 |
}
|
|
177 |
|
|
178 |
// ---------------------------------------------------------------------------
|
|
179 |
// UniViewerFeeder::clearContent
|
|
180 |
// @see header file
|
|
181 |
//
|
|
182 |
void UniViewerFeeder::clearContent()
|
|
183 |
{
|
|
184 |
return d_ptr->clearContent();
|
|
185 |
}
|
|
186 |
|
|
187 |
// UniViewerFeeder::fromAddressAndAlias
|
|
188 |
// @see header file
|
|
189 |
//
|
|
190 |
void UniViewerFeeder::fromAddressAndAlias(QString& from, QString& alias)
|
|
191 |
{
|
|
192 |
return d_ptr->fromAddressAndAlias(from, alias);
|
|
193 |
}
|
|
194 |
|
|
195 |
// UniViewerFeeder::isIncoming
|
|
196 |
// @see header file
|
|
197 |
//
|
|
198 |
bool UniViewerFeeder::isIncoming()
|
|
199 |
{
|
|
200 |
return d_ptr->isIncoming();
|
|
201 |
}
|
|
202 |
|
|
203 |
// UniViewerFeeder::priority
|
|
204 |
// @see header file
|
|
205 |
//
|
|
206 |
int UniViewerFeeder::priority()
|
|
207 |
{
|
|
208 |
return d_ptr->priority();
|
|
209 |
}
|
|
210 |
|
|
211 |
// UniViewerFeeder::subject
|
|
212 |
// @see header file
|
|
213 |
//
|
|
214 |
QString UniViewerFeeder::subject()
|
|
215 |
{
|
|
216 |
return d_ptr->subject();
|
|
217 |
}
|
|
218 |
|
|
219 |
int UniViewerFeeder::sendingState()
|
|
220 |
{
|
|
221 |
|
|
222 |
return d_ptr->sendingState();
|
|
223 |
}
|
|
224 |
// EOF
|