equal
deleted
inserted
replaced
43 #include <qmessageaccountid.h> |
43 #include <qmessageaccountid.h> |
44 #include <qmessagefolderid.h> |
44 #include <qmessagefolderid.h> |
45 #include <qmessageid.h> |
45 #include <qmessageid.h> |
46 #include <qmessagemanager.h> |
46 #include <qmessagemanager.h> |
47 #include <qmessage_symbian_p.h> |
47 #include <qmessage_symbian_p.h> |
|
48 #include <messagingutil_p.h> |
48 |
49 |
49 #include <QDebug> |
50 #include <QDebug> |
50 |
51 |
51 #include <pop3set.h> |
52 #include <pop3set.h> |
52 #include <imapset.h> |
53 #include <imapset.h> |
92 void CSymbianMessagingSession::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) |
93 void CSymbianMessagingSession::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) |
93 { |
94 { |
94 } |
95 } |
95 |
96 |
96 QTM_BEGIN_NAMESPACE |
97 QTM_BEGIN_NAMESPACE |
|
98 |
|
99 using namespace MessagingUtil; |
|
100 |
97 class MapiSession |
101 class MapiSession |
98 { |
102 { |
99 public: |
103 public: |
100 static QMessageId addMessage(const Support::Parameters ¶ms); |
104 static QMessageId addMessage(const Support::Parameters ¶ms); |
101 }; |
105 }; |
336 CleanupStack::PopAndDestroy(pImSmtpSettings); |
340 CleanupStack::PopAndDestroy(pImSmtpSettings); |
337 CleanupStack::PopAndDestroy(pImPop3Settings); |
341 CleanupStack::PopAndDestroy(pImPop3Settings); |
338 CleanupStack::PopAndDestroy(pImIAPPreferences); |
342 CleanupStack::PopAndDestroy(pImIAPPreferences); |
339 CleanupStack::PopAndDestroy(pEmailAccounts); |
343 CleanupStack::PopAndDestroy(pEmailAccounts); |
340 |
344 |
341 return QMessageAccountId(QString::number(popAccount.iPopService)); |
345 return QMessageAccountId(addIdPrefix(QString::number(popAccount.iPopService))); |
342 } |
346 } |
343 |
347 |
344 QMessageAccountId createPopAndSmtpAccount(const TDesC& accountName, const TDesC& fromAddress) |
348 QMessageAccountId createPopAndSmtpAccount(const TDesC& accountName, const TDesC& fromAddress) |
345 { |
349 { |
346 QMessageAccountId retVal; |
350 QMessageAccountId retVal; |
459 CleanupStack::PopAndDestroy(pImSmtpSettings); |
463 CleanupStack::PopAndDestroy(pImSmtpSettings); |
460 CleanupStack::PopAndDestroy(pImap4Settings); |
464 CleanupStack::PopAndDestroy(pImap4Settings); |
461 CleanupStack::PopAndDestroy(pImIAPPreferences); |
465 CleanupStack::PopAndDestroy(pImIAPPreferences); |
462 CleanupStack::PopAndDestroy(pEmailAccounts); |
466 CleanupStack::PopAndDestroy(pEmailAccounts); |
463 |
467 |
464 return QMessageAccountId(QString::number(imapAccount.iImapService)); |
468 return QMessageAccountId(addIdPrefix(QString::number(imapAccount.iImapService))); |
465 } |
469 } |
466 |
470 |
467 QMessageAccountId createImapAndSmtpAccount(const TDesC& accountName, const TDesC& fromAddress) |
471 QMessageAccountId createImapAndSmtpAccount(const TDesC& accountName, const TDesC& fromAddress) |
468 { |
472 { |
469 QMessageAccountId retVal; |
473 QMessageAccountId retVal; |
514 QString nullString = "00000000"; |
518 QString nullString = "00000000"; |
515 QString serviceEntryIdString = QString::number(account.iRelatedService); |
519 QString serviceEntryIdString = QString::number(account.iRelatedService); |
516 serviceEntryIdString = nullString.left(8-serviceEntryIdString.length()) + serviceEntryIdString; |
520 serviceEntryIdString = nullString.left(8-serviceEntryIdString.length()) + serviceEntryIdString; |
517 QString folderIdString = QString::number(folderId); |
521 QString folderIdString = QString::number(folderId); |
518 folderIdString = nullString.left(8-folderIdString.length()) + folderIdString; |
522 folderIdString = nullString.left(8-folderIdString.length()) + folderIdString; |
519 return serviceEntryIdString+folderIdString; |
523 return addIdPrefix(serviceEntryIdString+folderIdString); |
520 } |
524 } |
521 |
525 |
522 QMessageFolderId addFolder(const Parameters ¶ms) |
526 QMessageFolderId addFolder(const Parameters ¶ms) |
523 { |
527 { |
524 QString accountName(params["parentAccountName"]); |
528 QString accountName(params["parentAccountName"]); |