email_plat/nmail_client_api/nmapimessagebody.h
changeset 18 578830873419
child 23 2dc6caa42ec3
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 NMAPIMESSAGEBODY_H
       
    19 #define NMAPIMESSAGEBODY_H
       
    20 
       
    21 #include <QString>
       
    22 #include <QExplicitlySharedDataPointer>
       
    23 #include "nmenginedef.h"
       
    24 
       
    25 namespace EmailClientApi
       
    26 {
       
    27 
       
    28 class NmMessageBodyPrivate : public QSharedData
       
    29 {
       
    30 public:
       
    31     NmMessageBodyPrivate();
       
    32     virtual ~NmMessageBodyPrivate();
       
    33 
       
    34     quint64 totalSize;
       
    35     quint64 fetchedSize;
       
    36     QString content;
       
    37 };
       
    38 
       
    39 class NMENGINE_EXPORT NmMessageBody
       
    40 {
       
    41 public:
       
    42     /*
       
    43      * constructor for nmmessagebody
       
    44      */
       
    45     NmMessageBody();
       
    46 
       
    47     virtual ~NmMessageBody();
       
    48 
       
    49     /*!
       
    50      * getter for total size of message body in bytes
       
    51      */
       
    52     quint64 totalSize() const;
       
    53 
       
    54     /*!
       
    55      * getter for bytes available in local mailbox store
       
    56      */
       
    57     quint64 fetchedSize() const;
       
    58 
       
    59     /*!
       
    60      * getter for fetched content
       
    61      */
       
    62     QString content() const;
       
    63 
       
    64     /*
       
    65      * setter for total size of message body in bytes
       
    66      */
       
    67     void setTotalSize(quint64 size);
       
    68 
       
    69     /*
       
    70      * setter for bytes available on local mailbox store
       
    71      */
       
    72     void setFetchedSize(quint64 size);
       
    73 
       
    74     /*
       
    75      * setter for content
       
    76      */
       
    77     void setContent(const QString& content);
       
    78 
       
    79 private:
       
    80     QExplicitlySharedDataPointer<NmMessageBodyPrivate> d;
       
    81 };
       
    82 }
       
    83 #endif