email_plat/nmail_client_api/inc/nmapimessageenvelope.h
changeset 74 6c59112cfd31
parent 68 83cc6bae1de8
equal deleted inserted replaced
69:4e54af54a4a1 74:6c59112cfd31
       
     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 NMAPIMESSAGEENVELOPE_H
       
    19 #define NMAPIMESSAGEENVELOPE_H
       
    20 
       
    21 
       
    22 #include <QExplicitlySharedDataPointer>
       
    23 #include <QList>
       
    24 
       
    25 #include <nmapidef.h>
       
    26 #include <nmapicommon.h>
       
    27 
       
    28 class QString;
       
    29 class QDateTime;
       
    30 
       
    31 namespace EmailClientApi
       
    32 {
       
    33 class NmApiMessageEnvelopePrivate;
       
    34 class NmApiEmailAddress;
       
    35 class NmApiMessageBody;
       
    36 
       
    37 // read-only envelope
       
    38 class NMAPI_EXPORT NmApiMessageEnvelope
       
    39 {
       
    40 public:
       
    41     /*!
       
    42        constructor for NmApiMessageEnvelope
       
    43      */
       
    44     NmApiMessageEnvelope();
       
    45     
       
    46     /*!
       
    47        destructor for NmApiMessageEnvelope
       
    48      */
       
    49     virtual ~NmApiMessageEnvelope();
       
    50     
       
    51     /*!
       
    52        copying constructor for NmApiMessageEnvelope
       
    53      */
       
    54     NmApiMessageEnvelope(const NmApiMessageEnvelope &envelope);
       
    55 
       
    56     /*!
       
    57        Assignment operator
       
    58      */
       
    59     NmApiMessageEnvelope &operator=(const NmApiMessageEnvelope &envelope);
       
    60 
       
    61     /*!
       
    62        Comapre data from \a envelope
       
    63      */
       
    64     bool operator==(const NmApiMessageEnvelope &envelope);
       
    65     /*!        
       
    66        getter for id
       
    67      */
       
    68     quint64 id() const;
       
    69 
       
    70     /*!
       
    71        getter for id of parent folder
       
    72      */
       
    73     quint64 parentFolder() const;
       
    74 
       
    75     /*!
       
    76        getter for id of mailbox
       
    77      */
       
    78     quint64 mailboxId() const;
       
    79     
       
    80     /*!
       
    81        getter for subject
       
    82      */
       
    83     QString subject() const;
       
    84 
       
    85     /*!
       
    86        getter for sender
       
    87      */
       
    88     QString sender() const;
       
    89 
       
    90     /*!
       
    91        getter for to recipients
       
    92      */
       
    93     void getToRecipients(QList<EmailClientApi::NmApiEmailAddress> &toRecipients);
       
    94 
       
    95     /*!
       
    96        getter for cc recipients
       
    97      */
       
    98     void getCcRecipients(QList<EmailClientApi::NmApiEmailAddress> &ccRecipients);
       
    99 
       
   100     /*!
       
   101        getter for bcc recipients
       
   102      */
       
   103     void getBccRecipients(QList<EmailClientApi::NmApiEmailAddress> &bccRecipients);
       
   104 
       
   105     /*!
       
   106        getter for sent time
       
   107      */
       
   108     QDateTime sentTime() const;
       
   109 
       
   110     /*!
       
   111        getter for is read flag
       
   112      */
       
   113     bool isRead() const;
       
   114 
       
   115     /*!
       
   116        getter for has attachments flag
       
   117      */
       
   118     bool hasAttachments() const;
       
   119 
       
   120     /*!
       
   121        getter for is forwarded flag
       
   122      */
       
   123     bool isForwarded() const;
       
   124 
       
   125     /*!
       
   126        getter for is replied flag
       
   127      */
       
   128     bool isReplied() const;
       
   129 
       
   130     /*!
       
   131        getter for content type
       
   132      */
       
   133     QString contentType() const;
       
   134 
       
   135     /*!
       
   136        getter for plaintext body
       
   137      */
       
   138     void getPlainTextBody(EmailClientApi::NmApiMessageBody &body);
       
   139 
       
   140     /*!
       
   141        getter for plaintext body
       
   142      */
       
   143     QString plainText() const;
       
   144 
       
   145     /*!
       
   146        getter for messages fetched size 
       
   147      */
       
   148     quint64 totalSize() const;
       
   149 
       
   150     /*!
       
   151        getter for messages fetched size 
       
   152      */
       
   153     quint64 fetchedSize() const;
       
   154 
       
   155     /*!
       
   156         getter for priority
       
   157      */
       
   158     NmApiMessagePriority priority() const;
       
   159 
       
   160     /*!
       
   161         getter for flags
       
   162      */
       
   163     NmApiMessageFlags flags() const;
       
   164 
       
   165     /*!
       
   166         getter for flag
       
   167      */
       
   168      bool isFlagSet(const NmApiMessageFlag flag) const;
       
   169 
       
   170     /*!
       
   171        setter for id 
       
   172      */
       
   173     void setId(quint64 id);
       
   174 
       
   175     /*!
       
   176        setter for parent folder 
       
   177      */
       
   178     void setParentFolder(quint64 parentFolder);
       
   179 
       
   180     /*!
       
   181        setter for mailbox id
       
   182      */
       
   183     void setMailboxId(quint64 mailboxId);
       
   184     
       
   185     /*!
       
   186        setter for subject 
       
   187      */
       
   188     void setSubject(const QString &subject);
       
   189 
       
   190     /*!
       
   191        setter for sender  
       
   192      */
       
   193     void setSender(const QString &sender);
       
   194 
       
   195     /*!
       
   196        setter for to recipients 
       
   197      */
       
   198     void setToRecipients(const QList<EmailClientApi::NmApiEmailAddress> &toRecipients);
       
   199 
       
   200     /*!
       
   201        setter for cc recipients 
       
   202      */
       
   203     void setCcRecipients(const QList<EmailClientApi::NmApiEmailAddress> &ccRecipients);
       
   204 
       
   205     /*!
       
   206        setter for bcc recipients 
       
   207      */
       
   208     void setBccRecipients(const QList<EmailClientApi::NmApiEmailAddress> &bccRecipients);
       
   209 
       
   210     /*!
       
   211        setter for sent time 
       
   212      */
       
   213     void setSentTime(QDateTime sentTime);
       
   214 
       
   215     /*!
       
   216        setter for is read flag
       
   217      */
       
   218     void setIsRead(bool isRead);
       
   219 
       
   220     /*!
       
   221        setter for has attachments flag 
       
   222      */
       
   223     void setHasAttachments(bool hasAttachments);
       
   224 
       
   225     /*!
       
   226        setter for is forwarded flag 
       
   227      */
       
   228     void setIsForwarded(bool isForwarded);
       
   229 
       
   230     /*!
       
   231        setter for is replied flag 
       
   232      */
       
   233     void setIsReplied(bool isReplied);
       
   234 
       
   235     /*!
       
   236        setter for content type 
       
   237      */
       
   238     void setContentType(const QString &contentType);
       
   239 
       
   240     /*!
       
   241        setter for messages plain text 
       
   242      */
       
   243     void setPlainText(const QString &plainText);
       
   244 
       
   245     /*!
       
   246        setter for messages fetched size 
       
   247      */
       
   248     void setTotalSize(quint64 totalSize);
       
   249 
       
   250     /*!
       
   251        setter for messages fetched size 
       
   252      */
       
   253     void setFetchedSize(quint64 fetchedSize);
       
   254 
       
   255     /*!
       
   256        setter for priority
       
   257      */
       
   258     void setPriority(NmApiMessagePriority forwarded);
       
   259 
       
   260     /*!
       
   261         setter for flags
       
   262      */
       
   263     void setFlags(const NmApiMessageFlags flags, bool set);
       
   264 
       
   265     /*!
       
   266         setter for flag
       
   267      */
       
   268     void setFlag(const NmApiMessageFlag flag, bool set);
       
   269 
       
   270 private:
       
   271     QExplicitlySharedDataPointer<NmApiMessageEnvelopePrivate> d;
       
   272 };
       
   273 }
       
   274 #endif
       
   275