2 * Copyright (c) 2009 - 2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Helper classes for interface.
18 #ifndef MEMAILMAILBOXDATA_H
19 #define MEMAILMAILBOXDATA_H
21 #include <memailmessagedata.h>
23 namespace EmailInterface {
25 class MEmailLaunchParameters;
28 * Container interface for mailbox related info
34 * Accessor for mailbox id
35 * @return mailbox identifier
37 virtual TUint MailboxId() const = 0;
40 * Accessor for mailbox name
41 * @return mailbox name
43 virtual const TDesC& Name() const = 0;
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
52 virtual const TDesC& BrandingIcon() const = 0;
55 * Is mailbox's outbox empty or not
58 virtual TBool IsOutboxEmpty() const = 0;
61 * Accessor for seen/unseen status
62 * i.e. whether user has been to inbox after last message has been received
65 virtual TBool Unseen() const = 0;
68 * Accessor for launching parameters
69 * These parameters specify what application is launched when widget is pressed
70 * @return interface to launch parameters
72 virtual MEmailLaunchParameters& LaunchParameters() const = 0;
75 * Accessor for total count of messages in inbox
76 * @return total message count
78 virtual TInt MessageCount() const = 0;
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
87 virtual const RPointerArray<MMessageData>& LatestMessagesL() const = 0;
92 #endif // EMAILMAILBOXDATA_H