1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/app/memailmailboxdata.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,92 @@
1.4 +/*
1.5 +* Copyright (c) 2009 - 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Helper classes for interface.
1.18 +*
1.19 +*/
1.20 +
1.21 +#ifndef MEMAILMAILBOXDATA_H
1.22 +#define MEMAILMAILBOXDATA_H
1.23 +
1.24 +#include <memailmessagedata.h>
1.25 +
1.26 +namespace EmailInterface {
1.27 +
1.28 +class MEmailLaunchParameters;
1.29 +
1.30 +/**
1.31 + * Container interface for mailbox related info
1.32 + */
1.33 +class MMailboxData
1.34 + {
1.35 +public:
1.36 + /**
1.37 + * Accessor for mailbox id
1.38 + * @return mailbox identifier
1.39 + */
1.40 + virtual TUint MailboxId() const = 0;
1.41 +
1.42 + /**
1.43 + * Accessor for mailbox name
1.44 + * @return mailbox name
1.45 + */
1.46 + virtual const TDesC& Name() const = 0;
1.47 +
1.48 + /**
1.49 + * Accessor for mailbox branding icon specifier
1.50 + * @return path descriptor to branding icon
1.51 + * e.g. "mif(z:\\resource\\apps\\myemailplugin.mif N1 N2)",
1.52 + * where N1 is integer specifying the icon number in the mif file,
1.53 + * and N2 is the number of the respective icon mask
1.54 + */
1.55 + virtual const TDesC& BrandingIcon() const = 0;
1.56 +
1.57 + /**
1.58 + * Is mailbox's outbox empty or not
1.59 + * @return boolean
1.60 + */
1.61 + virtual TBool IsOutboxEmpty() const = 0;
1.62 +
1.63 + /**
1.64 + * Accessor for seen/unseen status
1.65 + * i.e. whether user has been to inbox after last message has been received
1.66 + * @return boolean
1.67 + */
1.68 + virtual TBool Unseen() const = 0;
1.69 +
1.70 + /**
1.71 + * Accessor for launching parameters
1.72 + * These parameters specify what application is launched when widget is pressed
1.73 + * @return interface to launch parameters
1.74 + */
1.75 + virtual MEmailLaunchParameters& LaunchParameters() const = 0;
1.76 +
1.77 + /**
1.78 + * Accessor for total count of messages in inbox
1.79 + * @return total message count
1.80 + */
1.81 + virtual TInt MessageCount() const = 0;
1.82 +
1.83 + /**
1.84 + * Accessor for mailbox's messages. If there are more messages in the array
1.85 + * than fits the widget, only the newest will be published.
1.86 + * Assumption: array must be ordered based on timestamp (i.e. newest in index 0)
1.87 + * Assumption: plugin does not have to upkeep more than 2 latest messages
1.88 + * @return array of messages
1.89 + */
1.90 + virtual const RPointerArray<MMessageData>& LatestMessagesL() const = 0;
1.91 + };
1.92 +
1.93 +} // namespace
1.94 +
1.95 +#endif // EMAILMAILBOXDATA_H