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