|
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: Private implementaion of sms data model plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef UNIBIOMESSAGEDATAPLUGINPRIVATE_H_ |
|
19 #define UNIBIOMESSAGEDATAPLUGINPRIVATE_H_ |
|
20 |
|
21 #include "unidatamodelplugininterface.h" |
|
22 |
|
23 //Forward Declarations |
|
24 class CClientMtmRegistry; |
|
25 class ConvergedMessage; |
|
26 class UniBioMessageDataPlugin; |
|
27 class CBIOClientMtm; |
|
28 class CMsvSession; |
|
29 |
|
30 /** |
|
31 * Symbian specific implementation of the uni SMS plugin |
|
32 */ |
|
33 class UniBioMessageDataPluginPrivate : public MMsvSessionObserver |
|
34 { |
|
35 |
|
36 public: |
|
37 /** |
|
38 * Constructor |
|
39 */ |
|
40 UniBioMessageDataPluginPrivate(UniBioMessageDataPlugin* plugin); |
|
41 |
|
42 /** |
|
43 * Destructor |
|
44 */ |
|
45 ~UniBioMessageDataPluginPrivate(); |
|
46 |
|
47 /** |
|
48 * Resets the datamodel |
|
49 */ |
|
50 void reset(); |
|
51 |
|
52 /** |
|
53 * sets the message id for which details needs to be fetched |
|
54 * @param message id |
|
55 */ |
|
56 int setMessageId(int mId); |
|
57 |
|
58 /** |
|
59 * Get the body of the message |
|
60 * @param aBodyText, for message body |
|
61 */ |
|
62 void body(QString& aBodyText); |
|
63 |
|
64 /** |
|
65 * Size of the message |
|
66 * @param message size |
|
67 */ |
|
68 int messageSize(); |
|
69 |
|
70 /** |
|
71 * List of the message TO recipients |
|
72 * @param list of the recipients |
|
73 */ |
|
74 void toRecipientList(ConvergedMessageAddressList& mAddressList); |
|
75 |
|
76 /** |
|
77 * Address from which the message was received |
|
78 * @param messageAddress |
|
79 */ |
|
80 void fromAddress(QString& messageAddress); |
|
81 |
|
82 /** |
|
83 * Time stamp of the message |
|
84 * @return time stamp of the created/received message |
|
85 */ |
|
86 int timeStamp(); |
|
87 |
|
88 /** |
|
89 * The File handle of the VCAL attachment |
|
90 * @return file handle |
|
91 */ |
|
92 RFile attachmentL(); |
|
93 |
|
94 /** |
|
95 * Priority of the message |
|
96 * @return message priority |
|
97 */ |
|
98 MsgPriority messagePriority(); |
|
99 |
|
100 /** |
|
101 * Number of attachments associated with the message.. |
|
102 * @return attachment count |
|
103 */ |
|
104 int attachmentCount(); |
|
105 |
|
106 /** |
|
107 * Session with the Messaging server |
|
108 * @return CMsvSession* |
|
109 */ |
|
110 CMsvSession* session(); |
|
111 |
|
112 private: |
|
113 /** |
|
114 * Extracts the name and address from the CMsvRecipientList |
|
115 */ |
|
116 void extractNameAndAddress(const TDesC& aMsvAddress, TPtrC& aName, |
|
117 TPtrC& aAddress); |
|
118 |
|
119 /** |
|
120 * intitlaises the CMsvSession and mtm |
|
121 */ |
|
122 void initL(); |
|
123 |
|
124 /** |
|
125 * setMessageIdL |
|
126 * @param int msgId |
|
127 * @return void |
|
128 */ |
|
129 void setMessageIdL(int msgId); |
|
130 |
|
131 /** |
|
132 * @see MMsvSessionObserver |
|
133 */ |
|
134 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, |
|
135 TAny* aArg3); |
|
136 |
|
137 |
|
138 private: |
|
139 UniBioMessageDataPlugin* q_ptr; |
|
140 CMsvSession* iMSession; |
|
141 CClientMtmRegistry* iMtmReg; |
|
142 CBIOClientMtm* iBioClientMtm; |
|
143 TMsvId iMessageId; |
|
144 TBool attachmentProcessed; |
|
145 CMsvEntry* iMsvEntry; |
|
146 TBool done; |
|
147 TInt iAttachmentCount; |
|
148 }; |
|
149 #endif //UNIBIOMESSAGEDATAPLUGINPRIVATE_H_ |