emailservices/nmclientapi/src/nmapimessage.cpp
changeset 68 83cc6bae1de8
child 74 6c59112cfd31
equal deleted inserted replaced
67:459da34cdb45 68:83cc6bae1de8
       
     1 /*
       
     2  * Copyright (c) 2010 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  *      Api's email message implementation.
       
    16  */
       
    17 
       
    18 #include "nmapiheaders.h"
       
    19 
       
    20 namespace EmailClientApi
       
    21 {
       
    22 
       
    23 /*!
       
    24     Class constructor.
       
    25 */
       
    26 NmApiMessage::NmApiMessage()
       
    27 {
       
    28     NM_FUNCTION;
       
    29     d = new NmApiMessagePrivate();
       
    30 }
       
    31 
       
    32 /*!
       
    33     Class destructor.
       
    34 */
       
    35 NmApiMessage::~NmApiMessage()
       
    36 {
       
    37     NM_FUNCTION;
       
    38 }
       
    39 
       
    40 /*!
       
    41  \fn plainTextContent 
       
    42  \return Message plain text content.
       
    43  
       
    44  Returns message plain text content.
       
    45  */
       
    46 NmApiTextContent NmApiMessage::plainTextContent()
       
    47 {
       
    48     NM_FUNCTION;
       
    49     return d->plainTextContent();
       
    50 }
       
    51 
       
    52 /*!
       
    53  \fn htmlContent 
       
    54  \return Message html text content.
       
    55  
       
    56  Returns message html text content.
       
    57  */
       
    58 NmApiTextContent NmApiMessage::htmlContent()
       
    59 {
       
    60     NM_FUNCTION;
       
    61     return d->htmlContent();
       
    62 }
       
    63 
       
    64 /*!
       
    65  \fn isComplete 
       
    66  \return Message complete state.
       
    67  
       
    68  Returns message complete state.
       
    69  */
       
    70 bool NmApiMessage::isComplete()
       
    71 {
       
    72     NM_FUNCTION;
       
    73     return d->isComplete();
       
    74 }
       
    75 
       
    76 /*!
       
    77  \fn getAttachments 
       
    78  \return Message attachment list.
       
    79  
       
    80  Returns message attachment list.
       
    81  */
       
    82 QList<NmApiAttachment> NmApiMessage::attachments()
       
    83 {
       
    84     NM_FUNCTION;
       
    85     return d->attachments();
       
    86 }
       
    87 
       
    88 
       
    89 /*!
       
    90  \fn addAttachment 
       
    91  \param attachment Attachment.
       
    92  
       
    93  Add attachment to message.
       
    94  */
       
    95 void NmApiMessage::addAttachment(NmApiAttachment &attachment)
       
    96 {
       
    97     NM_FUNCTION;
       
    98     d->addAttachment(attachment);
       
    99 }
       
   100 
       
   101 /*!
       
   102  \fn envelope 
       
   103  \return Message envelope.
       
   104  
       
   105  Returns message envelope.
       
   106  */
       
   107 NmApiMessageEnvelope& NmApiMessage::envelope()
       
   108 {
       
   109     NM_FUNCTION;
       
   110     return d->envelope();
       
   111 }
       
   112 
       
   113 /*!
       
   114  \fn setPlainTextContent 
       
   115  \param textContent Content.
       
   116  
       
   117  Setter for plain text content.
       
   118  */
       
   119 void NmApiMessage::setPlainTextContent(NmApiTextContent &textContent)
       
   120 {
       
   121     NM_FUNCTION;
       
   122     d->setPlainTextContent(textContent);
       
   123 }
       
   124 
       
   125 /*!
       
   126  \fn setHtmlContent 
       
   127  \param textContent Content.
       
   128  
       
   129  Setter for html text content.
       
   130  */
       
   131 void NmApiMessage::setHtmlContent(NmApiTextContent &textContent)
       
   132 {
       
   133     NM_FUNCTION;
       
   134     d->setHtmlContent(textContent);
       
   135 }
       
   136 
       
   137 /*!
       
   138  \fn setComplete 
       
   139  \param complete Complete state.
       
   140  
       
   141  Setter for message complete state.
       
   142  */
       
   143 void NmApiMessage::setComplete(bool complete)
       
   144 {
       
   145     NM_FUNCTION;
       
   146     d->setComplete(complete);
       
   147 }
       
   148 
       
   149 /*!
       
   150  \fn setAttachments 
       
   151  \param attachments Attachments.
       
   152  
       
   153  Setter for set attachments to message.
       
   154  */
       
   155 void NmApiMessage::setAttachments(QList<NmApiAttachment> &attachments)
       
   156 {
       
   157     NM_FUNCTION;
       
   158     d->setAttachments(attachments);
       
   159 }
       
   160 
       
   161 /*!
       
   162  \fn setEnvelope 
       
   163  \param envelope Envelope.
       
   164  
       
   165  Setter for message envelope.
       
   166  */
       
   167 void NmApiMessage::setEnvelope(NmApiMessageEnvelope &envelope)
       
   168 {
       
   169     NM_FUNCTION;
       
   170     d->setEnvelope(envelope);
       
   171 }
       
   172 
       
   173 }