emailservices/nmclientapi/src/nmapimessagecontent.cpp
author hgs
Thu, 30 Sep 2010 11:43:07 +0300
changeset 74 6c59112cfd31
parent 68 83cc6bae1de8
permissions -rw-r--r--
201039
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
68
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:
hgs
parents:
diff changeset
    15
*       Email message content implementation.
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
#include "nmapiheaders.h"
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
namespace EmailClientApi
hgs
parents:
diff changeset
    21
{
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
/*!
hgs
parents:
diff changeset
    24
   Constructor for NmApiMessageContent
hgs
parents:
diff changeset
    25
 */
hgs
parents:
diff changeset
    26
NmApiMessageContent::NmApiMessageContent()
hgs
parents:
diff changeset
    27
{
hgs
parents:
diff changeset
    28
    NM_FUNCTION;
hgs
parents:
diff changeset
    29
    d = new NmApiMessageContentPrivate();
hgs
parents:
diff changeset
    30
}
hgs
parents:
diff changeset
    31
hgs
parents:
diff changeset
    32
/*!
74
hgs
parents: 68
diff changeset
    33
    Class copy constructor.
hgs
parents: 68
diff changeset
    34
*/
hgs
parents: 68
diff changeset
    35
NmApiMessageContent::NmApiMessageContent(const NmApiMessageContent &messagecontent)
hgs
parents: 68
diff changeset
    36
{
hgs
parents: 68
diff changeset
    37
    NM_FUNCTION;
hgs
parents: 68
diff changeset
    38
    d = messagecontent.d;
hgs
parents: 68
diff changeset
    39
}
hgs
parents: 68
diff changeset
    40
hgs
parents: 68
diff changeset
    41
/*!
68
hgs
parents:
diff changeset
    42
   Destructor for NmApiMessageContent
hgs
parents:
diff changeset
    43
 */
hgs
parents:
diff changeset
    44
NmApiMessageContent::~NmApiMessageContent()
hgs
parents:
diff changeset
    45
{
hgs
parents:
diff changeset
    46
    NM_FUNCTION;
hgs
parents:
diff changeset
    47
}
hgs
parents:
diff changeset
    48
74
hgs
parents: 68
diff changeset
    49
NmApiMessageContent& NmApiMessageContent::operator=(const NmApiMessageContent &messagecontent)
hgs
parents: 68
diff changeset
    50
{
hgs
parents: 68
diff changeset
    51
    if (this == &messagecontent)
hgs
parents: 68
diff changeset
    52
        return *this;
hgs
parents: 68
diff changeset
    53
    
hgs
parents: 68
diff changeset
    54
    d = messagecontent.d;
hgs
parents: 68
diff changeset
    55
hgs
parents: 68
diff changeset
    56
    return *this;
hgs
parents: 68
diff changeset
    57
}
hgs
parents: 68
diff changeset
    58
68
hgs
parents:
diff changeset
    59
/*!
hgs
parents:
diff changeset
    60
   Getter for content type
hgs
parents:
diff changeset
    61
 */
hgs
parents:
diff changeset
    62
QString NmApiMessageContent::contentType() const
hgs
parents:
diff changeset
    63
{
hgs
parents:
diff changeset
    64
    NM_FUNCTION;
hgs
parents:
diff changeset
    65
    return d->contentType();
hgs
parents:
diff changeset
    66
}
hgs
parents:
diff changeset
    67
hgs
parents:
diff changeset
    68
/*!
hgs
parents:
diff changeset
    69
   Getter for is complete
hgs
parents:
diff changeset
    70
 */
hgs
parents:
diff changeset
    71
bool NmApiMessageContent::isComplete()
hgs
parents:
diff changeset
    72
{
hgs
parents:
diff changeset
    73
    NM_FUNCTION;
hgs
parents:
diff changeset
    74
    return d->isComplete();
hgs
parents:
diff changeset
    75
}
hgs
parents:
diff changeset
    76
hgs
parents:
diff changeset
    77
/*!
hgs
parents:
diff changeset
    78
   Getter for size
hgs
parents:
diff changeset
    79
 */
hgs
parents:
diff changeset
    80
quint32 NmApiMessageContent::size() const
hgs
parents:
diff changeset
    81
{
hgs
parents:
diff changeset
    82
    NM_FUNCTION;
hgs
parents:
diff changeset
    83
    return d->size();
hgs
parents:
diff changeset
    84
}
hgs
parents:
diff changeset
    85
hgs
parents:
diff changeset
    86
/*!
hgs
parents:
diff changeset
    87
   Getter for id
hgs
parents:
diff changeset
    88
 */
hgs
parents:
diff changeset
    89
quint64 NmApiMessageContent::id() const
hgs
parents:
diff changeset
    90
{
hgs
parents:
diff changeset
    91
     NM_FUNCTION;
hgs
parents:
diff changeset
    92
     return d->id();
hgs
parents:
diff changeset
    93
}
hgs
parents:
diff changeset
    94
hgs
parents:
diff changeset
    95
/*!
hgs
parents:
diff changeset
    96
   Setter for content type
hgs
parents:
diff changeset
    97
 */
hgs
parents:
diff changeset
    98
void NmApiMessageContent::setContentType(const QString &contentType)
hgs
parents:
diff changeset
    99
{
hgs
parents:
diff changeset
   100
    NM_FUNCTION;
hgs
parents:
diff changeset
   101
    d->setContentType(contentType);
hgs
parents:
diff changeset
   102
}
hgs
parents:
diff changeset
   103
hgs
parents:
diff changeset
   104
/*!
hgs
parents:
diff changeset
   105
   Setter for is complete
hgs
parents:
diff changeset
   106
 */
hgs
parents:
diff changeset
   107
void NmApiMessageContent::setComplete(bool complete)
hgs
parents:
diff changeset
   108
{
hgs
parents:
diff changeset
   109
    NM_FUNCTION;
hgs
parents:
diff changeset
   110
    d->setComplete(complete);
hgs
parents:
diff changeset
   111
}
hgs
parents:
diff changeset
   112
hgs
parents:
diff changeset
   113
/*!
hgs
parents:
diff changeset
   114
   Setter for size
hgs
parents:
diff changeset
   115
 */
hgs
parents:
diff changeset
   116
void NmApiMessageContent::setSize(quint32 size)
hgs
parents:
diff changeset
   117
{
hgs
parents:
diff changeset
   118
    NM_FUNCTION;
hgs
parents:
diff changeset
   119
    d->setSize(size);
hgs
parents:
diff changeset
   120
}
hgs
parents:
diff changeset
   121
hgs
parents:
diff changeset
   122
/*!
hgs
parents:
diff changeset
   123
   Setter for id
hgs
parents:
diff changeset
   124
 */
hgs
parents:
diff changeset
   125
void NmApiMessageContent::setId(quint64 id)
hgs
parents:
diff changeset
   126
{
hgs
parents:
diff changeset
   127
    NM_FUNCTION;
hgs
parents:
diff changeset
   128
    d->setId(id);
hgs
parents:
diff changeset
   129
}
hgs
parents:
diff changeset
   130
hgs
parents:
diff changeset
   131
}