emailservices/nmailbase/inc/nmfolder.h
changeset 18 578830873419
equal deleted inserted replaced
4:e7aa27f58ae1 18:578830873419
       
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NMAILFOLDER_H
       
    19 #define NMAILFOLDER_H
       
    20 
       
    21 #include <QString>
       
    22 #include <QDateTime>
       
    23 #include <QExplicitlySharedDataPointer>
       
    24 
       
    25 #include "nmbasedef.h"
       
    26 #include "nmcommon.h"
       
    27 
       
    28 class NMBASE_EXPORT NmFolderPrivate : public QSharedData
       
    29 {
       
    30 public:
       
    31     NmFolderPrivate();
       
    32     virtual ~NmFolderPrivate();
       
    33 
       
    34 public:
       
    35     NmId mFolderId;
       
    36     NmId mParentFolderId;
       
    37     NmId mMailboxId;
       
    38     QString mName;
       
    39     NmFolderType mFolderType;
       
    40     quint32 mMessageCount;
       
    41     quint32 mUnreadMessageCount;
       
    42     quint32 mUnseenCount;
       
    43     quint32 mSubFolderCount;
       
    44     QDateTime mUpdated;
       
    45 };
       
    46 
       
    47 class NMBASE_EXPORT NmFolder
       
    48 {
       
    49 public:
       
    50 
       
    51     NmFolder(NmId folderId);
       
    52     NmFolder(const NmFolder &foder);
       
    53     NmFolder(QExplicitlySharedDataPointer<NmFolderPrivate> folderPrivate);
       
    54     NmFolder &operator=(const NmFolder &folder);
       
    55     virtual ~NmFolder();
       
    56 
       
    57     NmId folderId() const;
       
    58     void setFolderId(NmId folderId);
       
    59 
       
    60     NmId parentId() const;
       
    61     void setParentId(NmId parentFolderId);
       
    62 
       
    63     NmId mailboxId() const;
       
    64     void setMailboxId(NmId mailboxId);
       
    65 
       
    66     QString name() const;
       
    67     void setName(QString name);
       
    68 
       
    69     NmFolderType folderType() const;
       
    70     void setFolderType(NmFolderType folderType);
       
    71 
       
    72     QDateTime lastUpdated() const;
       
    73     void setLastUpdated(QDateTime time);
       
    74 
       
    75     quint32 messageCount() const;
       
    76     void setMessageCount(quint32 messageCount);
       
    77 
       
    78     quint32 unreadMessageCount() const;
       
    79     void setUnreadMessageCount(quint32 unreadMessageCount);
       
    80 
       
    81     quint32 unseenCount() const;
       
    82     void setUnseenCount(quint32 unseenCount);
       
    83 
       
    84     quint32 subFolderCount() const;
       
    85     void setSubFolderCount(quint32 subFolderCount);
       
    86 
       
    87 private:
       
    88   QExplicitlySharedDataPointer<NmFolderPrivate> d;
       
    89 
       
    90   friend class CFSMailFolderBase;
       
    91 };
       
    92 
       
    93 
       
    94 #endif /* NMAILFOLDER_H */