src/messaging/qmessageservice_symbian.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 <smsclnt.h>
       
    42 #include <smuthdr.h>        // CSmsHeader
       
    43 #include <rsendas.h>
       
    44 #include <rsendasmessage.h>
       
    45 #include <f32file.h>
       
    46 #include <mmsconst.h>
       
    47 #include <utf.h>            // CnvUtfConverter
       
    48 
       
    49 #include "qmessageservice.h"
       
    50 #include "qmessageservice_symbian_p.h"
       
    51 #include "qmtmengine_symbian_p.h"
       
    52 #include "qmessage_symbian_p.h"
       
    53 #include "messagingutil_p.h"
       
    54 #include "maemohelpers_p.h" // contains non-meamo specific helpers for messaging
       
    55 #ifdef FREESTYLEMAILUSED
       
    56 #include "qfsengine_symbian_p.h"
       
    57 #endif
       
    58 
       
    59 QTM_BEGIN_NAMESPACE
       
    60 
       
    61 using namespace SymbianHelpers;
       
    62 
       
    63 QMessageServicePrivate::QMessageServicePrivate(QMessageService* parent)
       
    64  : q_ptr(parent),
       
    65    _state(QMessageService::InactiveState),
       
    66    _active(false),
       
    67    _pendingRequestCount(0)
       
    68 {
       
    69 }
       
    70       
       
    71 QMessageServicePrivate::~QMessageServicePrivate()
       
    72 {
       
    73 }
       
    74 
       
    75 bool QMessageServicePrivate::sendSMS(QMessage &message)
       
    76 {
       
    77     return CMTMEngine::instance()->sendSMS(message);
       
    78 }
       
    79 
       
    80 bool QMessageServicePrivate::sendMMS(QMessage &message)
       
    81 {
       
    82     return CMTMEngine::instance()->sendMMS(message);
       
    83 }
       
    84 
       
    85 bool QMessageServicePrivate::sendEmail(QMessage &message)
       
    86 {
       
    87     switch (idType(message.parentAccountId())) {
       
    88         case EngineTypeFreestyle:
       
    89 #ifdef FREESTYLEMAILUSED
       
    90             return CFSEngine::instance()->sendEmail(message);
       
    91 #else
       
    92             return false;
       
    93 #endif
       
    94             break;
       
    95         case EngineTypeMTM:
       
    96         default:
       
    97             return CMTMEngine::instance()->sendEmail(message);
       
    98             break;
       
    99     }
       
   100 }
       
   101 
       
   102 bool QMessageServicePrivate::show(const QMessageId& id)
       
   103 {
       
   104     switch (idType(id)) {
       
   105         case EngineTypeFreestyle:
       
   106 #ifdef FREESTYLEMAILUSED
       
   107             return CFSEngine::instance()->showMessage(id);
       
   108 #else
       
   109             return false;
       
   110 #endif
       
   111             break;
       
   112         case EngineTypeMTM:
       
   113         default:
       
   114             return CMTMEngine::instance()->showMessage(id);
       
   115             break;
       
   116     }
       
   117 }
       
   118 
       
   119 bool QMessageServicePrivate::compose(const QMessage &message)
       
   120 {
       
   121     switch (idType(message.parentAccountId())) {
       
   122         case EngineTypeFreestyle:
       
   123 #ifdef FREESTYLEMAILUSED
       
   124             return CFSEngine::instance()->composeMessage(message);
       
   125 #else
       
   126             return false;
       
   127 #endif
       
   128             break;
       
   129         case EngineTypeMTM:
       
   130         default:
       
   131             return CMTMEngine::instance()->composeMessage(message);
       
   132             break;
       
   133     }
       
   134 }
       
   135 
       
   136 bool QMessageServicePrivate::queryMessages(const QMessageFilter &filter, const QMessageSortOrder &sortOrder, uint limit, uint offset) const
       
   137 {
       
   138     if (_pendingRequestCount > 0) {
       
   139         return false;
       
   140     }
       
   141     _pendingRequestCount = 0;
       
   142     _active = true;
       
   143     _filter = filter;
       
   144     _sortOrder = sortOrder;
       
   145     _limit = limit;
       
   146     _offset = offset;
       
   147     _filtered = true;
       
   148     _sorted = true;
       
   149 
       
   150     _pendingRequestCount++;
       
   151     CMTMEngine::instance()->queryMessages((QMessageServicePrivate&)*this, filter, sortOrder, 0, 0);
       
   152 
       
   153 #ifdef FREESTYLEMAILUSED
       
   154     _pendingRequestCount++;
       
   155     CFSEngine::instance()->queryMessages((QMessageServicePrivate&)*this, filter, sortOrder, 0, 0);
       
   156 #endif
       
   157 
       
   158     return _active;
       
   159 }
       
   160 
       
   161 bool QMessageServicePrivate::queryMessages(const QMessageFilter &filter, const QString &body, QMessageDataComparator::MatchFlags matchFlags, const QMessageSortOrder &sortOrder, uint limit, uint offset) const
       
   162 {
       
   163     if (_pendingRequestCount > 0) {
       
   164         return false;
       
   165     }
       
   166     _pendingRequestCount = 0;
       
   167     _active = true;
       
   168     _filter = filter;
       
   169     _sortOrder = sortOrder;
       
   170     _limit = limit;
       
   171     _offset = offset;
       
   172     _filtered = true;
       
   173     _sorted = true;
       
   174     
       
   175     _pendingRequestCount++;
       
   176     CMTMEngine::instance()->queryMessages((QMessageServicePrivate&)*this, filter, body, matchFlags, sortOrder, 0, 0);
       
   177 
       
   178 #ifdef FREESTYLEMAILUSED
       
   179     _pendingRequestCount++;
       
   180     CFSEngine::instance()->queryMessages((QMessageServicePrivate&)*this, filter, body, matchFlags, sortOrder, 0, 0);
       
   181 #endif
       
   182 
       
   183     return _active;
       
   184 }
       
   185 
       
   186 bool QMessageServicePrivate::countMessages(const QMessageFilter &filter)
       
   187 {
       
   188     if (_pendingRequestCount > 0) {
       
   189         return false;
       
   190     }
       
   191     _pendingRequestCount = 0;
       
   192     _active = true;
       
   193     _count = 0;
       
   194 
       
   195     _pendingRequestCount++;
       
   196     CMTMEngine::instance()->countMessages((QMessageServicePrivate&)*this, filter);
       
   197 
       
   198 #ifdef FREESTYLEMAILUSED
       
   199     _pendingRequestCount++;
       
   200     CFSEngine::instance()->countMessages((QMessageServicePrivate&)*this, filter);
       
   201 #endif
       
   202     return _active;
       
   203 }
       
   204 
       
   205 bool QMessageServicePrivate::retrieve(const QMessageId &messageId, const QMessageContentContainerId &id)
       
   206 {
       
   207     switch (idType(messageId)) {
       
   208         case EngineTypeFreestyle:
       
   209 #ifdef FREESTYLEMAILUSED
       
   210             return CFSEngine::instance()->retrieve(*this, messageId, id);
       
   211 #else
       
   212             return false;
       
   213 #endif
       
   214             break;
       
   215         case EngineTypeMTM:
       
   216         default:
       
   217             return CMTMEngine::instance()->retrieve(*this, messageId, id);
       
   218             break;
       
   219     }
       
   220 }
       
   221 
       
   222 bool QMessageServicePrivate::retrieveBody(const QMessageId& id)
       
   223 {
       
   224     switch (idType(id)) {
       
   225         case EngineTypeFreestyle:
       
   226 #ifdef FREESTYLEMAILUSED
       
   227             return CFSEngine::instance()->retrieveBody(*this, id);
       
   228 #else
       
   229             return false;
       
   230 #endif
       
   231             break;
       
   232         case EngineTypeMTM:
       
   233         default:
       
   234             return CMTMEngine::instance()->retrieveBody(*this, id);
       
   235             break;
       
   236     }
       
   237 }
       
   238 
       
   239 bool QMessageServicePrivate::retrieveHeader(const QMessageId& id)
       
   240 {
       
   241     switch (idType(id)) {
       
   242         case EngineTypeFreestyle:
       
   243 #ifdef FREESTYLEMAILUSED
       
   244             return CFSEngine::instance()->retrieveHeader(*this, id);
       
   245 #else
       
   246             return false;
       
   247 #endif
       
   248             break;
       
   249         case EngineTypeMTM:
       
   250         default:
       
   251             return CMTMEngine::instance()->retrieveHeader(*this, id);
       
   252             break;
       
   253     }
       
   254 }
       
   255 
       
   256 void QMessageServicePrivate::messagesFound(const QMessageIdList &ids, bool isFiltered, bool isSorted)
       
   257 {
       
   258     _pendingRequestCount--;
       
   259 
       
   260     if (!isFiltered) {
       
   261         _filtered = false;
       
   262     }
       
   263 
       
   264     if (!isSorted) {
       
   265         _sorted = false;
       
   266     } else {
       
   267         if ((ids.count() > 0) && (_ids.count() > 0)) {
       
   268             _sorted = false;
       
   269         }
       
   270     }
       
   271 
       
   272     _ids.append(ids);
       
   273 
       
   274     if (_pendingRequestCount == 0) {
       
   275         if (!_filtered) {
       
   276             MessagingHelper::filterMessages(_ids, _filter);
       
   277         }
       
   278         if (!_sorted) {
       
   279             MessagingHelper::orderMessages(_ids, _sortOrder);
       
   280         }
       
   281         MessagingHelper::applyOffsetAndLimitToMessageIdList(_ids, _limit, _offset);
       
   282 
       
   283         emit q_ptr->messagesFound(_ids);
       
   284 
       
   285         setFinished(true);
       
   286 
       
   287         _ids.clear();
       
   288         _filter = QMessageFilter();
       
   289         _sortOrder = QMessageSortOrder();
       
   290     }
       
   291 }
       
   292 
       
   293 void QMessageServicePrivate::messagesCounted(int count)
       
   294 {
       
   295     _pendingRequestCount--;
       
   296 
       
   297     _count += count;
       
   298 
       
   299     if (_pendingRequestCount == 0) {
       
   300 
       
   301         emit q_ptr->messagesCounted(_count);
       
   302 
       
   303         setFinished(true);
       
   304 
       
   305         _count = 0;
       
   306     }
       
   307 }
       
   308 
       
   309 bool QMessageServicePrivate::exportUpdates(const QMessageAccountId &id)
       
   310 {
       
   311     switch (idType(id)) {
       
   312             case EngineTypeFreestyle:
       
   313 #ifdef FREESTYLEMAILUSED
       
   314                 return CFSEngine::instance()->exportUpdates(id);
       
   315 #else
       
   316                 return false;
       
   317 #endif
       
   318             case EngineTypeMTM:
       
   319             default:
       
   320                 return CMTMEngine::instance()->exportUpdates(*this, id);
       
   321     }
       
   322 }
       
   323 
       
   324 void QMessageServicePrivate::setFinished(bool successful)
       
   325 {
       
   326     if (!successful && (_error == QMessageManager::NoError)) {
       
   327         // We must report an error of some sort
       
   328         _error = QMessageManager::RequestIncomplete;
       
   329     }
       
   330 
       
   331     _state = QMessageService::FinishedState;
       
   332     emit q_ptr->stateChanged(_state);
       
   333     _active = false;
       
   334 }
       
   335 
       
   336 QMessageService::QMessageService(QObject *parent)
       
   337     : QObject(parent),
       
   338     d_ptr(new QMessageServicePrivate(this))
       
   339 {
       
   340 	connect(d_ptr, SIGNAL(stateChanged(QMessageService::State)), this, SIGNAL(stateChanged(QMessageService::State)));
       
   341 	connect(d_ptr, SIGNAL(messagesFound(const QMessageIdList&)), this, SIGNAL(messagesFound(const QMessageIdList&)));
       
   342     //connect(d_ptr, SIGNAL(messagesCounted(int)), this, SIGNAL(messagesCounted(int)));
       
   343 	connect(d_ptr, SIGNAL(progressChanged(uint, uint)), this, SIGNAL(progressChanged(uint, uint)));
       
   344 }
       
   345 
       
   346 QMessageService::~QMessageService()
       
   347 {
       
   348 }
       
   349 
       
   350 bool QMessageService::queryMessages(const QMessageFilter &filter, const QMessageSortOrder &sortOrder, uint limit, uint offset)
       
   351 {
       
   352     if (d_ptr->_active) {
       
   353         return false;
       
   354     }
       
   355     
       
   356     d_ptr->_active = true;
       
   357     d_ptr->_error = QMessageManager::NoError;
       
   358     
       
   359     if (d_ptr->queryMessages(filter, sortOrder, limit, offset)) {
       
   360         d_ptr->_state = QMessageService::ActiveState;
       
   361         emit stateChanged(d_ptr->_state);
       
   362     } else {
       
   363         d_ptr->setFinished(false);
       
   364     }
       
   365     
       
   366     return d_ptr->_active;
       
   367 }
       
   368 
       
   369 bool QMessageService::queryMessages(const QMessageFilter &filter, const QString &body, QMessageDataComparator::MatchFlags matchFlags, const QMessageSortOrder &sortOrder, uint limit, uint offset)
       
   370 {
       
   371     if (d_ptr->_active) {
       
   372         return false;
       
   373     }
       
   374 
       
   375     d_ptr->_active = true;
       
   376     d_ptr->_error = QMessageManager::NoError;
       
   377 
       
   378     if (d_ptr->queryMessages(filter, body, matchFlags, sortOrder, limit, offset)) {
       
   379         d_ptr->_state = QMessageService::ActiveState;
       
   380         emit stateChanged(d_ptr->_state);
       
   381     } else {
       
   382         d_ptr->setFinished(false);
       
   383     }
       
   384 
       
   385     return d_ptr->_active;
       
   386 }
       
   387 
       
   388 bool QMessageService::countMessages(const QMessageFilter &filter)
       
   389 {
       
   390     if (d_ptr->_active) {
       
   391         return false;
       
   392     }
       
   393     
       
   394     d_ptr->_active = true;
       
   395     d_ptr->_error = QMessageManager::NoError;
       
   396     
       
   397     if (d_ptr->countMessages(filter)) {
       
   398         d_ptr->_state = QMessageService::ActiveState;
       
   399         emit stateChanged(d_ptr->_state);
       
   400     } else {
       
   401         d_ptr->setFinished(false);
       
   402     }
       
   403     
       
   404     return d_ptr->_active;
       
   405 }
       
   406 
       
   407 bool QMessageService::send(QMessage &message)
       
   408 {
       
   409 	if (d_ptr->_active) {
       
   410 		return false;
       
   411 	}
       
   412 	
       
   413 	d_ptr->_active = true;
       
   414 	d_ptr->_error = QMessageManager::NoError;
       
   415 	
       
   416     bool retVal = true;	
       
   417     
       
   418     d_ptr->_state = QMessageService::ActiveState;
       
   419     emit stateChanged(d_ptr->_state);
       
   420     
       
   421     QMessageAccountId accountId = message.parentAccountId();
       
   422     QMessage::Type msgType = QMessage::NoType;
       
   423 
       
   424     // Check message type
       
   425     if (message.type() == QMessage::AnyType || message.type() == QMessage::NoType) {
       
   426         QMessage::TypeFlags types = QMessage::NoType;
       
   427         if (accountId.isValid()) {
       
   428             // ParentAccountId was defined => Message type can be read
       
   429             // from parent account
       
   430             QMessageAccount account = QMessageAccount(accountId);
       
   431             QMessage::TypeFlags types = account.messageTypes();
       
   432             if (types & QMessage::Sms) {
       
   433                 msgType = QMessage::Sms;
       
   434             } else if (types & QMessage::Mms) {
       
   435                 msgType = QMessage::Mms;
       
   436             } else if (types & QMessage::Email) {
       
   437                 msgType = QMessage::Email;
       
   438             }
       
   439         }
       
   440         if (msgType == QMessage::NoType) {
       
   441             d_ptr->_error = QMessageManager::ConstraintFailure;
       
   442             retVal = false;
       
   443         }
       
   444     }
       
   445 
       
   446     if (retVal) {
       
   447         // Check account
       
   448         if (!accountId.isValid()) {
       
   449             accountId = QMessageAccount::defaultAccount(message.type());
       
   450             if (!accountId.isValid()) {
       
   451                 d_ptr->_error = QMessageManager::InvalidId;
       
   452                 retVal = false;
       
   453             }
       
   454         }
       
   455     }
       
   456 
       
   457     QMessageAccount account(accountId);
       
   458     if (retVal) {
       
   459         // Check account/message type compatibility
       
   460         if (!(account.messageTypes() & message.type()) && (msgType == QMessage::NoType)) {
       
   461             d_ptr->_error = QMessageManager::ConstraintFailure;
       
   462             retVal = false;
       
   463         }
       
   464     }
       
   465     
       
   466     if (retVal) {
       
   467         // Check recipients
       
   468         QMessageAddressList recipients = message.to() + message.bcc() + message.cc();
       
   469         if (recipients.isEmpty()) {
       
   470             d_ptr->_error = QMessageManager::ConstraintFailure;
       
   471             return false;
       
   472         }
       
   473     }
       
   474     
       
   475     if (retVal) {
       
   476         // Set default account if unset
       
   477         if (!message.parentAccountId().isValid()) {
       
   478             message.setParentAccountId(accountId);
       
   479         }
       
   480         
       
   481         if (message.type() == QMessage::AnyType || message.type() == QMessage::NoType) {
       
   482             message.setType(msgType);
       
   483         }
       
   484 
       
   485         if (account.messageTypes() & QMessage::Sms) {
       
   486             retVal = d_ptr->sendSMS(message);
       
   487         } else if (account.messageTypes() & QMessage::Mms) {
       
   488             retVal = d_ptr->sendMMS(message);
       
   489         } else if (account.messageTypes() & QMessage::Email) {
       
   490             retVal = d_ptr->sendEmail(message);
       
   491         }
       
   492     }
       
   493     
       
   494     d_ptr->setFinished(retVal);
       
   495     return retVal;
       
   496 }
       
   497 
       
   498 bool QMessageService::compose(const QMessage &message)
       
   499 {
       
   500 	if (d_ptr->_active) {
       
   501 		return false;
       
   502 	}
       
   503 	
       
   504 	d_ptr->_active = true;
       
   505 	d_ptr->_error = QMessageManager::NoError;
       
   506 	
       
   507 	bool retVal = true;
       
   508 	d_ptr->_state = QMessageService::ActiveState;
       
   509 	emit stateChanged(d_ptr->_state);
       
   510 	
       
   511 	retVal = d_ptr->compose(message);
       
   512 	
       
   513     d_ptr->setFinished(retVal);
       
   514     return retVal;
       
   515 }
       
   516 
       
   517 bool QMessageService::retrieveHeader(const QMessageId& id)
       
   518 {
       
   519 	if (d_ptr->_active) {
       
   520 		return false;
       
   521 	}
       
   522 	
       
   523     if (!id.isValid()) {
       
   524         d_ptr->_error = QMessageManager::InvalidId;
       
   525         return false;
       
   526     }
       
   527     
       
   528 	d_ptr->_active = true;
       
   529 	d_ptr->_error = QMessageManager::NoError;
       
   530 	
       
   531 	bool retVal = true;
       
   532 	d_ptr->_state = QMessageService::ActiveState;
       
   533 	emit stateChanged(d_ptr->_state);
       
   534 
       
   535 	retVal = d_ptr->retrieveHeader(id);
       
   536 	if (retVal == false) {
       
   537 	    d_ptr->setFinished(retVal);
       
   538 	}
       
   539 	
       
   540     return retVal;
       
   541 }
       
   542 
       
   543 bool QMessageService::retrieveBody(const QMessageId& id)
       
   544 {
       
   545 	if (d_ptr->_active) {
       
   546 		return false;
       
   547 	}
       
   548 	
       
   549     if (!id.isValid()) {
       
   550         d_ptr->_error = QMessageManager::InvalidId;
       
   551         return false;
       
   552     }
       
   553     
       
   554 	d_ptr->_active = true;
       
   555 	d_ptr->_error = QMessageManager::NoError;
       
   556 	
       
   557 	bool retVal = true;
       
   558 	d_ptr->_state = QMessageService::ActiveState;
       
   559 	emit stateChanged(d_ptr->_state);
       
   560 
       
   561 	retVal = d_ptr->retrieveBody(id);
       
   562 	if (retVal == false) {
       
   563         d_ptr->setFinished(retVal);
       
   564     }
       
   565 	
       
   566     return retVal;
       
   567 }
       
   568 
       
   569 bool QMessageService::retrieve(const QMessageId &messageId, const QMessageContentContainerId& id)
       
   570 {
       
   571 	if (d_ptr->_active) {
       
   572 		return false;
       
   573 	}
       
   574 	
       
   575     if (!messageId.isValid() || !id.isValid()) {
       
   576         d_ptr->_error = QMessageManager::InvalidId;
       
   577         return false;
       
   578     }
       
   579     
       
   580 	d_ptr->_active = true;
       
   581 	d_ptr->_error = QMessageManager::NoError;
       
   582 
       
   583 	bool retVal = true;
       
   584 	d_ptr->_state = QMessageService::ActiveState;
       
   585 	emit stateChanged(d_ptr->_state);
       
   586 
       
   587 	retVal = d_ptr->retrieve(messageId, id);
       
   588     if (retVal == false) {
       
   589         d_ptr->setFinished(retVal);
       
   590     }
       
   591 	
       
   592     return retVal;
       
   593 }
       
   594 
       
   595 bool QMessageService::show(const QMessageId& id)
       
   596 {
       
   597 	if (d_ptr->_active) {
       
   598 		return false;
       
   599 	}
       
   600 	
       
   601     if (!id.isValid()) {
       
   602         d_ptr->_error = QMessageManager::InvalidId;
       
   603         return false;
       
   604     }
       
   605     
       
   606 	d_ptr->_active = true;
       
   607 	d_ptr->_error = QMessageManager::NoError;
       
   608 	
       
   609 	bool retVal = true;
       
   610 	d_ptr->_state = QMessageService::ActiveState;
       
   611 	emit stateChanged(d_ptr->_state);
       
   612 
       
   613     retVal = d_ptr->show(id);
       
   614     
       
   615     d_ptr->setFinished(retVal);
       
   616     return retVal;
       
   617 }
       
   618 
       
   619 bool QMessageService::exportUpdates(const QMessageAccountId &id)
       
   620 {
       
   621     if (d_ptr->_active) {
       
   622         return false;
       
   623     }
       
   624     
       
   625     if (!id.isValid()) {
       
   626         d_ptr->_error = QMessageManager::InvalidId;
       
   627         return false;
       
   628     }
       
   629     
       
   630     d_ptr->_active = true;
       
   631     d_ptr->_error = QMessageManager::NoError;
       
   632     
       
   633     bool retVal = true;
       
   634     d_ptr->_state = QMessageService::ActiveState;
       
   635     emit stateChanged(d_ptr->_state);
       
   636     
       
   637     retVal = d_ptr->exportUpdates(id);
       
   638     if (retVal == false) {
       
   639         d_ptr->setFinished(retVal);
       
   640     }
       
   641     
       
   642     return retVal;
       
   643 }
       
   644 
       
   645 QMessageService::State QMessageService::state() const
       
   646 {
       
   647 	return d_ptr->_state;
       
   648 }
       
   649 
       
   650 void QMessageService::cancel()
       
   651 {
       
   652 }
       
   653 
       
   654 QMessageManager::Error QMessageService::error() const
       
   655 {
       
   656     return d_ptr->_error;
       
   657 }
       
   658 
       
   659 #include "moc_qmessageservice_symbian_p.cpp"
       
   660 QTM_END_NAMESPACE