src/messaging/qmessage_stub.cpp
changeset 0 876b1a06bc25
equal deleted inserted replaced
-1:000000000000 0:876b1a06bc25
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the Qt Mobility Components.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 #include "qmessage.h"
       
    42 
       
    43 
       
    44 QTM_BEGIN_NAMESPACE
       
    45 
       
    46 QMessage::QMessage()
       
    47 {
       
    48 }
       
    49 
       
    50 QMessage::QMessage(const QMessageId& id)
       
    51 {
       
    52     Q_UNUSED(id)
       
    53 }
       
    54 
       
    55 QMessage::QMessage(const QMessage &other)
       
    56     :QMessageContentContainer(other)
       
    57 {
       
    58     Q_UNUSED(other)
       
    59 }
       
    60 
       
    61 QMessage& QMessage::operator=(const QMessage& other)
       
    62 {
       
    63     Q_UNUSED(other)
       
    64     return *this; // stub
       
    65 }
       
    66 
       
    67 QMessage::~QMessage()
       
    68 {
       
    69 }
       
    70 
       
    71 QMessageId QMessage::id() const
       
    72 {
       
    73     return QMessageId(); // stub
       
    74 }
       
    75 
       
    76 QMessage::Type QMessage::type() const
       
    77 {
       
    78     return NoType; // stub
       
    79 }
       
    80 
       
    81 void QMessage::setType(Type t)
       
    82 {
       
    83     Q_UNUSED(t)
       
    84 }
       
    85 
       
    86 QMessageAccountId QMessage::parentAccountId() const
       
    87 {
       
    88     return QMessageAccountId(); // stub
       
    89 }
       
    90 
       
    91 void QMessage::setParentAccountId(const QMessageAccountId &accountId)
       
    92 {
       
    93     Q_UNUSED(accountId)
       
    94 }
       
    95 
       
    96 QMessageFolderId QMessage::parentFolderId() const
       
    97 {
       
    98     return QMessageFolderId(); // stub
       
    99 }
       
   100 
       
   101 QMessage::StandardFolder QMessage::standardFolder() const
       
   102 {
       
   103     return QMessage::DraftsFolder; // stub
       
   104 }
       
   105 
       
   106 QMessageAddress QMessage::from() const
       
   107 {
       
   108     return QMessageAddress(); // stub
       
   109 }
       
   110 
       
   111 void QMessage::setFrom(const QMessageAddress &address)
       
   112 {
       
   113     Q_UNUSED(address)
       
   114 }
       
   115 
       
   116 QString QMessage::subject() const
       
   117 {
       
   118     return QString::null; //stub
       
   119 }
       
   120 
       
   121 void QMessage::setSubject(const QString &s)
       
   122 {
       
   123     Q_UNUSED(s)
       
   124 }
       
   125 
       
   126 QDateTime QMessage::date() const
       
   127 {
       
   128     return date(); // stub
       
   129 }
       
   130 
       
   131 void QMessage::setDate(const QDateTime &d)
       
   132 {
       
   133     Q_UNUSED(d)
       
   134 }
       
   135 
       
   136 QDateTime QMessage::receivedDate() const
       
   137 {
       
   138     return QDateTime(); // stub
       
   139 }
       
   140 
       
   141 void QMessage::setReceivedDate(const QDateTime &d)
       
   142 {
       
   143     Q_UNUSED(d)
       
   144 }
       
   145 
       
   146 QMessageAddressList QMessage::to() const
       
   147 {
       
   148     return QMessageAddressList(); // stub
       
   149 }
       
   150 
       
   151 void QMessage::setTo(const QMessageAddressList& toList)
       
   152 {
       
   153     Q_UNUSED(toList)
       
   154 }
       
   155 
       
   156 void QMessage::setTo(const QMessageAddress& address)
       
   157 {
       
   158     Q_UNUSED(address)
       
   159 }
       
   160 
       
   161 QMessageAddressList QMessage::cc() const
       
   162 {
       
   163     return QMessageAddressList(); // stub
       
   164 }
       
   165 
       
   166 void QMessage::setCc(const QMessageAddressList& ccList)
       
   167 {
       
   168     Q_UNUSED(ccList)
       
   169 }
       
   170 
       
   171 QMessageAddressList QMessage::bcc() const
       
   172 {
       
   173     return QMessageAddressList(); // stub
       
   174 }
       
   175 
       
   176 void QMessage::setBcc(const QMessageAddressList& bccList)
       
   177 {
       
   178     Q_UNUSED(bccList)
       
   179 }
       
   180 
       
   181 QMessage::StatusFlags QMessage::status() const
       
   182 {
       
   183     return StatusFlags(0); // stub
       
   184 }
       
   185 
       
   186 void QMessage::setStatus(QMessage::StatusFlags newStatus)
       
   187 {
       
   188     Q_UNUSED(newStatus)
       
   189 }
       
   190 
       
   191 void QMessage::setStatus(QMessage::Status flag, bool set)
       
   192 {
       
   193     Q_UNUSED(flag)
       
   194     Q_UNUSED(set)
       
   195 }
       
   196 
       
   197 QMessage::Priority QMessage::priority() const
       
   198 {
       
   199     return QMessage::NormalPriority; // stub
       
   200 }
       
   201 
       
   202 void QMessage::setPriority(Priority newPriority)
       
   203 {
       
   204     Q_UNUSED(newPriority)
       
   205 }
       
   206 
       
   207 int QMessage::size() const
       
   208 {
       
   209     return 0; // stub
       
   210 }
       
   211 
       
   212 QMessageContentContainerId QMessage::bodyId() const
       
   213 {
       
   214     // TODO: Example body finding algorithm.
       
   215     // If the content type of the message is text, then that is the body
       
   216     // otherwise if the first part of the body is text then that is the body.
       
   217     
       
   218     return QMessageContentContainerId(); // stub
       
   219 }
       
   220 
       
   221 void QMessage::setBody(const QString &body, const QByteArray &mimeType)
       
   222 {
       
   223     Q_UNUSED(body)
       
   224     Q_UNUSED(mimeType)
       
   225 }
       
   226 
       
   227 void QMessage::setBody(QTextStream &in, const QByteArray &mimeType)
       
   228 {
       
   229     Q_UNUSED(in)
       
   230     Q_UNUSED(mimeType)
       
   231 }
       
   232 
       
   233 QMessageContentContainerIdList QMessage::attachmentIds() const
       
   234 {
       
   235     //    TODO: Example attachment list generation algorithm, message parts are the main issue, maybe 
       
   236     //    have to recurse into them, somewhat ambiguous.
       
   237     //    Don't recurse, just ignore any body part, see bodyId() for body finding algorithm.
       
   238     
       
   239     // Implementation note, this should be platform independent.
       
   240     return QMessageContentContainerIdList(); // stub
       
   241 }
       
   242 
       
   243 void QMessage::appendAttachments(const QStringList &fileNames)
       
   244 {
       
   245     // Implementation note, this should be platform independent.
       
   246     Q_UNUSED(fileNames)
       
   247 }
       
   248 
       
   249 void QMessage::clearAttachments()
       
   250 {
       
   251     // Implementation note, this should be platform independent.
       
   252 }
       
   253 
       
   254 bool QMessage::isModified() const
       
   255 {
       
   256     return false; // stub
       
   257 }
       
   258 
       
   259 QMessage QMessage::createResponseMessage(ResponseType type) const
       
   260 {
       
   261     return QMessage(); // stub
       
   262 }
       
   263 
       
   264 
       
   265 QTM_END_NAMESPACE