emailservices/nmclientapi/src/nmapimessagebody.cpp
changeset 23 2dc6caa42ec3
parent 18 578830873419
child 30 759dc5235cdb
equal deleted inserted replaced
20:ecc8def7944a 23:2dc6caa42ec3
    13  *
    13  *
    14  * Description: 
    14  * Description: 
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 #include "nmapimessagebody.h"
    18 #include <nmapimessagebody.h>
       
    19 #include "nmapimessagebody_p.h"
    19 
    20 
    20 namespace EmailClientApi
    21 namespace EmailClientApi
    21 {
    22 {
    22 NmMessageBodyPrivate::NmMessageBodyPrivate()
    23 
       
    24 /*!
       
    25    constructor for NmApiMessageBody
       
    26  */
       
    27 NmApiMessageBody::NmApiMessageBody()
       
    28 {
       
    29     d = new NmApiMessageBodyPrivate();
       
    30 }
       
    31 
       
    32 /*!
       
    33    copying constructor for NmApiMessageBody
       
    34  */
       
    35 NmApiMessageBody::NmApiMessageBody(const NmApiMessageBody &apiMessageBody) : d(apiMessageBody.d)
    23 {
    36 {
    24 
    37 
    25 }
    38 }
    26 
    39 
    27 NmMessageBodyPrivate::~NmMessageBodyPrivate()
    40 /*!
       
    41    assignment operator for nmapimessagebody
       
    42  */
       
    43 NmApiMessageBody& NmApiMessageBody::operator=(const NmApiMessageBody &apiMessageBody)
    28 {
    44 {
    29 
    45 	if (this != &apiMessageBody) 
       
    46 	{
       
    47 		d = apiMessageBody.d;
       
    48 	}
       
    49 	return *this;
    30 }
    50 }
    31 
    51 
    32 /*
    52 /*!
    33  * constructor for nmmessagebody
    53    Compare data from \a apiMessageBody
    34  */
    54  */    
    35 NmMessageBody::NmMessageBody()
    55 bool NmApiMessageBody::operator==(const NmApiMessageBody &apiMessageBody)
    36 {
    56 {
    37     d = new NmMessageBodyPrivate();
    57     bool retVal = false;
       
    58     if (this->d == apiMessageBody.d)
       
    59     {
       
    60         retVal = true;
       
    61     }
       
    62     return retVal;
    38 }
    63 }
    39 
    64 
    40 NmMessageBody::~NmMessageBody()
    65 /*!
       
    66    Destructor for NmApiMessageBody
       
    67  */
       
    68 NmApiMessageBody::~NmApiMessageBody()
    41 {
    69 {
    42 
    70 
    43 }
    71 }
    44 /*!
    72 /*!
    45  * getter for total size of message body in bytes
    73    getter for total size of message body in bytes
    46  */
    74  */
    47 quint64 NmMessageBody::totalSize() const
    75 quint64 NmApiMessageBody::totalSize() const
    48 {
    76 {
    49     return d->totalSize;
    77     return d->totalSize;
    50 }
    78 }
    51 
    79 
    52 /*!
    80 /*!
    53  * getter for bytes available in local mailbox store
    81    getter for bytes available in local mailbox store
    54  */
    82  */
    55 quint64 NmMessageBody::fetchedSize() const
    83 quint64 NmApiMessageBody::fetchedSize() const
    56 {
    84 {
    57     return d->fetchedSize;
    85     return d->fetchedSize;
    58 }
    86 }
    59 
    87 
    60 /*!
    88 /*!
    61  * getter for fetched content
    89    getter for fetched content
    62  */
    90  */
    63 QString NmMessageBody::content() const
    91 QString NmApiMessageBody::content() const
    64 {
    92 {
    65     return d->content;
    93     return d->content;
    66 }
    94 }
    67 
    95 
    68 /*
    96 /*!
    69  * setter for total size of message body in bytes
    97    setter for total size of message body in bytes
    70  */
    98  */
    71 void NmMessageBody::setTotalSize(quint64 size)
    99 void NmApiMessageBody::setTotalSize(quint64 size)
    72 {
   100 {
    73     d->totalSize = size;
   101     d->totalSize = size;
    74 }
   102 }
    75 
   103 
    76 /*
   104 /*!
    77  * setter for bytes available on local mailbox store
   105    setter for bytes available on local mailbox store
    78  */
   106  */
    79 void NmMessageBody::setFetchedSize(quint64 size)
   107 void NmApiMessageBody::setFetchedSize(quint64 size)
    80 {
   108 {
    81     d->fetchedSize = size;
   109     d->fetchedSize = size;
    82 }
   110 }
    83 
   111 
    84 /*
   112 /*!
    85  * setter for content
   113    setter for content
    86  */
   114  */
    87 void NmMessageBody::setContent(const QString& content)
   115 void NmApiMessageBody::setContent(const QString& content)
    88 {
   116 {
    89     d->content = content;
   117     d->content = content;
    90 }
   118 }
    91 }
   119 }
    92 
   120