|
1 /* |
|
2 * Copyright (c) 2009 - 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: Helper classes for interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MEMAILMAILBOXDATA_H |
|
19 #define MEMAILMAILBOXDATA_H |
|
20 |
|
21 #include <memailmessagedata.h> |
|
22 |
|
23 namespace EmailInterface { |
|
24 |
|
25 class MEmailLaunchParameters; |
|
26 |
|
27 /** |
|
28 * Container interface for mailbox related info |
|
29 */ |
|
30 class MMailboxData |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Accessor for mailbox id |
|
35 * @return mailbox identifier |
|
36 */ |
|
37 virtual TUint MailboxId() const = 0; |
|
38 |
|
39 /** |
|
40 * Accessor for mailbox name |
|
41 * @return mailbox name |
|
42 */ |
|
43 virtual const TDesC& Name() const = 0; |
|
44 |
|
45 /** |
|
46 * Accessor for mailbox branding icon specifier |
|
47 * @return path descriptor to branding icon |
|
48 * e.g. "mif(z:\\resource\\apps\\myemailplugin.mif N1 N2)", |
|
49 * where N1 is integer specifying the icon number in the mif file, |
|
50 * and N2 is the number of the respective icon mask |
|
51 */ |
|
52 virtual const TDesC& BrandingIcon() const = 0; |
|
53 |
|
54 /** |
|
55 * Is mailbox's outbox empty or not |
|
56 * @return boolean |
|
57 */ |
|
58 virtual TBool IsOutboxEmpty() const = 0; |
|
59 |
|
60 /** |
|
61 * Accessor for seen/unseen status |
|
62 * i.e. whether user has been to inbox after last message has been received |
|
63 * @return boolean |
|
64 */ |
|
65 virtual TBool Unseen() const = 0; |
|
66 |
|
67 /** |
|
68 * Accessor for launching parameters |
|
69 * These parameters specify what application is launched when widget is pressed |
|
70 * @return interface to launch parameters |
|
71 */ |
|
72 virtual MEmailLaunchParameters& LaunchParameters() const = 0; |
|
73 |
|
74 /** |
|
75 * Accessor for total count of messages in inbox |
|
76 * @return total message count |
|
77 */ |
|
78 virtual TInt MessageCount() const = 0; |
|
79 |
|
80 /** |
|
81 * Accessor for mailbox's messages. If there are more messages in the array |
|
82 * than fits the widget, only the newest will be published. |
|
83 * Assumption: array must be ordered based on timestamp (i.e. newest in index 0) |
|
84 * Assumption: plugin does not have to upkeep more than 2 latest messages |
|
85 * @return array of messages |
|
86 */ |
|
87 virtual const RPointerArray<MMessageData>& LatestMessagesL() const = 0; |
|
88 }; |
|
89 |
|
90 } // namespace |
|
91 |
|
92 #endif // EMAILMAILBOXDATA_H |