diff -r dcf0eedfc1a3 -r d189ee25cf9d emailservices/emailcommon/inc/CFSMailFolderBase.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/emailcommon/inc/CFSMailFolderBase.h Tue Aug 31 15:04:17 2010 +0300
@@ -0,0 +1,250 @@
+/*
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: common email folder base object
+*
+*/
+
+
+#ifndef __FSMAILFOLDERBASE_H
+#define __FSMAILFOLDERBASE_H
+
+#include "CFSMailMessage.h"
+#include "cemailextensionbase.h"
+
+//
+class NmFolder;
+class NmFolderPrivate;
+//
+
+/**
+ * class for handling mailbox folder data
+ *
+ * @lib FSFWCommonLib
+ * @since S60 S60 v3.1
+ */
+NONSHARABLE_CLASS ( CFSMailFolderBase ) : public CExtendableEmail
+{
+ public:
+
+ /**
+ * Two-phased constructor.
+ *
+ * @param aFolderId folder id in plugin containing folder
+ */
+ IMPORT_C static CFSMailFolderBase* NewL(const TFSMailMsgId aFolderId);
+
+ /**
+ * Two-phased constructor.
+ *
+ * @param aFolderId folder id in plugin containing folder
+ */
+ IMPORT_C static CFSMailFolderBase* NewLC(const TFSMailMsgId aFolderId);
+
+ /**
+ * Destructor.
+ *
+ */
+ IMPORT_C virtual ~CFSMailFolderBase();
+
+ /**
+ * folder id accessor
+ *
+ * @return folder id
+ */
+ IMPORT_C TFSMailMsgId GetFolderId() const;
+
+ /**
+ * parent folder id accessor
+ *
+ * @return parent folder id
+ */
+ IMPORT_C TFSMailMsgId GetParentFolderId() const;
+
+ /**
+ * parent folder id mutator
+ *
+ * @param aFolderId parent folder id to be set
+ */
+ IMPORT_C void SetParentFolderId( const TFSMailMsgId aFolderId );
+
+ /**
+ * folder name accessor
+ *
+ * @return folder name
+ */
+ IMPORT_C TDesC& GetFolderName() const;
+
+ /**
+ * Folder name mutator. Note ! Some clients may ignore names set for
+ * standard folders (TFSFolderType being EFSInbox, EFSOutbox, EFSDraftsFolder,
+ * EFSSentFolder, or EFSDeleted) and display own localized names for them.
+ * E.g. Email UI behaves this way.
+ *
+ * @param aFolderName folder name to be set
+ */
+ IMPORT_C void SetFolderName(const TDesC& aFolderName);
+
+ /**
+ * folder type accessor
+ *
+ * @return folder type
+ */
+ IMPORT_C TFSFolderType GetFolderType() const;
+
+ /**
+ * folder type mutator
+ *
+ * @param aFolderType folder type to be set
+ */
+ IMPORT_C void SetFolderType( const TFSFolderType aFolderType );
+
+ /**
+ * returns id of mailbox containing this folder
+ *
+ * @return mailbox id
+ */
+ IMPORT_C TFSMailMsgId GetMailBoxId() const;
+
+ /**
+ * folder mailbox id mutator
+ *
+ * @param aMailBoxId mailbox id to be set
+ */
+ IMPORT_C void SetMailBoxId( const TFSMailMsgId aMailBoxId );
+
+ /**
+ * returns message count contained by this folder
+ *
+ * @return message count
+ */
+ IMPORT_C TUint GetMessageCount() const;
+
+ /**
+ * returns unread message count contained by this folder
+ *
+ * @return unread message count
+ */
+ IMPORT_C TUint GetUnreadCount() const;
+
+ /**
+ * returns unseen message count contained by this folder
+ *
+ * @return unseen message count
+ */
+ IMPORT_C TUint GetUnseenCount() const;
+
+ /**
+ * returns subfolder count contained by this folder
+ *
+ * @return subfolder count
+ */
+ IMPORT_C TUint GetSubFolderCount() const;
+
+ /**
+ * set message count contained by this folder
+ *
+ * @param aMessageCount message count
+ */
+ IMPORT_C void SetMessageCount( const TUint aMessageCount );
+
+ /**
+ * set unread message count contained by this folder
+ *
+ * @param aMessageCount unread message count
+ */
+ IMPORT_C void SetUnreadCount( const TUint aMessageCount );
+
+ /**
+ * set unseen message count contained by this folder
+ *
+ * @param aMessageCount unseen message count
+ */
+ IMPORT_C void SetUnseenCount( const TUint aMessageCount );
+
+ /**
+ * set subfolder count contained by this folder
+ *
+ * @param subfolder count
+ */
+ IMPORT_C void SetSubFolderCount( const TUint aMessageCount );
+
+ /**
+ * blocks copying to this folder from given folder types
+ *
+ * @param aFolderTypes blocked folder types
+ * @param aMailBoxStatus mailbox status (online / offline) when
+ * blocking is done
+ */
+ IMPORT_C void BlockCopyFromL( RArray aFolderTypes,
+ TFSMailBoxStatus aMailBoxStatus );
+ /**
+ * blocks moving to this folder from given folder types
+ *
+ * @param aFolderTypes blocked folder types
+ * @param aMailBoxStatus mailbox status (online / offline) when
+ * blocking is done
+ */
+ IMPORT_C void BlockMoveFromL( RArray aFolderTypes,
+ TFSMailBoxStatus aMailBoxStatus );
+
+ //
+ /**
+ * returns nmfolder constructed with shared data,
+ * ownership is transferred to caller
+ */
+ IMPORT_C NmFolder* GetNmFolder();
+ //
+
+protected:
+
+ /**
+ * C++ default constructor.
+ */
+ CFSMailFolderBase();
+
+//
+ /**
+ * Two-phased constructor
+ */
+ IMPORT_C void ConstructL( const TFSMailMsgId aFolderId );
+//
+
+// unnecessary iFolderId member removed
+
+ /**
+ * blocked folders in copying
+ */
+ RArray iCopyOfflineBlocked;
+ RArray iCopyOnlineBlocked;
+
+ /**
+ * blocked folders in moving
+ */
+ RArray iMoveOfflineBlocked;
+ RArray iMoveOnlineBlocked;
+
+
+private: // data
+
+ //
+ // unused data variables removed
+ //
+
+ //
+ mutable TPtrC16 iTextPtr;
+ QExplicitlySharedDataPointer iNmPrivateFolder;
+ //
+};
+
+#endif // __FSMAILFOLDERBASE_H