# HG changeset patch # User hgs # Date 1277379138 -10800 # Node ID f83bd4ae1fe37b4a1fb564238368637b202f588e # Parent 780f926bc26cddf74e5c48bf8705da32223f2219 201025 diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/email_client_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/email_client_api.metaxml Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,13 @@ + + + email client api + Email client api allows listing and accessing mailboxes and email messages. Messages can be created, replied, forwared and searched. Specific mailbox can be launched in the Email application. + c++ + email_plat + + + + no + no + + diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/email_client_api.pri --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/email_client_api.pri Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,35 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +# +symbian*: { + # Build.inf rules + BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " \ + "email_client_api/emailinterfacefactory.h APP_LAYER_PLATFORM_EXPORT_PATH(emailinterfacefactory.h)" \ + "email_client_api/emailinterfacefactory.inl APP_LAYER_PLATFORM_EXPORT_PATH(emailinterfacefactory.inl)" \ + "email_client_api/emailclientapi.hrh APP_LAYER_PLATFORM_EXPORT_PATH(emailclientapi.hrh)" \ + "email_client_api/emailapidefs.h APP_LAYER_PLATFORM_EXPORT_PATH(emailapidefs.h)" \ + "email_client_api/emailsorting.h APP_LAYER_PLATFORM_EXPORT_PATH(emailsorting.h)" \ + "email_client_api/mmessageiterator.h APP_LAYER_PLATFORM_EXPORT_PATH(mmessageiterator.h)" \ + "email_client_api/memailclientapi.h APP_LAYER_PLATFORM_EXPORT_PATH(memailclientapi.h)" \ + "email_client_api/memailmailbox.h APP_LAYER_PLATFORM_EXPORT_PATH(memailmailbox.h)" \ + "email_client_api/memailmessage.h APP_LAYER_PLATFORM_EXPORT_PATH(memailmessage.h)" \ + "email_client_api/memailfolder.h APP_LAYER_PLATFORM_EXPORT_PATH(memailfolder.h)" \ + "email_client_api/memailaddress.h APP_LAYER_PLATFORM_EXPORT_PATH(memailaddress.h)" \ + "email_client_api/memailcontent.h APP_LAYER_PLATFORM_EXPORT_PATH(memailcontent.h)" \ + "email_client_api/memailmessagesearch.h APP_LAYER_PLATFORM_EXPORT_PATH(memailmessagesearch.h)" \ + "email_client_api/mmailboxsyncobserver.h APP_LAYER_PLATFORM_EXPORT_PATH(mmailboxsyncobserver.h)" \ + "email_client_api/mmailboxcontentobserver.h APP_LAYER_PLATFORM_EXPORT_PATH(mmailboxcontentobserver.h)" +} diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/emailapidefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/emailapidefs.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,158 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Email Client API definitions +* +*/ + +#ifndef __EMAILAPIDEFS +#define __EMAILAPIDEFS + +#include +#include + +namespace EmailInterface { + +/** +* Id for message, message part, folder and mailbox entries +*/ +typedef TUint TEntryId; + +/** +* Interface id. Each implementation of MEmailInterface has unique id value. +*/ +typedef TInt TEmailTypeId; + +const TEntryId KUndefinedEntryId = 0; + +/** + * base interface for all email interfaces available to clients + * @since S60 v5.0 + */ +class MEmailInterface +{ +public: + /** returns interface id (kind of RTTI) */ + virtual TEmailTypeId InterfaceId() const = 0; + + /** frees memory allocated by interface impl. */ + virtual void Release() = 0; +}; + +/** + * Defines abstraction for entry ID. Used by message, folder, mailbox etc types. + * @since S60 v5.0 + */ +class TBaseId +{ +public: + inline TBaseId() : iId( KUndefinedEntryId ){} + inline TBaseId( TEntryId aId ) : iId( aId ){} + + TEntryId iId; +}; + +/** + * Defines mailbox ID + * @since S60 v5.0 + */ +class TMailboxId : public TBaseId +{ +public: + inline TMailboxId() : + TBaseId(){} + inline TMailboxId( TEntryId aId ) : TBaseId( aId ){} + inline TBool operator==( const TMailboxId& aMailboxId ) const { + return ( aMailboxId.iId == iId ); } +}; + +/** + * Defines folder ID which is associated with a mailbox + * @since S60 v5.0 + */ +class TFolderId : public TBaseId +{ +public: + // parent mailbox + TMailboxId iMailboxId; + inline TFolderId( TEntryId aId, const TMailboxId& aMailboxId ) : + TBaseId( aId ),iMailboxId( aMailboxId.iId ){} + + inline TFolderId() : TBaseId(), iMailboxId() {} + + inline TBool operator==( const TFolderId& aFolderId ) const { + return ( iMailboxId.iId == aFolderId.iMailboxId.iId && + iId == aFolderId.iId ); } + + inline TBool operator!=( const TFolderId& aFolderId ) const { + return !( aFolderId == *this ); } +}; + +/** + * Defines email message ID which is associated with a mailbox and folder + * @since S60 v5.0 + */ +class TMessageId : public TBaseId +{ +public: + inline TMessageId() : TBaseId(), iFolderId(){} + + inline TMessageId( TEntryId aMsgId, TEntryId aFolderId, TMailboxId aMailboxId ) : + TBaseId( aMsgId ), iFolderId( aFolderId, aMailboxId ){} + + inline TBool operator==( const TMessageId& aMessageId ) const { + return ( iFolderId == aMessageId.iFolderId && + iId == aMessageId.iId ); } + + inline TBool operator!=( const TMessageId& aMessageId ) const { + return !( aMessageId == *this ); } + + /** + * parent folder id. + */ + TFolderId iFolderId; +}; + + +/** + * Message content (part) id + * @since S60 v5.0 + */ +class TMessageContentId : public TBaseId +{ +public: + inline TMessageContentId(): TBaseId(), iMessageId() {} + + inline TMessageContentId( TEntryId aContentId, TEntryId aMsgId, TEntryId aFolderId, TMailboxId aMailboxId ) : + TBaseId( aContentId ), iMessageId( aMsgId, aFolderId, aMailboxId ){} + + inline TBool operator==( const TMessageContentId& aContentId ) const { + return ( iMessageId == aContentId.iMessageId && + iId == aContentId.iId ); } + + inline TBool operator!=( const TMessageContentId& aContentId ) const { + return !( aContentId == *this ); } + + // parent message + TMessageId iMessageId; +}; + +typedef RArray REmailMessageIdArray; + +typedef RArray REmailFolderIdArray; + +typedef RArray REmailMailboxIdArray; + +} // EmailInterface + +#endif // __EMAILAPIDEFS diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/emailclientapi.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/emailclientapi.hrh Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Interface IDs for sub interfaces +* +*/ + +#ifndef __EMAILCLIENTAPI_HRH +#define __EMAILCLIENTAPI_HRH + +// ECom interface UID for email API +#define KEmailClientFactoryApiUid 0x20022D62 + + +// Interface ids (not ECom) for accessing "sub interfaces" via +// MEmailInterface* CEmailInterfaceFactory::InterfaceL( const TInt aInterfaceId ) +// to be checked if all should be published to clients (some are not +// meant to be instantiated via factory method but by other means, e.g. +// user never instantiates mailbox from scratch but asks it from MEmailClientApi + +#define KEmailClientApiInterface 0x20022D63 +#define KEmailIFUidMailbox 0x20022D64 +#define KEmailIFUidMessage 0x20022D65 +#define KEmailIFUidFolder 0x20022D66 +#define KEmailIFUidAddress 0x20022D67 +#define KEmailIFUidMessageContent 0x20022D68 +#define KEmailIFUidSearch 0x20022D69 +#define KEmailIFUidTextContent 0x20022D6B +#define KEmailIFUidMessageIterator 0x20022D6C +#define KEmailIFUidMultipart 0x20022D6D +#define KEmailIFUidAttachment 0x20022D6E + + +#endif // __EMAILCLIENTAPI_HRH diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/emailinterfacefactory.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/emailinterfacefactory.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ECom interface for Email Client API +* +*/ + + +#ifndef CEMAILINTERFACEFACTORY_H +#define CEMAILINTERFACEFACTORY_H + +#include +#include +#include +#include + +namespace EmailInterface { + +/** + * ECom factory class for Email Client API. + * @since S60 v5.0 + * + */ +NONSHARABLE_CLASS( CEmailInterfaceFactory ) : public CBase +{ +public: + + /** + * Contructor + * @return factory for creating interface instances. + */ + inline static CEmailInterfaceFactory* NewL(); + + /** + * destructor + */ + inline ~CEmailInterfaceFactory(); + + /** + * Returns email interface pointer by id + * @param aInterfaceId interface id, see emailclientapi.hrh for available ids + * @return pointer to interface + * @exception KErrNotFound if unkown interface id is given + * + * @code + + #include + + using namespace EmailInterface; + + CEmailInterfaceFactory* factory = CEmailInterfaceFactory::NewL(); + CleanupStack::PushL( factory ); + MEmailInterface* ifPtr = factory->InterfaceL( KEmailClientApiInterface ); + MEmailClientApi* clientApi = static_cast( ifPtr ); + CleanupReleasePushL( *clientApi ); + // + CleanupStack::PopAndDestroy( 2 ); // clientApi and factory + @endcode + * + */ + virtual EmailInterface::MEmailInterface* InterfaceL( + const TInt aInterfaceId ) = 0; + +private: + + // Unique instance identifier key + TUid iDtor_ID_Key; +}; + + +/** + * Cleanup support for pointer arrays with MEmailInterface elements which are + * destroyed with Release() method. + * @since S60 v5.0 + @code + using namespace EmailInterface; + + RMailboxPtrArray mailboxes; // array of MEmailMailbox pointers + // note: PushL can take any pointer array of elements with Release() + // method + CleanupResetAndRelease::PushL( mailboxes ); + // + mailClient->GetMailboxesL( mailboxes ); + + // MEmailMailbox::Release() called for each array element and then + // mailboxes.Reset() is called + CleanupStack::PopAndDestroy(); + @endcode + */ +template +NONSHARABLE_CLASS( CleanupResetAndRelease ) +{ +public: + /** + * Cleanup for elements containing Release() method + */ + inline static void PushL( RPointerArray& aItem ); + + /** + * Releases array elements and resets array. + */ + inline static void ResetAndRelease( TAny* aPtr ); +}; + +#include "emailinterfacefactory.inl" + +} // namespace EmailInterface + +#endif // CEMAILINTERFACEFACTORY_H diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/emailinterfacefactory.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/emailinterfacefactory.inl Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ECom interface for email interface factory inline implementation +* +*/ + +#include "emailclientapi.hrh" + +// LOCAL FUNCTIONS + +inline void ResetAndDestroyCleanup( TAny* aAny ) + { + RImplInfoPtrArray* ptrArray = reinterpret_cast( aAny ); + ptrArray->ResetAndDestroy(); + } + +inline void CleanupResetAndDestroyPushL( RImplInfoPtrArray& aArray ) + { + TCleanupItem item( &ResetAndDestroyCleanup, &aArray ); + CleanupStack::PushL( item ); + } + +// ============================= MEMBER FUNCTIONS ============================= + +// ---------------------------------------------------------------------------- +// CEmailInterfaceFactory::NewL +// Two-phased constructor +// ---------------------------------------------------------------------------- +// +inline CEmailInterfaceFactory* CEmailInterfaceFactory::NewL( ) + { + // Find implementation for our interface. + RImplInfoPtrArray implArray; + EmailInterface::CleanupResetAndDestroyPushL( implArray ); + const TUid ifUid = {KEmailClientFactoryApiUid}; + REComSession::ListImplementationsL( + ifUid, + implArray ); + // there should be only one impl so take first + TAny* interface = NULL; + if ( implArray.Count() ) + { + const TUid uid = implArray[0]->ImplementationUid(); + interface = REComSession::CreateImplementationL( + uid, _FOFF( CEmailInterfaceFactory, iDtor_ID_Key ) ); + } + CleanupStack::PopAndDestroy(); // implArray + + return reinterpret_cast( interface ); + } + +// ---------------------------------------------------------------------------- +// CEmailInterfaceFactory::~CEmailInterfaceFactory +// Destructor +// ---------------------------------------------------------------------------- +// +inline CEmailInterfaceFactory::~CEmailInterfaceFactory() + { + REComSession::DestroyedImplementation( iDtor_ID_Key ); + } + +template +inline void CleanupResetAndRelease::PushL( RPointerArray& aItem ) { + TCleanupItem item( &CleanupResetAndRelease::ResetAndRelease, &aItem ); + CleanupStack::PushL( item ); + } +template +inline void CleanupResetAndRelease::ResetAndRelease( TAny* aPtr ) + { + RPointerArray* array = reinterpret_cast* >( aPtr ); + for ( TInt i = 0; i < array->Count(); i++ ) + { + T* item = (*array)[i]; + item->Release(); + } + array->Reset(); + } + +// End Of File diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/emailsorting.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/emailsorting.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,61 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Email Client sort criteria definition +* +*/ + +#ifndef EMAILSORTING +#define EMAILSORTING + +#include + +namespace EmailInterface { + +/** +* Sort criteria used in searching messages with MEmailMessageSearchAsync +* declared in memailmessagesearch.h. +*/ +class TEmailSortCriteria +{ +public: + /** + * Fields for sort criteria + */ + enum TSortField { + EDontCare, + EByDate, + EBySender, + EByRecipient, + EBySubject, + EByPriority, + EByFlagStatus, + EByUnread, + EBySize, + EByAttachment, + }; + + // is ascending sort order + TBool iAscending; + + // sort by field + TSortField iField; + + inline TEmailSortCriteria() : iAscending( ETrue ), iField( EDontCare ) {} +}; + +typedef RArray RSortCriteriaArray; + +} // EmailInterface + +#endif // EMAILSORTING diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/memailaddress.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/memailaddress.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,91 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Email address in Email Client API +* +*/ + +#ifndef MEMAILADDRESS_H +#define MEMAILADDRESS_H + +#include + +namespace EmailInterface { + +/** + * Email address that is used as recipient or sender in MEmailMessage and + * mailbox address in MEmailMailbox. + * @since S60 v5.0 + */ +class MEmailAddress : public MEmailInterface +{ +public: + /** + * Association role of the address in message/mailbox. + */ + enum TRole { + // role is undefined + EUndefined, + // reply-to address in a message + EReplyTo, + // sender of a message + ESender, + // to-recipient of a message + ETo, + // cc-recipient of a message + ECc, + // bcc-recipient of a message + EBcc }; + + /** + * Sets email address + * @param email address + */ + virtual void SetAddressL( const TDesC& aAddress ) = 0; + + /** + * Returns email address + * @return email address + */ + virtual TPtrC Address() const = 0; + + /** + * Sets display name for the address + * @param display name + */ + virtual void SetDisplayNameL( const TDesC& aDisplayName ) = 0; + + /** + * Returns display name for the address + * @return display name + */ + virtual TPtrC DisplayName() const = 0; + + /** + * Returns role associated with the address + * @return role + */ + virtual TRole Role() const = 0; + + /** + * Sets role + * @param role + */ + virtual void SetRole( const TRole aRole ) = 0; +}; + +typedef RPointerArray REmailAddressArray; + +} // namespace EmailInterface { + +#endif // MEMAILADDRESS_H \ No newline at end of file diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/memailclientapi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/memailclientapi.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,78 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ECom interface for Email Client API +* +*/ + + +#ifndef MEMAILCLIENTAPI_H +#define MEMAILCLIENTAPI_H + +#include + +namespace EmailInterface { + +class MEmailMailbox; + + +typedef RPointerArray RMailboxPtrArray; + +/** + * Email client main interface for accessing mailboxes and launching + * email editor and viewer. + * Use CEmailInterfaceFactory::InterfaceL( KEmailClientApiInterface ) + * to get instance. Use Release() (from MEmailInterface) when the instance + * is no more needed. + * + */ +class MEmailClientApi : public MEmailInterface +{ +public: + + /** returns mailbox by id, ownership transferred */ + virtual MEmailMailbox* MailboxL( const TMailboxId& aId ) = 0; + + /** + * Conveninence method for accessing mailbox by own addresss. + */ + virtual MEmailMailbox* MailboxL( const TPtrC& aAddress ) = 0; + + /** + * Gets all mailboxes in pointer array. It is recommended to free other + * mailboxes besides needed one to optimise memory usage. + */ + virtual TInt GetMailboxesL( RMailboxPtrArray& aMailboxes ) = 0; + + /** + * Launch policy defines behavior when launching email application + */ + enum TLaunchPolicy { + // Launch email application as from menu application by the user + EDefault, + // Shows inbox with unseen messages. If there are no unseen messages + // behavior is same as EDefault. This one is not currently supported. + EShowLastUnseenMailbox + }; + /** + * Launches Email application with defined launch behavior + * The method follows "fire and forget" pattern, returns immediately. + * @param aPolicy defines behavior for app launch + */ + virtual void LaunchEmailL( const TLaunchPolicy aPolicy ) = 0; + +}; + +} // namespace EmailInterface + +#endif // MEMAILCLIENTAPI_H diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/memailcontent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/memailcontent.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,289 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ECom interface for Email Client API +* +*/ + +#ifndef MEMAILCONTENT_H +#define MEMAILCONTENT_H + +#include + +namespace EmailInterface { + +_LIT( KContentTypeTextPlain, "text/plain" ); +_LIT( KContentTypeTextHtml, "text/html" ); + +class MEmailOperationObserver; +class MEmailAttachment; +class MEmailMultipart; +class MEmailTextContent; +class MEmailMessageContent; + +/** +* Callback interface used for content fetching asynchronously. +* Object deriving this interface is passed to MEmailMessageContent::FetchL +* @since S60 v5.0 +*/ +class MEmailFetchObserver +{ +public: + /** Content fetched + * @param operation result + */ + virtual void DataFetchedL( const TInt aResult ) = 0; +}; + +typedef RPointerArray REmailContentArray; + +/** +* Base interface for mime message parts. +* @since S60 v5.0 +*/ +class MEmailMessageContent : public MEmailInterface +{ +public: + /** numeric identifier of message content */ + virtual TMessageContentId Id() const = 0; + +// fields as per RFC 2045 + /** + * return sContent-Type field value + */ + virtual TPtrC ContentType() const = 0; + + /** + * sets value of Content-Type field + * @param content type + */ + virtual void SetContentType( const TDesC& aContentType ) = 0; + + /** + /* Returns Content-ID field value. + * @return content id + */ + virtual TPtrC ContentId() const = 0; + + /** + * Sets value of Content-ID field + * @param content id + */ + virtual void SetContentId( const TDesC& aContentId ) = 0; + + /** + * Returns value of content-description field + * @return content description + */ + virtual TPtrC ContentDescription() const = 0; + + /** + * Sets value of content description field + * @param content description + */ + virtual void SetContentDescription( const TDesC& aContentDescription ) = 0; + + /** + * Returns value of content disposition field + * @return content disposition + */ + virtual TPtrC ContentDisposition() const = 0; + + /** + * Sets value of content-disposition field + * @param content disposition + */ + virtual void SetContentDisposition( const TDesC& aContentDisposition ) = 0; + +// end of standard RFC 2045 fields + + /** + * returns Content-class field value (non-standard) + */ + virtual TPtrC ContentClass() const = 0; + + /** + * Sets value of Content-class field (non-standard) + * @param content class + */ + virtual void SetContentClass( const TDesC& aContentClass ) = 0; + + /** + * Available (=fetched) size accessor. If this is less than value from + * TotalSize(), Fetch() should be used to retrieve more data from + * remote mail server. + * @return fetched size of the data. + */ + virtual TInt AvailableSize() const = 0; + + /** + * Total size accessor + * @return total size of message text. + */ + virtual TInt TotalSize( ) const = 0; + + /** + * Returns pointer descriptor to content data + */ + virtual TPtrC ContentL() const = 0; + + /** + * Sets content data. + */ + virtual void SetContentL( const TDesC& aContent ) = 0; + + /** + * Starts fetching rest of content asynchronously. + * + * If available size after fetch is smaller than total size, next chunk can + * be fetched with new invocatin of Fetch method. + * + * Calling Release() implicitly cancels fetching. + * @param aObserver called when when fetch completes. + * @exception KErrInUse if fetch is ongoing + */ + virtual void FetchL( MEmailFetchObserver& aObserver ) = 0; + + /** + * Cancels fetch operation, observer is not called + */ + virtual void CancelFetch() = 0; + + /** + * Stores message content to a file + */ + virtual void SaveToFileL( const TDesC& aPath ) = 0; + + /** + * Typesafe multipart accessor for obtaining MEmailMultipart pointer + * to this object. + * @param content as multipart or NULL if content is not multipart + */ + virtual MEmailMultipart* AsMultipartOrNull() const = 0; + + /** + * Typesafe text content accessor for obtaining MEmailTextContent pointer + * to this object. + * @param content as text content or NULL if content is not text + */ + virtual MEmailTextContent* AsTextContentOrNull() const = 0; + + /** + * Typesafe attachment content accessor for obtaining MEmailAttachment pointer + * to this object. + * @param content as attachment content or NULL if content is not an attachment + */ + virtual MEmailAttachment* AsAttachmentOrNull() const = 0; +}; + +/** +* Convenience abstraction for manipulating plain or html text content. Use +* CEmailInterfaceFactory::InterfaceL( KEmailIFUidTextContent ) to make new +* instance of this interface. +* @since S60 v5.0 +*/ +class MEmailTextContent : public MEmailMessageContent +{ +public: + /** + * Text (content) type + */ + enum TTextType { + EPlainText, // text/plain + EHtmlText // text/html + }; + + /** + * Tells if content has specified type of text. + */ + virtual TTextType TextType() const = 0; + + /** + * Sets (replaces) text to message content. Possible old content is + * deleted. Content type is set to "text/plain" or "text/html" based on + * specified text type. + * @param aPlainOrHtml sub-type of the text + * @param aText content of the message part + */ + virtual void SetTextL( + const TTextType aPlainOrHtml, + const TDesC& aText ) = 0; +}; + +/** +* Message part with multiple sub parts. If MEmailMessage::ContentL returns +* content with type "multipart/*" (where '*' is a character sequence) it can +* safely be casted to MEmailMultipart +* @since S60 v5.0 +*/ +class MEmailMultipart : public MEmailMessageContent +{ +public: + /** + * Returns number of child parts + */ + virtual TInt PartCountL() = 0; + + /** + * Returns a child part, ownership is transferred. + * @param aIndex part to return, leaves KErrArgument if out of bounds + */ + virtual MEmailMessageContent* PartByIndexL( const TUint aIndex ) const = 0; + + /** + * Deletes part by index. + * @param aIndex part to delete, leaves KErrArgument if out of bounds + */ + virtual void DeletePartL( const TUint aIndex ) = 0; + + /** + * Adds message part, ownership is transferred. + * @param aPart any object derived from MEmailMessageContent + * @param aPos position among child parts + */ + virtual void AddPartL( + const MEmailMessageContent& aPart, + const TUint aPos ) = 0; +}; + +typedef RPointerArray REmailAttachmentArray; + +/** +* Email attachment interface +* Attachment is created with MEmailMessage::AddAttachmentL() +* @since S60 v5.0 +*/ +class MEmailAttachment : public MEmailMessageContent +{ +public: + /** + * Returns file handle of this attachment. If the attachment is + * not associated with a file, null file handle is returned. + */ + virtual RFile FileL() const = 0; + + /** + * Sets file name field + */ + virtual void SetFileNameL( const TDesC& aFileName ) = 0; + + /** + * Returns file name or null pointer descriptor if attachment + * is not associated with any file + */ + virtual TPtrC FileNameL() const = 0; +}; + +} // namespace EmailInterface + +#endif // MEMAILCONTENT_H diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/memailfolder.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/memailfolder.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,107 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Email message API +* +*/ + +#ifndef _M_EMAILFOLDER +#define _M_EMAILFOLDER + +#include +#include + +namespace EmailInterface { + +class MEmailFolder; +class MMessageIterator; + +typedef RPointerArray RFolderArray; + +/** +* folder types +*/ +enum TFolderType + { + EInbox, + EOutbox, + EDrafts, + EDeleted, + ESent, + EOther + }; + +/** +* Email folder interface +* This is used for accessing folder information and included messages. +* Operations affecting folder itself are not provided. +* +* Use case: for accessing messages in specific folder use MEmailMessageQuery +* and set folder id with MEmailMessageQuery::SetFolderIdL() +* +* @since S60 v5.0 +*/ +class MEmailFolder : public MEmailInterface +{ +public: + /** + * Returns folder id. + * @return folder type + */ + virtual TFolderId FolderId() const = 0; + + /** + * Returns parent folder id. + * @return parent folder id + */ + virtual TFolderId ParentFolderId() const = 0; + + /** + * Returns folder type. + * @return folder type + */ + virtual TFolderType FolderType() const = 0; + + /** + * Returns folder name. + * @return folder name pointer descriptor + */ + virtual TPtrC Name() const = 0; + + /** + * Returns direct children of this folder, i.e. this is not recursive. + * @return number of subfolders or an error code + */ + virtual TInt GetSubfoldersL( + RFolderArray& aSubfolders ) const = 0; + + /** + * Returns message iterator for iterating messages in the folder + * @param aSortCriteria sort criteria + * @return message iterator + */ + virtual EmailInterface::MMessageIterator* MessagesL( + const RSortCriteriaArray& aCriteria ) = 0; + + /** + * Deletes messages in this folder + * @param aMessageIds messages to delete. This method is no-op if + * array is empty. It is expected that messages in the array are + * located in same folder or KErrArgument exception is raised. + */ + virtual void DeleteMessagesL( const REmailMessageIdArray& aMessageIds ) = 0; +}; + +} // namespace EmailInterface + +#endif // _M_EMAILFOLDER diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/memailmailbox.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/memailmailbox.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,159 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Email message API +* +*/ + +#ifndef MEMAILMAILBOX_H +#define MEMAILMAILBOX_H + +#include + +namespace EmailInterface { + +class MEmailAddress; +class MEmailMessage; +class MMailboxContentObserver; +class MEmailMessageSearchAsync; +class MMailboxSyncObserver; + +/** +* Email mailbox interface. +* MEmailMailbox cannot be instantiated with factory method. Use +* MEmailClientApi::MailboxL to obtain a configured mailbox. +* @since S60 v5.0 +*/ +class MEmailMailbox : public MEmailInterface +{ +public: + /** + * Returns mailbox identifier + * @return mailbox id + */ + virtual TMailboxId MailboxId() const = 0; + + /** + * Returns own address of the mailbox. Role is set to ESender + * @return address, ownership not transferred + */ + virtual MEmailAddress* AddressL() const = 0; + + /** + * Returns mailbox name + * @return mailbox name + */ + virtual TPtrC MailboxName() const = 0; + + /** returns root level folders of this mailbox, to get subfolders of specific + * folder, use MEmailFolder::GetSubfolders + * @param aFolders pointer array of folders, ownership of folders is + * transferred + * @return number of folders in aFolders or Symbian OS error code + */ + virtual TInt GetFoldersL( RFolderArray& aFolders ) const = 0; + + /** + * Returns folder by folder id + * @param folder id + * @return pointer to folder, ownership is transferred + */ + virtual MEmailFolder* FolderL( const TFolderId& aFolderId ) const = 0; + + /** + * Returns folder by type + * @param type other than EOther because it is ambiguous + * @return pointer to folder, ownership is transferred + * @exception KErrNotFound if folder of requested type is not found + */ + virtual MEmailFolder* FolderByTypeL( + const TFolderType aFolderType ) const = 0; + + /** + * Returns existing message in this mailbox. + * @param aMessageId a message id returned by GetMessagesIdsL() + * @return new message object, ownership transferred. + * @exception + */ + virtual MEmailMessage* MessageL( const TMessageId& aMessageId ) = 0; + + /** + * Creates new message in 'drafts' folder. Ownership is transferred + * @return new draft message + */ + virtual MEmailMessage* CreateDraftMessageL() const = 0; + + /** + * Creates reply message. Ownership is transferred + * @param aMessageId original message + * @param aReplyToAll If ETrue, all recipients of the original message are + * added to reply message. + * @return new draft message + */ + virtual MEmailMessage* CreateReplyMessageL( + const TMessageId& aMessageId, + const TBool aReplyToAll = ETrue ) const = 0; + + /** + * Creates forward message. Ownership is transferred + * @param aMessageId original message + * @return new draft message + */ + virtual MEmailMessage* CreateForwardMessageL( + const TMessageId& aMessageId ) const = 0; + + /** + * Starts synchronising this mailbox + * @param aObserver observer called back when sync is complete + */ + virtual void SynchroniseL( MMailboxSyncObserver& aObserver ) = 0; + + /** + * Cancels mailbox synchronisation. + */ + virtual void CancelSynchronise() = 0; + + /** + * Returns interface for searching messages from this mailbox. Ownership + * is transferred. + * @return message search interface pointer + */ + virtual MEmailMessageSearchAsync* MessageSearchL() = 0; + + /** + * Launches Email application and shows inbox. + * The method follows "fire and forget" pattern, returns immediately. + */ + virtual void ShowInboxL() = 0; + + /** Launches email editor and returns immediately. + * The method follows "fire and forget" pattern, returns immediately. + */ + virtual void EditNewMessageL() = 0; + + /** Register mailbox observer + * @param aObserver observer called back when changes in mailbox (new message, + * messages changes or messages deleted). + * */ + virtual void RegisterObserverL( MMailboxContentObserver& aObserver ) = 0; + + /** + * Unregister mailbox observe.r + */ + virtual void UnregisterObserver( MMailboxContentObserver& aObserver ) = 0; + +}; + +} // namespace EmailInterface + +#endif // MEMAILMAILBOX_H diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/memailmessage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/memailmessage.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,262 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Email message API +* +*/ + +#ifndef MEMAILMESSAGE_H +#define MEMAILMESSAGE_H + +#include +#include +#include + +namespace EmailInterface { + +class MEmailMessageContent; +class MEmailAttachment; + +/** message flags */ +enum TMsgFlag + { + EFlag_Read = 1, // Message is read (or "seen") on the server + EFlag_Read_Locally = 2, // Message is read on the client + EFlag_Low = 4, // Message has low priority + EFlag_Important = 8, // Message has high priority + EFlag_FollowUpComplete = 16, // The message follow-up is complete + EFlag_FollowUp = 32, // Message is flagged (a flag is showing next to msg in Outlook) + EFlag_Attachments = 64, // Message has attachments + EFlag_Multiple = 128, // Message has more than one recipient + EFlag_CalendarMsg = 256, // Message is a calendar message + EFlag_Answered = 512, // The message was replied to + EFlag_Forwarded = 1024, // The message was forwarded + EFlag_OnlyToMe = 2048, // The message was sent only to this user + EFlag_RemoteDeleted = 4096, // The message has been deleted on the server + EFlag_HasMsgSender = 8192, // The message has one or more senders + }; +/** + * MEmailMessage is email message abstraction + * @since S60 v5.0 + @code + Create and send a message with attachment: + + using namespace EmailInterface; + CEmailInterfaceFactory* factory = CEmailInterfaceFactory::NewL(); + CleanupStack::PushL( factory ); + MEmailClientApi* emailAPI = factory->InterfaceL( KEmailTypeClientAPI ); + CleanupReleasePushL( *emailAPI ); + RMailboxPtrArray mailboxes; + // Cleanup for array containing mailbox pointers, + // calls MEmailMailbox::Release() on cleanup. + CleanupResetAndRelease::PushL( mailboxes ); + if ( emailAPI->GetMailboxesL( mailboxes ) > 0 ) // at least one found + { + MEmailMailbox* mailbox = mailboxes[0]; + MEmailMessage* message = mailbox->CreateDraftMessageL(); + CleanupReleasePushL( *message ); + message->SetPlainTextBodyL( _L("So say we all!") ); + message->AddAttachmentL( _L( "BSG.png" ) ); + message->SendL(); + CleanupStack::PopAndDestroy(); // message + } + CleanupStack::PopAndDestroy( 3 ); // mailboxes, emailAPI, factory + @endcode + * + */ +class MEmailMessage : public MEmailInterface +{ +public: + /** + * Returns message id + * @return message id + */ + virtual const TMessageId& MessageId() const = 0; + + /** + * Returns sender address, ownership is not transferred + * Setting role to MEmailAddress::EUndefined marks sender field "undefined" + */ + virtual MEmailAddress* SenderAddressL() const = 0; + + /** + * Returns reply-to address (NULL for newly created draft message). + * Ownership is not transferred. Setting role to MEmailAddress::EUndefined + * marks reply-to field "undefined". + */ + virtual MEmailAddress* ReplyToAddressL() const = 0; + + /** + * Sets reply-to address, note that role of the address is ignored. + * Ownership is not transferred. + */ + virtual void SetReplyToAddressL( const MEmailAddress& aSender ) = 0; + + /** + * Returns recipients. Ownership is transferred. + * @param aRole, if EUndefined - returns to,cc and bcc recipients in that order + * @return number of recipients returned in array + * @exception returns KErrArgument if aRole is EReplyTo or ESender + */ + virtual TInt GetRecipientsL( const MEmailAddress::TRole aRole, + REmailAddressArray& aRecipients ) const = 0; + + /** + * Sets and replaces recipients of specific type. + * @param aRole to, cc or bcc, for other types leave KErrArgument + * @return recipient added to this message. Ownership is not transferred. + */ + virtual void SetRecipientsL( const MEmailAddress::TRole aRole, REmailAddressArray& aRecipients ) = 0; + + /** removes recipient from the message + * @param aRecipient that has been obtained by GetRecipients(). + * Comparison of recipients and aRecipient is done based on + * MEmailAddress::Address() and MEmailAddress::Role(). + * @exception KErrNotFound if aRecipient doesn't match with existing + * recipients. + */ + virtual void RemoveRecipientL( const MEmailAddress& aRecipient ) = 0; + + /** + * Returns subject + * @return subject of the message + */ + virtual TPtrC Subject() const = 0; + + /** + * Sets subject + * @param subject of the message + */ + virtual void SetSubjectL( const TPtrC& aSubject) = 0; + + /** + * Returns date and time of the message. + * @return message date/time + */ + virtual TTime Date() const = 0; + + /** + * Returns message flags + * @return message flags + */ + virtual TInt Flags() const = 0; + + /** + * Sets a message flag + * @param flag to set + */ + virtual void SetFlag( const TUint aFlag ) = 0; + + /** + * Resets a message flag to zero + * @param flag to reset + */ + virtual void ResetFlag( const TUint aFlag ) = 0; + +// content + /** + * Returns message body + * Returns pointer to message content, ownership not transferred. + * Actual type is MEmailTextContent, or MEmailMultipart (see memailcontent.h) + * @return content of the message or NULL if content has not been set + */ + virtual MEmailMessageContent* ContentL() const = 0; + + /** + * Sets content to this message. First create content object, e.g. + * CEmailInterfaceFactory::InterfaceL( KEmailIFUidTextContent ), i.e. text/plain + * @param aContent content to set in the message, ownership is transferred. + * possible old content is destroyed if setting new content succeeds. + */ + virtual void SetContentL( const MEmailMessageContent* aContent ) = 0; + + /** + * Convenience method for setting plain text as message body. + * @param aPlainText text/plain content of message body. Old content + * is destroyed. + */ + virtual void SetPlainTextBodyL( const TDesC& aPlainText ) = 0; + + /** + * Adds attachment to message. This may affect previously set content, e.g. + * if SetContentL with MEmailTextContent argument was called, a new multipart + * content is created with MEmailTextContent and attachment as child parts. + * @param aFullpath path to file + * @return created attachment, ownership is not transferred + */ + virtual MEmailAttachment* AddAttachmentL( const TDesC& aFullPath ) = 0; + + /** + * Adds attachment to message. This may affect previously set content, e.g. + * if SetContentL with MEmailTextContent argument was called, a new multipart + * content is created with MEmailTextContent and attachment as child parts. + * @param file handle to file to be attached. Handle remains open. + * @return created attachment, ownership is not transferred + */ + virtual MEmailAttachment* AddAttachmentL( RFile& aFile ) = 0; + + /** + * Returns attachments, ownership is transferred + * @return number of attachments in aAttachments + */ + virtual TInt GetAttachmentsL( REmailAttachmentArray& aAttachments ) = 0; + + /** + * Remove an attachment, ownership is not transferred. + * @param attachment object obtained with GetAttachmentsL + */ + virtual void RemoveAttachmentL( const MEmailAttachment& aAttachment ) = 0; + + /** + * Returns id of parent folder of the message + * @return parent folder id + */ + virtual const TFolderId& ParentFolderId() const = 0; + + /** + * Saves changes done with any mutator to persistent store. + */ + virtual void SaveChangesL() = 0; + + /** + * Moves message to outbox, sending may not happen immediately but + * after next mailbox synchronization. Changes done to the message + * are first saved before sending as if SaveChangesL was called. + * For immediate sending use MEmailMailbox::SynchronizeL() + */ + virtual void SendL() = 0; + + /** + * Launches Email application and opens message in viewer + * The method follows "fire and forget" pattern, returns immediately. + */ + virtual void ShowMessageViewerL( ) = 0; + + /** + * Launches Email application and new reply message in editor. + * The method follows "fire and forget" pattern, returns immediately. + * @param boolean indicating if reply-to message is sent to all recipients. + */ + virtual void ReplyToMessageL( const TBool aReplyToAll = ETrue ) = 0; + + /** + * Launches Email application and new forward message in editor + * The method follows "fire and forget" pattern, returns immediately. + */ + virtual void ForwardMessageL() = 0; + +}; + +} // namespace EmailInterface + +#endif // MEMAILMESSAGE_H diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/memailmessagesearch.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/memailmessagesearch.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,133 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ECom interface for Email Client API +* +*/ + +#ifndef __MEMAILACTIONS +#define __MEMAILACTIONS + +#include +#include + +namespace EmailInterface { + +class MMessageIterator; +class TEmailSortCriteria; + +/** +* Observer interface for handling email search results. +*/ +class MEmailSearchObserver +{ +public: + /** + * Called when search has next message available. + * This callback is called several times until all results + * have been delivered. + * + * @param message found in search, ownership is transferred. + * + */ + virtual void HandleResultL( + MEmailMessage* aMessage ) = 0; + + /** + * Notifies that the search has completed and no more results are expected. + */ + virtual void SearchCompletedL() = 0; +}; + +/** + * Search interface for messages. Results are provided asynchronoysly. + * By default all found mailboxes are included in search. + * @code + + MEmailMailbox* mailbox = NULL; + // obtain mailbox here... + // ...and now get search interface + MEmailMessageSearchAsync* search = mailbox->MessageSearchL(); + CleanupReleasePushL( *search ); + TEmailSortCriteria criteria; + criteria.iAscending = ETrue; + criteria.iField = TEmailSortCriteria::EByDate; + search->SetSortCriteriaL( criteria ); + search->StartSearchL( *this ); // this implements MEmailSearchObserver + search->Cancel(); // cancel search + CleanupStack::PopAndDestroy(); // search + + @endcode + + * @since S60 v5.0 + */ +class MEmailMessageSearchAsync : public MEmailInterface +{ +public: + + /** + * Sets sort order for search results. + * Leaves KErrNotReady if search is ongoing. + */ + virtual void SetSortCriteriaL( const TEmailSortCriteria& aCriteria ) = 0; + + /** + * Adds a search key. Leaves KErrNotReady if search is ongoing. + */ + virtual void AddSearchKeyL( const TDesC& aSearchKey ) = 0; + + /** + * Enables/disables search from remote email server. + * Leaves KErrNotReady if search is ongoing. + */ + virtual void SetRemoteSearchL( TBool aRemote ) = 0; + + /** + * Indicates whether remote search is enabled. + */ + virtual TBool IsRemoteSearch() const = 0; + + /** + * Starts search, all methods affecting search attribures leave + * KErrNotReady while search is ongoing. + * @param aObserver called when results are available. + */ + virtual void StartSearchL( MEmailSearchObserver& aObserver ) = 0; + + /** + * Cancels search. + */ + virtual void Cancel() = 0; + + /** returns search status + * @return search status: + * < 0 : Search has failed + * KRequestPending : search is ongoing. note that status may be + * KRequestPending after HandleResultL callback because results + * may be given in chunks of results. Size of chunk depends on + * implementation and may vary. + * KErrNone : initial state, or search has finished + */ + virtual TInt Status() const = 0; + + /** + * Resets all search attribures. Cancels search if ongoing. + */ + virtual void Reset() = 0; +}; + +} //EmailInterface + +#endif // __MEMAILACTIONS + +// End of file. diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/mmailboxcontentobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/mmailboxcontentobserver.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,37 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Observer interface for mailbox events. +* +*/ + +#ifndef MMAILBOXCONTENTOBSERVER_H +#define MMAILBOXCONTENTOBSERVER_H + +#include + +namespace EmailInterface { + +class MMailboxContentObserver +{ +public: + virtual void NewMessageEventL( const TMailboxId& aMailbox, const REmailMessageIdArray aNewMessages, const TFolderId& aParentFolderId ) = 0; + + virtual void MessageChangedEventL( const TMailboxId& aMailbox, const REmailMessageIdArray aChangedMessages, const TFolderId& aParentFolderId ) = 0; + + virtual void MessageDeletedEventL( const TMailboxId& aMailbox, const REmailMessageIdArray aDeletedMessages, const TFolderId& aParentFolderId ) = 0; +}; + +} // namespace EmailInterface + +#endif // MMAILBOXCONTENTOBSERVER_H diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/mmailboxsyncobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/mmailboxsyncobserver.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Observer interface for mailbox synchronisation. +* +*/ + +#ifndef MEMAILSYNCOBSERVER_H +#define MEMAILSYNCOBSERVER_H + +#include + +namespace EmailInterface { + +class MMailboxSyncObserver +{ +public: + virtual void MailboxSynchronisedL( TInt aResult ) = 0; +}; + +} // namespace EmailInterface + +#endif // MEMAILSYNCOBSERVER_H diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_client_api/mmessageiterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/email_client_api/mmessageiterator.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,56 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Message iterator interface +* +*/ + +#ifndef MMESSAGEITERATOR_H +#define MMESSAGEITERATOR_H + +#include + +namespace EmailInterface { + +class MEmailMessage; + +/** + * Iterator for email messages. + * @since S60 v5.0 + */ +class MMessageIterator : public MEmailInterface +{ +public: + /** + * Returns next message. When all messages are iterated, returns NULL + * @return next message. Ownership is not transferred. + */ + virtual MEmailMessage* NextL() = 0; + + /** + * Returns previous message. When first message is reached, returns NULL + * @return previous message. Ownership not is transferred. + */ + virtual MEmailMessage* PreviousL() = 0; + + /** + * Returns amount of messages accessible from the iterator. + * @return message count + */ + virtual TUint Count() const = 0; + +}; + +} // EmailInterface + +#endif // MMESSAGEITERATOR_H diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/email_plat.pro --- a/email_plat/email_plat.pro Fri Jun 11 16:42:02 2010 +0300 +++ b/email_plat/email_plat.pro Thu Jun 24 14:32:18 2010 +0300 @@ -19,6 +19,7 @@ symbian*: { include(email_services_api/email_services_api.pri) - + include(nmail_settings_api/nmail_settings_api.pri) include(nmail_client_api/nmail_client_api.pri) + include(email_client_api/email_client_api.pri) } diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/nmail_client_api/nmapimessagemanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/nmail_client_api/nmapimessagemanager.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * Email message related operations + */ + +#ifndef NMAPIMESSAGEMANAGER_H_ +#define NMAPIMESSAGEMANAGER_H_ + +#include +#include + +#include + +struct NmApiMessage; +class NmApiEmailMessage; + +namespace EmailClientApi { + +class NmApiFolder; +class NmApiMessageManagerPrivate; + +class NMAPI_EXPORT NmApiMessageManager : public QObject +{ + Q_OBJECT + +public: + NmApiMessageManager(quint64 mailboxId,QObject *parent = 0); + + virtual ~NmApiMessageManager(); + +public slots: + bool createDraftMessage(const QVariant *initData); + + bool createForwardMessage(const QVariant *initData); + + bool createReplyMessage(const QVariant *initData,bool replyAll); + + bool moveMessages(const QList messageIds, + quint64 sourceFolderId,quint64 targetFolderId); + + bool copyMessages(const QList messageIds, + quint64 sourceFolder, + quint64 targetFolder); + + bool saveMessage(const ::NmApiMessage &message); + + bool deleteMessages(const QList messageIds); + + bool fetch(const NmApiMessage &message); + + bool send(const NmApiMessage &message); + + bool createAttachment(NmApiEmailMessage &message,const QVariant &attachmenSpec); + + bool removeAttachment(NmApiEmailMessage &message,quint64 attachmentId); + +signals: + void messagesCopied(int result); + + void messagesCreated(int result); + + void messagesMoved(int result); + + void messagesDeleted(int result); + +private: + NmApiMessageManagerPrivate *d; +}; + +} + +#endif diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/nmail_settings_api/nmail_settings_api.pri --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/nmail_settings_api/nmail_settings_api.pri Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,24 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +# + +symbian*: { + # Build.inf rules + BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " \ + "nmail_settings_api/nmapimailboxsettingsdata.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapimailboxsettingsdata.h)" \ + "nmail_settings_api/nmapimailboxsettings.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapimailboxsettings.h)" + +} diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/nmail_settings_api/nmapimailboxsettings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/nmail_settings_api/nmapimailboxsettings.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +#ifndef NMAPIMAILBOXSETTINGS_H_ +#define NMAPIMAILBOXSETTINGS_H_ + +#include +#include + +#include + +namespace EmailClientApi +{ + +class NmApiMailboxSettingsData; +class NmApiMailboxSettingsPrivate; +class NMAPI_EXPORT NmApiMailboxSettings : public QObject +{ + Q_OBJECT +public: + NmApiMailboxSettings(QObject *parent = 0); + ~NmApiMailboxSettings(); + + bool listMailboxIds(QList &idList); + bool loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data); + bool saveSettings(const NmApiMailboxSettingsData &data); + bool createMailbox(const QString &mailboxType, NmApiMailboxSettingsData &data); + bool deleteMailbox(quint64 mailboxId); + bool populateDefaultSettings(const QString &mailboxType, NmApiMailboxSettingsData &data); + +signals: + void mailboxDeleted(int result = 0); + +protected: + NmApiMailboxSettingsPrivate *d; + +}; + +} + +#endif /* NMAPIMAILBOXSETTINGS_H_ */ diff -r 780f926bc26c -r f83bd4ae1fe3 email_plat/nmail_settings_api/nmapimailboxsettingsdata.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email_plat/nmail_settings_api/nmapimailboxsettingsdata.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +#ifndef NMAPIMAILBOXSETTINGSDATA_H_ +#define NMAPIMAILBOXSETTINGSDATA_H_ + +#include +#include + +namespace EmailClientApi +{ + +const QString NmApiMailboxTypeImap = "imap"; +const QString NmApiMailboxTypePop = "pop"; + +const QString NmApiAuthNone = "none"; +const QString NmApiAuthSameAsIncoming = "SameAsIncoming"; +const QString NmApiAuthUserAuthentication = "UserAuthentication"; + +const QString NmApiAutomatic = "automatic"; +const QString NmApiAlways = "always"; +const QString NmApiHomeOnly = "homeOnly"; +const QString NmApiOff = "off"; + +const QString NmApiStartTls = "StartTls"; +const QString NmApiSSLTls = "SSLTls"; +const QString NmApiSecurityOff = NmApiOff; + +const QString NmApiKeepUpToDate = "Keep-Up-To-Date"; +const QString NmApiSaveEnergy = "Save-Energy"; +const QString NmApiFetchManually = "Manual-Fetch"; +const QString NmApiUserDefined = "User-Defined"; + +enum NmApiWeekDays +{ + Mon = 0x01, Tue = 0x02, Wed = 0x04, Thu = 0x08, Fri = 0x10, + Sat = 0x20, Sun = 0x40 +}; + +enum NmApiRefreshPeriods +{ + WhenMailboxOpens = 0, Every5minutes = 5, Every15minutes = 15, + EveryHour = 60, Every4Hours = 240 +}; + +enum NmApiMailboxSettingKey +{ + IncomingLoginName = 0, // String + IncomingPassword, // String + MailboxName, // String + EmailAddress, // String + ReplyAddress, // String + EmailAlias, // String + MyName, // String + DownloadPictures, // Integer: 0=Off, 1=On + MessageDivider, // Integer: 0=Off, 1=On + ReceptionActiveProfile, // String: Reception profile + ReceptionUserDefinedProfile, // Integer: 0=Disabled, 1=Enabled + ReceptionInboxSyncWindow, // Integer: 0=All messages + ReceptionGenericSyncWindowInMessages, // Integer: 0=All messages + ReceptionWeekDays, // Integer bitmask of weekdays + ReceptionDayStartTime, // Integer: 0-23 + ReceptionDayEndTime, // Integer: 0-23 + ReceptionRefreshPeriodDayTime, // Integer: 5,15,60,240,0="When open mailbox" + ReceptionRefreshPeriodOther, // Integer: 5,15,60,240,0="When open mailbox" + UserNameHidden, // Integer: 0=Off, 1=On + IncomingMailServer, // String + IncomingMailUsesAuthentication, // String "none", "UserAuthentication" + IncomingMailSecurityType, // String "StartTls", "SSLTls", "none" + OutgoingMailServer, // String + OutgoingMailUsesAuthentication, // String "none", "SameAsIncoming", "UserAuthentication" + OutgoingMailSecurityType, // String "StartTls", "SSLTls", "none" + IncomingPort, // Integer + OutgoingPort, // Integer + FolderPath, // String: Empty string means 'Default' + AlwaysOnlineState, // string "always", "homeOnly", "off" + EmailNotificationState, // string "automatic", "homeOnly", "off" + FirstEmnReceived, // Integer: 0=false,1=true + EmnReceivedNotSynced, // Integer: 0=false,1=true + AoLastSuccessfulUpdate, // QDateTime + AoLastUpdateFailed, // Integer: 0=false, 1=true + AoUpdateSuccessfulWithCurSettings, // Integer: 0=false, 1=true + IncomingSecureSockets, // Boolean + IncomingSSLWrapper, // Boolean + OutgoingLoginName, // String + OutgoingPassword, // String + UseOutgoingAuthentication, // Boolean + OutgoingSecureSockets, // Boolean + OutgoingSSLWrapper // Boolean +}; + +class NmApiMailboxSettingsDataPrivate; +class NMAPI_EXPORT NmApiMailboxSettingsData +{ + +public: + NmApiMailboxSettingsData(); + ~NmApiMailboxSettingsData(); + + void setMailboxId(quint64 mailboxId); + quint64 mailboxId() const; + void setValue(int key, const QVariant &settingValue); + bool getValue(int key, QVariant &settingValue) const; + bool validateData() const; + void clearSettings(); + QList listSettings() const; + +protected: + NmApiMailboxSettingsDataPrivate *d; + +}; + +}//end namespace + +#endif /* NMAPIMAILBOXSETTINGSDATA_H_ */ diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/bwins/emailclientapiu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/bwins/emailclientapiu.def Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,3 @@ +EXPORTS + ?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 1 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &) + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/data/emailclientapi.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/data/emailclientapi.rss Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,52 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declares ECom registration information for email client api +* +* +*/ + +#include //REGISTRY_INFO +#include "emailclientapiimpl.hrh" + +/** ECom version number to be used in Cmail related ECom registeration + * resource files. + * NOTE: Version number in ECom registeration resource file is saved as one + * byte, so 255 is the maximum version number. + */ +#define KEmailEcomVersionNumber 7 + +RESOURCE REGISTRY_INFO theInfo + { + dll_uid = 0x20022D63; + resource_format_version = RESOURCE_FORMAT_VERSION_2; + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x20022D62; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x20022D61; + version_no = KEmailEcomVersionNumber; + display_name = "email client api"; + default_data = ""; + opaque_data = ""; + rom_only=0; + } + }; + } + }; + } diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/eabi/emailclientapiu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/eabi/emailclientapiu.def Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,3 @@ +EXPORTS + _Z24ImplementationGroupProxyRi @ 1 NONAME + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/emailclientapi.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/emailclientapi.pro Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,107 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +# + +TEMPLATE = lib +TARGET = emailclientapi +DEPENDPATH += . inc src +INCLUDEPATH += . \ + ../../inc \ + ../emailframework/inc +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + +HEADERS += inc/emailclientapiimpl.h \ + inc/emailinterfacefactoryimpl.h \ + inc/emailapiutils.h \ + inc/emailmailbox.h \ + inc/emailaddress.h \ + inc/emailfolder.h \ + inc/emailmessage.h \ + inc/emailmailboxcache.h \ + inc/messageiterator.h \ + inc/emailcontent.h \ + inc/emailmessagesearch.h \ + inc/emailattachment.h \ + inc/emailtextcontent.h \ + inc/emailmultipart.h + +SOURCES += src/emailclientapiimpl.cpp \ + src/emailinterfacefactoryimpl.cpp \ + src/implproxy.cpp \ + src/emailapiutils.cpp \ + src/emailmailbox.cpp \ + src/emailaddress.cpp \ + src/emailfolder.cpp \ + src/emailmessage.cpp \ + src/emailmailboxcache.cpp \ + src/messageiterator.cpp \ + src/emailcontent.cpp \ + src/emailmessagesearch.cpp \ + src/emailattachment.cpp \ + src/emailtextcontent.cpp \ + src/emailmultipart.cpp + + +LIBS += -lbafl \ + -lcone \ + -leuser \ + -lECom \ + -lFSFWCommonLib \ + -lFSMailFramework \ + -lefsrv \ + -lviewcli \ + -lestor \ + -lcentralrepository + +symbian*: { + + INCLUDEPATH += /sf/mw/qtextensions/qthighway/inc + LIBS += -lxqservice + + TARGET.EPOCALLOWDLLDATA = 1 + TARGET.CAPABILITY = CAP_ECOM_PLUGIN + + TARGET.UID2 = 0x10009D8D + TARGET.UID3 = 0x20022D63 + + ecomPluginRegisterationFile = \ + "SOURCEPATH data" \ + "START RESOURCE emailclientapi.rss" \ + "END" + + MMP_RULES += "SYSTEMINCLUDE /epoc32/include/ecom" + MMP_RULES += ecomPluginRegisterationFile + MMP_RULES += "TARGETTYPE PLUGIN" + + defBlock = \ + "$${LITERAL_HASH}if defined(MARM)" \ + "DEFFILE eabi/emailclientapi.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE bwins/emailclientapi.def" \ + "$${LITERAL_HASH}endif" + + MMP_RULES += defBlock + + BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " \ + "rom/emailclientapi.iby CORE_APP_LAYER_IBY_EXPORT_PATH(emailclientapi.iby)" + + # Prevents C2874W warnings + QMAKE_CXXFLAGS.ARMCC += --diag_suppress 2874 +} + +win32 { + DESTDIR = ../../../../bin +} \ No newline at end of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailaddress.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailaddress.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,61 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: mail address implementation definition +* +*/ + +#ifndef EMAILADDRESS_H +#define EMAILADDRESS_H + +#include +#include "emailapiutils.h" + +using namespace EmailInterface; + +NONSHARABLE_CLASS( CEmailAddress ) : public CBase, public MEmailAddress + { +public: + static CEmailAddress* NewL( const TRole aRole, const TDataOwner aOwner ); + static CEmailAddress* NewLC( const TRole aRole, const TDataOwner aOwner ); + + ~CEmailAddress(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailAddress + void SetAddressL( const TDesC& aAddress ); + TPtrC Address() const; + + void SetDisplayNameL( const TDesC& aDisplayName ); + TPtrC DisplayName() const; + + TRole Role() const; + void SetRole( const TRole aRole ); + +private: + CEmailAddress( const TRole aRole, const TDataOwner aOwner ); + +private: + RBuf iAddress; + RBuf iDisplayName; + TRole iRole; + TDataOwner iOwner; + }; + +#endif // EMAILADDRESS_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailapiutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailapiutils.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,157 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements utilities like CPluginData. +* +*/ + +#ifndef EMAILAPIUTILS_H +#define EMAILAPIUTILS_H + +#include +#include "cfsmailcommon.h" +#include + +//using namespace EmailInterface; + +class CFSMailPlugin; + +enum TDataOwner + { + EClientOwns, + EAPIOwns + }; + + +/** +* Helper container class for storing plugin pointer and implementation UID +* @since S60 v5.2 +*/ +NONSHARABLE_CLASS( TPluginData ) + { + public: + + inline TPluginData( TUid aUid ) : iPlugin( NULL ), iUid( TUid::Uid( aUid.iUid ) ) {} + + CFSMailPlugin* iPlugin; + + const TUid iUid; + }; + +/** +* Plugin data is a utility for protocol plugin creation and book +* keeping. Objects using the plugin should access it via this +* class for optimised reference counting. +*/ +NONSHARABLE_CLASS( CPluginData ) : public CBase +{ +public: + /** + * returns plugin instance or null if failed to instantiate. + * LoadResult() will return error code in instantiation + */ + CFSMailPlugin* ClaimInstance(); + + /** + * returns plugin instance or leaves if failed to instantiate. + */ + CFSMailPlugin* ClaimInstanceL(); + + /** + * Decreases access count of the plugin and deletes if reaches zero. + * Note! this should be called only aftre succesful ClaimInstance or + * ClaimInstanceL. + */ + void ReleaseInstance(); + + /** + * Adds cleanup operation calling ReleaseInstance to cleanup stack + */ + void ReleasePushL(); + /** + * Cleanup operation for CleanupReleasePluginPushL + */ + static void CleanupOperation( TAny* aAny ); + + TUid Uid() const; + + TInt LoadResult() const; + +private: + /* only CEmailClientApi owns instances of this, it should make sure that + * no duplicates exist, otherwise reference counting of plugins fail + * (this is not singleton class) + */ + friend class CEmailClientApi; + friend class CEmailMailboxCache; + + CPluginData( TUid aUid ); + ~CPluginData(); + +private: + // plugin pointer and uid + TPluginData iData; + + TInt iPluginLoadError; + + // >0 when iPlugin is instantiated + TUint iRefCount; + + // EFalse if shared from Email Framework (CFSMailClient). If true, + // ReleaseInstance() doesn't delete plugin + TBool iOwned; +}; + +/** +* Constructs internal message id type from plugin data and mailbox/folder/message id +*/ +TFSMailMsgId FsMsgId( const CPluginData& aPluginData, const EmailInterface::TBaseId& aId ); + +/** +* Cleanup support for pointer arrays +*/ +template +class CleanupResetAndDestroy +{ +public: + inline static void PushL( T& aItem ); + +private: + inline static void ResetAndDestroy( TAny *aPtr ); +} ; + +template +inline void CleanupResetAndDestroyPushL( T& aRef ) + { + CleanupResetAndDestroy::PushL( aRef ); + } + +/** +* Cleanup support for email interface objects. +*/ +class CleanupReleasePush +{ +public: + static void PushL( EmailInterface::MEmailInterface& aItem ); + +private: + static void Release( TAny *aPtr ); +} ; + + +#include "emailapiutils.inl" + + +#endif // EMAILAPIUTILS_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailapiutils.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailapiutils.inl Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,31 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailMailbox. +* +*/ + +template +inline void CleanupResetAndDestroy::PushL( T& aItem ) + { + TCleanupItem item( &CleanupResetAndDestroy::ResetAndDestroy, &aItem ); + CleanupStack::PushL( item ); + } + +template +inline void CleanupResetAndDestroy::ResetAndDestroy( TAny *aPtr ) + { + reinterpret_cast( aPtr )->ResetAndDestroy(); + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailattachment.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailattachment.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,162 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Definition of Email attachment. +* +*/ + + +#ifndef EMAILATTACHMENT_H +#define EMAILATTACHMENT_H + +// INCLUDES +#include +#include + +#include "cfsmailclient.h" +#include +#include "emailapiutils.h" + +using namespace EmailInterface; + +class CEmailMessageContent; +// CLASS DECLARATION + +/** + * CEmailAttachment + * + */ + +NONSHARABLE_CLASS(CEmailAttachment) : public CBase, public MEmailAttachment + { +public: + // Constructors and destructor + + /** + * Destructor. + */ + ~CEmailAttachment(); + + /** + * Two-phased constructor. + */ + static CEmailAttachment* NewL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart *aAtt, + const TDataOwner aOwner ); + + /** + * Two-phased constructor. + */ + static CEmailAttachment* NewLC( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart *aAtt, + const TDataOwner aOwner ); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailAttachment + /** + * Returns file handle of this attachment. If the attachment is + * not associated with a file, null file handle is returned. + */ + RFile FileL() const; + + /** + * Sets file name field + */ + void SetFileNameL( const TDesC& aFileName ); + + /** + * Returns file name or null pointer descriptor if attachment + * is not associated with any file + */ + TPtrC FileNameL() const; + + +public: // from MEmailMessageContent + + TMessageContentId Id() const; + + TPtrC ContentType() const; + + void SetContentType( const TDesC& aContentType ); + + TPtrC ContentId() const; + + void SetContentId( const TDesC& aContentId ); + + TPtrC ContentDescription() const; + + void SetContentDescription( const TDesC& aContentDescription ); + + TPtrC ContentDisposition() const; + + void SetContentDisposition( const TDesC& aContentDisposition ); + + TPtrC ContentClass() const; + + void SetContentClass( const TDesC& aContentClass ); + + TInt AvailableSize() const; + + TInt TotalSize() const; + + TPtrC ContentL() const; + + void SetContentL( const TDesC& aContent ); + + void FetchL( MEmailFetchObserver& aObserver ); + + void CancelFetch(); + + void SaveToFileL( const TDesC& aPath ); + + MEmailMultipart* AsMultipartOrNull() const; + + MEmailTextContent* AsTextContentOrNull() const; + + MEmailAttachment* AsAttachmentOrNull() const; + +private: + + /** + * Constructor for performing 1st stage construction + */ + CEmailAttachment( const TDataOwner aOwner ); + + /** + * EPOC default constructor for performing 2nd stage construction + */ + void ConstructL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId ); + + void ConstructL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart *aPart); + +private: + CEmailMessageContent* iEmailMsgContent; + TDataOwner iOwner; + }; + +#endif // EMAILATTACHMENT_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailclientapiimpl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailclientapiimpl.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,232 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Definition of Email API main interface. +* +*/ + +#ifndef EMAILCLIENTAPIIMPL_H +#define EMAILCLIENTAPIIMPL_H + + +#include +#include "emailapiutils.h" +#include "cfsmailcommon.h" +#include "mfsmaileventobserver.h" +#include +#include "emailclientpluginmanager.h" + + +using namespace EmailInterface; + +class CFSMailBox; +class MEmailEventObserver; +class CVwsSessionWrapper; +class CFSMailPlugin; +class TFSMailMsgId; +class CEmailMailboxCache; +class CFSMailClient; + +/** +* "Framework" class including plugin management +* @since S60 v5.2 +*/ +NONSHARABLE_CLASS( CEmailClientApi ) : public CBase, public MEmailClientApi +{ +public: + /** + * Constructor + * @return + */ + static CEmailClientApi* NewL(); + + /** + * + */ + CEmailClientApi(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailClientApi + + /** @see MEmailClientApi */ + MEmailMailbox* MailboxL( const TMailboxId& aId ); + + /** @see MEmailClientApi */ + MEmailMailbox* MailboxL( const TPtrC& aAddress ); + + /** + * Gets all mailboxes in pointer array. It is recommended to free other + * mailboxes besides needed one to optimise memory usage. + */ + TInt GetMailboxesL( RMailboxPtrArray& aMailboxes ); + + /** + */ + void LaunchEmailL( const TLaunchPolicy aPolicy ); + +public: // new methods + + /** + * Gets array of mailbox ids + * @param aMailboxes mailbox ids from all plugins + * @return number of mailboxes returned in aMailboxes + */ + TInt GetMailboxIdsL( REmailMailboxIdArray& aMailboxes ); + +private: + + /** + * Constructor + */ + void ConstructL(); + + /** + * Destructor + */ + ~CEmailClientApi(); + + /** + * Push ECom implementation info to cleanup operation to cleanup stack + */ + void CleanupImplInfoPushL( RPointerArray& aArray ); + + /** + * Cleanup operation for ECom implementation info + */ + static void CleanupImplInfo( TAny* aAny ); + + + // Group of methods for book keeping of loaded protocol plugins by this object. + // In certain situations it is preferable to have a plugin in memory + // instead of loading/unloading frequently. + + /** Increases plugin reference count if CEmailClientApi already doesn't + * have active instance. When plugin is needed internally, this method + * should be accessor to a plugin. Counterpart is ReleasePlugin() when + * CEmailClientApi doesn't itself need plugin any more. + */ + CFSMailPlugin* UsePlugin( CPluginData& aPluginData ); + + /** + * For finding plugin data + */ + TInt IndexOfLoadedPluginData( const TPluginData& aPluginData ) const; + + /** + * Used in comparing plugin data in array (part of find algorithm) + */ + static TBool PluginDataEquals( const TPluginData& a1, const TPluginData& a2 ); + + /** + * This object doesn't need related protocol plugin + */ + void ReleasePlugin( CPluginData& aPluginData ); + + /** + * This object doesn't need any protocol plugin + */ + void ReleaseAllPlugins(); + + /** + * Return mailbox cache, creates it when called first time + */ + CEmailMailboxCache& MailboxInfoCacheL(); + + /** + * Caches mailbox ids and their mapping to related plugin data for quick + * lookup. When a mailbox with specific id is next time asked, related + * protocol plugin is already known. + */ + void UpdateMailboxInfoCacheL(); + + /** + * Internal, used from UpdateMailboxInfoCacheL + */ + TBool CachePluginMailboxesL( + CPluginData& aPluginData, + CFSMailPlugin& aPlugin ); + +private: + typedef RPointerArray RPluginDataArray; + + /** + * Iterator for CPluginData elements in an array + */ + class TPluginIterator + { + public: + // constructor + inline TPluginIterator( RPluginDataArray& aArray ) : + iArray( aArray ), iIndex( 0 ) {} + + /** + * return next element + */ + CPluginData* Next(); + private: + // iterator array + RPluginDataArray& iArray; + // current iterator index + TInt iIndex; + }; + +private: + // plugin data array for all protocol plugins + RPluginDataArray iPluginDataArray; + + // singleton instance counter + TInt iInstanceCounter; + + // book keeping of loaded plugins + RArray iLoadedPluginsArray; + + // Mailbox ids are cached when first time listed. Related plugin uid + // is include in the cache. + CEmailMailboxCache* iMailboxCache; + + CFSMailClient* iMailClient; + +}; + +/** +* Email application launcher. +*/ +NONSHARABLE_CLASS( CEmailLauncher ) : public CBase +{ +public: + static CEmailLauncher* NewL(); + + ~CEmailLauncher(); + + /** + * + */ + void LaunchL( const TMailboxId& aMailboxId ); +private: + + CEmailLauncher(); + + void ConstructL(); + + // Owned window server session. + CVwsSessionWrapper* iViewSrvSession; +}; + + +#endif // EMAILCLIENTAPIIMPL_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailclientapiimpl.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailclientapiimpl.hrh Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: email client api internal definitions +* +*/ +#ifndef _EMAILCLIENTAPIIMPL_HRH +#define _EMAILCLIENTAPIIMPL_HRH + +#define KEmailClientApiDllUid 0x20022D63 +#define KEmailClientApiImplUid 0x20022D61 + +#endif // _EMAILCLIENTAPIIMPL_HRH + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailclientapiimpldefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailclientapiimpldefs.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,30 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: . +* +*/ + +#ifndef _EMAILCLIENTAPIIMPLDEFS_H +#define _EMAILCLIENTAPIIMPLDEFS_H + +enum TEmailImplPanic { + EMailPanicPluginNotReleased, + EMailPanicSortMapIndexOutOfBounds +}; + +void Panic( TEmailImplPanic aPanic ); + +#endif // _EMAILCLIENTAPIIMPLDEFS_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailclientpluginmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailclientpluginmanager.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: Definition for plugin manager interface +* +* Description: +* +*/ + +#ifndef MEMAILPLUGINMANAGER_H_ +#define MEMAILPLUGINMANAGER_H_ + +#include "cfsmailcommon.h" + +class MEmailClientPluginManager + { +public: + virtual CFSMailPlugin* GetPluginByUid(TUid aUid) = 0; + }; + +#endif // MEMAILPLUGINMANAGER_H_ + +// End of file + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailcontent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailcontent.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,129 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: mail content implementation definition +* +*/ + +#ifndef EMAILCONTENT_H +#define EMAILCONTENT_H + +#include + +#include "cfsmailclient.h" +#include "emailapiutils.h" + +using namespace EmailInterface; + +class CFSMailPlugin; +class CFSMailRequestObserver; + +NONSHARABLE_CLASS( CEmailMessageContent ) : public CBase, + public MEmailMessageContent +{ +public: + static CEmailMessageContent* NewL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart); + + ~CEmailMessageContent(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailMessageContent + TMessageContentId Id() const; + + TPtrC ContentType() const; + + void SetContentType( const TDesC& aContentType ); + + TPtrC ContentId() const; + + void SetContentId( const TDesC& aContentId ); + + TPtrC ContentDescription() const; + + void SetContentDescription( const TDesC& aContentDescription ); + + TPtrC ContentDisposition() const; + + void SetContentDisposition( const TDesC& aContentDisposition ); + + TPtrC ContentClass() const; + + void SetContentClass( const TDesC& aContentClass ); + + TInt AvailableSize() const; + + TInt TotalSize() const; + + TPtrC ContentL() const; + + void SetContentL( const TDesC& aContent ); + + void FetchL( MEmailFetchObserver& aObserver ); + + void CancelFetch(); + + void SaveToFileL( const TDesC& aPath ); + + MEmailMultipart* AsMultipartOrNull() const; + + MEmailTextContent* AsTextContentOrNull() const; + + MEmailAttachment* AsAttachmentOrNull() const; + +public: + CFSMailMessagePart& Part(); + void SetPart( CFSMailMessagePart *aPart ); + + CPluginData& PluginData(); + +protected: + CEmailMessageContent( CPluginData& aPluginData, const TMessageContentId& aMsgContentId, CFSMailMessagePart* aPart ); + +private: + class CContentRequestObserver: public CBase, + public MFSMailRequestObserver + { + public: + CContentRequestObserver( CEmailMessageContent &aParent); + + virtual void RequestResponseL( TFSProgress aEvent, TInt aRequestId ); + void SetObserverL( MEmailFetchObserver* aObserver ); + private: + MEmailFetchObserver* iObserver; + CEmailMessageContent& iParent; + }; + +private: + void ConstructL(); + +private: + CPluginData& iPluginData; + CFSMailPlugin* iPlugin; + CFSMailMessagePart* iPart; + TMessageContentId iMsgContentId; + mutable HBufC* iBuf; + mutable TUint iUsed; + CContentRequestObserver *iFetchObserver; + TInt iRequestId; +}; + +#endif // EMAILCONTENT_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailfolder.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailfolder.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,103 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: CEmailMailbox. +* +*/ + +#ifndef CEMAILFOLDER_H +#define CEMAILFOLDER_H + +#include +#include "cfsmailcommon.h" +#include +#include "mfsmaileventobserver.h" + +using namespace EmailInterface; + +class CFSMailPlugin; +class CPluginData; +class CFSMailFolder; +class EmailInterface::MMessageIterator; + +NONSHARABLE_CLASS( CEmailFolder ) : + public CBase, + public MEmailFolder +{ +public: + + static CEmailFolder* NewLC( + CPluginData& aPluginData, + const TFolderId& aFolderId, + CFSMailFolder *aFolder ); + + static CEmailFolder* NewL( + CPluginData& aPluginData, + const TFolderId& aFolderId, + CFSMailFolder *aFolder ); + + ~CEmailFolder(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailFolder + TFolderId FolderId() const; + + TFolderId ParentFolderId() const; + + TFolderType FolderType() const; + + TPtrC Name() const; + + /** + * Returns direct childs of this folder, i.e. this is not recursive. + * @return number of subfolders or an error code + */ + TInt GetSubfoldersL( + RFolderArray& aSubfolders ) const; + + EmailInterface::MMessageIterator* MessagesL( + const RSortCriteriaArray& aCriteria ); + + void DeleteMessagesL( const REmailMessageIdArray& aMessageIds ); + +private: // constructors + CEmailFolder( CPluginData& aPluginData, const TFolderId& aFolderId, CFSMailFolder *aFolder ); + + void ConstructL(); + +private: // Internal methods + static void ToFsSortCriteriaL( + const RSortCriteriaArray& aSortCriteria, + RArray& aFsCriteria ); + +private: + CPluginData& iPluginData; + + CFSMailPlugin* iPlugin; + + TFolderType iFolderType; + + TFolderId iFolderId; + + TFolderId iParentId; + + CFSMailFolder *iFolder; +}; + +#endif // CEMAILFOLDER_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailinterfacefactoryimpl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailinterfacefactoryimpl.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Interface factory implementation class definition +* +*/ + +#ifndef EMAILINTERFACEFACTORY_H +#define EMAILINTERFACEFACTORY_H + +#include + +using namespace EmailInterface; + +/** +* Implements CEmailInterfaceFactory ECom interface +* +*/ +NONSHARABLE_CLASS( CEmailInterfaceFactoryImpl ) : public CEmailInterfaceFactory +{ +public: + + /** + * Creates interface factory + * @return interface factory + */ + static CEmailInterfaceFactoryImpl* NewL(); + + // destructor + ~CEmailInterfaceFactoryImpl(); + + /** @see CEmailInterfaceFactory::InterfaceL */ + MEmailInterface* InterfaceL( const TInt aInterfaceId ); + +private: + enum TEmailUidAppendRemoveMode + { + EEmailUidModeAppend, + EEmailUidModeRemove, + }; + + /** + * Registers/removes application UID to/from P&S so that the application + * can be shutdown during Email IAD update. Update may fail if any + * application is using some Email services during the update. + * Application UID is removed from the list in destructor. + * @param aMode Is the current process UID added or removed from the list + */ + void AppendOrRemoveUidL( const TEmailUidAppendRemoveMode aMode ); + +private: + // c++ constructor and 2nd phase constructor + CEmailInterfaceFactoryImpl(); + void ConstructL(); +}; + +#endif // EMAILINTERFACEFACTORY_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailmailbox.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailmailbox.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,181 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailMailbox. +* +*/ + +#ifndef EMAILMAILBOX_H +#define EMAILMAILBOX_H + +#include "cfsmailcommon.h" +#include +#include "mfsmaileventobserver.h" +#include "mfsmailrequestobserver.h" +#include "mmailboxcontentobserver.h" + +using namespace EmailInterface; + +class CFSMailBox; +class CFSMailAddress; +class CFSMailPlugin; +class CPluginData; +class CEmailAddress; + +NONSHARABLE_CLASS( CEmailMailbox ) : + public CBase, + public MEmailMailbox +{ +public: + + static CEmailMailbox* NewL( + CPluginData& aPluginData, + const TMailboxId& aMailboxId ); + + ~CEmailMailbox(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailMailbox + /**@see MEmailMailbox */ + TMailboxId MailboxId() const; + + /**@see MEmailMailbox */ + MEmailAddress* AddressL() const; + + /**@see MEmailMailbox */ + TPtrC MailboxName() const; + + /**@see MEmailMailbox */ + TInt GetFoldersL( RFolderArray& aFolders ) const; + + /**@see MEmailMailbox */ + MEmailFolder* FolderL( const TFolderId& aFolderId ) const; + + /**@see MEmailMailbox */ + MEmailFolder* FolderByTypeL( + const TFolderType aFolderType ) const; + + /**@see MEmailMailbox */ + MEmailMessage* MessageL( const TMessageId& aMessageId ); + + /**@see MEmailMailbox */ + MEmailMessage* CreateDraftMessageL() const; + + /**@see MEmailMailbox */ + MEmailMessage* CreateReplyMessageL( const TMessageId& aMessageId, const TBool aReplyToAll = ETrue ) const; + + /**@see MEmailMailbox */ + MEmailMessage* CreateForwardMessageL( const TMessageId& aMessageId ) const; + + /**@see MEmailMailbox */ + void SynchroniseL( MMailboxSyncObserver& aObserver ); + + /**@see MEmailMailbox */ + void CancelSynchronise(); + + /**@see MEmailMailbox */ + void RegisterObserverL( MMailboxContentObserver& aObserver ); + + /**@see MEmailMailbox */ + void UnregisterObserver( MMailboxContentObserver& aObserver ); + + /**@see MEmailMailbox */ + MEmailMessageSearchAsync* MessageSearchL(); + + /**@see MEmailMailbox */ + void ShowInboxL(); + + /**@see MEmailMailbox */ + void EditNewMessageL(); + + +public: // new methods + +private: + TFSMailMsgId FsMailboxId() const; + +private: // constructors + CEmailMailbox( CPluginData& aPluginData, const TMailboxId& aPlugin ); + + void ConstructL(); + +private: // inner class for mailbox event handling + class TObserverEventMapper : public MFSMailEventObserver + { + public: + TObserverEventMapper( CFSMailPlugin* aPlugin, TUid aPluginUid, const TMailboxId& aMailboxId ); + ~TObserverEventMapper(); + void AddObserverL( MMailboxContentObserver& aObserver ); + void RemoveObserver( MMailboxContentObserver& aObserver ); + public: // from MFSMailEventObserver + virtual void EventL( TFSMailEvent aEvent, TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + typedef void ( CEmailMailbox::TObserverEventMapper::*TEventMapFunc)( TMailboxId, TAny*, TAny*, TAny* ); + private: // mappers, so say we all! + void ConvertParamsL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, REmailMessageIdArray& aMessageIds, TFolderId& aFolderId ); + void IgnoreEventL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void NewMessageL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void MessageChangedL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void MessageDeletedL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void MessageMoved( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void MessageCopiedL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void NewFolderL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void FolderChangeL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void FoldersDeletedL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void FoldersMovedL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + void ExceptionL( TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* aParam3 ); + + private: + static TBool Equals( const MMailboxContentObserver& a1, const MMailboxContentObserver& a2 ); + private: + CFSMailPlugin* iPlugin; + TFSMailMsgId iFsMailboxId; + RPointerArray iClientObservers; + }; + class CEmailRequestObserver: public CBase, + public MFSMailRequestObserver + { + public: + CEmailRequestObserver(); + + void RequestResponseL( TFSProgress aEvent, TInt aRequestId ); + void SetObserverL( MMailboxSyncObserver* aObserver ); + private: + MMailboxSyncObserver* iObserver; + }; + +private: + + CPluginData& iPluginData; + + CFSMailPlugin* iPlugin; + + TMailboxId iMailboxId; + + TObserverEventMapper* iEventMapper; + + mutable CEmailAddress* iAddress; + + CFSMailBox* iFsMailbox; + + CEmailRequestObserver* iSyncObserver; + + TInt iRequestId; +}; + +#endif // EMAILMAILBOX_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailmailboxcache.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailmailboxcache.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,138 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Definition for mailbox cache +* +*/ + +#ifndef EMAILMAILBOXCACHE_H +#define EMAILMAILBOXCACHE_H + +#include +#include + +using namespace EmailInterface; + +class CPluginData; + + +/** +* Cache associating mailbox with a protocol plugin. Improves performance by +* removing need to load protocol plugins every time a mailbox needs to be +* accessed (and keeping plugin loaded when it is not needed) +* @since s60 v5.2 +*/ +NONSHARABLE_CLASS( CEmailMailboxCache ) : public CBase +{ +public: + /** + * Cache entry to access plugin by mailbox id + */ + class TCacheEntry + { + public: + inline TCacheEntry( + CPluginData* aPluginData, + TMailboxId aId ) : + iPluginData( aPluginData ), + iMailboxId( aId ) {} + CPluginData* iPluginData; + TMailboxId iMailboxId; + }; + + /** + * Constructor + */ + static CEmailMailboxCache* NewL(); + + /** destructor */ + ~CEmailMailboxCache(); + + /** + * Clears cache and indicates that one or more AddMailboxL calls will + * follow. + * Cleanup support invalidates cache if leave occurs before EndCachingPop() + * is called + */ + void StartCachingPushL(); + + /** + * Marks caching fully complete for all mailboxes (call when no more + * AddMailboxL will follow) and pops cleanup item. + */ + void EndCachingPop(); + + /** + * Returns if mailboxes are cached + */ + TBool IsCached() const; + + /** + * Adds mailbox to cache. + * @param aPluginData mailbox associated with plugin(data) + * @param aMailboxId mailbox id + * @precondition: StartCaching must have been called. + */ + void AddMailboxL( CPluginData& aPluginData, const TMailboxId& aMailboxId ); + + /** + * Returns plugin data by mailbox id + * @param aMailboxId + * @return plugin data associated with specified mailbox + */ + CPluginData* PluginDataL( const TMailboxId& aMailboxId ) const; + + /** + * Returns plugin data by plugin id + * @param aPluginId + * @return plugin data associated with specified plugin + */ + CPluginData* PluginDataL( const TUid& aPluginId ) const; + + /** + * Gets all mailbox ids in all protocol plugins + */ + void GetIdsL( REmailMailboxIdArray& aIdArray ) const; + +private: + + TInt FindById( const TMailboxId& aMailboxId ) const; + TInt FindByPluginIdL( const TUid& aPluginId ) const; + static TBool Equals( const TCacheEntry& a1, const TCacheEntry& a2 ); + static TBool PluginEquals( const TCacheEntry& a1, const TCacheEntry& a2 ); + + static void CleanupOp( TAny* aAny ); + +private: + + CEmailMailboxCache(); + + void ConstructL(); + + enum TCacheState { + EEmpty, + ECaching, + EComplete + }; +private: + // empty, caching or caching complete + TCacheState iState; + + // cached mailbox id with associated plugin data + RArray iEntries; +}; + + +#endif // EMAILMAILBOXCACHE_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailmessage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailmessage.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,200 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: mail message implementation definition +* +*/ + +#ifndef EMAILMESSAGE_H +#define EMAILMESSAGE_H + +#include +#include "cfsmailcommon.h" +#include "emailapiutils.h" +#include "MFSMailRequestObserver.h" +#include + +using namespace EmailInterface; + +class CFSMailMessagePart; +class CFSMailMessage; +class CFSMailAddress; +class CFSMailPlugin; +class CPluginData; +class CEmailAddress; +class CEmailAttachment; +class CEmailTextContent; +class CEmailMultipart; + +NONSHARABLE_CLASS( CEmailMessage ) : public CBase, public MEmailMessage, public MFSMailRequestObserver + { +public: + /** + * Creates email message from plugin message + */ + static CEmailMessage* NewL( CPluginData& aPluginData, + CFSMailMessage* aFsMessage, + const TDataOwner aOwner ); + + ~CEmailMessage(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailMessage + /**@see MEmailMessage */ + const TMessageId& MessageId() const; + + /**@see MEmailMessage */ + MEmailAddress* SenderAddressL() const; + + /**@see MEmailMessage */ + MEmailAddress* ReplyToAddressL() const; + + /**@see MEmailMessage */ + void SetReplyToAddressL( const MEmailAddress& aSender ); + + /**@see MEmailMessage */ + TInt GetRecipientsL( const MEmailAddress::TRole aRole, + REmailAddressArray& aRecipients ) const; + + /**@see MEmailMessage */ + void SetRecipientsL( const MEmailAddress::TRole aRole, REmailAddressArray& aRecipients ); + + /**@see MEmailMessage */ + void RemoveRecipientL( const MEmailAddress& aRecipient ); + + /**@see MEmailMessage */ + TPtrC Subject() const; + + /**@see MEmailMessage */ + void SetSubjectL( const TPtrC& aSubject ); + + /**@see MEmailMessage */ + TTime Date() const; + + /**@see MEmailMessage */ + TInt Flags() const; + + /**@see MEmailMessage */ + void SetFlag( const TUint aFlag ); + + /**@see MEmailMessage */ + void ResetFlag( const TUint aFlag ); + + /**@see MEmailMessage */ + MEmailMessageContent* ContentL() const; + + /**@see MEmailMessage */ + void SetContentL( const MEmailMessageContent* aContent ); + + /**@see MEmailMessage */ + void SetPlainTextBodyL( const TDesC& aPlainText ); + + /**@see MEmailMessage */ + MEmailAttachment* AddAttachmentL( const TDesC& aFullPath ); + + /**@see MEmailMessage */ + MEmailAttachment* AddAttachmentL( RFile& aFile ); + + /**@see MEmailMessage */ + TInt GetAttachmentsL( REmailAttachmentArray& aAttachments ); + + /**@see MEmailMessage */ + void RemoveAttachmentL( const MEmailAttachment& aAttachment ); + + /**@see MEmailMessage */ + const TFolderId& ParentFolderId() const; + + /**@see MEmailMessage */ + void SaveChangesL(); + + /**@see MEmailMessage */ + void SendL(); + + /**@see MEmailMessage */ + void ShowMessageViewerL(); + + /**@see MEmailMessage */ + void ReplyToMessageL( const TBool aReplyToAll = ETrue ); + + /**@see MEmailMessage */ + void ForwardMessageL(); + +protected: // From MFSMailRequestObserver + void RequestResponseL( TFSProgress aEvent, TInt aRequestId ); + +private: + + // Copies/moves flag values from iPluginMessage's flags to local flag member variable + void InitializeFlagValues(); + + CEmailMessage( CPluginData& aPluginData, CFSMailMessage* aMessage, const TDataOwner aOwner ); + + void ConstructL(); + + void ConvertAddressArrayL( const MEmailAddress::TRole aRole, + const RPointerArray& aSrc, + REmailAddressArray& aDst ) const; + CEmailAddress* CreateAddressLC( const MEmailAddress::TRole aRole, CFSMailAddress& aFsAddress ) const; + TUint MapFlags( const TUint& aFlag ); + + TMessageContentId MessageContentId( TEntryId aContentId ) const; + +private: + CPluginData& iPluginData; + + CFSMailPlugin* iPlugin; + + TMessageId iMessageId; + + TMessageContentId iMsgContentId; + + mutable CEmailAddress* iSender; + + mutable CEmailAddress* iReplyTo; + + REmailAddressArray iRecipients; + + CFSMailMessage* iPluginMessage; + + TUint iFlags; + + mutable CEmailTextContent *iTextContent; + mutable CEmailMultipart* iContent; + RPointerArray iAttachments; + TDataOwner iOwner; + QEventLoop iEventLoop; + TInt iError; + + }; +//Class for compare email content type +class TContentType +{ +public: + TContentType( const TDesC& aContentType ); + // Returns ETrue iff the content type represented by this object + // (after parameters have been removed) is equal to the given content type. + TBool Equals( const TDesC& aContentType ); + +private: + // Content type (without parameters) + TPtrC iContentType; +}; + + +#endif // EMAILMESSAGE_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailmessagesearch.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailmessagesearch.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,170 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Definition of Email message search API. +* +*/ + +#ifndef EMAILMESSAGESEARCHASYNCIMPL_H_ +#define EMAILMESSAGESEARCHASYNCIMPL_H_ + +#include +#include +#include + +#include "cfsmailclient.h" +#include "mfsmailboxsearchobserver.h" +#include "emailapiutils.h" + +using namespace EmailInterface; + + +NONSHARABLE_CLASS( CEmailMessageSearchAsync) : + public CBase, + public MEmailMessageSearchAsync, + public MFSMailBoxSearchObserver + +{ +public: + /** + * Constructor + * @return + */ + static CEmailMessageSearchAsync* NewL( + CPluginData& aPluginData, + const TMailboxId& aMailboxId ); + + /** + * Destructor + */ + ~CEmailMessageSearchAsync(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + + +public: // from MEmailMessageSearchAsync + /** + * Sets sort order for search results. + * Leaves KErrNotReady if search is ongoing. + */ + void SetSortCriteriaL( const TEmailSortCriteria& aCriteria ); + + /** + * Adds a search key. Leaves KErrNotReady if search is ongoing. + */ + void AddSearchKeyL( const TDesC& aSearchKey ); + + /** + * Enables/disables search from remote email server. + * Leaves KErrNotReady if search is ongoing. + */ + void SetRemoteSearchL( TBool aRemote ); + + /** + * Indicates whether remote search is enabled. + */ + TBool IsRemoteSearch() const; + + /** + * Starts search, all methods affecting search attribures leave + * KErrNotReady while search is ongoing. + * @param aObserver called when results are available. + */ + void StartSearchL( MEmailSearchObserver& aObserver ); + + /** + * Cancels search. + */ + void Cancel(); + + /** returns search status + * @return search status: + * < 0 : Search has failed + * KRequestPending : search is ongoing. note that status may be + * KRequestPending after HandleResultL callback because results + * may be given in chunks of results. Size of chunk depends on + * implementation and may vary. + * KErrNone : initial state, or search has finished + */ + TInt Status() const; + + /** + * Resets all search attribures. Cancels search if ongoing. + */ + void Reset(); + +public: // From MFSMailBoxSearchObserver + /** + * Notifies the email search API client that a match has been found + * + * @param aMatchMessage contains a pointer to the matched message. + * Ownership is transfered to the observer. + * + */ + void MatchFoundL( CFSMailMessage* aMatchMessage ); + + /** + * Notifies the email search API client that the search has completed + * + */ + void SearchCompletedL(); + +// + /** + * Asks client if search engine should change search priority + */ + void ClientRequiredSearchPriority(TInt *apRequiredSearchPriority); +// + + +private: + /** + * Constructor + */ + CEmailMessageSearchAsync( + CPluginData& aPluginData, + const TMailboxId& aMailboxId ); + + void ConstructL(); + + /** + * Function leaves if search is going on. Otherwise it doesn't do anything. + */ + inline void IsSearchGoingOnL() const; + +private: + + CPluginData& iPluginData; + + CFSMailPlugin* iPlugin; + + TMailboxId iMailboxId; + + TFSMailSortCriteria iCriteria; + + RPointerArray iSearchStrings; + + MEmailSearchObserver* iObserver; + + mutable RSemaphore iGate; + + TBool iRemote; +}; + +#endif // EMAILMESSAGESEARCHASYNCIMPL_H_ + +// End of file + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailmultipart.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailmultipart.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,123 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Definition of Email text content. +* +*/ + + +#ifndef EMAILMULTIPART_H_ +#define EMAILMULTIPART_H_ +// INCLUDES +#include "cfsmailclient.h" +#include +#include "emailapiutils.h" + +using namespace EmailInterface; + +class CEmailMessageContent; + + +// CLASS DECLARATION + +NONSHARABLE_CLASS( CEmailMultipart ) : public CBase, + public MEmailMultipart +{ +public: + static CEmailMultipart* NewL( CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart, + const TDataOwner aOwner ); + + ~CEmailMultipart(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailMessageContent + + TMessageContentId Id() const; + + TPtrC ContentType() const; + + void SetContentType( const TDesC& aContentType ); + + TPtrC ContentId() const; + + void SetContentId( const TDesC& aContentId ); + + TPtrC ContentDescription() const; + + void SetContentDescription( const TDesC& aContentDescription ); + + TPtrC ContentDisposition() const; + + void SetContentDisposition( const TDesC& aContentDisposition ); + + TPtrC ContentClass() const; + + void SetContentClass( const TDesC& aContentClass ); + + TInt AvailableSize() const; + + TInt TotalSize() const; + + TPtrC ContentL() const; + + void SetContentL( const TDesC& aContent ); + + void FetchL( MEmailFetchObserver& aObserver ); + + void CancelFetch(); + + void SaveToFileL( const TDesC& aPath ); + + MEmailMultipart* AsMultipartOrNull() const; + + MEmailTextContent* AsTextContentOrNull() const; + + MEmailAttachment* AsAttachmentOrNull() const; + +public: // from MEmailMultipart + TInt PartCountL(); + + MEmailMessageContent* PartByIndexL( const TUint aIndex ) const; + + void DeletePartL( const TUint aIndex ); + + void AddPartL( + const MEmailMessageContent& aPart, + const TUint aPos ); + +public: // for internal usage + void SetOwner( const TDataOwner aOwner ); + + +private: + CEmailMultipart( const TDataOwner aOwner ); + + void ConstructL( CPluginData& aPluginData, const TMessageContentId& aMsgContentId, CFSMailMessagePart* aPart ); + +private: // Private data + CEmailMessageContent* iEmailMsgContent; + RArray iChildParts; + TUint iChildPartCount; + TDataOwner iOwner; +}; + +#endif // EMAILMULTIPART_H_ + +// End of file + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/emailtextcontent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/emailtextcontent.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,121 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Definition of Email text content. +* +*/ + + +#ifndef EMAILTEXTCONTENT_H_ +#define EMAILTEXTCONTENT_H_ + +// INCLUDES +#include "cfsmailclient.h" +#include +#include "emailapiutils.h" + +using namespace EmailInterface; + +class CEmailMessageContent; +// CLASS DECLARATION + +/** + * CEmailTextContent + * + */ +NONSHARABLE_CLASS( CEmailTextContent ) : public CBase, + public MEmailTextContent +{ +public: + static CEmailTextContent* NewL( CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart, + const TDataOwner aOwner ); + + ~CEmailTextContent(); + +public: // from MEmailInterface + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MEmailTextContent + TTextType TextType() const; + + void SetTextL( + const TTextType aPlainOrHtml, + const TDesC& aText ); + +public: // from MEmailMessageContent + + TMessageContentId Id() const; + + TPtrC ContentType() const; + + void SetContentType( const TDesC& aContentType ); + + TPtrC ContentId() const; + + void SetContentId( const TDesC& aContentId ); + + TPtrC ContentDescription() const; + + void SetContentDescription( const TDesC& aContentDescription ); + + TPtrC ContentDisposition() const; + + void SetContentDisposition( const TDesC& aContentDisposition ); + + TPtrC ContentClass() const; + + void SetContentClass( const TDesC& aContentClass ); + + TInt AvailableSize() const; + + TInt TotalSize() const; + + TPtrC ContentL() const; + + void SetContentL( const TDesC& aContent ); + + void FetchL( MEmailFetchObserver& aObserver ); + + void CancelFetch(); + + void SaveToFileL( const TDesC& aPath ); + + MEmailMultipart* AsMultipartOrNull() const; + + MEmailTextContent* AsTextContentOrNull() const; + + MEmailAttachment* AsAttachmentOrNull() const; + +public: // for internal usage + void SetOwner( const TDataOwner aOwner ); + + +private: + CEmailTextContent( const TDataOwner aOwner ); + + void ConstructL( CPluginData& aPluginData, const TMessageContentId& aMsgContentId, CFSMailMessagePart* aPart); + +private: + TTextType iTextType; + CEmailMessageContent* iEmailMsgContent; + TDataOwner iOwner; +}; + +#endif // EMAILTEXTCONTENT_H_ + +// End of file + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/inc/messageiterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/inc/messageiterator.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,135 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Email message iterator +* +*/ + +#ifndef CMESSAGEITERATOR_H +#define CMESSAGEITERATOR_H + +#include +#include "emailapidefs.h" +#include "cfsmailcommon.h" + +using namespace EmailInterface; + +class MFSMailIterator; +class CPluginData; +class CFSMailMessage; +class CEmailMessage; +/** + * Iterator for email messages + * @since S60 v5.2 + */ +NONSHARABLE_CLASS( CMessageIterator ) : public CBase, public MMessageIterator +{ +public: + /** + * Constructor + * @param aIterator + * @param aPluginData + * @return new iterator + */ + static CMessageIterator* NewL( MFSMailIterator* aIterator, + CPluginData& aPluginData, + TUint aCount ); + + ~CMessageIterator(); + +private: + CMessageIterator( MFSMailIterator* aIterator, CPluginData& aPluginData, TUint aCount ); + + void ConstructL(); + +public: // from MEmailInterface + + TEmailTypeId InterfaceId() const; + + void Release(); + +public: // from MMessageIterator + + /** @see MMessageIterator */ + MEmailMessage* NextL(); + + /** @see MMessageIterator + (not implemented) */ + + MEmailMessage* PreviousL(); + + TUint Count() const; + + +private: + // Reads next chunk of messages from protocol plugin + TBool ReadNextChunkL(); + TBool ReadPreviousChunkL(); + MEmailMessage* ReadFromChunkL(); + void CleanCache(); + void AddToCacheL( CFSMailMessage* aFsMsg ); +private: // data + + /** + * Iterator internal states. "Consuming" in state names mean getting and + * returning next message from the iterator. + */ + enum TState { + // No messages available in iterator, read them from protocl plugin. + // NextL returns a message from chunk (or NULL if folder is empty) + // This is initial state. + EReadNextMessageChunk, + EReadPreviousMessageChunk, + + // Message(s) are available (retrieved from plugin). No remaining + // messages excepted from the plugin. NextL returns a message from chunk. + EConsumeFromChunk, + + // Message(s) are available in chunk and more in protocol plugin. + EConsumeFromChunkWithMoreChunksToFollow, + + // Iterator is iterated throuh and NextL would return NULL. + EIteratorConsumed + }; + + // plugin iterator, owned + MFSMailIterator* iIterator; + + // reference to plugin data + CPluginData& iPluginData; + + CFSMailPlugin* iPlugin; + + // message id used for reading messages from plugin + TFSMailMsgId iStartMsgId; + + // Internal state + TState iState; + + // pointer array of messages read from protocol plugin (aka message chunk) + RPointerArray iFsMessageArray; + RPointerArray iMessageArray; + + TUint iCount; + + TInt iCursor; + + TFSMailMsgId iFirstMsgId; + + TBool iHasMoreNextItems; + TBool iHasMorePrevItems; +}; + +#endif // CMESSAGEITERATOR_H + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/rom/emailclientapi.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/rom/emailclientapi.iby Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,22 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: (ROM) Image description file for emailclientapi +* +*/ +#include +#ifdef FF_EMAIL_FRAMEWORK + +ECOM_PLUGIN( emailclientapi.dll, emailclientapi.rsc ) + +#endif \ No newline at end of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailaddress.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailaddress.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,129 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailAddress. +* +*/ + +#include "emailaddress.h" +#include "cfsmailclient.h" +#include "emailclientapi.hrh" + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailAddress* CEmailAddress::NewL( const TRole aRole, const TDataOwner aOwner ) + { + CEmailAddress* self = new ( ELeave ) CEmailAddress( aRole, aOwner ); + + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailAddress* CEmailAddress::NewLC( const TRole aRole, const TDataOwner aOwner ) + { + CEmailAddress* self = CEmailAddress::NewL( aRole, aOwner ); + CleanupStack::PushL( self ); + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailAddress::~CEmailAddress() + { + iAddress.Close(); + iDisplayName.Close(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailAddress::CEmailAddress( const TRole aRole, const TDataOwner aOwner ) : + iRole( aRole ), + iOwner( aOwner ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailAddress::InterfaceId() const + { + return KEmailIFUidAddress; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAddress::Release() + { + if ( iOwner == EClientOwns ) + { + delete this; + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAddress::SetAddressL( const TDesC& aAddress ) + { + iAddress.Close(); + iAddress.CreateL( aAddress ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAddress::Address() const + { + return iAddress; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAddress::SetDisplayNameL( const TDesC& aDisplayName ) + { + iDisplayName.Close(); + iDisplayName.CreateL( aDisplayName ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAddress::DisplayName() const + { + return iDisplayName; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAddress::TRole CEmailAddress::Role() const + { + return iRole; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAddress::SetRole( const TRole aRole ) + { + iRole = aRole; + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailapiutils.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailapiutils.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,144 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailApiUtils. +* +*/ + +#include +#include "cfsmailplugin.h" +#include "emailapidefs.h" +#include "emailclientapiimpldefs.h" +#include "emailapiutils.h" + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CPluginData::CPluginData( TUid aUid ) : + iData( aUid ), + iPluginLoadError( KErrNotReady ) + { + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CPluginData::~CPluginData() + { + // panic if a user of plugin has not called ReleaseInstance after ClaimInstance + __ASSERT_ALWAYS( iOwned || !iRefCount, Panic( EMailPanicPluginNotReleased ) ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CFSMailPlugin* CPluginData::ClaimInstance() + { + if ( !iData.iPlugin ) + { + TRAP( iPluginLoadError, iData.iPlugin = CFSMailPlugin::NewL( iData.iUid ) ); + } + if ( !iPluginLoadError ) + { + iRefCount++; + } + return iData.iPlugin; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CFSMailPlugin* CPluginData::ClaimInstanceL() + { + ClaimInstance(); + User::LeaveIfError( iPluginLoadError ); + return iData.iPlugin; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CPluginData::ReleaseInstance() + { + if ( iData.iPlugin ) + { + iRefCount--; + if ( !iRefCount ) + { + delete iData.iPlugin; + iData.iPlugin = NULL; + } + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CPluginData::ReleasePushL() + { + TCleanupItem item( &CPluginData::CleanupOperation, this ); + CleanupStack::PushL( item ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CPluginData::CleanupOperation( TAny* aAny ) + { + CPluginData* pdata = reinterpret_cast( aAny ); + pdata->ReleaseInstance(); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TUid CPluginData::Uid() const + { + return iData.iUid; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TInt CPluginData::LoadResult() const + { + return iPluginLoadError; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TFSMailMsgId FsMsgId( const CPluginData& aPluginData, const EmailInterface::TBaseId& aId ) + { + TFSMailMsgId id( aPluginData.Uid(), aId.iId ); + return id; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CleanupReleasePush::PushL( EmailInterface::MEmailInterface& aItem ) + { + TCleanupItem item( &CleanupReleasePush::Release, &aItem ); + CleanupStack::PushL( item ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CleanupReleasePush::Release( TAny *aPtr ) + { + reinterpret_cast( aPtr )->Release(); + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailattachment.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailattachment.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,292 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailAttachment. +* +*/ + +#include "emailattachment.h" +#include "emailcontent.h" +#include "emailclientapi.hrh" + +// ----------------------------------------------------------------------------- +// +// -----------------------------------------------------------------------------/ +CEmailAttachment::CEmailAttachment( const TDataOwner aOwner ) : iOwner( aOwner ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailAttachment::~CEmailAttachment() + { + delete iEmailMsgContent; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailAttachment* CEmailAttachment::NewLC( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart *aAtt, + const TDataOwner aOwner ) + { + CEmailAttachment* self = new (ELeave) CEmailAttachment( aOwner ); + CleanupStack::PushL( self ); + self->ConstructL( aPluginData, aMsgContentId, aAtt ); + + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailAttachment* CEmailAttachment::NewL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart *aAtt, + const TDataOwner aOwner ) + { + CEmailAttachment* self = CEmailAttachment::NewLC( aPluginData, aMsgContentId, aAtt, aOwner ); + CleanupStack::Pop( self ); + + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::ConstructL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart *aAtt) + { + iEmailMsgContent = CEmailMessageContent::NewL( aPluginData, aMsgContentId, aAtt ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailAttachment::AvailableSize() const +{ + return iEmailMsgContent->AvailableSize(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::CancelFetch() +{ + iEmailMsgContent->CancelFetch(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAttachment::ContentL() const +{ + User::Leave(KErrNotSupported); + return iEmailMsgContent->ContentL(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAttachment::ContentClass() const +{ + return iEmailMsgContent->ContentClass(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAttachment::ContentDescription() const +{ + return iEmailMsgContent->ContentDescription(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAttachment::ContentDisposition() const +{ + return iEmailMsgContent->ContentDisposition(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAttachment::ContentId() const +{ + return iEmailMsgContent->ContentId(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAttachment::ContentType() const +{ + return iEmailMsgContent->ContentType(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::FetchL( MEmailFetchObserver & aObserver ) +{ + iEmailMsgContent->FetchL( aObserver ); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TMessageContentId CEmailAttachment::Id() const +{ + return iEmailMsgContent->Id(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailAttachment::InterfaceId() const + { + return KEmailIFUidAttachment; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::Release() + { + if ( iOwner == EClientOwns ) + { + delete this; + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::SaveToFileL( const TDesC& aPath ) +{ + iEmailMsgContent->SaveToFileL( aPath ); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::SetContentClass( const TDesC& aContentClass ) +{ + iEmailMsgContent->SetContentClass( aContentClass ); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::SetContentDescription( const TDesC& aContentDescription ) +{ + iEmailMsgContent->SetContentDescription(aContentDescription); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::SetContentDisposition( const TDesC& aContentDisposition ) +{ + iEmailMsgContent->SetContentDisposition( aContentDisposition ); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::SetContentId( const TDesC &aContentId ) +{ + iEmailMsgContent->SetContentId( aContentId ); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::SetContentL( const TDesC &aContent ) +{ + iEmailMsgContent->SetContentL( aContent ); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailAttachment::SetContentType( const TDesC &aContentType ) +{ + iEmailMsgContent->SetContentType( aContentType ); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailAttachment::TotalSize() const +{ + return iEmailMsgContent->TotalSize(); +} + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMultipart* CEmailAttachment::AsMultipartOrNull() const + { + return NULL; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailTextContent* CEmailAttachment::AsTextContentOrNull() const + { + return NULL; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAttachment* CEmailAttachment::AsAttachmentOrNull() const + { + const MEmailAttachment* ptr = this; + return const_cast( ptr ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +RFile CEmailAttachment::FileL() const + { + return iEmailMsgContent->Part().GetContentFileL(); + } + +// ----------------------------------------------------------------------------- +// +// -----------------------------------------------------------------------------/ +void CEmailAttachment::SetFileNameL( const TDesC& aFileName ) + { + iEmailMsgContent->Part().SetAttachmentNameL( aFileName ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailAttachment::FileNameL() const + { + return iEmailMsgContent->Part().AttachmentNameL(); + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailclientapiimpl.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailclientapiimpl.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,425 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailClientApi. +* +*/ + + + +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#include +#else +#include +#include +#endif // SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#include "emailclientapiimpl.h" +#include "emailapiutils.h" +#include "emailmailbox.h" +#include +#include "cfsmailplugin.h" +#include "cfsmailclient.h" +#include "emailclientapiimpldefs.h" +#include "emailmailboxcache.h" +#include "emailclientapi.hrh" + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +MEmailMailbox* CEmailClientApi::MailboxL( const TMailboxId& aId ) + { + UpdateMailboxInfoCacheL(); + CPluginData* pluginData = MailboxInfoCacheL().PluginDataL( aId ); + MEmailMailbox* mailbox = NULL; + if ( pluginData ) + { + mailbox = CEmailMailbox::NewL( *pluginData, aId ); + } + return mailbox; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMailbox* CEmailClientApi::MailboxL( const TPtrC& aAddress ) + { + MEmailMailbox* mailbox = NULL; + REmailMailboxIdArray mailboxes; + CleanupClosePushL( mailboxes ); + TInt count( GetMailboxIdsL( mailboxes ) ); + while ( count-- ) + { + const TMailboxId mailboxId = mailboxes[count]; + MEmailMailbox* refMailbox = MailboxL( mailboxId ); + if ( refMailbox ) + { + TPtrC address( refMailbox->AddressL()->Address() ); + if ( !address.Compare( aAddress ) ) + { + mailbox = refMailbox; // addresses match + count = 0; + } + else + { + refMailbox->Release(); + } + } + } + CleanupStack::PopAndDestroy( &mailboxes ); + // find mailbox or leave KErrNotFound + if ( !mailbox ) + { + User::Leave( KErrNotFound ); + } + return mailbox; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailClientApi::GetMailboxIdsL( + REmailMailboxIdArray& aMailboxes ) + { + UpdateMailboxInfoCacheL(); + + aMailboxes.Reset(); + CEmailMailboxCache& mbcache = MailboxInfoCacheL(); + mbcache.GetIdsL( aMailboxes ); + + const TInt mailboxesFound( aMailboxes.Count() ); + return mailboxesFound; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailClientApi::GetMailboxesL( RMailboxPtrArray& aMailboxes ) + { + REmailMailboxIdArray mailboxIdArray; + CleanupClosePushL( mailboxIdArray ); + + // GetMailboxIdsL loads plugin and keeps loaded if it contains at + // least one mailbox + TInt count = GetMailboxIdsL( mailboxIdArray ); + while ( count-- ) + { + // mailbox creation increases plugin ref count by one + MEmailMailbox* mailbox = MailboxL( mailboxIdArray[count] ); + CleanupReleasePushL( *mailbox ); + aMailboxes.AppendL( mailbox ); + CleanupStack::Pop( mailbox ); + } + // Created mailboxes still hold plugin references so we can decrease + // ref count. + ReleaseAllPlugins(); + + CleanupStack::PopAndDestroy( &mailboxIdArray ); + return aMailboxes.Count(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailClientApi::LaunchEmailL( const TLaunchPolicy /*aPolicy*/ ) + { + User::Leave(KErrNotSupported); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CPluginData* CEmailClientApi::TPluginIterator::Next() + { + CPluginData* item = NULL; + if ( iIndex < iArray.Count() ) + { + item = iArray[ iIndex++ ]; + } + return item; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailClientApi* CEmailClientApi::NewL() + { + CEmailClientApi* instance = static_cast( Dll::Tls() ); + + if ( !instance ) + { + instance = new ( ELeave ) CEmailClientApi(); + CleanupStack::PushL( instance ); + instance->ConstructL(); + User::LeaveIfError( Dll::SetTls( instance ) ); + CleanupStack::Pop( instance ); + } + + instance->iInstanceCounter++; + + return instance; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailClientApi::~CEmailClientApi() + { + // ensure this doesn't held plugin references + ReleaseAllPlugins(); + + // ResetAndDestroy doesn't work because ~CPluginData is private + TInt count( iPluginDataArray.Count() ); + while ( count-- ) + { + delete iPluginDataArray[count]; + } + iPluginDataArray.Close(); + iLoadedPluginsArray.Close(); + delete iMailboxCache; + + Dll::FreeTls(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailClientApi::CEmailClientApi() : iInstanceCounter( 0 ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailClientApi::CleanupImplInfoPushL( RPointerArray& aArray ) + { + TCleanupItem item( &CEmailClientApi::CleanupImplInfo, &aArray ); + CleanupStack::PushL( item ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailClientApi::CleanupImplInfo( TAny* aAny ) + { + RPointerArray* array = + reinterpret_cast*>( aAny ); + array->ResetAndDestroy(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailClientApi::ConstructL() + { + RPointerArray implInfoArray; + REComSession::ListImplementationsL( KFSMailPluginInterface, implInfoArray ); + CleanupImplInfoPushL( implInfoArray ); + TInt err = KErrNone; + TInt count( implInfoArray.Count() ); + // add implementation UIDs to plugin info array, no instantiation at this + // phase + while ( count-- ) + { + const CImplementationInformation* info = implInfoArray[count]; + CPluginData* pluginData = new ( ELeave ) CPluginData( info->ImplementationUid() ); + err = iPluginDataArray.Append( pluginData ); + if ( err != KErrNone ) + { + // failed to append, give up + delete pluginData; + count = 0; + } + } + iMailClient = CFSMailClient::NewL(); + CleanupStack::PopAndDestroy( &implInfoArray ); + User::LeaveIfError( err ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailClientApi::InterfaceId() const + { + return KEmailClientApiInterface; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailClientApi::Release() + { + if( this->iInstanceCounter == 1 ) + { + delete this; + } + else + { + this->iInstanceCounter--; + } + } + +// ----------------------------------------------------------------------------- +// Returns plugin instance from plugin data. If we already have "claimed" +// instance once, prevent increment of reference count +// ----------------------------------------------------------------------------- +CFSMailPlugin* CEmailClientApi::UsePlugin( CPluginData& aPluginData ) + { + // use 'data' as search key for IndexOfLoadedPluginData() + TPluginData data( aPluginData.Uid() ); + TPluginData* pluginDataPtr = &data; + // check if we have plugin already "in use". + const TInt index( IndexOfLoadedPluginData( data ) ); + if ( index == KErrNotFound ) + { // we don't have plugin instance so take it and add to loaded plugins + data.iPlugin = aPluginData.ClaimInstance(); + if ( data.iPlugin && iLoadedPluginsArray.Append( data ) != KErrNone ) + { + aPluginData.ReleaseInstance(); // failed to append, don't proceed.. + data.iPlugin = NULL; // but return null + } + } + else + { + // already in use, obtain plugin pointer from the array + pluginDataPtr = &iLoadedPluginsArray[index]; + } + return pluginDataPtr->iPlugin; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailClientApi::ReleasePlugin( CPluginData& aPluginData ) + { + // release plugin but only if it is not already claimed + TPluginData data( aPluginData.Uid() ); + const TInt index( IndexOfLoadedPluginData( data ) ); + if ( index != KErrNotFound ) + { + aPluginData.ReleaseInstance(); + iLoadedPluginsArray.Remove( index ); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailClientApi::ReleaseAllPlugins() + { + for ( TInt i = 0; i < iPluginDataArray.Count(); i++ ) + { + CPluginData* pdata = iPluginDataArray[i]; + ReleasePlugin( *pdata ); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMailboxCache& CEmailClientApi::MailboxInfoCacheL() + { + if ( !iMailboxCache) + { + iMailboxCache = CEmailMailboxCache::NewL(); + } + return *iMailboxCache; + } + +// ----------------------------------------------------------------------------- +// Lists all mailboxes in protocol plugins and adds them to cache. Plugins may +// not be loaded so loading is done. The plugin is kept in memory if it contains +// at least one mailbox to avoid loading again later as typical use case is +// creation of a mailbox object => the plugin is again needed +//( see ::GetMailboxesL which calls ReleaseAllPlugins() +// ----------------------------------------------------------------------------- +void CEmailClientApi::UpdateMailboxInfoCacheL() + { + CEmailMailboxCache& mbcache = MailboxInfoCacheL(); + if ( !mbcache.IsCached() ) + { + // cache update needed + mbcache.StartCachingPushL(); + TPluginIterator iter( iPluginDataArray ); + CPluginData* pluginData = iter.Next(); + while ( pluginData ) + { + TBool containsMailbox( EFalse ); + // loads plugin if needed + CFSMailPlugin* plugin = UsePlugin( *pluginData ); + if ( plugin ) + { + // if one plugin fails, it should not block other plugins + // ==> trap it + + TRAPD( err, containsMailbox = CachePluginMailboxesL( + *pluginData, + *plugin ) ); + if ( !containsMailbox || err ) + { + // plugins with no mailboxes (or failed to cache) is + // released (unloaded) to optimize RAM usage. + ReleasePlugin( *pluginData ); + } + } + else if ( pluginData->iPluginLoadError == KErrNoMemory ) + { + // don't continue if OOM + User::Leave( KErrNoMemory ); + } + pluginData = iter.Next(); + } + mbcache.EndCachingPop(); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TBool CEmailClientApi::CachePluginMailboxesL( CPluginData& aPluginData, CFSMailPlugin& aPlugin ) + { + TBool containsMailbox( EFalse ); + RArray pluginMailboxes; + CleanupClosePushL( pluginMailboxes ); + aPlugin.ListMailBoxesL( pluginMailboxes ); + TInt mailboxCount = pluginMailboxes.Count(); + while ( mailboxCount-- ) + { + const TFSMailMsgId& mailboxId = pluginMailboxes[mailboxCount]; + TMailboxId id( mailboxId.Id() ); + MailboxInfoCacheL().AddMailboxL( aPluginData, id ); + containsMailbox = ETrue; + } + CleanupStack::PopAndDestroy( &pluginMailboxes ); + return containsMailbox; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailClientApi::IndexOfLoadedPluginData( const TPluginData& aPluginData ) const + { + TIdentityRelation relation( CEmailClientApi::PluginDataEquals ); + return iLoadedPluginsArray.Find( aPluginData, relation ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TBool CEmailClientApi::PluginDataEquals( const TPluginData& a1, const TPluginData& a2 ) + { + return ( a1.iUid == a2.iUid ); + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailcontent.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailcontent.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,412 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailContent. +* +*/ + +#include + +#include "emailcontent.h" +#include "cfsmailclient.h" +#include "emailclientapi.hrh" +#include "emailapiutils.h" + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CEmailMessageContent* CEmailMessageContent::NewL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart ) + { + + CEmailMessageContent* self = new ( ELeave ) + CEmailMessageContent( aPluginData, aMsgContentId, aPart ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CFSMailMessagePart& CEmailMessageContent::Part() + { + return *iPart; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::SetPart( CFSMailMessagePart* aPart ) + { + iPart = aPart; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CPluginData& CEmailMessageContent::PluginData() + { + return iPluginData; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::ConstructL() + { + iPlugin = iPluginData.ClaimInstanceL(); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CEmailMessageContent::~CEmailMessageContent() + { + iPluginData.ReleaseInstance(); + delete iPart; + delete iBuf; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CEmailMessageContent::CEmailMessageContent( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart): + iPluginData( aPluginData ), + iPart( aPart ), + iMsgContentId( aMsgContentId ), + iBuf( NULL ), + iUsed( 0 ) + { + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TEmailTypeId CEmailMessageContent::InterfaceId() const + { + return KEmailIFUidMessageContent; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::Release() + { + delete this; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TMessageContentId CEmailMessageContent::Id() const + { + return iMsgContentId; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TPtrC CEmailMessageContent::ContentType() const + { + if (iPart) + { + return iPart->GetContentType(); + } + else + { + return TPtrC(0,0); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::SetContentType( const TDesC& aContentType ) + { + if (iPart) + iPart->SetContentType( aContentType ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TPtrC CEmailMessageContent::ContentId() const + { + if (iPart) + { + return iPart->ContentID(); + } + else + { + return TPtrC(0,0); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::SetContentId( const TDesC& aContentId ) + { + if (iPart) + TRAP_IGNORE( iPart->SetContentIDL( aContentId ) ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TPtrC CEmailMessageContent::ContentDescription() const + { + if (iPart) + { + return iPart->ContentDescription(); + } + else + { + return TPtrC(0,0); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::SetContentDescription( + const TDesC& aContentDescription ) + { + if (iPart) + iPart->SetContentDescription( aContentDescription ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TPtrC CEmailMessageContent::ContentDisposition() const + { + if (iPart) + { + return iPart->ContentDisposition(); + } + else + { + return TPtrC(0,0); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::SetContentDisposition( + const TDesC& aContentDisposition ) + { + if (iPart) + iPart->SetContentDisposition( aContentDisposition ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TPtrC CEmailMessageContent::ContentClass() const + { + if (iPart) + { + return iPart->GetContentClass(); + } + else + { + return TPtrC(0,0); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::SetContentClass( const TDesC& aContentClass ) + { + if (iPart) + iPart->SetContentClass( aContentClass ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TInt CEmailMessageContent::AvailableSize() const + { + if (iPart) + { + return iPart->FetchedContentSize(); + } + else + { + return 0; + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TInt CEmailMessageContent::TotalSize() const + { + if (iPart) + { + return iPart->ContentSize(); + } + else + { + return 0; + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TPtrC CEmailMessageContent::ContentL() const + { + TInt size = AvailableSize(); + TPtr16 ptr( 0, size ); + if ( size != 0 ) + { + if ( !iBuf ) + { + iBuf = HBufC::NewL( size ); + } + + if ( size > ptr.MaxLength() ) + { + iBuf = iBuf->ReAlloc( size ); + } + ptr.Set( iBuf->Des() ); + iPart->GetContentToBufferL( ptr, iUsed ); + iUsed += size; + } + return ptr; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::SetContentL( const TDesC& aContent ) + { + User::LeaveIfNull( iPart ); + iPart->SetContentSize( aContent.Length() ); + iPart->SetFetchedContentSize( aContent.Length() ); + iPlugin->SetContentL( aContent, + FsMsgId( iPluginData, iMsgContentId.iMessageId.iFolderId.iMailboxId ), + FsMsgId( iPluginData, iMsgContentId.iMessageId.iFolderId ), + FsMsgId( iPluginData, iMsgContentId.iMessageId ), + FsMsgId( iPluginData, iMsgContentId ) ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::FetchL( MEmailFetchObserver& aObserver ) + { + User::LeaveIfNull( iPart ); + const TFSMailMsgId fsId = FsMsgId(iPluginData, iMsgContentId); + if ( !iFetchObserver ) + { + iFetchObserver = new ( ELeave ) CContentRequestObserver( *this ); + } + iFetchObserver->SetObserverL( &aObserver ); + iRequestId = iPart->FetchMessagePartL( fsId, *iFetchObserver, TUint( 0 ) ); + + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::CancelFetch() + { + TRAP_IGNORE( iPlugin->CancelL( iRequestId ) ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::SaveToFileL( const TDesC& aPath ) + { + iPlugin->CopyMessagePartFileL( + FsMsgId( iPluginData, iMsgContentId.iMessageId.iFolderId.iMailboxId ), + FsMsgId( iPluginData, iMsgContentId.iMessageId.iFolderId ), + FsMsgId( iPluginData, iMsgContentId.iMessageId ), + FsMsgId( iPluginData, iMsgContentId ), + aPath ); + } + +/* Dummy implementations, not ever called */ +MEmailMultipart* CEmailMessageContent::AsMultipartOrNull() const + { + return NULL; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +MEmailTextContent* CEmailMessageContent::AsTextContentOrNull() const + { + return NULL; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +MEmailAttachment* CEmailMessageContent::AsAttachmentOrNull() const + { + return NULL; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CEmailMessageContent::CContentRequestObserver::CContentRequestObserver( + CEmailMessageContent& aParent ) : iObserver( NULL ), iParent( aParent ) + { + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::CContentRequestObserver::RequestResponseL( + TFSProgress aEvent, TInt /* aRequestId */ ) + { + if ( aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestComplete ) + { + delete iParent.iPart; + iParent.iPart = NULL; + CFSMailMessagePart *part = iParent.iPlugin->MessagePartL( + FsMsgId( iParent.iPluginData, iParent.iMsgContentId.iMessageId.iFolderId.iMailboxId ), + FsMsgId( iParent.iPluginData, iParent.iMsgContentId.iMessageId.iFolderId ), + FsMsgId( iParent.iPluginData, iParent.iMsgContentId.iMessageId ), + FsMsgId( iParent.iPluginData, iParent.iMsgContentId ) ); + iParent.SetPart( part ); + + if ( iObserver ) + iObserver->DataFetchedL( aEvent.iError ); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageContent::CContentRequestObserver::SetObserverL( MEmailFetchObserver* aObserver ) + { + iObserver = aObserver; + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailfolder.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailfolder.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,278 @@ +/* +* Copyright (c)2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailFolder. +* +*/ + +#include "emailfolder.h" +#include "emailmailbox.h" +#include "emailapiutils.h" +#include "messageiterator.h" +#include "emailsorting.h" +#include "cfsmailfolder.h" +#include "cfsmailplugin.h" +#include "emailclientapi.hrh" +#include "emailclientapiimpldefs.h" + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailFolder* CEmailFolder::NewLC( + CPluginData& aPluginData, + const TFolderId& aFolderId, + CFSMailFolder *aFolder ) + { + CEmailFolder* self = new ( ELeave ) + CEmailFolder( aPluginData, aFolderId, aFolder ); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailFolder* CEmailFolder::NewL( + CPluginData& aPluginData, + const TFolderId& aFolderId, + CFSMailFolder *aFolder ) + { + CEmailFolder* self = CEmailFolder::NewLC( aPluginData, aFolderId, aFolder); + CleanupStack::Pop( self ); + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailFolder::CEmailFolder( + CPluginData& aPluginData, + const TFolderId& aFolderId, + CFSMailFolder* aFolder) : + iPluginData( aPluginData ), + iFolderType( EOther ), + iFolderId( aFolderId ), + iFolder( aFolder ) + { + } + + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailFolder::ConstructL() + { + iPlugin = iPluginData.ClaimInstance(); + + User::LeaveIfNull( iFolder ); + + const TFSFolderType fsType = iFolder->GetFolderType(); + switch ( fsType ) + { + case EFSInbox: + iFolderType = EInbox; + break; + case EFSOutbox: + iFolderType = EOutbox; + break; + case EFSDraftsFolder: + iFolderType = EDrafts; + break; + case EFSSentFolder: + iFolderType = ESent; + break; + case EFSDeleted: + iFolderType = EDeleted; + break; + case EFSOther: + default: + iFolderType = EOther; + break; + } + iParentId = TFolderId( + iFolder->GetParentFolderId().Id(), + iFolderId.iMailboxId ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailFolder::~CEmailFolder() + { + iPluginData.ReleaseInstance(); + delete iFolder; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailFolder::InterfaceId() const + { + return KEmailIFUidFolder; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailFolder::Release() + { + delete this; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TFolderId CEmailFolder::FolderId() const + { + return iFolderId; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TFolderId CEmailFolder::ParentFolderId() const + { + return iParentId; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TFolderType CEmailFolder::FolderType() const + { + return iFolderType; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailFolder::Name() const + { + if ( !iFolder ) + return KNullDesC(); + return TPtrC ( iFolder->GetFolderName() ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailFolder::GetSubfoldersL( RFolderArray& aSubfolders ) const + { + User::LeaveIfNull( iFolder ); + + RPointerArray folders; + CleanupResetAndDestroy >::PushL( folders ); + + iFolder->GetSubFoldersL( folders ); + + TInt res( folders.Count() ); + + for ( TInt i = 0; i < res; i++ ) + { + const CFSMailFolder* fsfolder = folders[i]; + const TEntryId id = fsfolder->GetFolderId().Id(); + const TFolderId folderId( id, iFolderId.iMailboxId.iId ); + MEmailFolder* folder = CEmailFolder::NewL( iPluginData, folderId, folders[i] ); + aSubfolders.AppendL( folder ); + } + CleanupStack::Pop( &folders ); + folders.Close(); + return res; + } + +// ----------------------------------------------------------------------------- +// CEmailFolder::MessagesL +// ----------------------------------------------------------------------------- +MMessageIterator* CEmailFolder::MessagesL( + const RSortCriteriaArray& aCriteria ) + { + RArray sortCriterias; + CleanupClosePushL( sortCriterias ); + CEmailFolder::ToFsSortCriteriaL( aCriteria, sortCriterias ); + + MFSMailIterator* fsIter = iFolder->ListMessagesL( EFSMsgDataEnvelope, sortCriterias ); + TUint count = iFolder->GetMessageCount(); + + CleanupStack::PopAndDestroy( &sortCriterias ); + CMessageIterator* iter = CMessageIterator::NewL( + fsIter, iPluginData, count ); + + return iter; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailFolder::DeleteMessagesL( const REmailMessageIdArray& aMessageIds ) + { + RArray fsArray; + CleanupClosePushL( fsArray ); + const TInt count( aMessageIds.Count() ); + for ( TInt i = 0; i < count; i++ ) + { + TMessageId msgId = aMessageIds[i]; + if ( iFolderId != msgId.iFolderId ) + { + // not all messages in the same folder, plugin API doesn't accept this. + User::Leave( KErrArgument ); + } + fsArray.AppendL( FsMsgId( iPluginData, msgId ) ); + } + iPlugin->DeleteMessagesByUidL( + FsMsgId( iPluginData, iFolderId.iMailboxId ), + FsMsgId( iPluginData, iFolderId ), + fsArray ); + CleanupStack::PopAndDestroy( &fsArray ); + } + +// ----------------------------------------------------------------------------- +// Maps email api sort criteria to sort criteria type that protocol plugin +// accepts. +// ----------------------------------------------------------------------------- +void CEmailFolder::ToFsSortCriteriaL( + const RSortCriteriaArray& aSortCriteria, + RArray& aFsCriteria ) + { + const TFSMailSortField fieldValues[] = { + EFSMailDontCare, + EFSMailSortByDate, + EFSMailSortBySender, + EFSMailSortByRecipient, + EFSMailSortBySubject, + EFSMailSortByPriority, + EFSMailSortByFlagStatus, + EFSMailSortByUnread, + EFSMailSortBySize, + EFSMailSortByAttachment }; + + for ( TInt i=0; i < aSortCriteria.Count(); i++ ) + { + const TEmailSortCriteria& criteria = aSortCriteria[i]; + __ASSERT_ALWAYS( criteria.iField < sizeof( fieldValues ) / sizeof (fieldValues [i] ), + Panic( EMailPanicSortMapIndexOutOfBounds ) ); + TFSMailSortCriteria fsCriteria; + fsCriteria.iField = fieldValues[ criteria.iField ]; + if ( criteria.iAscending ) + { + fsCriteria.iOrder = EFSMailAscending; + } + else + { + fsCriteria.iOrder = EFSMailDescending; + } + aFsCriteria.AppendL( fsCriteria ); + } + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailinterfacefactoryimpl.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailinterfacefactoryimpl.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,216 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailInterfaceFactoryImpl. +* +*/ + +#include // RProperty +#include // RDesRead/WriteStream + +#include "emailinterfacefactoryimpl.h" +#include "emailcontent.h" +#include "cfsmailclient.h" +#include "emailclientapiimpldefs.h" +#include "emailclientapiimpl.h" +#include "emailaddress.h" +#include "emailmessagesearch.h" +#include "emailshutdownconst.h" + +_LIT( KEmailImplPanic, "Email client API" ); +const TInt KEmailUidExtraBuffer = 2 * KEmailPlatformApiUidItemSize; + +// --------------------------------------------------------------------------- +// Email client API panic wrapper +// --------------------------------------------------------------------------- +void Panic( TEmailImplPanic aPanic ) + { + User::Panic( KEmailImplPanic(), aPanic ); + } + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// CEmailInterfaceFactoryImpl::NewL +// --------------------------------------------------------------------------- +CEmailInterfaceFactoryImpl* CEmailInterfaceFactoryImpl::NewL() + { + CEmailInterfaceFactoryImpl* self = new (ELeave) CEmailInterfaceFactoryImpl(); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// CEmailInterfaceFactoryImpl::~CEmailInterfaceFactoryImpl +// --------------------------------------------------------------------------- +CEmailInterfaceFactoryImpl::~CEmailInterfaceFactoryImpl() + { + TRAP_IGNORE( AppendOrRemoveUidL( EEmailUidModeRemove ) ); + } + +// --------------------------------------------------------------------------- +// CEmailInterfaceFactoryImpl::CEmailInterfaceFactoryImpl +// --------------------------------------------------------------------------- +CEmailInterfaceFactoryImpl::CEmailInterfaceFactoryImpl() : + CEmailInterfaceFactory() + { + } + +// --------------------------------------------------------------------------- +// CEmailInterfaceFactoryImpl::ConstructL +// --------------------------------------------------------------------------- +void CEmailInterfaceFactoryImpl::ConstructL() + { + // This leaves if related P&S keys are not defined by EmailServerMonitor, + // so EmailServerMonitor need to be started before using client API. + // TRAP_IGNORE should be removed after EmailServerMonitor is added to + // starter list. + TRAP_IGNORE( AppendOrRemoveUidL( EEmailUidModeAppend ) ); + } + +// --------------------------------------------------------------------------- +// CEmailInterfaceFactoryImpl::InterfaceL +// --------------------------------------------------------------------------- +MEmailInterface* CEmailInterfaceFactoryImpl::InterfaceL( const TInt aInterfaceId ) + { + MEmailInterface* interface = NULL; + switch ( aInterfaceId ) + { + case KEmailClientApiInterface: + interface = CEmailClientApi::NewL(); + break; + case KEmailIFUidAddress: + interface = CEmailAddress::NewL( MEmailAddress::EUndefined, EClientOwns ); + break; + case KEmailIFUidTextContent: + default: + break; + } + if ( !interface ) + { + User::Leave( KErrNotSupported ); + } + return interface; + } + +// --------------------------------------------------------------------------- +// CEmailInterfaceFactoryImpl::AppendOrRemoveUidL +// --------------------------------------------------------------------------- +void CEmailInterfaceFactoryImpl::AppendOrRemoveUidL( + const TEmailUidAppendRemoveMode aMode ) + { + // Read buffer length + TInt bufLength( 0 ); + User::LeaveIfError( RProperty::Get( KEmailShutdownPsCategory, + EEmailPsKeyPlatformApiAppsToCloseLength, + bufLength ) ); + + // Allocate buffer for reading and then read the list of UIDs from P&S. + // Adding some extra buffer just in case the size key and actual list + // are out of sync. This shouldn't happen, but you never know. + HBufC8* readBuf = HBufC8::NewLC( bufLength + KEmailUidExtraBuffer ); + TPtr8 readPtr = readBuf->Des(); + + User::LeaveIfError( RProperty::Get( KEmailShutdownPsCategory, + EEmailPsKeyPlatformApiAppsToClose, + readPtr ) ); + + // For writing get the size of the original buffer + room for our own UID + // if needed + TInt writeBufSize = readPtr.Length(); + if( aMode == EEmailUidModeAppend ) + { + writeBufSize += KEmailPlatformApiUidItemSize; + } + + HBufC8* writeBuf = HBufC8::NewLC( writeBufSize ); + TPtr8 writePtr = writeBuf->Des(); + + // Read and write streams used to read/write the UIDs from/to descriptors + RDesReadStream readStream( readPtr ); + CleanupClosePushL( readStream ); + + RDesWriteStream writeStream( writePtr ); + CleanupClosePushL( writeStream ); + + // Get our own process UID + RProcess ownProcess; + TUid ownUid = ownProcess.SecureId(); + ownProcess.Close(); + + TInt itemsCount = readPtr.Length() / KEmailPlatformApiUidItemSize; + + TBool ownUidFound = EFalse; + TInt writeLength = 0; + for ( TInt ii = 0;ii < itemsCount; ++ii ) + { + // Read next UID from the stream + TUid item = TUid::Uid( readStream.ReadInt32L() ); + + // We can skip our own UID. If we are removing, then we don't want + // our UID to be written. If we are adding, we don't need to set + // the new values as our UID already exists in the list. + if( item == ownUid ) + { + ownUidFound = ETrue; + if( aMode == EEmailUidModeAppend ) + { + // Our own UID is already in the list, so no need to update + // the list. Hence we can quit here. + break; + } + } + else + { + writeStream.WriteInt32L( item.iUid ); + writeLength += KEmailPlatformApiUidItemSize; + } + } + + // If we are appending our UID and it wasn't found from the list, + // write it to the stream + if( aMode == EEmailUidModeAppend && !ownUidFound ) + { + writeStream.WriteInt32L( ownUid.iUid ); + writeLength += KEmailPlatformApiUidItemSize; + } + + // Set correct length for the write ptr buffer as it might not be + // updated correctly by the write stream + writePtr.SetLength( writeLength ); + + // Set new values to P&S only if something has changed, so either: + // 1) We are appending our UID and it didn't exist before + // 2) We are removing our UID and it did exist before + if( ( aMode == EEmailUidModeAppend && !ownUidFound ) || + ( aMode == EEmailUidModeRemove && ownUidFound ) ) + { + // Write first the UID list as it is more probable to fail, writing + // plain integer value shouldn't fail in any case. This way these + // values stay in sync also in case of error, as the list length + // gets updated only if the list itself is updated succesfully. + User::LeaveIfError( RProperty::Set( KEmailShutdownPsCategory, + EEmailPsKeyPlatformApiAppsToClose, + writePtr ) ); + + User::LeaveIfError( RProperty::Set( KEmailShutdownPsCategory, + EEmailPsKeyPlatformApiAppsToCloseLength, + writeLength ) ); + } + + CleanupStack::PopAndDestroy( 4, readBuf ); + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailmailbox.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailmailbox.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,662 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailMailbox. +* +*/ + +#include +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#include +#else +#include +#include +#endif // SYMBIAN_ENABLE_SPLIT_HEADERS + +#include +#include "emailmailbox.h" +#include "emailapiutils.h" +#include "emailaddress.h" +#include "emailfolder.h" +#include "emailmessage.h" +#include "emailmessagesearch.h" +#include "cfsmailclient.h" +#include "emailclientapiimpl.h" +#include "cfsmailplugin.h" +#include "cfsmailbox.h" +#include "cfsmailfolder.h" +#include "emailclientapi.hrh" + +#include +#include "email_services_api.h" + +// Constants + +#include + +_LIT( KNewLine, "\n" ); + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMailbox* CEmailMailbox::NewL( + CPluginData& aPluginData, + const TMailboxId& aMailboxId ) + { + CEmailMailbox* self = new ( ELeave ) CEmailMailbox( aPluginData, aMailboxId ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMailbox::CEmailMailbox( + CPluginData& aPluginData, + const TMailboxId& aMailboxId ) + : iPluginData( aPluginData ), + iMailboxId( aMailboxId.iId ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::ConstructL() + { + iPlugin = iPluginData.ClaimInstanceL(); + iEventMapper = new ( ELeave ) TObserverEventMapper( + iPlugin, iPluginData.Uid(), iMailboxId ); + iFsMailbox = iPlugin->GetMailBoxByUidL( FsMailboxId() ); + iSyncObserver = new ( ELeave ) CEmailMailbox::CEmailRequestObserver(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMailbox::~CEmailMailbox() + { + delete iFsMailbox; + delete iEventMapper; + delete iAddress; + iPluginData.ReleaseInstance(); + delete iSyncObserver; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailMailbox::InterfaceId() const + { + return KEmailIFUidMailbox; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::Release() + { + delete this; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TMailboxId CEmailMailbox::MailboxId() const + { + return iMailboxId; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAddress* CEmailMailbox::AddressL() const + { + if ( !iAddress ) + { + iAddress = CEmailAddress::NewL( + MEmailAddress::ESender, EAPIOwns ); + iAddress->SetDisplayNameL( iFsMailbox->GetName() ); + iAddress->SetAddressL( iFsMailbox->OwnMailAddress().GetEmailAddress() ); + } + return iAddress; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailMailbox::MailboxName() const + { + return iFsMailbox->GetName(); + } + +// ----------------------------------------------------------------------------- +// Constructs and returns type mailbox id of internal data type TFSMailMsgId +// ----------------------------------------------------------------------------- +TFSMailMsgId CEmailMailbox::FsMailboxId() const + { + return FsMsgId( iPluginData, iMailboxId ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailMailbox::GetFoldersL( RFolderArray& aFolders ) const + { + TFSMailMsgId rootId = TFSMailMsgId(); + RPointerArray folders; + CleanupResetAndDestroyPushL( folders ); + iPlugin->ListFoldersL( FsMailboxId(), rootId, folders ); + TInt res( folders.Count() ); + for ( TInt i = 0; i < res; i++ ) + { + const CFSMailFolder* fsfolder = folders[i]; + const TEntryId id = fsfolder->GetFolderId().Id(); + const TFolderId folderId( id, iMailboxId ); + CEmailFolder* folder = CEmailFolder::NewLC( iPluginData, folderId, folders[i] ); + aFolders.AppendL( folder ); + CleanupStack::Pop( folder ); + } + CleanupStack::Pop( &folders ); + folders.Close(); // close but don't delete folders because they are + // owned by CEmailFolder + return res; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailFolder* CEmailMailbox::FolderL( const TFolderId& aFolderId ) const + { + CFSMailFolder* fsFolder = iPlugin->GetFolderByUidL( + FsMsgId( iPluginData, iMailboxId ), + FsMsgId( iPluginData, aFolderId ) ); + CleanupStack::PushL( fsFolder ); + + CEmailFolder* folder = CEmailFolder::NewL( iPluginData, + aFolderId, fsFolder ); + CleanupStack::Pop( fsFolder ); + + return folder; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailFolder* CEmailMailbox::FolderByTypeL( + const TFolderType aFolderType ) const + { + TFSMailMsgId fsFolderId; + + switch ( aFolderType ) + { + case EInbox: + fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSInbox ); + break; + case EOutbox: + fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSOutbox ); + break; + case EDrafts: + fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDraftsFolder ); + break; + case EDeleted: + fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDeleted ); + break; + case ESent: + fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSSentFolder ); + break; + case EOther: + default: + User::Leave( KErrNotFound ); + break; + } + + const TFolderId folderId( fsFolderId.Id(), iMailboxId ); + + CFSMailFolder* fsFolder = iPlugin->GetFolderByUidL( + FsMsgId( iPluginData, iMailboxId ), + fsFolderId ); + CleanupStack::PushL( fsFolder ); + + CEmailFolder* folder = CEmailFolder::NewL( iPluginData, + folderId, + fsFolder ); + + CleanupStack::Pop( fsFolder ); + + return folder; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessage* CEmailMailbox::MessageL( const TMessageId& aMessageId ) + { + CFSMailMessage *fsMessage = iPlugin->GetMessageByUidL( + FsMsgId( iPluginData, aMessageId.iFolderId.iMailboxId ), + FsMsgId( iPluginData, aMessageId.iFolderId ), + FsMsgId( iPluginData, aMessageId ), + EFSMsgDataEnvelope ); + + CleanupStack::PushL( fsMessage ); + CEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); + CleanupStack::Pop( fsMessage ); + + return message; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessage* CEmailMailbox::CreateDraftMessageL() const + { + CFSMailMessage* fsMessage = iFsMailbox->CreateMessageToSend(); + User::LeaveIfNull( fsMessage ); + CleanupStack::PushL( fsMessage ); + MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); + CleanupStack::Pop( fsMessage ); + + return message; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessage* CEmailMailbox::CreateReplyMessageL( + const TMessageId& aMessageId, const TBool aReplyToAll ) const + { + CFSMailMessage* fsMessage = iFsMailbox->CreateReplyMessage( + FsMsgId( iPluginData, aMessageId ), aReplyToAll ); + User::LeaveIfNull( fsMessage ); + CleanupStack::PushL( fsMessage ); + MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); + CleanupStack::Pop( fsMessage ); + + return message; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessage* CEmailMailbox::CreateForwardMessageL( const TMessageId& aMessageId ) const + { + CFSMailMessage* fsMessage = iFsMailbox->CreateForwardMessage( + FsMsgId( iPluginData, aMessageId ), KNewLine() ); + User::LeaveIfNull( fsMessage ); + CleanupStack::PushL( fsMessage ); + MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); + CleanupStack::Pop( fsMessage ); + + return message; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::SynchroniseL( MMailboxSyncObserver& aObserver ) + { + iSyncObserver->SetObserverL( &aObserver ); + iRequestId = iFsMailbox->RefreshNowL( *iSyncObserver ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::CancelSynchronise() + { + iFsMailbox->CancelSearch(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::RegisterObserverL( MMailboxContentObserver& aObserver ) + { + iEventMapper->AddObserverL( aObserver ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::UnregisterObserver( MMailboxContentObserver& aObserver ) + { + iEventMapper->RemoveObserver( aObserver ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessageSearchAsync* CEmailMailbox::MessageSearchL() + { + MEmailMessageSearchAsync* searchAPI = + CEmailMessageSearchAsync::NewL( iPluginData, iMailboxId ); + return searchAPI; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::ShowInboxL() + { + User::Leave( KErrNotSupported ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::EditNewMessageL() + { + bool syncronous; + + XQServiceRequest request( emailInterfaceNameSend, + emailOperationSendMail, + syncronous ); + + QVariant returnValue; + if ( !request.send( returnValue ) ) + User::Leave( KErrGeneral ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMailbox::TObserverEventMapper::TObserverEventMapper( + CFSMailPlugin* aPlugin, + TUid aPluginUid, const TMailboxId& aMailboxId ) + : iPlugin( aPlugin ), + iFsMailboxId( aPluginUid.iUid, aMailboxId.iId ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMailbox::TObserverEventMapper::~TObserverEventMapper() + { + iClientObservers.Close(); + } + +// ----------------------------------------------------------------------------- +// Adds mailbox observer and subscribes to plugin mailbox events if there +// were no previous observers. +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::AddObserverL( + MMailboxContentObserver& aObserver ) + { + TIdentityRelation relation( + &CEmailMailbox::TObserverEventMapper::Equals ); + if ( iClientObservers.Find( &aObserver, relation ) == KErrNotFound ) + { + const TInt count( iClientObservers.Count() ); + if ( !count ) + { + iPlugin->SubscribeMailboxEventsL( iFsMailboxId, *this ); + } + iClientObservers.AppendL( &aObserver ); + } + } + +// ----------------------------------------------------------------------------- +// Removes an observer and removes event subscription if the observer was +// last in observer array. +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::RemoveObserver( + MMailboxContentObserver& aObserver ) + { + TIdentityRelation relation( + &CEmailMailbox::TObserverEventMapper::Equals ); + const TInt index( iClientObservers.Find( &aObserver, relation ) ); + if ( index != KErrNotFound ) + { + iClientObservers.Remove( index ); + const TInt count( iClientObservers.Count() ); + if ( !count ) + { + iPlugin->UnsubscribeMailboxEvents( iFsMailboxId, *this ); + } + } + } + +// ----------------------------------------------------------------------------- +// Maps protocol a plugin event to client event +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::EventL( + TFSMailEvent aEvent, + TFSMailMsgId aMailbox, + TAny* aParam1, + TAny* aParam2, + TAny* aParam3 ) + { + const TEventMapFunc KMailboxEventHandlers[] = { + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::IgnoreEventL, + &CEmailMailbox::TObserverEventMapper::NewMessageL, + &CEmailMailbox::TObserverEventMapper::MessageChangedL, + &CEmailMailbox::TObserverEventMapper::MessageDeletedL, + &CEmailMailbox::TObserverEventMapper::MessageMoved, + &CEmailMailbox::TObserverEventMapper::MessageCopiedL, + &CEmailMailbox::TObserverEventMapper::NewFolderL, + &CEmailMailbox::TObserverEventMapper::FolderChangeL, + &CEmailMailbox::TObserverEventMapper::FoldersDeletedL, + &CEmailMailbox::TObserverEventMapper::FoldersMovedL, + &CEmailMailbox::TObserverEventMapper::ExceptionL + }; + + TMailboxId id( aMailbox.Id() ); + // boundary check + const TInt index( aEvent ); + if ( index < sizeof( KMailboxEventHandlers ) / sizeof( KMailboxEventHandlers[ index ] ) ) + { + // call event handler function + TEventMapFunc method = KMailboxEventHandlers[ index ]; + (this->*method)(id, aParam1,aParam2,aParam3 ); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::ConvertParamsL( + TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, + REmailMessageIdArray& aMessageIds, TFolderId& aFolderId ) + { + RArray* newEntries( static_cast< RArray* >( aParam1 ) ); + CleanupClosePushL( *newEntries ); + TFSMailMsgId* parentFolder = static_cast( aParam2 ); + aFolderId = TFolderId( parentFolder->Id(), aMailbox ); + + for ( TInt j = 0; j < newEntries->Count(); j++ ) + { + TFSMailMsgId fsId(( *newEntries )[j] ); + TMessageId messageId( fsId.Id(), aFolderId.iId, aMailbox ); + aMessageIds.Append( messageId ); + } + + CleanupStack::PopAndDestroy( newEntries ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::IgnoreEventL( + TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::NewMessageL( + TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* /*aParam3*/ ) + { + REmailMessageIdArray messageIds; + TFolderId folderId; + ConvertParamsL( aMailbox, aParam1, aParam2, messageIds, folderId ); + CleanupClosePushL( messageIds ); + + for ( TInt i = 0; i < iClientObservers.Count(); i++ ) + { + MMailboxContentObserver* observer = iClientObservers[i]; + if (observer) + observer->NewMessageEventL( aMailbox, messageIds, folderId ); + } + + CleanupStack::PopAndDestroy( &messageIds ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::MessageChangedL( + TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* /*aParam3*/ ) + { + REmailMessageIdArray messageIds; + TFolderId folderId; + ConvertParamsL( aMailbox, aParam1, aParam2, messageIds, folderId ); + CleanupClosePushL( messageIds ); + + for ( TInt i = 0; i < iClientObservers.Count(); i++ ) + { + MMailboxContentObserver* observer = iClientObservers[i]; + if (observer) + observer->MessageChangedEventL( aMailbox, messageIds, folderId ); + } + CleanupStack::PopAndDestroy( &messageIds ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::MessageDeletedL( + TMailboxId aMailbox, TAny* aParam1, TAny* aParam2, TAny* /*aParam3*/ ) + { + REmailMessageIdArray messageIds; + TFolderId folderId; + ConvertParamsL( aMailbox, aParam1, aParam2, messageIds, folderId ); + CleanupClosePushL( messageIds ); + + for ( TInt i = 0; i < iClientObservers.Count(); i++ ) + { + MMailboxContentObserver* observer = iClientObservers[i]; + if (observer) + observer->MessageDeletedEventL( aMailbox, messageIds, folderId ); + } + + CleanupStack::PopAndDestroy( &messageIds ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::MessageMoved( + TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::MessageCopiedL( + TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::NewFolderL( + TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::FolderChangeL( + TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::FoldersDeletedL( + TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::FoldersMovedL( + TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::TObserverEventMapper::ExceptionL( + TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TBool CEmailMailbox::TObserverEventMapper::Equals( + const MMailboxContentObserver& a1, const MMailboxContentObserver& a2 ) + { + return ( &a1 == &a2 ); + } +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMailbox::CEmailRequestObserver::CEmailRequestObserver() : iObserver( NULL ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::CEmailRequestObserver::RequestResponseL( + TFSProgress aEvent, TInt /* aRequestId */ ) + { + if ( iObserver && aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestComplete ) + { + iObserver->MailboxSynchronisedL(aEvent.iError); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMailbox::CEmailRequestObserver::SetObserverL( MMailboxSyncObserver* aObserver ) + { + iObserver = aObserver; + } + +// End of file + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailmailboxcache.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailmailboxcache.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,194 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailMailboxCache. +* +*/ + +#include "emailmailboxcache.h" +#include "emailapiutils.h" + +static const TInt KCacheGranularity = 2; + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CEmailMailboxCache* CEmailMailboxCache::NewL() + { + CEmailMailboxCache* cache = new ( ELeave ) CEmailMailboxCache(); + return cache; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CEmailMailboxCache::~CEmailMailboxCache() + { + iEntries.Close(); + } + +// --------------------------------------------------------------------------- +// Start of cache transaction with clenanup support +// --------------------------------------------------------------------------- +void CEmailMailboxCache::StartCachingPushL() + { + TCleanupItem item( &CEmailMailboxCache::CleanupOp, this ); + CleanupStack::PushL( item ); + iState = ECaching; + iEntries.Reset(); + } + +// --------------------------------------------------------------------------- +// End of cache transaction +// --------------------------------------------------------------------------- +void CEmailMailboxCache::EndCachingPop() + { + iState = EComplete; + CleanupStack::Pop(); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TBool CEmailMailboxCache::IsCached() const + { + return iState == EComplete; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMailboxCache::AddMailboxL( + CPluginData& aPluginData, + const TMailboxId& aMailboxId ) + { + if ( iState != ECaching ) + { + User::Leave( KErrNotReady ); + } + if ( FindById( aMailboxId ) == KErrNotFound ) + { + TCacheEntry entry( &aPluginData, aMailboxId ); + iEntries.AppendL( entry ); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CPluginData* CEmailMailboxCache::PluginDataL( const TMailboxId& aMailboxId ) const + { + CPluginData* pdata = NULL; + const TInt index( FindById( aMailboxId ) ); + if ( index != KErrNotFound ) + { + const TCacheEntry& entry = iEntries[ index ]; + pdata = entry.iPluginData; + } + return pdata; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CPluginData* CEmailMailboxCache::PluginDataL( const TUid& aPluginId ) const + { + CPluginData* pdata = NULL; + const TInt index( FindByPluginIdL( aPluginId ) ); + if ( index != KErrNotFound ) + { + const TCacheEntry& entry = iEntries[ index ]; + pdata = entry.iPluginData; + } + return pdata; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMailboxCache::GetIdsL( REmailMailboxIdArray& aIdArray ) const + { + if ( iState != EComplete ) + { + // cache not up to date + User::Leave( KErrNotReady ); + } + for ( TInt i=0; i < iEntries.Count(); i++ ) + { + TMailboxId id = iEntries[i].iMailboxId; + aIdArray.AppendL( id ); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TInt CEmailMailboxCache::FindById( const TMailboxId& aMailboxId ) const + { + TIdentityRelation rel( CEmailMailboxCache::Equals ); + + // don't care about plugin data because this is seach key only and + // mailbox id is used for search + TCacheEntry entry( NULL, aMailboxId ); + return iEntries.Find( entry, rel ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TInt CEmailMailboxCache::FindByPluginIdL( const TUid& aPluginId ) const + { + TIdentityRelation rel( CEmailMailboxCache::PluginEquals ); + CPluginData* key = new ( ELeave ) CPluginData( aPluginId ); + TCacheEntry entry( key, TMailboxId() ); + TInt index = iEntries.Find( entry, rel ); + delete key; + return index; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TBool CEmailMailboxCache::Equals( const TCacheEntry& a1, const TCacheEntry& a2 ) + { + return ( a1.iMailboxId == a2.iMailboxId ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +TBool CEmailMailboxCache::PluginEquals( const TCacheEntry& a1, const TCacheEntry& a2 ) + { + return ( a1.iPluginData->Uid() == a2.iPluginData->Uid() ); + } + +// --------------------------------------------------------------------------- +// Cleanup +// --------------------------------------------------------------------------- +void CEmailMailboxCache::CleanupOp( TAny* aAny ) + { + CEmailMailboxCache* cache = reinterpret_cast( aAny ); + cache->iEntries.Reset(); + cache->iState = EEmpty; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +CEmailMailboxCache::CEmailMailboxCache() : + iState( EEmpty ), + iEntries( KCacheGranularity ) + { + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailmessage.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailmessage.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,912 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailMessage. +* +*/ + +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#include +#else +#include +#include +#endif // SYMBIAN_ENABLE_SPLIT_HEADERS + +#include "emailmessage.h" +#include "emailaddress.h" +#include "emailapiutils.h" +#include "emailclientapi.hrh" +#include "emailapiutils.h" +#include "emailinterfacefactoryimpl.h" +#include "emailcontent.h" +#include "emailtextcontent.h" +#include "emailmultipart.h" +#include "emailattachment.h" +#include "cfsmailplugin.h" +#include "cfsmailclient.h" + +#include +#include "email_services_api.h" + +const TInt KSendMessageRequestId = 100; + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMessage* CEmailMessage::NewL( CPluginData& aPluginData, + CFSMailMessage* aFsMessage, + const TDataOwner aOwner ) + { + CEmailMessage* message = new ( ELeave ) CEmailMessage( aPluginData, aFsMessage, aOwner ); + CleanupStack::PushL( message ); + message->ConstructL(); + CleanupStack::Pop( message ); + return message; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMessage::CEmailMessage( + CPluginData& aPluginData, + CFSMailMessage *aFsMessage, + const TDataOwner aOwner) + : iPluginData( aPluginData ), iPluginMessage( aFsMessage ), iOwner( aOwner ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::ConstructL() + { + User::LeaveIfNull( iPluginMessage ); + iPlugin = iPluginData.ClaimInstanceL(); + if ( iPluginMessage ) + { + iMessageId = TMessageId( + iPluginMessage->GetMessageId().Id(), + iPluginMessage->GetFolderId().Id(), + iPluginMessage->GetMailBoxId().Id() ); + + // Copy the message flags + InitializeFlagValues(); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMessage::~CEmailMessage() + { + delete iPluginMessage; + delete iSender; + delete iReplyTo; + delete iTextContent; + delete iContent; + iPluginData.ReleaseInstance(); + iAttachments.ResetAndDestroy(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailMessage::InterfaceId() const + { + return KEmailIFUidMessage; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::Release() + { + if ( iOwner == EClientOwns ) + { + delete this; + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +const TMessageId& CEmailMessage::MessageId() const + { + return iMessageId; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAddress* CEmailMessage::SenderAddressL() const + { + User::LeaveIfNull( iPluginMessage ); + + CFSMailAddress* fsAddress = iPluginMessage->GetSender(); + if ( fsAddress ) + { + if ( !iSender ) + { + iSender = CEmailAddress::NewL( MEmailAddress::ESender, EAPIOwns ); + } + iSender->SetAddressL(fsAddress->GetEmailAddress()); + iSender->SetDisplayNameL(fsAddress->GetDisplayName()); + } + else + { + // Sender address not defined. Delete client object as well + delete iSender; + iSender = NULL; + } + return iSender; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAddress* CEmailMessage::ReplyToAddressL() const + { + User::LeaveIfNull( iPluginMessage ); + + const CFSMailAddress& fsAddress = iPluginMessage->GetReplyToAddress(); + if ( &fsAddress ) + { + if ( !iReplyTo ) + { + iReplyTo = CEmailAddress::NewL( MEmailAddress::EReplyTo, EAPIOwns ); + } + iReplyTo->SetAddressL( fsAddress.GetEmailAddress() ); + iReplyTo->SetDisplayNameL( fsAddress.GetDisplayName() ); + } + else + { + delete iReplyTo; + iReplyTo = NULL; + } + return iReplyTo; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::SetReplyToAddressL( const MEmailAddress& aSender ) + { + User::LeaveIfNull( iPluginMessage ); + + CFSMailAddress *fsAddress = CFSMailAddress::NewLC(); + if ( !iReplyTo ) + { + iReplyTo = CEmailAddress::NewL( MEmailAddress::EReplyTo, EAPIOwns ); + } + fsAddress->SetDisplayName( aSender.DisplayName() ); + fsAddress->SetEmailAddress( aSender.Address() ); + iPluginMessage->SetReplyToAddress( fsAddress ); + iReplyTo->SetAddressL( fsAddress->GetEmailAddress() ); + iReplyTo->SetDisplayNameL( fsAddress->GetDisplayName() ); + CleanupStack::Pop(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailMessage::GetRecipientsL( const MEmailAddress::TRole aRole, + REmailAddressArray& aRecipients ) const + { + if( aRole == MEmailAddress::EReplyTo || + aRole == MEmailAddress::ESender ) + { + User::Leave( KErrArgument ); + } + else + { + User::LeaveIfNull( iPluginMessage ); + + if( aRole == MEmailAddress::ETo || + aRole == MEmailAddress::EUndefined ) + { + const RPointerArray& toRecipients = + iPluginMessage->GetToRecipients(); + ConvertAddressArrayL( + MEmailAddress::ETo, + toRecipients, aRecipients ); + } + if( aRole == MEmailAddress::ECc || + aRole == MEmailAddress::EUndefined ) + { + const RPointerArray& ccRecipients = + iPluginMessage->GetCCRecipients(); + ConvertAddressArrayL( + MEmailAddress::ECc, + ccRecipients, aRecipients ); + } + if( aRole == MEmailAddress::EBcc || + aRole == MEmailAddress::EUndefined ) + { + const RPointerArray& bccRecipients = + iPluginMessage->GetBCCRecipients(); + ConvertAddressArrayL( + MEmailAddress::EBcc, + bccRecipients, aRecipients ); + } + } + return aRecipients.Count(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::SetRecipientsL( const MEmailAddress::TRole aRole, + REmailAddressArray& aRecipients ) + { + TInt count( aRecipients.Count() ); + + for( TInt i=0;iSetEmailAddress( address->Address() ); + fsAddress->SetDisplayName( address->DisplayName() ); + + User::LeaveIfNull( iPluginMessage ); + + if( aRole == MEmailAddress::ETo ) + { + iPluginMessage->AppendToRecipient( fsAddress ); + } + else if( aRole == MEmailAddress::ECc ) + { + iPluginMessage->AppendCCRecipient( fsAddress ); + } + else if( aRole == MEmailAddress::EBcc ) + { + iPluginMessage->AppendBCCRecipient( fsAddress ); + } + else + { + User::Leave( KErrArgument ); + } + CleanupStack::Pop( fsAddress ); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::RemoveRecipientL( const MEmailAddress& /*aRecipient*/ ) + { + User::Leave( KErrNotSupported ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailMessage::Subject() const + { + if ( !iPluginMessage ) + return KNullDesC(); + return iPluginMessage->GetSubject(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::SetSubjectL( const TPtrC& aSubject ) + { + User::LeaveIfNull( iPluginMessage ); + iPluginMessage->SetSubject( aSubject ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TTime CEmailMessage::Date() const + { + TTime time; + + if ( iPluginMessage ) { + time = iPluginMessage->GetDate(); + } + + return time; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailMessage::Flags() const + { + return iFlags; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::SetFlag( const TUint aFlag ) + { + iFlags |= aFlag; + TUint flag = MapFlags( aFlag ); + if ( iPluginMessage ) + iPluginMessage->SetFlag( flag ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::ResetFlag( const TUint aFlag ) + { + iFlags &= ~aFlag; + TUint flag = MapFlags( aFlag ); + if ( iPluginMessage ) + iPluginMessage->ResetFlag( flag ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::InitializeFlagValues() + { + if ( !iPluginMessage ) + return; + // 1st reset member value, then start copying different flags + iFlags = 0; + + // EFlag_Read + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_Read ) ) + { + iFlags |= EFlag_Read; + } + else + { + iFlags &= ~EFlag_Read; + } + // EFlag_Read_Locally + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_Read_Locally ) ) + { + iFlags |= EFlag_Read_Locally; + } + else + { + iFlags &= ~EFlag_Read_Locally; + } + // EFlag_Low + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_Low ) ) + { + iFlags |= EFlag_Low; + } + else + { + iFlags &= ~EFlag_Low; + } + // EFlag_Important + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_Important ) ) + { + iFlags |= EFlag_Important; + } + else + { + iFlags &= ~EFlag_Important; + } + // EFlag_FollowUpComplete + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_FollowUpComplete ) ) + { + iFlags |= EFlag_FollowUpComplete; + } + else + { + iFlags &= ~EFlag_FollowUpComplete; + } + // EFlag_FollowUp + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_FollowUp ) ) + { + iFlags |= EFlag_FollowUp; + } + else + { + iFlags &= ~EFlag_FollowUp; + } + // EFlag_Attachments + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_Attachments ) ) + { + iFlags |= EFlag_Attachments; + } + else + { + iFlags &= ~EFlag_Attachments; + } + // EFlag_Multiple + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_Multiple ) ) + { + iFlags |= EFlag_Multiple; + } + else + { + iFlags &= ~EFlag_Multiple; + } + // EFlag_CalendarMsg + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_CalendarMsg ) ) + { + iFlags |= EFlag_CalendarMsg; + } + else + { + iFlags &= ~EFlag_CalendarMsg; + } + // EFlag_Answered + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_Answered ) ) + { + iFlags |= EFlag_Answered; + } + else + { + iFlags &= ~EFlag_Answered; + } + // EFlag_Forwarded + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_Forwarded ) ) + { + iFlags |= EFlag_Forwarded; + } + else + { + iFlags &= ~EFlag_Forwarded; + } + // EFlag_OnlyToMe + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_OnlyToMe ) ) + { + iFlags |= EFlag_OnlyToMe; + } + else + { + iFlags &= ~EFlag_OnlyToMe; + } + // EFlag_RemoteDeleted + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_RemoteDeleted ) ) + { + iFlags |= EFlag_RemoteDeleted; + } + else + { + iFlags &= ~EFlag_RemoteDeleted; + } + // EFlag_HasMsgSender + if ( iPluginMessage->IsFlagSet( EFSMsgFlag_HasMsgSender ) ) + { + iFlags |= EFlag_HasMsgSender; + } + else + { + iFlags &= ~EFlag_HasMsgSender; + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessageContent* CEmailMessage::ContentL() const + { + if ( iTextContent ) + { + return iTextContent; + } + if ( iContent ) + { + return iContent; + } + + User::LeaveIfNull( iPluginMessage ); + + RPointerArray parts; + CleanupResetAndDestroyPushL( parts ); + iPluginMessage->ChildPartsL( parts ); + TInt count( parts.Count() ); + if( count == 0 ) + { + /* No content, return NULL */ + CleanupStack::PopAndDestroy( &parts ); // in case heap allocated but not used + return NULL; + } + CFSMailMessagePart* part = parts[0]; + TContentType contentType( part->GetContentType() ); + TMessageContentId msgContentId = TMessageContentId( + part->GetPartId().Id(), + iMessageId.iId, + iMessageId.iFolderId.iId, + iMessageId.iFolderId.iMailboxId ); + + if ( contentType.Equals( KFSMailContentTypeTextPlain ) || + contentType.Equals( KFSMailContentTypeTextHtml ) ) + { + iTextContent = CEmailTextContent::NewL(iPluginData, msgContentId, part, EAPIOwns ); + parts[0] = NULL; // ownership of part transferred + } + else if ( contentType.Equals( KFSMailContentTypeMultipartMixed ) || + contentType.Equals( KFSMailContentTypeMultipartAlternative ) || + contentType.Equals( KFSMailContentTypeMultipartDigest ) || + contentType.Equals( KFSMailContentTypeMultipartRelated ) || + contentType.Equals( KFSMailContentTypeMultipartParallel ) ) + { + iContent = CEmailMultipart::NewL(iPluginData, msgContentId, part, EAPIOwns); + parts[0] = NULL; // ownership of part transferred + } + + CleanupStack::PopAndDestroy( &parts ); // parts + + if (iTextContent) + { + return iTextContent; + } + return iContent; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::SetContentL( const MEmailMessageContent* aContent ) + { + User::LeaveIfNull( aContent ); + MEmailTextContent* textContent = aContent->AsTextContentOrNull(); + if ( textContent ) + { + if ( iTextContent ) + { + delete iTextContent; // Destroy old content + } + iTextContent = dynamic_cast( textContent ); + if ( iTextContent ) + { + iTextContent->SetOwner( EAPIOwns ); + } + return; + } + MEmailMultipart* mPart = aContent->AsMultipartOrNull(); + if ( mPart ) + { + if ( iContent ) + { + delete iContent; + } + iContent = dynamic_cast( mPart ); + if ( iContent ) + { + iContent->SetOwner( EAPIOwns ); + } + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::SetPlainTextBodyL( const TDesC& aPlainText ) + { + if ( iTextContent ) + { + iTextContent->SetTextL( MEmailTextContent::EPlainText, aPlainText ); + return; + } + + User::LeaveIfNull( iPluginMessage ); + + CFSMailMessagePart* msgTextPart = iPluginMessage->PlainTextBodyPartL(); + + if( !msgTextPart ) + { + msgTextPart = iPluginMessage->NewChildPartL( TFSMailMsgId(), KFSMailContentTypeTextPlain ); + } + CleanupStack::PushL( msgTextPart ); + + TMessageContentId msgContentId = MessageContentId( msgTextPart->GetPartId().Id() ); + + msgTextPart->SetContentType( KFSMailContentTypeTextPlain ); + iTextContent = CEmailTextContent::NewL( iPluginData, msgContentId, msgTextPart, EAPIOwns ); + if (iTextContent) + { + iTextContent->SetTextL( MEmailTextContent::EPlainText, aPlainText ); + } + CleanupStack::Pop( msgTextPart ); + + return; + + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAttachment* CEmailMessage::AddAttachmentL( const TDesC& aFullPath ) + { + User::LeaveIfNull( iPluginMessage ); + + CFSMailMessagePart* part = iPluginMessage->AddNewAttachmentL( aFullPath, TFSMailMsgId() ); + CleanupStack::PushL( part ); + CEmailAttachment* att = CEmailAttachment::NewLC( iPluginData, iMsgContentId, part, EAPIOwns ); + iAttachments.AppendL( att ); + CleanupStack::Pop( 2, part ); + + return att; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAttachment* CEmailMessage::AddAttachmentL( RFile& aFile ) + { + User::LeaveIfNull( iPluginMessage ); + TBufC8 <1> mime; + CFSMailMessagePart* part = iPluginMessage->AddNewAttachmentL( aFile, mime ); + CleanupStack::PushL( part ); + CEmailAttachment* att = CEmailAttachment::NewLC( iPluginData, iMsgContentId, part, EAPIOwns ); + iAttachments.AppendL( att ); + + CleanupStack::Pop( 2, part ); + + return att; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailMessage::GetAttachmentsL( REmailAttachmentArray& aAttachments ) + { + User::LeaveIfNull( iPluginMessage ); + + RPointerArray attachments; + CleanupResetAndDestroyPushL( attachments ); + iPluginMessage->AttachmentListL( attachments ); + const TInt count( attachments.Count() ); + for (TInt i = 0; i < count; i++) + { + TMessageContentId msgContentId = MessageContentId( attachments[i]->GetPartId().Id() ); + + CEmailAttachment* att = CEmailAttachment::NewL( + iPluginData, msgContentId, attachments[i], EClientOwns ); + + aAttachments.AppendL( att ); + } + CleanupStack::Pop( &attachments ); + return count; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::RemoveAttachmentL( const MEmailAttachment& /*aAttachment*/ ) + { + User::Leave( KErrNotSupported ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +const TFolderId& CEmailMessage::ParentFolderId() const + { + return iMessageId.iFolderId; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::SaveChangesL() + { + User::LeaveIfNull( iPluginMessage ); + + TFSMailMsgId mailboxId( + FsMsgId( iPluginData, iMessageId.iFolderId.iMailboxId ) ); + + iPlugin->StoreMessageL( mailboxId, *iPluginMessage ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::SendL() + { + User::LeaveIfNull( iPluginMessage ); + + if ( iEventLoop.isRunning() ) + User::Leave( KErrInUse ); + + SaveChangesL(); + iError = KErrNone; + iPlugin->SendMessageL( *iPluginMessage, *this, KSendMessageRequestId ); + iEventLoop.exec(); + + User::LeaveIfError( iError ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::RequestResponseL( TFSProgress aEvent, TInt aRequestId ) + { + iError = aEvent.iError; + + if ( aRequestId == KSendMessageRequestId && + aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestComplete ) + iEventLoop.quit(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::ConvertAddressArrayL( + const MEmailAddress::TRole aRole, + const RPointerArray& aSrc, + REmailAddressArray& aDst ) const + { + for ( TInt i=0; iSetAddressL( temp1 ); + } + TDesC& temp2 = aFsAddress.GetDisplayName(); + if ( &temp2 ) + { + address->SetDisplayNameL( temp2 ); + } + return address; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TUint CEmailMessage::MapFlags( const TUint& aFlag ) + { + TUint flag = 0; + switch( aFlag ) + { + case EFlag_Read: + flag = EFSMsgFlag_Read; + break; + case EFlag_Read_Locally: + flag = EFSMsgFlag_Read_Locally; + break; + case EFlag_Low: + flag = EFSMsgFlag_Low; + break; + case EFlag_Important: + flag = EFSMsgFlag_Important; + break; + case EFlag_FollowUpComplete: + flag = EFSMsgFlag_FollowUpComplete; + break; + case EFlag_FollowUp: + flag = EFSMsgFlag_FollowUp; + break; + case EFlag_Attachments: + flag = EFSMsgFlag_Attachments; + break; + case EFlag_Multiple: + flag = EFSMsgFlag_Multiple; + break; + case EFlag_CalendarMsg: + flag = EFSMsgFlag_CalendarMsg; + break; + case EFlag_Answered: + flag = EFSMsgFlag_Answered; + break; + case EFlag_Forwarded: + flag = EFSMsgFlag_Forwarded; + break; + case EFlag_OnlyToMe: + flag = EFSMsgFlag_OnlyToMe; + break; + case EFlag_RemoteDeleted: + flag = EFSMsgFlag_RemoteDeleted; + break; + case EFlag_HasMsgSender: + flag = EFSMsgFlag_HasMsgSender; + break; + default: + break; + } + return flag; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::ShowMessageViewerL() + { + bool syncronous; + + XQServiceRequest request( + emailInterfaceNameMessage, + emailOperationViewMessage, + syncronous ); + + TFSMailMsgId mailboxId = FsMsgId( iPluginData, iMessageId.iFolderId.iMailboxId ); + TFSMailMsgId folderId = FsMsgId( iPluginData, iMessageId.iFolderId ); + TFSMailMsgId messageId = FsMsgId( iPluginData, iMessageId ); + + QList list; + list.append( mailboxId.Id() ); + list.append( folderId.Id() ); + list.append( messageId.Id() ); + request.setArguments( list ); + + QVariant returnValue; + if ( !request.send( returnValue ) ) + User::Leave( KErrGeneral ); + } + +// ----------------------------------------------------------------------------- +// Launches Email application and new reply message in editor. +// The method follows "fire and forget" pattern, returns immediately. +// ----------------------------------------------------------------------------- +void CEmailMessage::ReplyToMessageL( const TBool /*aReplyToAll*/ ) + { + User::Leave( KErrNotSupported ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessage::ForwardMessageL() + { + User::Leave( KErrNotSupported ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TMessageContentId CEmailMessage::MessageContentId( TEntryId aContentId ) const + { + TMessageContentId msgContentId = TMessageContentId( + aContentId, + iMessageId.iId, + iMessageId.iFolderId.iId, + iMessageId.iFolderId.iMailboxId ); + return msgContentId; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TContentType::TContentType( const TDesC& aContentType ) : iContentType( aContentType ) + { + _LIT( KSeparator, ";" ); + TInt end = aContentType.Find( KSeparator ); + if ( end != KErrNotFound ) + { + iContentType.Set( aContentType.Left( end ) ); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TBool TContentType::Equals( const TDesC& aContentType ) + { + TBool ret = iContentType.CompareF( aContentType ); + if ( ret == 0 ) + return ETrue; + else + return EFalse; + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailmessagesearch.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailmessagesearch.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,362 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailMessageSearchAsync +* +*/ + +#include +#include "emailmessagesearch.h" +#include "emailmessage.h" + +/** + * Global semaphore name. Semaphore blocks parallel service access. + */ +_LIT( KGlobalSemaphoreToPreventParallelCall, "12mymessaging.nokia.com34" ); + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// CEmailMessageSearchAsync::NewL +// --------------------------------------------------------------------------- +CEmailMessageSearchAsync* CEmailMessageSearchAsync::NewL( + CPluginData& aPluginData, + const TMailboxId& aMailboxId ) + { + CEmailMessageSearchAsync* self = + new ( ELeave ) CEmailMessageSearchAsync( aPluginData, aMailboxId ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +void CEmailMessageSearchAsync::ConstructL() + { + iPlugin = iPluginData.ClaimInstanceL(); + // Open existing semaphore, or create a new one + if ( KErrNone != iGate.OpenGlobal( KGlobalSemaphoreToPreventParallelCall, EOwnerProcess ) ) + { + User::LeaveIfError( + iGate.CreateGlobal( KGlobalSemaphoreToPreventParallelCall, 1, EOwnerProcess ) ); + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMessageSearchAsync::CEmailMessageSearchAsync( + CPluginData& aPluginData, + const TMailboxId& aMailboxId ) + : iPluginData( aPluginData ), iMailboxId( aMailboxId.iId ), + iCriteria(), iObserver( NULL ), iRemote( EFalse ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMessageSearchAsync::~CEmailMessageSearchAsync() + { + iSearchStrings.Close(); + iPluginData.ReleaseInstance(); + iGate.Close(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailMessageSearchAsync::InterfaceId() const + { + return KEmailIFUidSearch; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::Release() + { + if (KErrNone != iGate.Wait(1)) + { + this->Cancel(); + } + delete this; + } + +// ----------------------------------------------------------------------------- +// Sets sort order for search results. +// Leaves KErrNotReady if search is ongoing. +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::SetSortCriteriaL( const TEmailSortCriteria& aCriteria ) + { + IsSearchGoingOnL(); + + switch (aCriteria.iField) + { + case TEmailSortCriteria::EDontCare: + iCriteria.iField = EFSMailDontCare; + break; + + case TEmailSortCriteria::EByDate: + iCriteria.iField = EFSMailSortByDate; + break; + + case TEmailSortCriteria::EBySender: + iCriteria.iField = EFSMailSortBySender; + break; + + case TEmailSortCriteria::EByRecipient: + iCriteria.iField = EFSMailSortByRecipient; + break; + + case TEmailSortCriteria::EBySubject: + iCriteria.iField = EFSMailSortBySubject; + break; + + case TEmailSortCriteria::EByPriority: + iCriteria.iField = EFSMailSortByPriority; + break; + + case TEmailSortCriteria::EByFlagStatus: + iCriteria.iField = EFSMailSortByFlagStatus; + break; + + case TEmailSortCriteria::EByUnread: + iCriteria.iField = EFSMailSortByUnread; + break; + + case TEmailSortCriteria::EBySize: + iCriteria.iField = EFSMailSortBySize; + break; + + case TEmailSortCriteria::EByAttachment: + iCriteria.iField = EFSMailSortByAttachment; + break; + + default: + User::Leave( KErrNotSupported ); + break; + + } + if (aCriteria.iAscending) + { + iCriteria.iOrder = EFSMailAscending; + } + else + { + iCriteria.iOrder = EFSMailDescending; + } + // Release gate + iGate.Signal(); + } + +// ----------------------------------------------------------------------------- +// Adds a search key. Leaves KErrNotReady if search is ongoing. +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::AddSearchKeyL( const TDesC& aSearchKey ) + { + IsSearchGoingOnL(); + + iSearchStrings.AppendL(&aSearchKey); + // Release gate + iGate.Signal(); + } + +/// ----------------------------------------------------------------------------- +// Enables/disables search from remote email server. +// Leaves KErrNotReady if search is ongoing. +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::SetRemoteSearchL( TBool aRemote ) + { + IsSearchGoingOnL(); + + iRemote = aRemote; + // Release gate + iGate.Signal(); + // Currently plugins do not support this function + User::Leave( KErrNotSupported ); + } + +// ----------------------------------------------------------------------------- +// Indicates whether remote search is enabled. +// ----------------------------------------------------------------------------- +TBool CEmailMessageSearchAsync::IsRemoteSearch() const + { + // Currently plugins do not support this function + return EFalse; + } + +// ----------------------------------------------------------------------------- +// Starts search, all methods affecting search attribures leave +// KErrNotReady while search is ongoing. +// @param aObserver called when results are available. +// +void CEmailMessageSearchAsync::StartSearchL( MEmailSearchObserver& aObserver ) + { + IsSearchGoingOnL(); + + iObserver = &aObserver; + const TFSMailMsgId fsMailboxId( iPluginData.Uid(), iMailboxId.iId ); + RArray folderIds; + + /** Search API */ + + /** + * Asyncronous call for starting search for given string. Only one search can be + * performed at a time. + * + * + * This function will search for message's containing the given search string. + * The search will be performed on the all message fields: To, Cc, Bcc, subject, body. + * The search client will be notified of each found message, + * and upon completion of the search. Only one search can be performed at a time. + * + * To change the sort order in the search result, use the same search string in the + * but change the aSortCriteria parameter. The store "caches" the search + * results generated by the same search string. + * + * The function will leave with KErrInUse if a search is already in progress. + * + * /note Only works if the store is in an authenticated state, + * otherwise this function leaves with KErrNotReady + * + * @paran aMailBoxId id of the mailbox where messages are to be searched + * @param aFolderIds list of folders where messages are to be searched + * global or folder specific search depends on the size of array is 0 or not. + * @param aSearchStrings text strings that will be searched from different message fields. + * @param aSortCriteria sort criteria for the results + * @param aSearchObserver client observer that will be notified about search status. + * + */ + iPlugin->SearchL( fsMailboxId, + folderIds, + iSearchStrings, + iCriteria, + *this ); + // Gate is kept closed as search is asynchronous. Gate will be reopen after search is completed, i.e. + // CEmailMessageSearchAsync::SearchCompleted. + } + +// ----------------------------------------------------------------------------- +// Cancels search. +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::Cancel() + { + if (KErrNone != iGate.Wait(1)) + { + + /** + * Cancels current search. Does nothing if there is not any search. + * The search client will not be called back after this function is called. + * + */ + const TFSMailMsgId fsMailboxId( iPluginData.Uid(), iMailboxId.iId ); + iPlugin->CancelSearch( fsMailboxId ); + } + else + { + // Release gate + iGate.Signal(); + } + } + +// ----------------------------------------------------------------------------- +// * @return search status: +// * < 0 : Search has failed +// * KRequestPending : search is ongoing. note that status may be +// * KRequestPending after HandleResultL callback because results +// * may be given in chunks of results. Size of chunk depends on +// * implementation and may vary. +// * KErrNone : initial state, or search has finished +// ----------------------------------------------------------------------------- +TInt CEmailMessageSearchAsync::Status() const + { + if (KErrNone != iGate.Wait(1)) + { + // Search is going on + return KRequestPending; + } + else + { + // Release gate + iGate.Signal(); + } + + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// Resets all search attribures. Cancels search if ongoing. +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::Reset() + { + if ( KErrNone != iGate.Wait( 1 ) ) + { + this->Cancel(); + } + + iCriteria = TFSMailSortCriteria(); + iSearchStrings.Reset(); + + // Release gate + iGate.Signal(); + + }; + +// ----------------------------------------------------------------------------- +// Notifies the email search API client that a match has been found +// +// @param aMatchMessage contains a pointer to the matched message. +// Ownership is transfered to the observer. +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::MatchFoundL( CFSMailMessage* aMatchMessage ) +{ + User::LeaveIfNull( iObserver ); + CEmailMessage *result = CEmailMessage::NewL(iPluginData, aMatchMessage, EClientOwns ); + iObserver->HandleResultL( result ); +} + +// ----------------------------------------------------------------------------- +// Notifies the email search API client that the search has completed +// ----------------------------------------------------------------------------- + void CEmailMessageSearchAsync::SearchCompletedL() +{ + User::LeaveIfNull( iObserver ); + iObserver->SearchCompletedL(); + // Search is now complete, release gate. + iGate.Signal(); +} + +// ----------------------------------------------------------------------------- +// Asks client if search engine should change search priority +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::ClientRequiredSearchPriority(TInt* /*apRequiredSearchPriority*/) + { + } + +// ----------------------------------------------------------------------------- +// Function leaves if search is going on. Otherwise it doesn't do anything. +// ----------------------------------------------------------------------------- +void CEmailMessageSearchAsync::IsSearchGoingOnL() const + { + if ( KErrNone != iGate.Wait( 1 ) ) + { + // Leave now, search is going on + User::Leave( KErrNotReady ); + } + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailmultipart.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailmultipart.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,378 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailAttachment. +* +*/ + +#include "emailcontent.h" +#include "emailtextcontent.h" +#include "emailattachment.h" +#include "emailmultipart.h" +#include "emailmessage.h" +#include "emailclientapi.hrh" + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMultipart* CEmailMultipart::NewL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart, + const TDataOwner aOwner ) + { + CEmailMultipart* self = new ( ELeave ) CEmailMultipart( aOwner ); + CleanupStack::PushL( self ); + self->ConstructL( aPluginData, aMsgContentId, aPart ); + CleanupStack::Pop( self ); + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::ConstructL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart ) + { + iEmailMsgContent = CEmailMessageContent::NewL( aPluginData, aMsgContentId, aPart ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMultipart::~CEmailMultipart() + { + delete iEmailMsgContent; + iChildParts.Reset(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailMultipart::CEmailMultipart( const TDataOwner aOwner ) : iOwner( aOwner ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailMultipart::PartCountL() + { + iChildParts.Reset(); + RPointerArray childParts; + CleanupResetAndDestroyPushL( childParts ); + iEmailMsgContent->Part().ChildPartsL( childParts ); + iChildPartCount = childParts.Count(); + + for ( TInt i = 0; i < iChildPartCount; i++ ) + { + TFSMailMsgId id = childParts[i]->GetPartId(); + iChildParts.AppendL( id ); + } + CleanupStack::PopAndDestroy( &childParts ); + return iChildPartCount; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessageContent* CEmailMultipart::PartByIndexL( const TUint aIndex ) const + { + if ( aIndex >= iChildPartCount ) + { + User::Leave( KErrArgument ); + } + MEmailMessageContent* content = NULL; + TFSMailMsgId partId = iChildParts[aIndex]; + CFSMailMessagePart* copy = iEmailMsgContent->Part().ChildPartL( partId ); + if ( !copy ) + return content; + + TContentType contentType( copy->GetContentType() ); + TMessageContentId msgContentId = TMessageContentId( + copy->GetPartId().Id(), + Id().iMessageId.iId, + Id().iMessageId.iFolderId.iId, + Id().iMessageId.iFolderId.iMailboxId ); + + if ( contentType.Equals( KFSMailContentTypeTextPlain ) || + contentType.Equals( KFSMailContentTypeTextHtml ) ) + { + content = CEmailTextContent::NewL( + iEmailMsgContent->PluginData(), msgContentId, copy, EClientOwns ); + } + else if ( contentType.Equals( KFSMailContentTypeMultipartMixed ) || + contentType.Equals( KFSMailContentTypeMultipartAlternative ) || + contentType.Equals( KFSMailContentTypeMultipartDigest ) || + contentType.Equals( KFSMailContentTypeMultipartRelated ) || + contentType.Equals( KFSMailContentTypeMultipartParallel ) ) + { + content = CEmailMultipart::NewL( + iEmailMsgContent->PluginData(), msgContentId, copy, EClientOwns ); + } + else + { + content = CEmailAttachment::NewL( + iEmailMsgContent->PluginData(), msgContentId, copy, EClientOwns ); + } + return content; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::DeletePartL( const TUint aIndex ) + { + if ( aIndex >= iChildPartCount ) + { + User::Leave( KErrArgument ); + } + + TFSMailMsgId partId = iChildParts[aIndex]; + iEmailMsgContent->Part().RemoveChildPartL( partId ); + iChildParts.Remove( aIndex ); + iChildPartCount--; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::AddPartL( + const MEmailMessageContent& aPart, + const TUint aPos ) + { + if ( aPos > iChildPartCount ) + { + User::Leave( KErrArgument ); + } + + TFSMailMsgId insertBefore = TFSMailMsgId(); + if ( aPos < iChildPartCount ) + { + insertBefore = iChildParts[aPos]; + } + const TDesC& contentType = aPart.ContentType(); + + CFSMailMessagePart* newPart = + iEmailMsgContent->Part().NewChildPartL( insertBefore, contentType ); + CleanupStack::PushL( newPart ); + TFSMailMsgId newPartId = newPart->GetPartId(); + iChildParts.InsertL( newPartId, aPos ); + iChildPartCount = iChildParts.Count(); + CleanupStack::Pop( newPart ); + + + + return; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailMultipart::InterfaceId() const + { + return KEmailIFUidMultipart; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::Release() + { + if ( iOwner == EClientOwns ) + { + delete this; + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TMessageContentId CEmailMultipart::Id() const + { + return iEmailMsgContent->Id(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailMultipart::ContentType() const + { + return iEmailMsgContent->ContentType(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::SetContentType( const TDesC& aContentType ) + { + iEmailMsgContent->SetContentType( aContentType ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailMultipart::ContentId() const + { + return iEmailMsgContent->ContentId(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::SetContentId( const TDesC& aContentId ) + { + iEmailMsgContent->SetContentId( aContentId ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailMultipart::ContentDescription() const + { + return iEmailMsgContent->ContentDescription(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::SetContentDescription( const TDesC& aContentDescription ) + { + iEmailMsgContent->SetContentDescription( aContentDescription ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailMultipart::ContentDisposition() const + { + return iEmailMsgContent->ContentDisposition(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::SetContentDisposition( const TDesC& aContentDisposition ) + { + iEmailMsgContent->SetContentDisposition( aContentDisposition ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailMultipart::ContentClass() const + { + return iEmailMsgContent->ContentClass(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::SetContentClass( const TDesC& aContentClass ) + { + iEmailMsgContent->SetContentClass( aContentClass ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailMultipart::AvailableSize() const + { + return iEmailMsgContent->AvailableSize(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailMultipart::TotalSize() const + { + return iEmailMsgContent->TotalSize(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailMultipart::ContentL() const + { + User::Leave(KErrNotSupported); + return iEmailMsgContent->ContentL(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::SetContentL( const TDesC& aContent ) + { + iEmailMsgContent->SetContentL( aContent ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::FetchL( MEmailFetchObserver& aObserver ) + { + iEmailMsgContent->FetchL( aObserver ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::CancelFetch() + { + iEmailMsgContent->CancelFetch(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::SaveToFileL( const TDesC& aPath ) + { + iEmailMsgContent->SaveToFileL( aPath ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMultipart* CEmailMultipart::AsMultipartOrNull() const + { + const MEmailMultipart* ptr = this; + return const_cast( ptr ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailTextContent* CEmailMultipart::AsTextContentOrNull() const + { + return NULL; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAttachment* CEmailMultipart::AsAttachmentOrNull() const + { + return NULL; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailMultipart::SetOwner( const TDataOwner aOwner ) + { + iOwner = aOwner; + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/emailtextcontent.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/emailtextcontent.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,298 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CEmailAttachment. +* +*/ + +#include "emailcontent.h" +#include "emailtextcontent.h" +#include "emailmessage.h" +#include "emailclientapi.hrh" + +// CEmailTextContent + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailTextContent* CEmailTextContent::NewL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart, + const TDataOwner aOwner ) + { + CEmailTextContent* self = new ( ELeave ) CEmailTextContent( aOwner ); + CleanupStack::PushL( self ); + self->ConstructL( aPluginData, aMsgContentId, aPart ); + CleanupStack::Pop( self ); + return self; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::ConstructL( + CPluginData& aPluginData, + const TMessageContentId& aMsgContentId, + CFSMailMessagePart* aPart ) + { + iEmailMsgContent = CEmailMessageContent::NewL( aPluginData, aMsgContentId, aPart ); + TContentType contentType( aPart->GetContentType() ); + if ( contentType.Equals( KFSMailContentTypeTextHtml ) ) + { + iTextType = EHtmlText; + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailTextContent::~CEmailTextContent() + { + delete iEmailMsgContent; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CEmailTextContent::CEmailTextContent( TDataOwner aOwner ) : + iTextType( EPlainText ), + iOwner( aOwner ) + { + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CEmailTextContent::InterfaceId() const + { + return KEmailIFUidTextContent; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::Release() + { + if ( iOwner == EClientOwns ) + { + delete this; + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailTextContent::TTextType CEmailTextContent::TextType() const + { + return iTextType; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SetTextL( + const TTextType aPlainOrHtml, + const TDesC& aText ) + { + iTextType = aPlainOrHtml; + + if( aPlainOrHtml == EPlainText ) + { + SetContentType( KContentTypeTextPlain ); + } + else if( aPlainOrHtml == EHtmlText ) + { + SetContentType( KContentTypeTextHtml ); + } + SetContentL( aText ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TMessageContentId CEmailTextContent::Id() const + { + return iEmailMsgContent->Id(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailTextContent::ContentType() const + { + return iEmailMsgContent->ContentType(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SetContentType( const TDesC& aContentType ) + { + iEmailMsgContent->SetContentType( aContentType ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailTextContent::ContentId() const + { + return iEmailMsgContent->ContentId(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SetContentId( const TDesC& aContentId ) + { + iEmailMsgContent->SetContentId( aContentId ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailTextContent::ContentDescription() const + { + return iEmailMsgContent->ContentDescription(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SetContentDescription( const TDesC& aContentDescription ) + { + iEmailMsgContent->SetContentDescription( aContentDescription ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailTextContent::ContentDisposition() const + { + return iEmailMsgContent->ContentDisposition(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SetContentDisposition( const TDesC& aContentDisposition ) + { + iEmailMsgContent->SetContentDisposition( aContentDisposition ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailTextContent::ContentClass() const + { + return iEmailMsgContent->ContentClass(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SetContentClass( const TDesC& aContentClass ) + { + iEmailMsgContent->SetContentClass( aContentClass ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailTextContent::AvailableSize() const + { + return iEmailMsgContent->AvailableSize(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TInt CEmailTextContent::TotalSize() const + { + return iEmailMsgContent->TotalSize(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TPtrC CEmailTextContent::ContentL() const + { + return iEmailMsgContent->ContentL(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SetContentL( const TDesC& aContent ) + { + iEmailMsgContent->SetContentL( aContent ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::FetchL( MEmailFetchObserver& aObserver ) + { + iEmailMsgContent->FetchL( aObserver ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::CancelFetch() + { + iEmailMsgContent->CancelFetch(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SaveToFileL( const TDesC& aPath ) + { + iEmailMsgContent->SaveToFileL( aPath ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMultipart* CEmailTextContent::AsMultipartOrNull() const + { + return NULL; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailTextContent* CEmailTextContent::AsTextContentOrNull() const + { + const MEmailTextContent* ptr = this; + return const_cast(ptr); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailAttachment* CEmailTextContent::AsAttachmentOrNull() const + { + return NULL; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CEmailTextContent::SetOwner( const TDataOwner aOwner ) + { + iOwner = aOwner; + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/implproxy.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/implproxy.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ECom impementation proxy for Email client API +* +*/ + +#include "emailclientapiimpl.hrh" +#include "emailclientapiimpl.h" +#include "emailinterfacefactoryimpl.h" +#include //TImplementationProxy + +// ----------------------------------------------------------------------------- +// Defines the pairing required by the ECOM framework to correctly identify the +// instantiation method pointer for client's request. +// ----------------------------------------------------------------------------- +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY( + KEmailClientApiImplUid, + CEmailInterfaceFactoryImpl::NewL ) + }; + +// ----------------------------------------------------------------------------- +// Returns the TImplementationProxy for email client api implementation +// ----------------------------------------------------------------------------- +EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) + { + aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); + + return ImplementationTable; + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailclientapi/src/messageiterator.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/emailclientapi/src/messageiterator.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,319 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file implements class CMessageIterator. +* +*/ + +#include "emailmessage.h" +#include "messageiterator.h" +#include "emailapiutils.h" +#include "cfsmailplugin.h" +#include "emailapiutils.h" +#include "emailclientapi.hrh" +#include "mfsmailiterator.h" + +// number of messages in chunk to retrive from protocol plugin. Actual chunk +// size is one less because last element is used for reference to next chunk +// retrieval. See ReadNextChunkL() for details. +const TInt KMessageChunkSize = 5; + +const TInt KUndefined = -1; + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CMessageIterator* CMessageIterator::NewL( + MFSMailIterator* aIterator, + CPluginData& aPluginData, + TUint aCount ) + { + CMessageIterator* iter = new ( ELeave ) + CMessageIterator( aIterator, aPluginData, aCount ); + return iter; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CMessageIterator::~CMessageIterator() + { + iPluginData.ReleaseInstance(); + TInt count = iMessageArray.Count(); + iMessageArray.ResetAndDestroy(); + for ( TInt i = count; i < iFsMessageArray.Count(); i++ ) + { + delete iFsMessageArray[i]; + } + iFsMessageArray.Reset(); + delete iIterator; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TEmailTypeId CMessageIterator::InterfaceId() const + { + return KEmailIFUidMessageIterator; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CMessageIterator::Release() + { + delete this; + } + +// ----------------------------------------------------------------------------- +// Returns next message +// Messages are retrieved from protocol plugin in chunks of x messages and +// when NextL has be called for x times, next chunk is retrieved. This +// is trade-off between RAM consumption and speed. +// ----------------------------------------------------------------------------- +MEmailMessage* CMessageIterator::NextL() + { + if ( iCursor == KUndefined ) + { + // Buffer empty, read the first chunk + if ( !ReadNextChunkL() ) + { + // No messages found, + // Reset the cursor and return NULL + iCursor = KUndefined; + iStartMsgId = TFSMailMsgId(); + return NULL; + } + // Items found, return the first item in the buffer + iCursor = 0; + } + else + { + // Iterate to the next item + iCursor++; + } + return ReadFromChunkL(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessage* CMessageIterator::PreviousL() + { + if ( iCursor == KUndefined ) + { + iStartMsgId = TFSMailMsgId(); + // Buffer empty, client should first call NextL + return NULL; + } + // Iterate to the previous item + iCursor--; + return ReadFromChunkL(); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TBool CMessageIterator::ReadNextChunkL() + { + User::LeaveIfNull( iIterator ); + + TBool chunkFound = EFalse; + + // Delete previous items if exist + CleanCache(); + iHasMoreNextItems = iIterator->NextL( + iStartMsgId, + KMessageChunkSize, + iFsMessageArray ); + if ( iFsMessageArray.Count() > 0 ) + { + chunkFound = ETrue; + // Set the cursor to the first item + iCursor = 0; + iHasMorePrevItems = ETrue; + } + return chunkFound; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TBool CMessageIterator::ReadPreviousChunkL() + { + User::LeaveIfNull( iIterator ); + + TBool chunkFound = EFalse; + + // Delete previous items if exist + CleanCache(); + RPointerArray tmp; + iHasMorePrevItems = iIterator->PreviousL( + iStartMsgId, + KMessageChunkSize, + tmp ); + TInt count = tmp.Count(); + if ( count > 0 ) + { + // It seems that items have been found + // Set the cursor to the end of array + iCursor = count - 1; + iHasMoreNextItems = ETrue; + chunkFound = ETrue; + // Revise the order of the buffer. + // Create complete cache, so it is easier to iterate, + // as now we have to start from the end of cache + for ( TInt i = count; i > 0; i-- ) + { + CFSMailMessage* msg = tmp[i-1]; + iFsMessageArray.AppendL( msg ); + AddToCacheL( msg ); + } + } + + return chunkFound; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +MEmailMessage* CMessageIterator::ReadFromChunkL() + { + if ( iCursor >= KMessageChunkSize ) + { + if ( iHasMoreNextItems ) + { + iStartMsgId = iFsMessageArray[iCursor-1]->GetMessageId(); + if ( !ReadNextChunkL() ) + { + // No more items found, + // set the cursor to the previous item, + // and return NULL. + iCursor--; + return NULL; + } + } + else + { + // No more items found, + // set the cursor to the previous item, + // and return NULL. + iCursor--; + return NULL; + } + } + else if ( iCursor < 0 ) + { + iStartMsgId = iFsMessageArray[0]->GetMessageId(); + if ( iHasMorePrevItems ) + { + if ( !ReadPreviousChunkL() ) + { + // Buffer is empty now, client should call nextL, + // and start reading from the start of the buffer + iCursor = KUndefined; + return NULL; + } + } + else + { + // Buffer is empty now, client should call nextL, + // and start reading from the start of the buffer + iCursor = KUndefined; + return NULL; + } + } + + if ( iCursor < iFsMessageArray.Count() ) + { + /* There are items to read in the cache */ + if ( iCursor >= iMessageArray.Count() ) + { + AddToCacheL( iFsMessageArray[iCursor] ); + } + return iMessageArray[iCursor]; + } + else + { + // No more items found, + // set the cursor to the previous item, + // and return NULL. + iCursor--; + return NULL; + } + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CMessageIterator::AddToCacheL( CFSMailMessage* aFsMsg ) + { + CEmailMessage* message = CEmailMessage::NewL( iPluginData, aFsMsg, EAPIOwns ); + iMessageArray.AppendL( message ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CMessageIterator::CleanCache() + { + // This is strange loop indeed + // Both arrays has items that are deleted, iMessageArray has objects that point to iFsMessageArray + // Index in both arrays goes syncronously + // To prevent double destruction, first delete iMessageArray onjects and then the rest of the iFsMessageArray + TInt count = iMessageArray.Count(); + iMessageArray.ResetAndDestroy(); + for ( TInt i = count; i < iFsMessageArray.Count(); i++ ) + { + iFsMessageArray.Remove( count ); + } + iFsMessageArray.Reset(); + } +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +TUint CMessageIterator::Count() const + { + return iCount; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +void CMessageIterator::ConstructL() + { + iPlugin = iPluginData.ClaimInstanceL(); + + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +CMessageIterator::CMessageIterator( + MFSMailIterator* aIterator, + CPluginData& aPluginData, + TUint aCount ) : + iIterator( aIterator ), + iPluginData( aPluginData ), + iStartMsgId( TFSMailMsgId() ), + iState( EReadNextMessageChunk ), + iFsMessageArray( KMessageChunkSize ), + iCount( aCount ), + iCursor ( KUndefined ), + iFirstMsgId( TFSMailMsgId() ), + iHasMoreNextItems( ETrue ), + iHasMorePrevItems( ETrue ) + { + } + +// End of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emaildebug/inc/emailtrace.h --- a/emailservices/emaildebug/inc/emailtrace.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/emaildebug/inc/emailtrace.h Thu Jun 24 14:32:18 2010 +0300 @@ -18,47 +18,43 @@ #ifndef EMAILTRACE_H #define EMAILTRACE_H -#include -#include -#include - -/* - * The NM_TRACING_SYSTEM macro can be used to enable and disable the tracing - * system in debug mode. The tracing system can be disabled in a specific - * source file by defining the macro "NM_TRACING_SYSTEM 0" before this file - * is included. - */ -#ifndef NM_TRACING_SYSTEM -#define NM_TRACING_SYSTEM 1 -#endif +#include +#include +#include +#include /* * The macros NM_COMMENT_TRACES, NM_ERROR_TRACES, and NM_FUNCTION_TRACES * control which debug messages are printed. The trace logging is controlled - * with the NM_LOG_TO_FILE macro, whereas the NM_LOG_FILE macro defines which - * file is to be used in logging. The print_trace() helper function implements - * printing. If NM_LOG_TO_FILE is zero or the NM_LOG_FILE cannot be opened, - * the messages are printed to qDebug(). + * with the NM_LOG_TO_FILE macro, whereas the NM_LOG_DIRECTORY macro defines + * which directory is to be used to store the log files. The print_trace() + * helper function implements printing. Log files are named according to + * process and thread IDs. If NM_LOG_TO_FILE is zero or a log file cannot be + * opened, the messages are printed to qDebug(). The DSC2STR() function can + * be used to convert Symbian descriptors to QString objects. */ -#if NM_TRACING_SYSTEM && (defined(DEBUG) || defined(_DEBUG)) +#if defined(DEBUG) || defined(_DEBUG) -#define NM_COMMENT_TRACES 1 -#define NM_ERROR_TRACES 1 -#define NM_FUNCTION_TRACES 1 +#define NM_COMMENT_TRACES 0 +#define NM_ERROR_TRACES 0 +#define NM_FUNCTION_TRACES 0 #if NM_COMMENT_TRACES || NM_ERROR_TRACES || NM_FUNCTION_TRACES -#define NM_LOG_TO_FILE 0 -#define NM_LOG_FILE "c:/data/logs/nmail_trace.log" +#define NM_LOG_TO_FILE 1 +#define NM_LOG_DIRECTORY "c:/data/logs/" inline void print_trace(const QString& msg) { - static QFile file(NM_LOG_FILE); + static QFile file(NM_LOG_DIRECTORY+ + QString("nmail_p%1_t%2.log"). + arg(QCoreApplication::applicationPid()). + arg(QThread::currentThreadId())); if (NM_LOG_TO_FILE && !file.isOpen()) { file.open(QIODevice::Append | QIODevice::Text); } if (file.isWritable()) { - QDebug(&file).nospace() << "[Nmail] " << msg << '\n'; + QDebug(&file).nospace() << msg << '\n'; } else { qDebug().nospace() << "[Nmail] " << msg; } @@ -66,6 +62,16 @@ #endif +inline QString DSC2STR(const TDesC& dsc) +{ + return QString::fromRawData(reinterpret_cast(dsc.Ptr()), + dsc.Length()); +} + +#else + +#define DSC2STR(dsc) + #endif /* DEBUG */ /* @@ -142,7 +148,7 @@ #define ERROR_3(err,msg,arg1,arg2,arg3)\ do {\ QString __msg;\ - __msg.sprintf(msg,arg1,srg2,arg3);\ + __msg.sprintf(msg,arg1,arg2,arg3);\ NM_ERROR(err,__msg);\ } while(0) #define ERROR_GEN(msg) ERROR(KErrGeneral,msg) @@ -162,10 +168,12 @@ /* * The macro NM_FUNCTION, when used inside a function body, enables tracing - * for a function. ENTER and RETURN messages are printed when entering into + * for a function. If used, it should be placed on the first line of the + * function body. ENTER and RETURN messages are printed when entering into * and returning from a function, respectively. In case of an exception, - * UNWIND (for stack unwinding) is printed. The FUNC_LOG macro is provided - * for legacy compatibility. It is deprecated and should not be used. + * UNWIND (for stack unwinding) is printed instead of RETURN. The FUNC_LOG + * macro is provided for legacy compatibility. It is deprecated and should + * not be used. */ #if NM_FUNCTION_TRACES diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailframework/src/CFSMailClient.cpp --- a/emailservices/emailframework/src/CFSMailClient.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/emailframework/src/CFSMailClient.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -188,7 +188,7 @@ { NM_FUNCTION; - CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid(aFolderId); + CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid(aMailBoxId); if(plugin) { plugin->DeleteMessagesByUidL(aMailBoxId,aFolderId,aMessages); diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailstore/base_plugin/inc/BasePlugin.h --- a/emailservices/emailstore/base_plugin/inc/BasePlugin.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/emailstore/base_plugin/inc/BasePlugin.h Thu Jun 24 14:32:18 2010 +0300 @@ -50,6 +50,7 @@ class CMailboxInfo; class CSearchHandler; class HMailIterator; +class CDelayedOp; class CDelayedOpsManager; class MDelayedOpsManager; @@ -831,6 +832,7 @@ RPointerArray iObservers; //async fetch reqs. RPointerArray iReqs; + RPointerArray iDelayedOpReqs; TCacheLine iCacheLine; diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailstore/base_plugin/inc/baseplugindelayedops.h --- a/emailservices/emailstore/base_plugin/inc/baseplugindelayedops.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/emailstore/base_plugin/inc/baseplugindelayedops.h Thu Jun 24 14:32:18 2010 +0300 @@ -108,6 +108,10 @@ MDelayedOpsManager* iManager; //not owned CBasePlugin* iPlugin; //not owned +public: + TInt iRequestId; + MFSMailRequestObserver* iOperationObserver; + __LOG_DECLARATION }; diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailstore/base_plugin/inc/baseplugindelayedopsprivate.h --- a/emailservices/emailstore/base_plugin/inc/baseplugindelayedopsprivate.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/emailstore/base_plugin/inc/baseplugindelayedopsprivate.h Thu Jun 24 14:32:18 2010 +0300 @@ -231,8 +231,6 @@ TFSMailMsgId iMailBox; RPointerArray iMessages; RPointerArray iMessageParts; - MFSMailRequestObserver& iOperationObserver; - TInt iRequestId; TInt iType; // Data buffer for async operations HBufC8* iDataBuffer; @@ -273,8 +271,6 @@ private: CBasePlugin& iBasePlugin; TFSMailMsgId iMailBox; - MFSMailRequestObserver& iOperationObserver; - TInt iRequestId; __LOG_DECLARATION }; @@ -342,8 +338,6 @@ TFSMailMsgId iPartId; HBufC* iContentType; HBufC* iFilePath; - MFSMailRequestObserver& iOperationObserver; - TInt iRequestId; TInt iActionType; __LOG_DECLARATION }; diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailstore/base_plugin/src/BasePlugin.cpp --- a/emailservices/emailstore/base_plugin/src/BasePlugin.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/emailstore/base_plugin/src/BasePlugin.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -131,6 +131,8 @@ iReqs.ResetAndDestroy(); iReqs.Close(); + iDelayedOpReqs.ResetAndDestroy(); + iDelayedOpReqs.Close(); ResetCache(); __LOG_DESTRUCT @@ -800,6 +802,7 @@ CDelayedMessageToSendOp* delayedOp = CDelayedMessageToSendOp::NewLC( *this,aMailBoxId,aOperationObserver,aRequestId); iDelayedOpsManager->EnqueueOpL( delayedOp ); + iDelayedOpReqs.AppendL(delayedOp); CleanupStack::Pop( delayedOp ); } // diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailstore/base_plugin/src/baseplugindelayedops.cpp --- a/emailservices/emailstore/base_plugin/src/baseplugindelayedops.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/emailstore/base_plugin/src/baseplugindelayedops.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -613,10 +613,12 @@ MFSMailRequestObserver& aOperationObserver, const TInt aRequestId) : iMailBox( aMailBox ), - iOperationObserver( aOperationObserver ), - iRequestId( aRequestId ), iType(EHeaders) { + + CDelayedOp::iOperationObserver = &aOperationObserver ; + CDelayedOp::iRequestId = aRequestId ; + for(TInt i=0; i < messages.Count(); i++) { iMessages.Append(messages[i]); @@ -630,10 +632,12 @@ RPointerArray& aMessageParts, MFSMailRequestObserver& aOperationObserver, const TInt aRequestId) - :iOperationObserver( aOperationObserver ), - iRequestId( aRequestId ), - iType(EParts) + :iType(EParts) { + + CDelayedOp::iOperationObserver = &aOperationObserver ; + CDelayedOp::iRequestId = aRequestId ; + for(TInt i=0; i < aMessageParts.Count(); i++) { iMessageParts.Append(aMessageParts[i]); @@ -704,8 +708,12 @@ progress.iError = KErrNone; progress.iProgressStatus = TFSProgress::EFSStatus_RequestComplete; } - - iOperationObserver.RequestResponseL( progress, iRequestId ); + + if(iOperationObserver) + { + iOperationObserver->RequestResponseL( progress, iRequestId ); + } + __LOG_EXIT; } @@ -714,35 +722,39 @@ /** * */ -void CDelayedMessageStorerOp::StorePartL( - CFSMailMessagePart* aPart) +void CDelayedMessageStorerOp::StorePartL(CFSMailMessagePart* aPart) { User::LeaveIfNull(aPart); - + // Text buffer for html text content HBufC* data16 = aPart->GetLocalTextContentLC(); - TPtrC8 ptr8(reinterpret_cast( data16->Ptr() ), - data16->Size() ); - + // Convert from 16 to 8 bit data - + HBufC8* dataBuffer = HBufC8::NewLC((data16->Length() * 2) + 1); + TPtr8 ptr8(dataBuffer->Des()); + CnvUtfConverter::ConvertFromUnicodeToUtf8(ptr8, *data16); + //get msgstore part - CMailboxInfo& mailBox = GetPlugin().GetMailboxInfoL( aPart->GetMailBoxId().Id() ); - + CMailboxInfo& mailBox = GetPlugin().GetMailboxInfoL( + aPart->GetMailBoxId().Id()); + CMsgStoreMessage* msg = mailBox().FetchMessageL( - aPart->GetMessageId().Id(), KMsgStoreInvalidId ); - CleanupStack::PushL( msg ); - - CMsgStoreMessagePart* part= msg->ChildPartL( aPart->GetPartId().Id(), ETrue ); - - CleanupStack::PopAndDestroy( msg ); - CleanupStack::PushL( part ); + aPart->GetMessageId().Id(), KMsgStoreInvalidId); + CleanupStack::PushL(msg); + + CMsgStoreMessagePart* part = msg->ChildPartL(aPart->GetPartId().Id(), + ETrue); + + CleanupStack::PopAndDestroy(msg); + CleanupStack::PushL(part); //replace content part->ReplaceContentL(ptr8); - - CleanupStack::PopAndDestroy( part ); - CleanupStack::PopAndDestroy( data16 ); - + + CleanupStack::PopAndDestroy(part); + CleanupStack::PopAndDestroy(dataBuffer); + CleanupStack::PopAndDestroy(data16); + } @@ -794,10 +806,11 @@ MFSMailRequestObserver& aOperationObserver, const TInt aRequestId) : iBasePlugin(aPlugin), - iMailBox( aMailBox ), - iOperationObserver( aOperationObserver ), - iRequestId( aRequestId ) + iMailBox( aMailBox ) { + + CDelayedOp::iOperationObserver = &aOperationObserver ; + CDelayedOp::iRequestId = aRequestId ; } @@ -821,7 +834,10 @@ progress.iProgressStatus = TFSProgress::EFSStatus_RequestComplete; } - iOperationObserver.RequestResponseL( progress, iRequestId ); + if(iOperationObserver) + { + iOperationObserver->RequestResponseL( progress, iRequestId ); + } __LOG_EXIT; } @@ -885,10 +901,10 @@ iParentFolderId( aParentFolderId ), iMessageId( aMessageId ), iParentPartId( aParentPartId ), - iOperationObserver( aOperationObserver ), - iRequestId( aRequestId ), iActionType( AddNewChild) { + CDelayedOp::iOperationObserver = &aOperationObserver ; + CDelayedOp::iRequestId = aRequestId ; } /** @@ -907,10 +923,10 @@ iMessageId( aMessageId ), iParentPartId( aParentPartId ), iPartId( aPartId ), - iOperationObserver( aOperationObserver ), - iRequestId( aRequestId ), iActionType( RemoveChild) { + CDelayedOp::iOperationObserver = &aOperationObserver ; + CDelayedOp::iRequestId = aRequestId ; } /** @@ -978,7 +994,10 @@ progress.iProgressStatus = TFSProgress::EFSStatus_RequestComplete; } - iOperationObserver.RequestResponseL( progress, iRequestId ); + if(iOperationObserver) + { + iOperationObserver->RequestResponseL( progress, iRequestId ); + } __LOG_EXIT; } diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/emailstore/base_plugin/src/basepluginmisc.cpp --- a/emailservices/emailstore/base_plugin/src/basepluginmisc.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/emailstore/base_plugin/src/basepluginmisc.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -384,6 +384,23 @@ break; } } + count = iDelayedOpReqs.Count(); + for ( TInt i = 0; i < count; i++ ) + { + if ( iDelayedOpReqs[i]->iRequestId == aRequestId ) + { + CDelayedOp* request = iDelayedOpReqs[i]; + TFSProgress progress = TFSProgress(); + progress.iProgressStatus = TFSProgress::EFSStatus_RequestCancelled; + progress.iCounter = progress.iMaxCount = 1; + progress.iError = KErrNone; + request->iOperationObserver->RequestResponseL( progress, aRequestId ); + iDelayedOpsManager->DequeueOp(*request); + iDelayedOpReqs.Remove( i ); + delete request; + break; + } + } } diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmailagent/nmailagent.pro --- a/emailservices/nmailagent/nmailagent.pro Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/nmailagent/nmailagent.pro Thu Jun 24 14:32:18 2010 +0300 @@ -51,13 +51,14 @@ "conf/2002C326.txt /epoc32/release/winscw/urel/z/private/10202BE9/2002C326.txt" \ "conf/2002C326.txt /epoc32/data/z/private/10202BE9/2002C326.txt" + RSS_RULES += "hidden = KAppIsHidden;" TARGET.EPOCHEAPSIZE = 0x1000 0x100000 // MAX 1MB LIBS += -ldomaincli LIBS += -lxqservice LIBS += -lxqsettingsmanager - #LIBS += -lxqsystemtoneservice + LIBS += -lxqsystemtoneservice LIBS += -lhwrmvibraclient TARGET.UID2 = 0x100039CE diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmailagent/src/nmmailagent.cpp --- a/emailservices/nmailagent/src/nmmailagent.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/nmailagent/src/nmmailagent.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -31,7 +31,7 @@ const int NmAgentIndicatorNotSet = -1; const int NmAgentAlertToneTimer = 60000; // 60s const int NmAgentDefaultVibraDuration = 1000; // 1 second -static const quint32 NmRepositoryId = 0x2002C326; +static const quint32 NmRepositoryId = 0x2002C326; static const QString NmMailboxIndicatorType = "com.nokia.nmail.indicatorplugin_%1/1.0"; static const QString NmSendIndicatorName = "com.nokia.nmail.indicatorplugin.send/1.0"; static const QString NmUnreadIndicatorName = "com.nokia.nmail.indicatorplugin.unread/1.0"; @@ -99,8 +99,8 @@ return false; } - //mSystemTone = new XQSystemToneService(); - + mSystemTone = new XQSystemToneService(); + mIndicator = new HbIndicator(); connect(mIndicator,SIGNAL(userActivated(const QString &, const QVariantMap&)), this, SLOT(indicatorActivated(const QString&, const QVariantMap&))); @@ -144,11 +144,10 @@ NM_FUNCTION; delete mVibra; - //delete mSystemTone; + delete mSystemTone; qDeleteAll(mMailboxes); - //delete mSystemTone; NmDataPluginFactory::releaseInstance(mPluginFactory); } @@ -332,10 +331,10 @@ bool changed = false; if (mailboxInfo->mActive != active || refreshAlways) { - + // store the new state to permanent storage storeMailboxActive(mailboxId, active); - + mailboxInfo->mActive = active; changed = true; if (active) { @@ -428,17 +427,20 @@ { NM_FUNCTION; + bool ok(false); XQApplicationManager appManager; XQAiwRequest *request = appManager.create( XQI_EMAIL_INBOX_VIEW, XQOP_EMAIL_INBOX_VIEW, false); - - QList list; - list.append(QVariant(mailboxId)); - request->setArguments(list); - - bool ok = request->send(); - NM_COMMENT(QString("Launch ok=%1 error=%2").arg(ok).arg(request->lastError())); - delete request; + // Instance might be NULL if the service is not available. + if (request) { + QList list; + list.append(QVariant(mailboxId)); + request->setArguments(list); + + ok = request->send(); + NM_COMMENT(QString("Launch ok=%1 error=%2").arg(ok).arg(request->lastError())); + delete request; + } return ok; } @@ -479,7 +481,7 @@ case NmMailboxCreated: foreach (NmId mailboxId, mailboxIds) { getMailboxInfo(mailboxId); // create a new mailbox if needed - + // make sure the mailbox activity data is reseted deleteStoredMailboxActivity(mailboxId); } @@ -511,7 +513,7 @@ foreach (NmId mailboxId, mailboxIds) { // Will hide also the indicator removeMailboxInfo(mailboxId); - + // make sure the mailbox activity data is deleted deleteStoredMailboxActivity(mailboxId); } @@ -551,7 +553,7 @@ { NM_FUNCTION; Q_UNUSED(data); - + // map the indicator type to mailbox NmMailboxInfo *info = getMailboxByType(type); if (info) { @@ -583,45 +585,44 @@ switch (event) { case NmMessageCreated: { + // Check the new messages to make the indicator appear earlier NmMailboxInfo *mailboxInfo = getMailboxInfo(mailboxId); + + // Inbox folder ID may be still unknown + if (mailboxInfo->mInboxFolderId.id() == 0) { + NmDataPluginInterface *plugin = + mPluginFactory->interfaceInstance(mailboxId); - // Check the new messages to make the indicator appear earlier - if (mailboxInfo->mSyncState == Synchronizing) { - - // Inbox folder ID may be still unknown - if (mailboxInfo->mInboxFolderId.id()==0) { - NmDataPluginInterface *plugin = mPluginFactory->interfaceInstance(mailboxId); - if (plugin) { - mailboxInfo->mInboxFolderId = - plugin->getStandardFolderId(mailboxId, NmFolderInbox); - } + if (plugin) { + mailboxInfo->mInboxFolderId = + plugin->getStandardFolderId(mailboxId, NmFolderInbox); } - - if (folderId == mailboxInfo->mInboxFolderId) { - foreach (NmId messageId, messageIds) { - bool messageUnread = false; + } + + if (folderId == mailboxInfo->mInboxFolderId) { + foreach (NmId messageId, messageIds) { + bool messageUnread = false; - // Check the message if we can either play a tone or if the "@" is - // not visible at the moment - if (mAlertToneAllowed || !mUnreadIndicatorActive) { - if (getMessageUnreadInfo(folderId, messageId, mailboxId, messageUnread)) { - if (messageUnread) { - mailboxInfo->mUnreadMailIdList.append(messageId); - mailboxInfo->mInboxActive = true; - updateMailboxState(mailboxId, true, false); + // Check the message if we can either play a tone or if the "@" is + // not visible at the moment + if (mAlertToneAllowed || !mUnreadIndicatorActive) { + if (getMessageUnreadInfo(folderId, messageId, mailboxId, messageUnread)) { + if (messageUnread) { + mailboxInfo->mUnreadMailIdList.append(messageId); + mailboxInfo->mInboxActive = true; + updateMailboxState(mailboxId, true, false); - // make the "@" appear immediatelly - updateUnreadIndicator(true); + // make the "@" appear immediatelly + updateUnreadIndicator(true); - // Play the tone as well - playAlertTone(); - } + // Play the tone as well + playAlertTone(); } } } } } - + if (folderId==mailboxInfo->mInboxFolderId) { mailboxInfo->mInboxCreatedMessages += messageIds.count(); } @@ -635,7 +636,7 @@ // Always activate the indicator activate = true; updateNeeded = true; - + mailboxInfo->mOutboxMails += messageIds.count(); updateSendIndicator(); } @@ -681,13 +682,21 @@ // The last mail was now deleted if (mailboxInfo->mOutboxMails == 0) { NM_COMMENT("NmMailAgent: last mail deleted from outbox"); - // Keep it active if there is unread mails and inbox is still active - if (mailboxInfo->mInboxActive && + updateNeeded = true; + + // Keep it active if there is unread mails and inbox is still active + if (mailboxInfo->mInboxActive && mailboxInfo->mUnreadMailIdList.count() > 0) { activate = true; - } - updateNeeded = true; - } + } + } + else { + // Also update the indicator status if it is already shown + if (mailboxInfo->mActive) { + activate = true; + updateNeeded = true; + } + } updateSendIndicator(); } break; @@ -913,13 +922,15 @@ bool played = false; if (mAlertToneAllowed) { - //mSystemTone->playTone(XQSystemToneService::EmailAlertTone); - + if (mSystemTone) { + mSystemTone->playTone(XQSystemToneService::EmailAlertTone); + } + // Execute the vibra effect. if (mVibra) { TRAP_IGNORE(mVibra->StartVibraL(NmAgentDefaultVibraDuration)); } - + // play alert only once per minute mAlertToneAllowed = false; QTimer::singleShot(NmAgentAlertToneTimer, this, SLOT(enableAlertTone())); @@ -973,7 +984,7 @@ XQCentralRepositorySettingsKey key(NmRepositoryId, mailboxId.id()); XQSettingsManager mgr; XQCentralRepositoryUtils utils(mgr); - + if (active) { // when mailbox is active, key can be deleted utils.deleteKey(key); @@ -984,7 +995,7 @@ } /*! - Get the mailbox activity state. + Get the mailbox activity state. \param mailboxId id of the mailbox \return true if the mailbox is active or no information was stored earlier */ diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/bwins/nmailclientapiu.def --- a/emailservices/nmclientapi/bwins/nmailclientapiu.def Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/nmclientapi/bwins/nmailclientapiu.def Thu Jun 24 14:32:18 2010 +0300 @@ -187,4 +187,59 @@ ?setParentFolderId@NmApiFolder@EmailClientApi@@QAEX_K@Z @ 186 NONAME ; void EmailClientApi::NmApiFolder::setParentFolderId(unsigned long long) ?start@NmApiFolderListing@EmailClientApi@@UAE_NXZ @ 187 NONAME ; bool EmailClientApi::NmApiFolderListing::start(void) ?cancel@NmApiFolderListing@EmailClientApi@@UAEXXZ @ 188 NONAME ; void EmailClientApi::NmApiFolderListing::cancel(void) + ?metaObject@NmApiMessageManager@EmailClientApi@@UBEPBUQMetaObject@@XZ @ 189 NONAME ; struct QMetaObject const * EmailClientApi::NmApiMessageManager::metaObject(void) const + ?tr@NmApiMessageManager@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 190 NONAME ; class QString EmailClientApi::NmApiMessageManager::tr(char const *, char const *, int) + ?createReplyMessage@NmApiMessageManager@EmailClientApi@@QAE_NPBVQVariant@@_N@Z @ 191 NONAME ; bool EmailClientApi::NmApiMessageManager::createReplyMessage(class QVariant const *, bool) + ?saveMessage@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 192 NONAME ; bool EmailClientApi::NmApiMessageManager::saveMessage(struct NmApiMessage const &) + ?messagesCopied@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 193 NONAME ; void EmailClientApi::NmApiMessageManager::messagesCopied(int) + ??_ENmApiMessageManager@EmailClientApi@@UAE@I@Z @ 194 NONAME ; EmailClientApi::NmApiMessageManager::~NmApiMessageManager(unsigned int) + ?tr@NmApiMailboxSettings@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 195 NONAME ; class QString EmailClientApi::NmApiMailboxSettings::tr(char const *, char const *, int) + ?loadSettings@NmApiMailboxSettings@EmailClientApi@@QAE_N_KAAVNmApiMailboxSettingsData@2@@Z @ 196 NONAME ; bool EmailClientApi::NmApiMailboxSettings::loadSettings(unsigned long long, class EmailClientApi::NmApiMailboxSettingsData &) + ?removeAttachment@NmApiMessageManager@EmailClientApi@@QAE_NAAVNmApiEmailMessage@@_K@Z @ 197 NONAME ; bool EmailClientApi::NmApiMessageManager::removeAttachment(class NmApiEmailMessage &, unsigned long long) + ?copyMessages@NmApiMessageManager@EmailClientApi@@QAE_NV?$QList@_K@@_K1@Z @ 198 NONAME ; bool EmailClientApi::NmApiMessageManager::copyMessages(class QList, unsigned long long, unsigned long long) + ??1NmApiMessageManager@EmailClientApi@@UAE@XZ @ 199 NONAME ; EmailClientApi::NmApiMessageManager::~NmApiMessageManager(void) + ?tr@NmApiMessageManager@EmailClientApi@@SA?AVQString@@PBD0@Z @ 200 NONAME ; class QString EmailClientApi::NmApiMessageManager::tr(char const *, char const *) + ?listSettings@NmApiMailboxSettingsData@EmailClientApi@@QBE?AV?$QList@H@@XZ @ 201 NONAME ; class QList EmailClientApi::NmApiMailboxSettingsData::listSettings(void) const + ?trUtf8@NmApiMessageManager@EmailClientApi@@SA?AVQString@@PBD0@Z @ 202 NONAME ; class QString EmailClientApi::NmApiMessageManager::trUtf8(char const *, char const *) + ?mailboxDeleted@NmApiMailboxSettings@EmailClientApi@@IAEXH@Z @ 203 NONAME ; void EmailClientApi::NmApiMailboxSettings::mailboxDeleted(int) + ?staticMetaObject@NmApiMailboxSettings@EmailClientApi@@2UQMetaObject@@B @ 204 NONAME ; struct QMetaObject const EmailClientApi::NmApiMailboxSettings::staticMetaObject + ?messagesDeleted@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 205 NONAME ; void EmailClientApi::NmApiMessageManager::messagesDeleted(int) + ??0NmApiMailboxSettingsData@EmailClientApi@@QAE@XZ @ 206 NONAME ; EmailClientApi::NmApiMailboxSettingsData::NmApiMailboxSettingsData(void) + ?trUtf8@NmApiMessageManager@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 207 NONAME ; class QString EmailClientApi::NmApiMessageManager::trUtf8(char const *, char const *, int) + ?metaObject@NmApiMailboxSettings@EmailClientApi@@UBEPBUQMetaObject@@XZ @ 208 NONAME ; struct QMetaObject const * EmailClientApi::NmApiMailboxSettings::metaObject(void) const + ?messagesMoved@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 209 NONAME ; void EmailClientApi::NmApiMessageManager::messagesMoved(int) + ?saveSettings@NmApiMailboxSettings@EmailClientApi@@QAE_NABVNmApiMailboxSettingsData@2@@Z @ 210 NONAME ; bool EmailClientApi::NmApiMailboxSettings::saveSettings(class EmailClientApi::NmApiMailboxSettingsData const &) + ?fetch@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 211 NONAME ; bool EmailClientApi::NmApiMessageManager::fetch(struct NmApiMessage const &) + ?createMailbox@NmApiMailboxSettings@EmailClientApi@@QAE_NABVQString@@AAVNmApiMailboxSettingsData@2@@Z @ 212 NONAME ; bool EmailClientApi::NmApiMailboxSettings::createMailbox(class QString const &, class EmailClientApi::NmApiMailboxSettingsData &) + ?qt_metacast@NmApiMessageManager@EmailClientApi@@UAEPAXPBD@Z @ 213 NONAME ; void * EmailClientApi::NmApiMessageManager::qt_metacast(char const *) + ??0NmApiMessageManager@EmailClientApi@@QAE@_KPAVQObject@@@Z @ 214 NONAME ; EmailClientApi::NmApiMessageManager::NmApiMessageManager(unsigned long long, class QObject *) + ?getValue@NmApiMailboxSettingsData@EmailClientApi@@QBE_NHAAVQVariant@@@Z @ 215 NONAME ; bool EmailClientApi::NmApiMailboxSettingsData::getValue(int, class QVariant &) const + ?tr@NmApiMailboxSettings@EmailClientApi@@SA?AVQString@@PBD0@Z @ 216 NONAME ; class QString EmailClientApi::NmApiMailboxSettings::tr(char const *, char const *) + ?moveMessages@NmApiMessageManager@EmailClientApi@@QAE_NV?$QList@_K@@_K1@Z @ 217 NONAME ; bool EmailClientApi::NmApiMessageManager::moveMessages(class QList, unsigned long long, unsigned long long) + ??1NmApiMailboxSettingsData@EmailClientApi@@QAE@XZ @ 218 NONAME ; EmailClientApi::NmApiMailboxSettingsData::~NmApiMailboxSettingsData(void) + ?validateData@NmApiMailboxSettingsData@EmailClientApi@@QBE_NXZ @ 219 NONAME ; bool EmailClientApi::NmApiMailboxSettingsData::validateData(void) const + ?trUtf8@NmApiMailboxSettings@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 220 NONAME ; class QString EmailClientApi::NmApiMailboxSettings::trUtf8(char const *, char const *, int) + ?createForwardMessage@NmApiMessageManager@EmailClientApi@@QAE_NPBVQVariant@@@Z @ 221 NONAME ; bool EmailClientApi::NmApiMessageManager::createForwardMessage(class QVariant const *) + ?listMailboxIds@NmApiMailboxSettings@EmailClientApi@@QAE_NAAV?$QList@_K@@@Z @ 222 NONAME ; bool EmailClientApi::NmApiMailboxSettings::listMailboxIds(class QList &) + ??_ENmApiMailboxSettings@EmailClientApi@@UAE@I@Z @ 223 NONAME ; EmailClientApi::NmApiMailboxSettings::~NmApiMailboxSettings(unsigned int) + ?getStaticMetaObject@NmApiMailboxSettings@EmailClientApi@@SAABUQMetaObject@@XZ @ 224 NONAME ; struct QMetaObject const & EmailClientApi::NmApiMailboxSettings::getStaticMetaObject(void) + ?deleteMessages@NmApiMessageManager@EmailClientApi@@QAE_NV?$QList@_K@@@Z @ 225 NONAME ; bool EmailClientApi::NmApiMessageManager::deleteMessages(class QList) + ?createDraftMessage@NmApiMessageManager@EmailClientApi@@QAE_NPBVQVariant@@@Z @ 226 NONAME ; bool EmailClientApi::NmApiMessageManager::createDraftMessage(class QVariant const *) + ??0NmApiMailboxSettings@EmailClientApi@@QAE@PAVQObject@@@Z @ 227 NONAME ; EmailClientApi::NmApiMailboxSettings::NmApiMailboxSettings(class QObject *) + ?qt_metacast@NmApiMailboxSettings@EmailClientApi@@UAEPAXPBD@Z @ 228 NONAME ; void * EmailClientApi::NmApiMailboxSettings::qt_metacast(char const *) + ?qt_metacall@NmApiMessageManager@EmailClientApi@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 229 NONAME ; int EmailClientApi::NmApiMessageManager::qt_metacall(enum QMetaObject::Call, int, void * *) + ??1NmApiMailboxSettings@EmailClientApi@@UAE@XZ @ 230 NONAME ; EmailClientApi::NmApiMailboxSettings::~NmApiMailboxSettings(void) + ?deleteMailbox@NmApiMailboxSettings@EmailClientApi@@QAE_N_K@Z @ 231 NONAME ; bool EmailClientApi::NmApiMailboxSettings::deleteMailbox(unsigned long long) + ?send@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 232 NONAME ; bool EmailClientApi::NmApiMessageManager::send(struct NmApiMessage const &) + ?trUtf8@NmApiMailboxSettings@EmailClientApi@@SA?AVQString@@PBD0@Z @ 233 NONAME ; class QString EmailClientApi::NmApiMailboxSettings::trUtf8(char const *, char const *) + ?createAttachment@NmApiMessageManager@EmailClientApi@@QAE_NAAVNmApiEmailMessage@@ABVQVariant@@@Z @ 234 NONAME ; bool EmailClientApi::NmApiMessageManager::createAttachment(class NmApiEmailMessage &, class QVariant const &) + ?messagesCreated@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 235 NONAME ; void EmailClientApi::NmApiMessageManager::messagesCreated(int) + ?setMailboxId@NmApiMailboxSettingsData@EmailClientApi@@QAEX_K@Z @ 236 NONAME ; void EmailClientApi::NmApiMailboxSettingsData::setMailboxId(unsigned long long) + ?populateDefaultSettings@NmApiMailboxSettings@EmailClientApi@@QAE_NABVQString@@AAVNmApiMailboxSettingsData@2@@Z @ 237 NONAME ; bool EmailClientApi::NmApiMailboxSettings::populateDefaultSettings(class QString const &, class EmailClientApi::NmApiMailboxSettingsData &) + ?clearSettings@NmApiMailboxSettingsData@EmailClientApi@@QAEXXZ @ 238 NONAME ; void EmailClientApi::NmApiMailboxSettingsData::clearSettings(void) + ?setValue@NmApiMailboxSettingsData@EmailClientApi@@QAEXHABVQVariant@@@Z @ 239 NONAME ; void EmailClientApi::NmApiMailboxSettingsData::setValue(int, class QVariant const &) + ?mailboxId@NmApiMailboxSettingsData@EmailClientApi@@QBE_KXZ @ 240 NONAME ; unsigned long long EmailClientApi::NmApiMailboxSettingsData::mailboxId(void) const + ?getStaticMetaObject@NmApiMessageManager@EmailClientApi@@SAABUQMetaObject@@XZ @ 241 NONAME ; struct QMetaObject const & EmailClientApi::NmApiMessageManager::getStaticMetaObject(void) + ?staticMetaObject@NmApiMessageManager@EmailClientApi@@2UQMetaObject@@B @ 242 NONAME ; struct QMetaObject const EmailClientApi::NmApiMessageManager::staticMetaObject + ?qt_metacall@NmApiMailboxSettings@EmailClientApi@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 243 NONAME ; int EmailClientApi::NmApiMailboxSettings::qt_metacall(enum QMetaObject::Call, int, void * *) diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/eabi/nmailclientapiu.def --- a/emailservices/nmclientapi/eabi/nmailclientapiu.def Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/nmclientapi/eabi/nmailclientapiu.def Thu Jun 24 14:32:18 2010 +0300 @@ -211,4 +211,61 @@ _ZTVN14EmailClientApi19NmApiMailboxListingE @ 210 NONAME _ZTVN14EmailClientApi20NmApiEnvelopeListingE @ 211 NONAME _ZTVN14EmailClientApi20NmApiMessageEnvelopeE @ 212 NONAME + _ZN14EmailClientApi19NmApiMessageManager11qt_metacallEN11QMetaObject4CallEiPPv @ 213 NONAME + _ZN14EmailClientApi19NmApiMessageManager11qt_metacastEPKc @ 214 NONAME + _ZN14EmailClientApi19NmApiMessageManager11saveMessageERK12NmApiMessage @ 215 NONAME + _ZN14EmailClientApi19NmApiMessageManager12copyMessagesE5QListIyEyy @ 216 NONAME + _ZN14EmailClientApi19NmApiMessageManager12moveMessagesE5QListIyEyy @ 217 NONAME + _ZN14EmailClientApi19NmApiMessageManager13messagesMovedEi @ 218 NONAME + _ZN14EmailClientApi19NmApiMessageManager14deleteMessagesE5QListIyE @ 219 NONAME + _ZN14EmailClientApi19NmApiMessageManager14messagesCopiedEi @ 220 NONAME + _ZN14EmailClientApi19NmApiMessageManager15messagesCreatedEi @ 221 NONAME + _ZN14EmailClientApi19NmApiMessageManager15messagesDeletedEi @ 222 NONAME + _ZN14EmailClientApi19NmApiMessageManager16createAttachmentER17NmApiEmailMessageRK8QVariant @ 223 NONAME + _ZN14EmailClientApi19NmApiMessageManager16removeAttachmentER17NmApiEmailMessagey @ 224 NONAME + _ZN14EmailClientApi19NmApiMessageManager16staticMetaObjectE @ 225 NONAME DATA 16 + _ZN14EmailClientApi19NmApiMessageManager18createDraftMessageEPK8QVariant @ 226 NONAME + _ZN14EmailClientApi19NmApiMessageManager18createReplyMessageEPK8QVariantb @ 227 NONAME + _ZN14EmailClientApi19NmApiMessageManager19getStaticMetaObjectEv @ 228 NONAME + _ZN14EmailClientApi19NmApiMessageManager20createForwardMessageEPK8QVariant @ 229 NONAME + _ZN14EmailClientApi19NmApiMessageManager4sendERK12NmApiMessage @ 230 NONAME + _ZN14EmailClientApi19NmApiMessageManager5fetchERK12NmApiMessage @ 231 NONAME + _ZN14EmailClientApi19NmApiMessageManagerC1EyP7QObject @ 232 NONAME + _ZN14EmailClientApi19NmApiMessageManagerC2EyP7QObject @ 233 NONAME + _ZN14EmailClientApi19NmApiMessageManagerD0Ev @ 234 NONAME + _ZN14EmailClientApi19NmApiMessageManagerD1Ev @ 235 NONAME + _ZN14EmailClientApi19NmApiMessageManagerD2Ev @ 236 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings11qt_metacallEN11QMetaObject4CallEiPPv @ 237 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings11qt_metacastEPKc @ 238 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings12loadSettingsEyRNS_24NmApiMailboxSettingsDataE @ 239 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings12saveSettingsERKNS_24NmApiMailboxSettingsDataE @ 240 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings13createMailboxERK7QStringRNS_24NmApiMailboxSettingsDataE @ 241 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings13deleteMailboxEy @ 242 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings14listMailboxIdsER5QListIyE @ 243 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings14mailboxDeletedEi @ 244 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings16staticMetaObjectE @ 245 NONAME DATA 16 + _ZN14EmailClientApi20NmApiMailboxSettings19getStaticMetaObjectEv @ 246 NONAME + _ZN14EmailClientApi20NmApiMailboxSettings23populateDefaultSettingsERK7QStringRNS_24NmApiMailboxSettingsDataE @ 247 NONAME + _ZN14EmailClientApi20NmApiMailboxSettingsC1EP7QObject @ 248 NONAME + _ZN14EmailClientApi20NmApiMailboxSettingsC2EP7QObject @ 249 NONAME + _ZN14EmailClientApi20NmApiMailboxSettingsD0Ev @ 250 NONAME + _ZN14EmailClientApi20NmApiMailboxSettingsD1Ev @ 251 NONAME + _ZN14EmailClientApi20NmApiMailboxSettingsD2Ev @ 252 NONAME + _ZN14EmailClientApi24NmApiMailboxSettingsData12setMailboxIdEy @ 253 NONAME + _ZN14EmailClientApi24NmApiMailboxSettingsData13clearSettingsEv @ 254 NONAME + _ZN14EmailClientApi24NmApiMailboxSettingsData8setValueEiRK8QVariant @ 255 NONAME + _ZN14EmailClientApi24NmApiMailboxSettingsDataC1Ev @ 256 NONAME + _ZN14EmailClientApi24NmApiMailboxSettingsDataC2Ev @ 257 NONAME + _ZN14EmailClientApi24NmApiMailboxSettingsDataD1Ev @ 258 NONAME + _ZN14EmailClientApi24NmApiMailboxSettingsDataD2Ev @ 259 NONAME + _ZNK14EmailClientApi19NmApiMessageManager10metaObjectEv @ 260 NONAME + _ZNK14EmailClientApi20NmApiMailboxSettings10metaObjectEv @ 261 NONAME + _ZNK14EmailClientApi24NmApiMailboxSettingsData12listSettingsEv @ 262 NONAME + _ZNK14EmailClientApi24NmApiMailboxSettingsData12validateDataEv @ 263 NONAME + _ZNK14EmailClientApi24NmApiMailboxSettingsData8getValueEiR8QVariant @ 264 NONAME + _ZNK14EmailClientApi24NmApiMailboxSettingsData9mailboxIdEv @ 265 NONAME + _ZTIN14EmailClientApi19NmApiMessageManagerE @ 266 NONAME + _ZTIN14EmailClientApi20NmApiMailboxSettingsE @ 267 NONAME + _ZTVN14EmailClientApi19NmApiMessageManagerE @ 268 NONAME + _ZTVN14EmailClientApi20NmApiMailboxSettingsE @ 269 NONAME diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/inc/nmapimailboxsettings_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/inc/nmapimailboxsettings_p.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +#ifndef NMAPIMAILBOXSETTINGS_P_H_ +#define NMAPIMAILBOXSETTINGS_P_H_ + +#include +#include +#include +#include + +class NmApiDataPluginFactory; +class NmOperation; + +namespace EmailClientApi +{ +class NmApiMailboxSettingsData; + +class NmApiMailboxSettingsPrivate : public QObject +{ + Q_OBJECT +public: + NmApiMailboxSettingsPrivate(QObject *parent = 0); + ~NmApiMailboxSettingsPrivate(); + + bool listMailboxIds(QList &idList); + bool loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data); + bool saveSettings(const NmApiMailboxSettingsData &data); + bool createMailbox(const QString &mailboxType, NmApiMailboxSettingsData &data); + bool deleteMailbox(quint64 mailboxId); + bool populateDefaultSettings(const QString &mailboxType, NmApiMailboxSettingsData &data); + +signals: + void mailboxDeleted(int result = 0); + +private: + void createPopImapMailbox(const QString &type, NmApiMailboxSettingsData &data); + + +private: + NmApiDataPluginFactory *mFactory; + QPointer mDeleteMailboxOperation; // not owned +}; + +} + +#endif /* NMAPIMAILBOXSETTINGS_P_H_ */ diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/inc/nmapimailboxsettingsdata_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/inc/nmapimailboxsettingsdata_p.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +#ifndef _NMAPI_MAILBOX_SETTINGS_DATA_PRIVATE_ +#define _NMAPI_MAILBOX_SETTINGS_DATA_PRIVATE_ + +#include +#include +#include + +namespace EmailClientApi +{ +class NmApiMailboxSettingsDataPrivate +{ +public: + NmApiMailboxSettingsDataPrivate(); + virtual ~NmApiMailboxSettingsDataPrivate(); + void setMailboxId(quint64 mailboxId); + quint64 mailboxId() const; + void setValue(int key, const QVariant &settingValue); + bool getValue(int key, QVariant &settingValue) const; + bool validateData() const; + QList listSettings() const; + void clearSettings(); + +private: + bool validateString(int key, QVariant& val, bool& validated) const; + bool validateStringValue(int key, QString& val) const; + bool validateStringGeneral(int key, QString& val, bool& handled) const; + bool validateEmailAddress(int key, QString& val, bool& handled) const; + bool validateUsesAuthentication(int key, QString& val, bool& handled) const; + bool validateSecurityType(int key, QString& val, bool& handled) const; + bool validateAOLState(int key, QString& val, bool& handled) const; + bool validateInteger(int key, QVariant& val, bool& validated) const; + bool validateIntVal(int key, int val) const; + bool validateIntGeneral(int key, int val, bool& handled) const; + bool validateOnOffValue(int key, int val, bool& handled) const; + bool validateWeekdayMask(int key, int val, bool& handled) const; + bool validateHoursInDay(int key, int val, bool& handled) const; + bool validateBool(int key, QVariant& val, bool& validated) const; + bool validateDateTime(int key, QVariant& val, bool& validated) const; + +private: + quint64 mId; + QScopedPointer > mSettings; + +}; +}//end namespace + +#endif //_NMAPI_MAILBOX_SETTINGS_DATA_PRIVATE_ diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/inc/nmapimessagemanager_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/inc/nmapimessagemanager_p.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * Email message related operations + */ + +#ifndef NMAPIMESSAGEMANAGER_P_H_ +#define NMAPIMESSAGEMANAGER_P_H_ + +#include +#include +#include +#include +#include +#include +#include + + +class NmApiEmailMessage; + +namespace EmailClientApi +{ + +class NmApiMessageManagerPrivate : public QObject +{ + Q_OBJECT +public: + NmApiMessageManagerPrivate(quint64 mailboxId,QObject *parent = 0); + virtual ~NmApiMessageManagerPrivate(); + +private: + enum EState { + EIdle = 0, + ECopyPending, + EMovePending, + EDeletePending + }; + +public slots: + bool moveMessages(const QList messageIds, + quint64 sourceFolderId, + quint64 targetFolderId); + + bool copyMessages(const QList messageIds, + quint64 sourceFolder, + quint64 targetFolder); + + void messageEventHandler(NmMessageEvent event, + const NmId &folder, + const QList &messages, + const NmId &mailBox); + +signals: + void messagesCopied(int result); + void messagesCreated(int result); + void messagesMoved(int result); + void messagesDeleted(int result); + + +private: + NmApiMessageManagerPrivate::EState mState; + QList mMessages; + NmId mTarget; + NmId mMailboxId; + NmApiDataPluginFactory *mFactory; + QObject *mPlugin; +}; + +} + +#endif /*NMAPIMESSAGEMANAGER_P_H_ */ diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/inc/nmapipopimapsettingsmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/inc/nmapipopimapsettingsmanager.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,39 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef NMAPIPOPIMAPSETTINGSMANAGER_H +#define NMAPIPOPIMAPSETTINGSMANAGER_H + +#include + +namespace EmailClientApi { + +class NmApiPopImapSettingsManager +{ +public: + NmApiPopImapSettingsManager(); + virtual ~NmApiPopImapSettingsManager(); + bool populateDefaults(const QString &mailboxType, NmApiMailboxSettingsData &data); + +private: + void populateImapDefs(NmApiMailboxSettingsData &data); + void populatePopDefs(NmApiMailboxSettingsData &data); + +}; +}//namespace + +#endif // NMAPIPOPIMAPSETTINGSMANAGER_H diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/nmclientapi.pro --- a/emailservices/nmclientapi/nmclientapi.pro Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/nmclientapi/nmclientapi.pro Thu Jun 24 14:32:18 2010 +0300 @@ -44,7 +44,9 @@ nmapidatapluginfactory.h \ nmapiengine.h \ nmmessagepart.h \ - nmapicommon.h + nmapicommon.h \ + nmapimessagemanager.h \ + nmoperation.h #headers and sources from api SOURCES += nmapitypesconverter.cpp \ @@ -52,8 +54,6 @@ nmapiemailservice.cpp \ nmapiengine.cpp - - HEADERS += nmapicommonheader.h \ nmapiemailservice.h \ nmapimessagetask.h \ @@ -63,18 +63,24 @@ nmapifolderlisting.h \ nmapienvelopelisting_p.h \ nmapienvelopelisting.h \ - nmapiemailaddress_p.h \ - nmapiemailaddress.h \ - nmapieventnotifier_p.h \ - nmapieventnotifier.h \ - nmapifolder_p.h \ - nmapifolder.h \ - nmapimailbox_p.h \ - nmapimailbox.h \ - nmapimessagebody_p.h \ - nmapimessagebody.h \ - nmapimessageenvelope_p.h \ - nmapimessageenvelope.h + nmapiemailaddress_p.h \ + nmapiemailaddress.h \ + nmapieventnotifier_p.h \ + nmapieventnotifier.h \ + nmapifolder_p.h \ + nmapifolder.h \ + nmapimailbox_p.h \ + nmapimailbox.h \ + nmapimessagebody_p.h \ + nmapimessagebody.h \ + nmapimessageenvelope_p.h \ + nmapimessageenvelope.h \ + nmapimailboxsettingsdata_p.h \ + nmapimailboxsettingsdata.h \ + ../inc/nmapimailboxsettings_p.h \ + ../../email_plat/nmail_settings_api/nmapimailboxsettings.h \ + ../inc/nmapipopimapsettingsmanager.h \ + ../inc/nmapimessagemanager_p.h LIBS += -leuser LIBS += -llibc @@ -87,17 +93,24 @@ nmapifolderlisting.cpp \ nmapienvelopelisting_p.cpp \ nmapienvelopelisting.cpp \ - nmapiemailaddress.cpp \ - nmapieventnotifier_p.cpp \ - nmapieventnotifier.cpp \ - nmapifolder.cpp \ - nmapimailbox.cpp \ - nmapimessagebody.cpp \ - nmapimessageenvelope.cpp + nmapiemailaddress.cpp \ + nmapieventnotifier_p.cpp \ + nmapieventnotifier.cpp \ + nmapifolder.cpp \ + nmapimailbox.cpp \ + nmapimessagebody.cpp \ + nmapimessageenvelope.cpp \ + nmapimailboxsettingsdata_p.cpp \ + nmapimailboxsettingsdata.cpp \ + ../src/nmapimailboxsettings_p.cpp \ + ../src/nmapimailboxsettings.cpp \ + nmapipopimapsettingsmanager.cpp \ + ../src/nmapimessagemanager_p.cpp \ + ../src/nmapimessagemanager.cpp - - + + symbian*: { TARGET.EPOCALLOWDLLDATA = 1 @@ -107,8 +120,14 @@ TARGET.UID3 = 0x2002C366 INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + DEPENDPATH += $$APP_LAYER_SYSTEMINCLUDE + - LIBS += -lnmailbase + LIBS += -lnmailbase \ + -limcm \ + -lxqsettingsmanager \ + -lxqutils \ + -lnmailuiengine defBlock = \ "$${LITERAL_HASH}if defined(MARM)" \ diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/src/nmapimailboxsettings.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/src/nmapimailboxsettings.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +#include +#include "nmapimailboxsettings_p.h" +#include + +namespace EmailClientApi { + + +NmApiMailboxSettings::NmApiMailboxSettings(QObject *parent) + :QObject(parent) +{ + d = new NmApiMailboxSettingsPrivate(this); + connect(d, SIGNAL(mailboxDeleted(int)),this,SIGNAL(mailboxDeleted(int))); +} + +NmApiMailboxSettings::~NmApiMailboxSettings() +{ + delete d; +} + +/*! + \fn listMailboxIds + \param idList - QList consists of ids as quint64. + \return true is successful, otherwise return false + + Lists ids of mailboxes + */ +bool NmApiMailboxSettings::listMailboxIds(QList &idList) +{ + return d->listMailboxIds(idList); +} + +bool NmApiMailboxSettings::loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data) +{ + return d->loadSettings(mailboxId, data); +} + +bool NmApiMailboxSettings::saveSettings(const NmApiMailboxSettingsData &data) +{ + return d->saveSettings(data); +} + +/*! + \fn createMailbox + \param mailboxType - mailbox type as QString + \param data - mailbox settings data + + Creates a mailbox + */ +bool NmApiMailboxSettings::createMailbox(const QString &mailboxType, NmApiMailboxSettingsData &data) +{ + return d->createMailbox(mailboxType, data); +} + +/*! + \fn deleteMailbox + \param mailboxId - mailbox id. + \return quint64 - the mailbox id. + + Deletes mailbox with specific id. + */ +bool NmApiMailboxSettings::deleteMailbox(quint64 mailboxId) +{ + return d->deleteMailbox(mailboxId); +} + +/*! + \fn populateDefaultSettings + \param mailboxType - mailbox type as QString + \param data - mailbox settings data, on return contains dafault settings for mailbox protocol + \return true if default settings are set, otherwise false + + Populates NmApiMailboxSettingsData with protocol specific settings data. + */ +bool NmApiMailboxSettings::populateDefaultSettings(const QString &mailboxType, NmApiMailboxSettingsData &data) +{ + return d->populateDefaultSettings(mailboxType, data); +} + +}//end namespace diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/src/nmapimailboxsettings_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/src/nmapimailboxsettings_p.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +#include "nmapimailboxsettings_p.h" + +#include "nmdataplugininterface.h" +#include "nmapidatapluginfactory.h" +//#include "nmapipopimapsettingsmanager.h" +#include "emailtrace.h" + +#include +#include + +#include +#include +#include +#include + +namespace EmailClientApi +{ +NmApiMailboxSettingsPrivate::NmApiMailboxSettingsPrivate(QObject *parent) : + QObject(parent), + mFactory(NULL), + mDeleteMailboxOperation(NULL) +{ + NM_FUNCTION; + mFactory = NmApiDataPluginFactory::instance(); + Q_CHECK_PTR(mFactory); +} + +NmApiMailboxSettingsPrivate::~NmApiMailboxSettingsPrivate() +{ + NM_FUNCTION; + NmApiDataPluginFactory::releaseInstance(mFactory); + if(mDeleteMailboxOperation && mDeleteMailboxOperation->isRunning()) { + mDeleteMailboxOperation->cancelOperation(); + } +} + +bool NmApiMailboxSettingsPrivate::listMailboxIds(QList &idList) +{ + NM_FUNCTION; + QList mailboxIds; + bool ret = false; + idList.clear(); + + NmDataPluginInterface *instance = mFactory->interfaceInstance(); + if (instance) { + if (instance->listMailboxIds(mailboxIds) == KErrNone) { + + foreach (NmId boxId, mailboxIds) { + idList.append(boxId.id()); + } + + ret = true; + } + } + + return ret; +} + +bool NmApiMailboxSettingsPrivate::loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data) +{ + NM_FUNCTION; + Q_UNUSED(mailboxId); + Q_UNUSED(data); + return false; +} + +bool NmApiMailboxSettingsPrivate::saveSettings(const NmApiMailboxSettingsData &data) +{ + NM_FUNCTION; + Q_UNUSED(data); + return false; +} + +bool NmApiMailboxSettingsPrivate::createMailbox( + const QString &mailboxType, + NmApiMailboxSettingsData &data) +{ + NM_FUNCTION; + + bool ret = false; + + /*QT_TRY { + if (mailboxType==NmApiMailboxTypePop || mailboxType==NmApiMailboxTypeImap) { + QScopedPointer popImapManager(new NmApiPopImapSettingsManager()); + popImapManager->createMailbox(mailboxType, data); + ret = true; + } + else { + ret = false; + } + //TODO store cenrep stuff here + } + QT_CATCH(...){ + ret = false; + }*/ + + return ret; +} + +bool NmApiMailboxSettingsPrivate::deleteMailbox(quint64 mailboxId) +{ + NM_FUNCTION; + bool ret = false; + NmDataPluginInterface *instance = mFactory->interfaceInstance(); + if (instance) { + if (mDeleteMailboxOperation && mDeleteMailboxOperation->isRunning()) { + mDeleteMailboxOperation->cancelOperation(); + } + mDeleteMailboxOperation = instance->deleteMailboxById(NmId(mailboxId)); + + if (mDeleteMailboxOperation) { + ret = true; + connect(mDeleteMailboxOperation, + SIGNAL(operationCompleted(int)), + this, + SIGNAL(mailboxDeleted(int))); + } + } + return ret; +} + +bool NmApiMailboxSettingsPrivate::populateDefaultSettings( + const QString &mailboxType, NmApiMailboxSettingsData &data) +{ + NM_FUNCTION; + /*QScopedPointer popImapManager(new NmApiPopImapSettingsManager()); + return popImapManager->populateDefaults(mailboxType, data);*/ + return true; +} + +}// namespace diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/src/nmapimailboxsettingsdata.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/src/nmapimailboxsettingsdata.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +#include +#include "NmApiMailboxSettingsData_p.h" + +namespace EmailClientApi +{ + +NmApiMailboxSettingsData::NmApiMailboxSettingsData() +{ + d = new NmApiMailboxSettingsDataPrivate(); + Q_CHECK_PTR(d); +} + +NmApiMailboxSettingsData::~NmApiMailboxSettingsData() +{ + delete d; +} + +/*! + \fn setMailboxId + \param mailboxId - valid mailbox id as quint64. + + Sets the mailbox id + */ +void NmApiMailboxSettingsData::setMailboxId(quint64 mailboxId) +{ + d->setMailboxId(mailboxId); +} + +/*! + \fn mailboxId + \return quint64 - the mailbox id. + + Gets the mailbox id. + */ +quint64 NmApiMailboxSettingsData::mailboxId() const +{ + return d->mailboxId(); +} + +/*! + \fn setValue + \param key - setting data to be set. + \param settingValue - Value to be set as QVariant. + + Sets individual setting value. + */ +void NmApiMailboxSettingsData::setValue(int key, const QVariant &settingValue) +{ + d->setValue(key, settingValue); +} + +/*! + \fn getValue + \param key - setting data to get. + \param settingValue - On return holds as QVariant. + \return true if successfull, false otherwise. + + Get individual setting value. + */ +bool NmApiMailboxSettingsData::getValue(int key, QVariant &settingValue) const +{ + return d->getValue(key, settingValue); +} + +/*! + \fn validateData + \return boolean - true, everything validated OK, false otherwise + + Validates data in this container. + */ +bool NmApiMailboxSettingsData::validateData() const +{ + return d->validateData(); +} + +/*! + \fn listSettings + \return QList - ,on return contains use key values for settingsdata + + Validates data in this container. + */ +QList NmApiMailboxSettingsData::listSettings() const +{ + return d->listSettings(); +} + +/*! + \fn clearSettings + + Resets data in this container. + */ +void NmApiMailboxSettingsData::clearSettings() +{ + d->clearSettings(); +} + +}//end namespace diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/src/nmapimailboxsettingsdata_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/src/nmapimailboxsettingsdata_p.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,761 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +#include "nmapimailboxsettingsdata_p.h" + +#include +#include +#include +#include +#include +#include "emailtrace.h" + +namespace EmailClientApi +{ + +NmApiMailboxSettingsDataPrivate::NmApiMailboxSettingsDataPrivate() : + mId(0), mSettings(new QHash()) +{ + NM_FUNCTION; + Q_CHECK_PTR( mSettings ); +} + +NmApiMailboxSettingsDataPrivate::~NmApiMailboxSettingsDataPrivate() +{ + NM_FUNCTION; +} + +/*! + \fn setMailboxId + \param mailboxId - valid mailbox id as quint64. + + Sets the mailbox id + */ +void NmApiMailboxSettingsDataPrivate::setMailboxId(quint64 mailboxId) +{ + NM_FUNCTION; + mId = mailboxId; +} + +/*! + \fn mailboxId + \return quint64 - the mailbox id. + + Gets the mailbox id. + */ +quint64 NmApiMailboxSettingsDataPrivate::mailboxId() const +{ + NM_FUNCTION; + return mId; +} + +/*! + \fn setValue + \param key - setting data to be set. + \param settingValue - Value to be set as QVariant. + + Sets individual setting value. + */ +void NmApiMailboxSettingsDataPrivate::setValue(int key, const QVariant &settingValue) +{ + NM_FUNCTION; + (*mSettings)[key] = settingValue; +} + +/*! + \fn getValue + \param key - setting data to get. + \param settingValue - On return holds as QVariant. + \return true if succesfull, false otherwise. + + Get individual setting value. + */ +bool NmApiMailboxSettingsDataPrivate::getValue(int key, QVariant &settingValue) const +{ + NM_FUNCTION; + if (mSettings->contains(key)) { + settingValue = (*mSettings)[key]; + return true; + } + return false; +} + +/*! + \fn validateString + \param key - setting data to validate. + \param val - value to validate. + \param validated - if this key was validated by the method + \return true if valid value, false otherwise. + + validates individual string type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateString(int key, QVariant& val, bool& validated) const +{ + NM_FUNCTION; + bool ret = true; + switch (key) { + case OutgoingPassword: + case IncomingPassword: + case FolderPath: + case IncomingLoginName: + case MailboxName: + case MyName: + case ReceptionActiveProfile: + case IncomingMailServer: + case OutgoingMailServer: + case OutgoingLoginName: + case EmailAddress: + case ReplyAddress: + case EmailAlias: + case IncomingMailUsesAuthentication: + case OutgoingMailUsesAuthentication: + case IncomingMailSecurityType: + case OutgoingMailSecurityType: + case EmailNotificationState: + case AlwaysOnlineState:{ + validated=true; + if (val.type() != QVariant::String) { + ret = false; + break; + } + + QString sz = val.toString(); + ret = validateStringValue(key, sz); + break; + } + + default: { + validated = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateStringValue + \param key - setting data to validate. + \param val - value to validate. + \return true if valid value, false otherwise. + + validates individual string type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateStringValue(int key, QString& val) const +{ + NM_FUNCTION; + int ret = true; + bool valid = true, validated = false; + + valid = validateStringGeneral(key ,val, validated); + if (validated && !valid) { + ret = false; + } + + if( !validated ) { + valid = validateEmailAddress(key ,val, validated); + if (validated && !valid) { + ret = false; + } + } + + if( !validated ) { + valid = validateUsesAuthentication(key ,val, validated); + if (validated && !valid) { + ret = false; + } + } + + if( !validated ) { + valid = validateSecurityType(key ,val, validated); + if (validated && !valid) { + ret = false; + } + } + + if( !validated ) { + valid = validateAOLState(key ,val, validated); + if (validated && !valid) { + ret = false; + } + } + return ret; +} + +/*! + \fn validateStringGeneral + \param key - setting data to validate. + \param val - value to validate. + \param handled - true if method value was handled by method. + \return true if valid value, false otherwise. + + validates individual string type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateStringGeneral(int key, QString& /*val*/, bool& handled) const +{ + NM_FUNCTION; + int ret = true; + switch (key) { + case OutgoingPassword: + case IncomingPassword: + case FolderPath: + case IncomingLoginName: + case MailboxName: + case MyName: + case ReceptionActiveProfile: + case IncomingMailServer: + case OutgoingMailServer: + case OutgoingLoginName: { + // Allready validated that values are string, + // otherwise method is not called + handled = true; + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateEmailAddress + \param key - setting data to validate. + \param val - value to validate. + \param handled - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual string type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateEmailAddress(int key, QString& val, bool& handled) const +{ + NM_FUNCTION; + int ret = true; + switch (key) { + case EmailAddress: + case ReplyAddress: { + handled = true; + if (val.size() == 0) { + ret = false; + break; + } + if (!(val.contains("@"))) { + ret = false; + } + break; + } + case EmailAlias: { + handled = true; + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateUsesAuthentication + \param key - setting data to validate. + \param val - value to validate. + \param handled - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual string type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateUsesAuthentication(int key, QString& val, bool& handled) const +{ + NM_FUNCTION; + int ret = true; + switch (key) { + case IncomingMailUsesAuthentication: + case OutgoingMailUsesAuthentication: { + handled = true; + if (val.size() == 0) { + ret = false; + break; + } + if (!(val.contains("none") || + val.contains("UserAuthentication") || + (key == OutgoingMailUsesAuthentication && + val.contains("SameAsIncoming")) )) { + ret = false; + } + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateSecurityType + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual string type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateSecurityType(int key, QString& val, bool& handled) const +{ + NM_FUNCTION; + int ret = true; + switch (key) { + case IncomingMailSecurityType: + case OutgoingMailSecurityType: { + handled = true; + if (val.size() == 0) { + ret = false; + break; + } + if (!(val.contains("StartTls") || + val.contains("SSLTls") || + val.contains("none"))) { + ret = false; + } + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateAOLState + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual string type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateAOLState(int key, QString& val, bool& handled) const +{ + NM_FUNCTION; + int ret = true; + switch (key) { + case EmailNotificationState: + case AlwaysOnlineState:{ + handled = true; + if (val.size() == 0) { + ret = false; + break; + } + if (!( (val.contains("always") && key == AlwaysOnlineState) || + (val.contains("automatic") && key == EmailNotificationState) || + val.contains("homeOnly") || + val.contains("off"))) { + ret = false; + } + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateInteger + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual integer type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateInteger(int key, QVariant& val, bool& validated) const +{ + NM_FUNCTION; + bool ret = true; + switch (key) { + case DownloadPictures: + case MessageDivider: + case UserNameHidden: + case FirstEmnReceived: + case EmnReceivedNotSynced: + case AoLastUpdateFailed: + case AoUpdateSuccessfulWithCurSettings: + case ReceptionUserDefinedProfile: + case ReceptionInboxSyncWindow: + case ReceptionGenericSyncWindowInMessages: + case IncomingPort: + case OutgoingPort: + case ReceptionWeekDays: + case ReceptionDayStartTime: + case ReceptionDayEndTime: + case ReceptionRefreshPeriodDayTime: + case ReceptionRefreshPeriodOther: { + validated = true; + if (!(val.type() == QVariant::Int || + val.type() == QVariant::UInt || + val.type() == QVariant::LongLong || + val.type() == QVariant::ULongLong || + val.type() == QVariant::Double)) { + ret = false; + break; + } + int ival = val.toInt(); + ret = validateIntVal(key,ival); + break; + } + default: { + validated = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateIntVal + \param key - setting data to validate. + \param val - value to validate. + \return true if valid value, false otherwise. + + validates individual integer type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateIntVal(int key, int val) const +{ + NM_FUNCTION; + int ret = true; + bool valid = true, validated = false; + + valid = validateIntGeneral(key ,val, validated); + if (validated && !valid) { + ret = false; + } + + if( !validated ) { + valid = validateOnOffValue(key ,val, validated); + if (validated && !valid) { + ret = false; + } + } + + if( !validated ) { + valid = validateWeekdayMask(key ,val, validated); + if (validated && !valid) { + ret = false; + } + } + + if( !validated ) { + valid = validateHoursInDay(key ,val, validated); + if (validated && !valid) { + ret = false; + } + } + return ret; +} + +/*! + \fn validateOnOffValue + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual integer type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateOnOffValue(int key, int val, bool& handled) const +{ + NM_FUNCTION; + bool ret = true; + switch (key) { + // Integer: 0=Off, 1=On + case DownloadPictures: + case MessageDivider: + case UserNameHidden: + + // Integer: 0=false,1=true + case FirstEmnReceived: + case EmnReceivedNotSynced: + case AoLastUpdateFailed: + case AoUpdateSuccessfulWithCurSettings: + + // Integer: 0=Disabled, 1=Enabled + case ReceptionUserDefinedProfile: { + handled = true; + if (!(0 <= val && val <= 1)) { + ret = false; + } + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateIntGeneral + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual integer type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateIntGeneral(int key, int /*val*/, bool& handled) const +{ + NM_FUNCTION; + bool ret = true; + switch (key) { + // Integer: 5,15,60,240,0="When open mailbox" + case ReceptionRefreshPeriodDayTime: + case ReceptionRefreshPeriodOther: + + // Integer: 0=All messages + case ReceptionInboxSyncWindow: + case ReceptionGenericSyncWindowInMessages: + + // Integer + case IncomingPort: + case OutgoingPort: { + // Allready valid thate these are integers + handled = true; + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateWeekDayMask + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual integer type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateWeekdayMask(int key, int val, bool& handled) const +{ + NM_FUNCTION; + bool ret = true; + switch (key) { + // Integer bitmask of weekdays: 0x01=Mon,0x02=Tue,0x04=Wed,0x08=Thu,0x10=Fri,0x20=Sat,0x40=Sun + case ReceptionWeekDays: { + handled = true; + int wkdmask = Mon | Tue | Wed | Thu | Fri | Sat | Sun; + if ((val & wkdmask) != val) { + ret = false; + } + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateHoursInDay + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual integer type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateHoursInDay(int key, int val, bool& handled) const +{ + NM_FUNCTION; + bool ret = true; + switch (key) { + // Integer: 0-23 + case ReceptionDayStartTime: + case ReceptionDayEndTime: { + handled = true; + if (!(0 <= val && val <= 23)) { + ret = false; + } + break; + } + default: { + handled = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateBool + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual bool type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateBool(int key, QVariant& val, bool& validated) const +{ + NM_FUNCTION; + bool ret = true; + switch (key) { + + // Boolean + case IncomingSecureSockets: + case IncomingSSLWrapper: + case UseOutgoingAuthentication: + case OutgoingSecureSockets: + case OutgoingSSLWrapper: { + validated = true; + if (val.type() != QVariant::Bool) + ret = false; + break; + } + default: { + validated = false; + ret = false; + break; + } + } + return ret; +} + +/*! + \fn validateDateTime + \param key - setting data to validate. + \param val - value to validate. + \param validated - true if value was validated by the method + \return true if valid value, false otherwise. + + validates individual QDateTime type value. + */ +bool NmApiMailboxSettingsDataPrivate::validateDateTime(int key, QVariant& val, bool& validated) const +{ + NM_FUNCTION; + switch(key) { + case AoLastSuccessfulUpdate: { + if (val.type() != QVariant::DateTime) { + validated = true; + return false; + } + return true; + } + default: { + validated = false; + return false; + } + } +} + +/*! + \fn validateData + \return boolean - true, everything validated OK, false otherwise + + Validates data in this container. + */ +bool NmApiMailboxSettingsDataPrivate::validateData() const +{ + NM_FUNCTION; + QHash::const_iterator i = mSettings->constBegin(); + while (i != mSettings->constEnd()) { + + bool validated = false; + bool valid = false; + + int key = i.key(); + QVariant val = i.value(); + + ++i; + + valid = validateString(key ,val, validated); + if (validated) { + if (!valid){ + return valid; + } + continue; + } + + valid = validateInteger(key ,val, validated); + if (validated) { + if (!valid){ + return valid; + } + continue; + } + + valid = validateBool(key ,val, validated); + if (validated) { + if (!valid){ + return valid; + } + continue; + } + + valid = validateDateTime(key ,val, validated); + if (validated) { + if (!valid){ + return valid; + } + continue; + } + } + return true; +} + +QList NmApiMailboxSettingsDataPrivate::listSettings() const +{ + NM_FUNCTION; + return mSettings->keys(); +} + +/*! + \fn clearSettings + + Resets data in this container. + */ +void NmApiMailboxSettingsDataPrivate::clearSettings() +{ + mSettings->clear(); +} + +}//end namespace diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/src/nmapimessagemanager.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/src/nmapimessagemanager.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * Email message related operations + */ +#include +#include +#include +#include "nmapimessagemanager_p.h" + + +/*! + \class NmApiMessageManager + \brief A class for performing various operations on messages. + */ + + +namespace EmailClientApi +{ + + NmApiMessageManager::NmApiMessageManager(quint64 mailboxId,QObject *parent) + :QObject(parent) +{ + d = new NmApiMessageManagerPrivate(mailboxId,this); + connect(d, SIGNAL(messagesCopied(int)),this,SIGNAL(messagesCopied(int))); + connect(d, SIGNAL(messagesCreated(int)),this,SIGNAL(messagesCreated(int))); + connect(d, SIGNAL(messagesMoved(int)),this,SIGNAL(messagesMoved(int))); + connect(d, SIGNAL(messagesDeleted(int)),this,SIGNAL(messagesDeleted(int))); +} + +NmApiMessageManager::~NmApiMessageManager() +{ + delete d; +} + + + // creates a new email message + // signaled with draftMessageCreated(NmApiMessage *message,int result) + // * ownership transferred +bool NmApiMessageManager::createDraftMessage(const QVariant *initData) +{ + NM_FUNCTION; + Q_UNUSED(initData); + return false; +} + + // creates fw message + // signaled with forwardMessageCreated(NmApiMessage *message,int result) + // * ownership transferred + bool NmApiMessageManager::createForwardMessage(const QVariant *initData) + { + NM_FUNCTION; + Q_UNUSED(initData); + return false; + } + + // creates reply message + // signaled with replyMessageCreated(NmApiMessage *message,int result) + // * ownership transferred +bool NmApiMessageManager::createReplyMessage(const QVariant *initData, + bool replyAll) +{ + NM_FUNCTION; + Q_UNUSED(initData); + Q_UNUSED(replyAll); + return false; +} + +/*! + \fn moveMessages + \param messageIds Id list of source messages. + \param sourceFolderId Id of the source folder. + \param targetFolderId Id of the target folder. + \return true if operation was successfully started. + + Starts async move operation for given messages. + Completion signalled with messagesMoved(int result). + */ +bool NmApiMessageManager::moveMessages(const QList messageIds, + quint64 sourceFolderId, + quint64 targetFolderId) +{ + return d->moveMessages(messageIds,sourceFolderId,targetFolderId); +} + +/*! + \fn copyMessages + \param messageIds Id list of source messages. + \param sourceFolder Id of the source folder. + \param targetFolder Id of the target folder. + \return true if operation was successfully started. + + Starts async copy operation for given messages. + Completion signalled with messagesCopied(int result). + */ +bool NmApiMessageManager::copyMessages(const QList messageIds, + quint64 sourceFolder, + quint64 targetFolder) +{ + return d->copyMessages(messageIds, sourceFolder, targetFolder); +} + +// signaled with messageSaved(quint64 messageId, int result) +bool NmApiMessageManager::saveMessage(const NmApiMessage &message) +{ + Q_UNUSED(message); + return false; +} + +// deletes message +// signaled with messagesDeleted(int result) +bool NmApiMessageManager::deleteMessages(const QList messageIds) +{ + Q_UNUSED(messageIds); + return false; +} + + // starts fetching rest of message body from server + // signaled with messageFetched(quint64 messageId, int result) +bool NmApiMessageManager::fetch(const NmApiMessage &message) +{ + Q_UNUSED(message); + return false; +} + + // moves message to outbox. Actual sending time may be immediate or scheduled + // signaled with messageSent(quint64 messageId, int result) +bool NmApiMessageManager::send(const NmApiMessage &message) +{ + Q_UNUSED(message); + return false; +} + +// creates new attachment for a message. Currently attachment can be specified as file name (attachmentSpec is QString) +// signaled with attachmentCreated(quint64 attachemntId) +// * +bool NmApiMessageManager::createAttachment(NmApiEmailMessage &message, + const QVariant &attachmenSpec) +{ + Q_UNUSED(message); + Q_UNUSED(attachmenSpec); + return false; +} + +// removes attachment from a message +// signaled with attachmentRemoved(int result) +bool NmApiMessageManager::removeAttachment(NmApiEmailMessage &message, +quint64 /*attachmentId*/) +{ + Q_UNUSED(message); + return false; +} + +} // namespace EmailClientApi + + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/src/nmapimessagemanager_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/src/nmapimessagemanager_p.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * Email message related operations + */ + +#include +#include +#include +#include +#include +#include "nmapimessagemanager_p.h" +#include "emailtrace.h" + +namespace EmailClientApi +{ + +NmApiMessageManagerPrivate::NmApiMessageManagerPrivate(quint64 mailboxId,QObject *parent) +: QObject(parent), + mState(NmApiMessageManagerPrivate::EIdle), mMailboxId(mailboxId) +{ + NM_FUNCTION; + + mFactory = NmApiDataPluginFactory::instance(); + mPlugin = mFactory->plugin(); + if(mPlugin) { + connect(mPlugin, + SIGNAL(messageEvent(NmMessageEvent, + const NmId&, + const QList&, + const NmId&)), + this, + SLOT(messageEventHandler(NmMessageEvent, + const NmId&, + const QList&, + const NmId&))); + } + NmDataPluginInterface *interface = mFactory->interfaceInstance(); + interface->subscribeMailboxEvents(mailboxId); + +} + +NmApiMessageManagerPrivate::~NmApiMessageManagerPrivate() +{ + NM_FUNCTION; + NmDataPluginInterface *interface = mFactory->interfaceInstance(); + interface->unsubscribeMailboxEvents(mMailboxId); + NmApiDataPluginFactory::releaseInstance(mFactory); +} + +/*! + \fn moveMessages + \param messageIds Id list of source messages. + \param sourceFolderId Id of the source folder. + \param targetFolderId Id of the target folder. + \return true if operation was successfully started. + + Starts async move operation for given messages. + Completion signalled with messagesMoved(int result). + */ +bool NmApiMessageManagerPrivate::moveMessages(const QList messageIds, + quint64 sourceFolder, + quint64 targetFolder) +{ + NM_FUNCTION; + Q_UNUSED(messageIds); + Q_UNUSED(sourceFolder); + Q_UNUSED(targetFolder); + return false; +} + +/*! + \fn copyMessages + \param messageIds Id list of source messages. + \param sourceFolder Id of the source folder. + \param targetFolder Id of the target folder. + \return true if operation was successfully started. + + Starts async copy operation for given messages. + Completion signalled with messagesCopied(int result). + */ +bool NmApiMessageManagerPrivate::copyMessages(const QList messageIds, + const quint64 sourceFolder, + const quint64 targetFolder) +{ + NM_FUNCTION; + bool ret = false; + NmId targetFolderNmId(targetFolder); + NmId sourceFolderNmId(sourceFolder); + mTarget = targetFolderNmId; + mMessages = messageIds; + + NmDataPluginInterface *interface = mFactory->interfaceInstance(); + + if (interface) { + mState = NmApiMessageManagerPrivate::ECopyPending; + if (interface->copyMessages(mMailboxId, + messageIds, + sourceFolderNmId, + targetFolderNmId)==0) { + ret = true; + } + } + mState = NmApiMessageManagerPrivate::EIdle; + return ret; +} + +/*! + \fn messageEventHandler + \param event Event type. + \param folder Folder id. + \param messages Id list of messages involved. + \param mailBox Id of mailbox. + + Handler for plugin originated messageEvent. + */ +void NmApiMessageManagerPrivate::messageEventHandler(NmMessageEvent event, + const NmId &folder, + const QList &messages, + const NmId &mailBox) +{ + if(mMailboxId == mailBox && + mTarget == folder) { + switch(event) + { + case NmMessageCreated: { + if (mState==NmApiMessageManagerPrivate::ECopyPending) { + if(messages.count()==mMessages.count()) { + emit messagesCopied(0); + } + else { + emit messagesCopied(-1); + } + } + break; + } + + case NmMessageChanged: { + break; + } + + case NmMessageDeleted: { + break; + } + + case NmMessageFound: { + break; + } + + default: { + break; + } + } + mState = NmApiMessageManagerPrivate::EIdle; + } +} +} //namespace + + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmclientapi/src/nmapipopimapsettingsmanager.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailservices/nmclientapi/src/nmapipopimapsettingsmanager.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,130 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "nmapipopimapsettingsmanager.h" + +#include +#include +#include +#include +#include + + +static const int DefaultPopPort = 110; +static const int DefaultImapPort = 993; + +using namespace EmailClientApi; + +NmApiPopImapSettingsManager::NmApiPopImapSettingsManager() +{ +} + +NmApiPopImapSettingsManager::~NmApiPopImapSettingsManager() +{ +} + +bool NmApiPopImapSettingsManager::populateDefaults(const QString &mailboxType, NmApiMailboxSettingsData &data) +{ + bool ret = false; + + QT_TRY { + if (mailboxType==NmApiMailboxTypePop) { + populatePopDefs(data); + ret = true; + } + else if (mailboxType==NmApiMailboxTypeImap) { + populateImapDefs(data); + ret = true; + } + else { + ret = false; + } + } + QT_CATCH(...){ + ret = false; + } + + return ret; +} + +void NmApiPopImapSettingsManager::populateImapDefs(NmApiMailboxSettingsData &data) +{ + QScopedPointer imapSettings(new CImImap4Settings()); + + QScopedPointer iapPref; + QT_TRAP_THROWING(iapPref.reset(CImIAPPreferences::NewLC()); + CleanupStack::Pop(iapPref.data())); + + QScopedPointer mailAccounts; + QT_TRAP_THROWING(mailAccounts.reset(CEmailAccounts::NewL())); + + QT_TRAP_THROWING( mailAccounts->PopulateDefaultImapSettingsL(*imapSettings,*iapPref)); + + data.setValue(IncomingLoginName, + XQConversions::s60Desc8ToQString(imapSettings->LoginName())); + + data.setValue(IncomingPassword, + XQConversions::s60Desc8ToQString(imapSettings->Password())); + + data.setValue(IncomingMailServer, + XQConversions::s60DescToQString(imapSettings->ServerAddress())); + + if (imapSettings->Port()) { + data.setValue(IncomingPort, imapSettings->Port()); + } + else { + data.setValue(IncomingPort, DefaultImapPort); + } + + data.setValue(OutgoingSecureSockets, imapSettings->SecureSockets()); + data.setValue(OutgoingSSLWrapper, imapSettings->SSLWrapper()); +} + +void NmApiPopImapSettingsManager::populatePopDefs(NmApiMailboxSettingsData &data) +{ + QScopedPointer popSettings(new CImPop3Settings()); + + QScopedPointer iapPref; + QT_TRAP_THROWING(iapPref.reset(CImIAPPreferences::NewLC()); + CleanupStack::Pop(iapPref.data())); + + QScopedPointer mailAccounts; + QT_TRAP_THROWING(mailAccounts.reset(CEmailAccounts::NewL())); + + QT_TRAP_THROWING( mailAccounts->PopulateDefaultPopSettingsL(*popSettings,*iapPref)); + + data.setValue(IncomingLoginName, + XQConversions::s60Desc8ToQString(popSettings->LoginName())); + + data.setValue(IncomingPassword, + XQConversions::s60Desc8ToQString(popSettings->Password())); + + data.setValue(IncomingMailServer, + XQConversions::s60DescToQString(popSettings->ServerAddress())); + + if (popSettings->Port()) { + data.setValue(IncomingPort, popSettings->Port()); + } + else { + data.setValue(IncomingPort, DefaultPopPort); + } + + data.setValue(OutgoingSecureSockets, popSettings->SecureSockets()); + data.setValue(OutgoingSSLWrapper, popSettings->SSLWrapper()); +} + + diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmregister/src/nmmailboxregisterinterface.cpp --- a/emailservices/nmregister/src/nmmailboxregisterinterface.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/nmregister/src/nmmailboxregisterinterface.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include "nmicons.h" @@ -33,6 +33,7 @@ //not mandatory const QString hsItemWidgetUri("widget:uri"); const QString hsItemDescription("item:description"); +const QString hsItemLocDescription("item:locdescription"); //for icon - not mandatory const QString hsIconFileName("icon:filename");//to display specific icon from file const QString hsIconName("icon:name");// HbIcon @@ -198,7 +199,7 @@ map[hsitemLaunchUri] = formLaunchUri(accountId); map[hsitemPublisherId] = NmPublisherName; map[hsItemWidgetUri] = NmHsWidget; - map[hsItemDescription] = hbTrId("txt_mail_widget_dblist_preview_of_recent_mail"); + map[hsItemLocDescription] = "loc://KNmRegisterLocFileName/txt_mail_widget_dblist_preview_of_recent_mail"; map[hsIconFileName] = accountIconName; // to add widget params that are mapped to widgets properties map[NmHsWidgetParamAccountId] = QString::number(accountId); diff -r 780f926bc26c -r f83bd4ae1fe3 emailservices/nmregister/translations/nmregister.ts --- a/emailservices/nmregister/translations/nmregister.ts Fri Jun 11 16:42:02 2010 +0300 +++ b/emailservices/nmregister/translations/nmregister.ts Thu Jun 24 14:32:18 2010 +0300 @@ -3,23 +3,23 @@ - Custom layout ID parent (no children). Descriptive text of mail widget in application library, landscape + Descriptive text of mail widget in application library, landscape Preview of recent mail - txt_mail_widget_l_dblist_preview_of_recent_mail + qtl_list_sec2_large_graphic Mail Widget_L07 dblist_1_val - Mail Widget + Ma False - Custom layout ID parent (no children). Descriptive text of mail widget in application library, portrait + Descriptive text of mail widget in application library, portrait Preview of recent mail - txt_mail_widget_dblist_preview_of_recent_mail + qtl_list_sec_large_graphic Mail Widget_P07 dblist_1_val - Mail Widget + Ma False diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailcpplugin/inc/nmsettingsplugin.h --- a/emailuis/nmailcpplugin/inc/nmsettingsplugin.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailcpplugin/inc/nmsettingsplugin.h Thu Jun 24 14:32:18 2010 +0300 @@ -18,17 +18,17 @@ #ifndef NMSETTINGSPLUGIN_H #define NMSETTINGSPLUGIN_H -#include +#include #include class CpSettingFormItemData; class CpItemDataHelper; class QTranslator; -class NmSettingsPlugin : public QObject, public CpPluginPlatInterface +class NmSettingsPlugin : public QObject, public CpPluginInterface { Q_OBJECT - Q_INTERFACES(CpPluginPlatInterface) + Q_INTERFACES(CpPluginInterface) public: @@ -36,7 +36,7 @@ virtual ~NmSettingsPlugin(); - virtual CpSettingFormItemData *createSettingFormItemData( + virtual QList createSettingFormItemData( CpItemDataHelper &itemDataHelper) const; private: diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailcpplugin/src/nmsettingsplugin.cpp --- a/emailuis/nmailcpplugin/src/nmsettingsplugin.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailcpplugin/src/nmsettingsplugin.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -27,7 +27,7 @@ /*! \class NmSettingsPlugin - \brief The class implements CpPluginPlatInterface which is an interface + \brief The class implements CpPluginInterface which is an interface for plug-ins that are displayed in the control panel application. The class works as an entry point for NMail settings. @@ -67,19 +67,20 @@ \param itemDataHelper Helper class that helps control panel plug-ins to connect slots to inner widgets of the setting items. - \return Instance of CpSettingFormItemData. - Caller is the owner of the returned instance. + \return List of CpSettingFormItemData items. */ -CpSettingFormItemData *NmSettingsPlugin::createSettingFormItemData( +QList NmSettingsPlugin::createSettingFormItemData( CpItemDataHelper &itemDataHelper) const { NM_FUNCTION; HbIcon icon("qtg_large_email"); + QList list; - return new NmSettingsViewFactory(itemDataHelper, - hbTrId("txt_mail_title_control_panel"), "", - icon); + CpSettingFormItemData* viewFactory = new NmSettingsViewFactory(itemDataHelper, + hbTrId("txt_mail_title_control_panel"), "", icon); + list.append(viewFactory); + return list; } Q_EXPORT_PLUGIN2(nmsettingsplugin, NmSettingsPlugin); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/conf/nmeditorview.docml --- a/emailuis/nmailui/conf/nmeditorview.docml Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/conf/nmeditorview.docml Thu Jun 24 14:32:18 2010 +0300 @@ -9,14 +9,14 @@ - + - + @@ -28,14 +28,14 @@ - + - + @@ -47,14 +47,14 @@ - + - + @@ -66,7 +66,7 @@ - + @@ -129,7 +129,7 @@ - + diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/conf/nmmailboxlistview.docml --- a/emailuis/nmailui/conf/nmmailboxlistview.docml Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/conf/nmmailboxlistview.docml Thu Jun 24 14:32:18 2010 +0300 @@ -3,8 +3,6 @@ - - diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/conf/nmmessagelistview.docml --- a/emailuis/nmailui/conf/nmmessagelistview.docml Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/conf/nmmessagelistview.docml Thu Jun 24 14:32:18 2010 +0300 @@ -4,7 +4,6 @@ - @@ -19,6 +18,7 @@ + diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmaction.h --- a/emailuis/nmailui/inc/nmaction.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmaction.h Thu Jun 24 14:32:18 2010 +0300 @@ -40,7 +40,7 @@ }; inline NmAction(int priorityIndex); - inline void setPriorityIndex(int priorityIndex); + inline void setPriorityIndex(const int priorityIndex); inline int priorityIndex() const; inline void setAvailabilityCondition(NmAvailabilityCondition condition); inline NmAvailabilityCondition availabilityCondition() const; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmactionrequest.h --- a/emailuis/nmailui/inc/nmactionrequest.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmactionrequest.h Thu Jun 24 14:32:18 2010 +0300 @@ -45,8 +45,6 @@ NmActionContextViewMessageSearchList, NmActionContextViewViewer, NmActionContextViewEditor - // Add more view id's when - // funtionality is added }; /*! @@ -58,9 +56,7 @@ NmActionContextDataNone=0, NmActionContextDataMailbox, NmActionContextDataFolder, - NmActionContextDataMessage, - //Add more context menu types - //when functionality is added + NmActionContextDataMessage }; @@ -77,7 +73,7 @@ class NmActionRequest { public: - inline NmActionRequest(NmActionObserver* observer, + inline NmActionRequest(NmActionObserver *observer, NmActionContextMenuType menuType=NmActionOptionsMenu, NmActionContextView contextView=NmActionContextViewNone, NmActionContextDataType contextDataType=NmActionContextDataNone, @@ -95,7 +91,7 @@ mMessageId(messageId), mRequestData(requestData){}; - inline NmActionObserver* observer() const {return mObserver;} + inline NmActionObserver *observer() const {return mObserver;} inline NmActionContextMenuType menuType() const {return mMenuType;} inline NmActionContextView contextView() const {return mContextView;} inline NmActionContextDataType contextDataType() const {return mContextDataType;} diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmapplication.h --- a/emailuis/nmailui/inc/nmapplication.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmapplication.h Thu Jun 24 14:32:18 2010 +0300 @@ -44,7 +44,7 @@ { Q_OBJECT public: - NmApplication(QObject *parent); + NmApplication(QObject *parent, quint32 accountId=0); ~NmApplication(); void enterNmUiView(NmUiStartParam *startParam); HbMainWindow* mainWindow(); @@ -61,7 +61,7 @@ void delayedExitApplication(); void handleOperationCompleted(const NmOperationCompletionEvent &event); void viewReady(); - void launchSettings(HbAction* action); + void launchSettings(HbAction *action); private: void createMainWindow(); @@ -69,10 +69,10 @@ void resetViewStack(); private: - HbMainWindow *mMainWindow; // Not owned + HbMainWindow *mMainWindow; // Owned QStack *mViewStack; // Owned NmUiViewId mActiveViewId; - NmUiEngine *mUiEngine; // Owned + NmUiEngine *mUiEngine; // Not owned, singleton instance HbAction *mBackAction; // Owned NmUiExtensionManager *mExtensionManager;// Owned NmSendServiceInterface *mSendServiceInterface; // Owned @@ -90,6 +90,7 @@ bool mViewReady; NmId mLastOperationMailbox; HbMessageBox *mQueryDialog; // Owned + bool mBackButtonPressed; }; #endif // NMAPPLICATION_H diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmattachmentmanager.h --- a/emailuis/nmailui/inc/nmattachmentmanager.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmattachmentmanager.h Thu Jun 24 14:32:18 2010 +0300 @@ -59,7 +59,7 @@ void changeProgress(int value); void completeAttachmentFetch(int result); void completeMessageFetch(int result); - + private: NmUiEngine &mUiEngine; QPointer mFetchOperation; // Not owned diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmattachmentpicker.h --- a/emailuis/nmailui/inc/nmattachmentpicker.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmattachmentpicker.h Thu Jun 24 14:32:18 2010 +0300 @@ -31,7 +31,7 @@ Q_OBJECT public: - NmAttachmentPicker(QObject* parent = 0); + NmAttachmentPicker(QObject *parent = 0); ~NmAttachmentPicker(); public slots: @@ -43,12 +43,12 @@ void fetchCameraVideo(); signals: - void attachmentsFetchOk(const QVariant& fileNames); - void attachmentsFetchError(int errorCode, const QString& errorMessage); + void attachmentsFetchOk(const QVariant &fileNames); + void attachmentsFetchError(int errorCode, const QString &errorMessage); private: - void fetch(const QString& interface, const QString& operation, - const QList* args = 0); + void fetch(const QString &interface, const QString &operation, + const QList *args = 0); void fetchFromCamera(int mode); private: diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmbaseview.h --- a/emailuis/nmailui/inc/nmbaseview.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmbaseview.h Thu Jun 24 14:32:18 2010 +0300 @@ -34,11 +34,11 @@ { Q_OBJECT public: - NmBaseView(NmUiStartParam* startParam, + NmBaseView(NmUiStartParam *startParam, NmApplication &application, QGraphicsItem *parent = 0); virtual ~NmBaseView(); - virtual void reloadViewContents(NmUiStartParam* startParam) = 0; + virtual void reloadViewContents(NmUiStartParam *startParam) = 0; virtual NmUiViewId nmailViewId() const = 0; virtual void okToExitView(); virtual void aboutToExitView(); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmeditorcontent.h --- a/emailuis/nmailui/inc/nmeditorcontent.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmeditorcontent.h Thu Jun 24 14:32:18 2010 +0300 @@ -21,52 +21,59 @@ #include #include "nmuiviewids.h" -enum MessageBodyType { PlainText, HTMLText }; - class HbAnchorLayout; class HbTextEdit; class HbDocumentLoader; class NmBaseViewScrollArea; -class NmEditorView; class NmMessage; class NmMessageEnvelope; class NmEditorHeader; class NmEditorTextEdit; class QNetworkAccessManager; +class NmApplication; -class NmEditorContent : public HbWidget +class NmEditorContent : public QObject { Q_OBJECT public: - NmEditorContent(QGraphicsItem *parent, - NmEditorView *parentView, + NmEditorContent(QObject *parent, HbDocumentLoader *documentLoader, - QNetworkAccessManager &manager); + QNetworkAccessManager &manager, + NmApplication &application); + virtual ~NmEditorContent(); void setMessageData(const NmMessage &originalMessage, - bool createReplyHeader = true); + NmUiEditorStartMode &editorStartMode); NmEditorTextEdit* editor() const; NmEditorHeader* header() const; private: void createConnections(); + void removeEmbeddedImages(QString &bodyContent); signals: void setPlainText(const QString&); + void setHtml(const QString&); public slots: void setEditorContentHeight(); + void setScrollPosition(int oldPos, int newPos); + void updateScrollPosition(const QPointF &newPosition); + +private: + enum MessageBodyType { NmPlainText, NmHTMLText }; private: - NmEditorHeader *mHeaderWidget; // Owned - NmEditorView *mParentView; // Not owned - HbAnchorLayout *mEditorLayout; // Not owned + NmEditorHeader *mHeaderWidget; // Not owned MessageBodyType mMessageBodyType; NmEditorTextEdit *mEditorWidget; // Not owned - NmBaseViewScrollArea *mBackgroundScrollArea; + NmBaseViewScrollArea *mScrollArea; // Not owned + HbWidget *mScrollAreaContents; // Not owned + QPointF mScrollPosition; + NmApplication &mApplication; }; #endif /* NMEDITORCONTENT_H_ */ diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmeditorheader.h --- a/emailuis/nmailui/inc/nmeditorheader.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmeditorheader.h Thu Jun 24 14:32:18 2010 +0300 @@ -20,15 +20,6 @@ #include #include "nmactionresponse.h" -// Header widget fields -enum -{ - EEditorToLine=0, - EEditorCcLine, - EEditorBccLine, - EEditorSubjectLine, - EEditorAttachmentLine -}; class HbGroupBox; class HbLabel; @@ -37,20 +28,20 @@ class NmRecipientLineEdit; class QGraphicsLinearLayout; class NmRecipientField; -class NmAttachmentList; +class NmAttachmentList; class NmEditorHeader : public QObject { Q_OBJECT public: - NmEditorHeader(HbDocumentLoader *documentLoader); + NmEditorHeader(QObject *parent, HbDocumentLoader *documentLoader); virtual ~NmEditorHeader(); qreal headerHeight() const; - NmHtmlLineEdit* subjectEdit() const; - NmRecipientLineEdit* toEdit() const; - NmRecipientLineEdit* ccEdit() const; - NmRecipientLineEdit* bccEdit() const; + NmHtmlLineEdit *subjectEdit() const; + NmRecipientLineEdit *toEdit() const; + NmRecipientLineEdit *ccEdit() const; + NmRecipientLineEdit *bccEdit() const; void setPriority(NmMessagePriority priority=NmMessagePriorityNormal); void setPriority(NmActionResponseCommand prio=NmActionResponseCommandNone); void addAttachment(const QString &fileName, const QString &fileSize, const NmId &nmid); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmeditorview.h --- a/emailuis/nmailui/inc/nmeditorview.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmeditorview.h Thu Jun 24 14:32:18 2010 +0300 @@ -25,7 +25,6 @@ #include "nmactionresponse.h" #include "nmattachmentfetchobserver.h" -class QGraphicsLinearLayout; class HbTextEdit; class HbDocumentLoader; class HbProgressDialog; @@ -45,7 +44,7 @@ class NmAttachmentPicker; class HbMessageBox; class NmAttachmentManager; - +class HbVkbHost; class NmEditorView : public NmBaseView, public NmActionObserver, @@ -54,9 +53,8 @@ Q_OBJECT public: - NmEditorView(NmApplication &application, - NmUiStartParam* startParam, + NmUiStartParam *startParam, NmUiEngine &uiEngine, NmAttachmentManager &attaManager, QGraphicsItem *parent = 0); @@ -64,39 +62,30 @@ public: - void reloadViewContents(NmUiStartParam* startParam); NmUiViewId nmailViewId() const; HbWidget* scrollAreaContents(); void okToExitView(); void aboutToExitView(); void viewReady(); - + void handleActionCommand(NmActionResponse &menuResponse); + void progressChanged(int value); + void fetchCompleted(int result); + public slots: - void orientationChanged(Qt::Orientation orientation); void createOptionsMenu(); void setButtonsDimming(bool enabled); void attachmentLongPressed(NmId attachmentPartId, QPointF point); void invalidAddressQuery(HbAction* action); void okToExitQuery(HbAction* action); - -public: // From NmActionObserver - - void handleActionCommand(NmActionResponse &menuResponse); - -public: // From NmAttachmentFetchObserver - void progressChanged(int value); - void fetchCompleted(int result); - + void sendProgressDialogCancelled(); + private slots: - void messageCreated(int result); - void adjustViewDimensions(); void oneAttachmentAdded(const QString &fileName, const NmId &msgPartId, int result); - void allAttachmentsAdded(int result); void attachmentRemoved(int result); void removeAttachmentTriggered(); @@ -106,9 +95,10 @@ void onAttachmentsFetchError(int errorCode, const QString& errorMessage); void switchCcBccFieldVisibility(); void fetchProgressDialogCancelled(); + void vkbOpened(); + void vkbClosed(); private: - void loadViewLayout(); void setMailboxName(); void fetchProgressDialogShow(); @@ -126,33 +116,25 @@ QString addressListToString(const QList &list) const; QString addressListToString(const QList &list) const; void enableToolBarAttach(bool enable); - -public slots: - - void sendProgressDialogCancelled(); + void showChrome(bool show); private: // Data - NmApplication &mApplication; NmUiEngine &mUiEngine; NmAttachmentManager &mAttaManager; HbDocumentLoader *mDocumentLoader; // Owned QObjectList mWidgetList; // Owned - NmBaseViewScrollArea *mScrollArea; // Not owned - HbWidget *mScrollAreaContents; // Not owned NmEditorTextEdit *mEditWidget; // Not owned NmEditorHeader *mHeaderWidget; // Not owned NmMessage *mMessage; // Owned - QGraphicsLinearLayout *mLayout; NmEditorContent *mContentWidget; // Owned HbMenu *mPrioritySubMenu; // Owned HbMenu *mAttachmentListContextMenu; // Owned NmId mSelectedAttachment; - + HbVkbHost *mVkbHost; // Not owned QPointer mMessageCreationOperation; // Not owned QPointer mAddAttachmentOperation; // Not owned QPointer mRemoveAttachmentOperation; // Not owned - HbProgressDialog *mWaitDialog; // Owned. HbMessageBox* mQueryDialog; // Owned NmAttachmentPicker* mAttachmentPicker; // Owned diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmmailboxlistview.h --- a/emailuis/nmailui/inc/nmmailboxlistview.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmmailboxlistview.h Thu Jun 24 14:32:18 2010 +0300 @@ -33,7 +33,7 @@ class HbAbstractViewItem; class NmAction; -class NmMailboxListView : public NmBaseView, public NmActionObserver +class NmMailboxListView : public NmBaseView { Q_OBJECT public: @@ -49,9 +49,6 @@ NmUiViewId nmailViewId() const; void viewReady(); -public: // From NmActionObserver - void handleActionCommand(NmActionResponse &menuResponse); - public slots: void itemActivated(const QModelIndex &index); void openSelectedMailBox(); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmmailboxlistviewitem.h --- a/emailuis/nmailui/inc/nmmailboxlistviewitem.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmmailboxlistviewitem.h Thu Jun 24 14:32:18 2010 +0300 @@ -33,7 +33,6 @@ HbListViewItem *createItem(); void updateChildItems(); bool canSetModelIndex(const QModelIndex &index); - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); protected: void polishEvent(); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmmessagelistview.h --- a/emailuis/nmailui/inc/nmmessagelistview.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmmessagelistview.h Thu Jun 24 14:32:18 2010 +0300 @@ -72,7 +72,6 @@ void showNoMessagesText(); void hideNoMessagesText(); void handleSyncStateEvent(NmSyncState syncState, const NmId & mailboxId); - void handleConnectionEvent(NmConnectState connectState, const NmId &mailboxId); void folderSelected(); private: @@ -102,6 +101,7 @@ NmId mSelectedFolderId; NmId mSelectedMailboxId; int mPreviousModelCount; + bool mIsFirstSyncInMessageList; }; #endif /* NMMESSAGELISTVIEW_H_ */ diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmmessagelistviewitem.h --- a/emailuis/nmailui/inc/nmmessagelistviewitem.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmmessagelistviewitem.h Thu Jun 24 14:32:18 2010 +0300 @@ -23,10 +23,6 @@ class HbLabel; class HbTextItem; class HbFrameItem; -class QStyleOptionGraphicsItem; -class QGraphicsLayoutItem; -class HbWidgetBase; -class HbStyleOptionAbstractViewItem; class NmMessageListModel; class NmMessageListModelItem; class NmMessageEnvelope; @@ -43,7 +39,6 @@ void updateChildItems(); HbTreeViewItem *createItem(); bool canSetModelIndex(const QModelIndex &index) const; - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); QRectF contiguousSelectionArea() const { return QRectF(); }; private: @@ -51,7 +46,7 @@ void setContentsToMessageItem(const NmMessageEnvelope &envelope, bool dividersActive); void setFontsRead(); void setFontsUnread(); - void setFonts(const QColor &colorRole, HbFontSpec &spekki); + void setFonts(const QColor &colorRole, HbFontSpec &fontSpec); void getFontSizes(); QString senderFieldText(const NmMessageEnvelope &envelope); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmrecipientfield.h --- a/emailuis/nmailui/inc/nmrecipientfield.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmrecipientfield.h Thu Jun 24 14:32:18 2010 +0300 @@ -49,9 +49,7 @@ public slots: void setText(const QString &text); -#ifdef Q_OS_SYMBIAN void launchContactsPicker(); -#endif private: HbDocumentLoader &mDocumentLoader; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmsendserviceinterface.h --- a/emailuis/nmailui/inc/nmsendserviceinterface.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmsendserviceinterface.h Thu Jun 24 14:32:18 2010 +0300 @@ -23,11 +23,7 @@ #include #include -#ifdef Q_OS_SYMBIAN #include -#else -#define NM_WINS_ENV -#endif // FORWARD DECLARATIONS class NmDataManager; @@ -41,11 +37,7 @@ class NmSendServiceInterface -#ifndef NM_WINS_ENV : public XQServiceProvider -#else - : public QObject -#endif { Q_OBJECT @@ -69,11 +61,11 @@ private: // Data - NmApplication *mApplication; // Not owned + NmApplication *mApplication; // Not owned NmUiEngine &mUiEngine; int mAsyncReqId; - NmUiStartParam *mStartParam; - NmMailboxSelectionDialog *mSelectionDialog; + NmUiStartParam *mStartParam; // Owned + NmMailboxSelectionDialog *mSelectionDialog; // Owned HbView *mCurrentView; }; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmuidocumentloader.h --- a/emailuis/nmailui/inc/nmuidocumentloader.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmuidocumentloader.h Thu Jun 24 14:32:18 2010 +0300 @@ -28,9 +28,9 @@ { public: NmUiDocumentLoader(const HbMainWindow *window); - virtual ~NmUiDocumentLoader(); + ~NmUiDocumentLoader(); protected: - virtual QObject *createObject(const QString& type, const QString &name); + QObject *createObject(const QString& type, const QString &name); }; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmuiheaders.h --- a/emailuis/nmailui/inc/nmuiheaders.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmuiheaders.h Thu Jun 24 14:32:18 2010 +0300 @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -87,8 +88,10 @@ #include #include #include +#include +#include +#include -#ifdef Q_OS_SYMBIAN #include #include #include @@ -97,7 +100,8 @@ #include #include #include -#endif +#include +#include #include @@ -117,6 +121,9 @@ #include #include +// other +#include + // nmailui #include "nmhtmllineedit.h" #include "nmaction.h" diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmuriserviceinterface.h --- a/emailuis/nmailui/inc/nmuriserviceinterface.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmuriserviceinterface.h Thu Jun 24 14:32:18 2010 +0300 @@ -22,57 +22,39 @@ // INCLUDES #include #include - -#ifdef Q_OS_SYMBIAN #include -#else -#define NM_WINS_ENV -#endif // FORWARD DECLARATIONS -class NmDataManager; -class NmMailboxListModel; class NmUiEngine; class NmApplication; class NmUiStartParam; class NmMailboxSelectionDialog; class NmId; class HbView; -class NmAddress; -class NmUriServiceInterface -#ifndef NM_WINS_ENV - : public XQServiceProvider -#else - : public QObject -#endif +class NmUriServiceInterface : public XQServiceProvider { Q_OBJECT - public: - - NmUriServiceInterface( QObject *parent, - NmUiEngine &mailboxListModel, - NmApplication* application); + NmUriServiceInterface(QObject *parent, + NmUiEngine &uiEngine, + NmApplication *application); virtual ~NmUriServiceInterface(); public slots: - bool view(const QString& uri); void selectionDialogClosed(NmId &mailboxId); private: - void launchEditorView(NmId mailboxId); void cancelService(); private: // Data - - NmApplication *mApplication; // Not owned + NmApplication *mApplication; // Not owned NmUiEngine &mUiEngine; int mAsyncReqId; - NmUiStartParam *mStartParam; - NmMailboxSelectionDialog *mSelectionDialog; + NmUiStartParam *mStartParam; // Owned + NmMailboxSelectionDialog *mSelectionDialog; //Owned HbView *mCurrentView; }; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmutilities.h --- a/emailuis/nmailui/inc/nmutilities.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmutilities.h Thu Jun 24 14:32:18 2010 +0300 @@ -23,10 +23,7 @@ class NmMessage; class NmMessageEnvelope; class NmAddress; -class NmOperationCompletionEvent; -class QFile; class XQSharableFile; -class NmOperationCompletionEvent; class HbMessageBox; /*! @@ -37,39 +34,28 @@ Q_OBJECT public: enum NmAddressValidationType { - ValidAddress, - InvalidAddress, - Default + NmValidAddress, + NmInvalidAddress, + NmDefault }; - static void getRecipientsFromMessage( const NmMessage &message, QList &recipients, - NmAddressValidationType type = Default ); - + NmAddressValidationType type = NmDefault ); static bool isValidEmailAddress( const QString &emailAddress ); - static QString addressToDisplayName( const NmAddress &address ); - static bool parseEmailAddress( const QString &emailAddress, NmAddress &address ); - static QString cleanupDisplayName( const QString &displayName ); - - static int openFile(XQSharableFile &file); - + static int openFile(XQSharableFile &file); static QString truncate( const QString &string, int length ); - static QString attachmentSizeString(const int sizeInBytes); - static void displayErrorNote(QString noteText); - - static HbMessageBox* displayQuestionNote(QString noteText, - QObject* receiver = 0, - const char* member = 0); - - static HbMessageBox* displayWarningNote(QString noteText, - QObject* receiver = 0, - const char* member = 0); - + static HbMessageBox *displayQuestionNote(QString noteText, + QObject *receiver = 0, + const char *member = 0); + + static HbMessageBox *displayWarningNote(QString noteText, + QObject *receiver = 0, + const char *member = 0); static QString createReplyHeader(const NmMessageEnvelope &env); }; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmviewerheader.h --- a/emailuis/nmailui/inc/nmviewerheader.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmviewerheader.h Thu Jun 24 14:32:18 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: NMail viewer view header widget definition * */ @@ -54,7 +54,7 @@ QString formatRecipientList(const QString &sender, const QList &to, const QList &cc); - QString addressToDisplayInHtml(const NmAddress &addr); + QString addressToDisplay(const NmAddress &addr); private: NmMessage *mMessage; // Not owned diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmviewerserviceinterface.h --- a/emailuis/nmailui/inc/nmviewerserviceinterface.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmviewerserviceinterface.h Thu Jun 24 14:32:18 2010 +0300 @@ -21,44 +21,27 @@ // INCLUDES #include -#ifdef Q_OS_SYMBIAN #include -#else -#define NM_WINS_ENV -#include -#endif - // FORWARD DECLARATIONS -class HbView; class NmApplication; class NmUiEngine; class NmId; -#ifndef NM_WINS_ENV class NmViewerServiceInterface : public XQServiceProvider -#else -class NmViewerServiceInterface : public QObject -#endif { Q_OBJECT - public: - NmViewerServiceInterface(QObject *parent, NmApplication *application, NmUiEngine &uiEngine); - ~NmViewerServiceInterface(); public slots: - void viewMessage(QVariant mailboxId, QVariant folderId, QVariant messageId); - private: - NmApplication *mApplication; // Not owned NmUiEngine &mUiEngine; int mAsyncReqId; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmviewerview.h --- a/emailuis/nmailui/inc/nmviewerview.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmviewerview.h Thu Jun 24 14:32:18 2010 +0300 @@ -105,8 +105,6 @@ void createToolBar(); void setAttachmentList(); void createAndShowWaitDialog(); - void setWebViewWidth(int width); - void setWebViewHeighth(int height); private: NmApplication &mApplication; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/inc/nmviewerwebview.h --- a/emailuis/nmailui/inc/nmviewerwebview.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/inc/nmviewerwebview.h Thu Jun 24 14:32:18 2010 +0300 @@ -42,27 +42,24 @@ { Q_OBJECT public: - NmMailViewerWK(); - ~NmMailViewerWK(); + NmMailViewerWK(); + ~NmMailViewerWK(); virtual QVariant loadResource (int type, const QUrl &name, NmId &partId, bool &isFetched); void setParentView(NmViewerView *parentView); void addContent(QString key, QVariant val, NmId partId, bool isFetched); - + virtual bool event(QEvent* event); + +protected: + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + virtual void gestureEvent(QGestureEvent* event); + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + private: QMap mContent; NmViewerView *mParentView; // Not owned -}; - -class NmEventFilterWK : public QObject -{ - Q_OBJECT -public: - NmEventFilterWK(QObject* parent = 0); -protected: - bool eventFilter(QObject* object, QEvent* event); - bool gestureEvent(QGestureEvent* event); -private: - Q_DISABLE_COPY(NmEventFilterWK) + bool mSuppressRelease; }; #endif /* NMVIEWERWEBVIEW_H_*/ diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/nmailui.pro --- a/emailuis/nmailui/nmailui.pro Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/nmailui.pro Thu Jun 24 14:32:18 2010 +0300 @@ -11,6 +11,7 @@ CONFIG += debug CONFIG += hb CONFIG += service +CONFIG += no_icon SERVICE.FILE = service_conf.xml diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/main.cpp --- a/emailuis/nmailui/src/main.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/main.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -18,6 +18,9 @@ #include "nmuiheaders.h" +//parameter values +const QString NmActivityName("EmailInboxView"); + /*! int main */ @@ -29,22 +32,28 @@ // Load the translation file. QTranslator translator; - -#ifdef Q_OS_SYMBIAN QString lang = QLocale::system().name(); QString appName = "mail_"; QString path = "Z:/resource/qt/translations/"; -#else - QString lang; - QString appName = "mail"; - QString path = ":/translations"; -#endif translator.load(appName + lang, path); app.installTranslator(&translator); app.setApplicationName(hbTrId("txt_mail_title_mail")); - NmApplication *nmApplication = new NmApplication(&app); + NmApplication *nmApplication = NULL; + + quint32 accountId = 0; + if (app.activateReason() == Hb::ActivationReasonActivity && app.activateId() == NmActivityName) + { + QVariant data = app.activateParams().take("accountId"); + QString accountIdString = data.toString(); + accountId = accountIdString.toULongLong(); + nmApplication = new NmApplication(&app,accountId); + } + else + { + nmApplication = new NmApplication(&app); + } int ret = app.exec(); delete nmApplication; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmapplication.cpp --- a/emailuis/nmailui/src/nmapplication.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmapplication.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -16,12 +16,8 @@ */ #include "nmuiheaders.h" -#ifdef Q_OS_SYMBIAN #include #include -#else -#define NM_WINS_ENV -#endif static const QString NmSendServiceName = "nmail.com.nokia.symbian.IFileShare"; @@ -33,7 +29,7 @@ /*! Constructor */ -NmApplication::NmApplication(QObject *parent) +NmApplication::NmApplication(QObject *parent, quint32 accountId) :QObject(parent), mMainWindow(NULL), mViewStack(NULL), @@ -48,17 +44,12 @@ mAttaManager(NULL), mSettingsViewLauncher(NULL), mViewReady(false), -mQueryDialog(NULL) +mQueryDialog(NULL), +mBackButtonPressed(false) { NM_FUNCTION; - // TEMPORARY WORKAROUND TO PREVENT PANIC User panic 66, where there is - // a PushL call to cleanup stack without any TRAP. -#ifdef Q_OS_SYMBIAN TRAP_IGNORE(mUiEngine = NmUiEngine::instance()); -#else - mUiEngine = NmUiEngine::instance(); -#endif // Create network access manager and cache for application use. mNetManager = new NmViewerViewNetManager(*mUiEngine); @@ -71,7 +62,6 @@ // attachment manager can be shared between viewer and editor, ownership in application class mAttaManager = new NmAttachmentManager(*mUiEngine); -#ifndef NM_WINS_ENV mSendServiceInterface = new NmSendServiceInterface(NmSendServiceName, NULL, *mUiEngine, this); mSendServiceInterface2 = @@ -82,7 +72,12 @@ new NmMailboxServiceInterface(NULL, *mUiEngine, this); mViewerServiceInterface = new NmViewerServiceInterface(NULL, this, *mUiEngine); -#endif + + if(accountId != 0) { + QVariant mailbox; + mailbox.setValue(mUiEngine->getPluginIdByMailboxId(accountId).id()); + mMailboxServiceInterface->displayInboxByMailboxId(mailbox); + } mEffects = new NmUiEffects(*mMainWindow); } @@ -94,18 +89,16 @@ { NM_FUNCTION; - if (mQueryDialog){ + if (mQueryDialog) { delete mQueryDialog; mQueryDialog=NULL; } -#ifndef NM_WINS_ENV delete mSendServiceInterface; delete mSendServiceInterface2; delete mUriServiceInterface; delete mMailboxServiceInterface; delete mViewerServiceInterface; -#endif resetViewStack(); delete mViewStack; @@ -114,12 +107,12 @@ mUiEngine = NULL; delete mBackAction; delete mExtensionManager; - if (mNetManager){ - if (mNetManager->cache()){ + if (mNetManager) { + if (mNetManager->cache()) { mNetManager->cache()->clear(); } delete mNetManager; - mNetManager=NULL; + mNetManager = NULL; } // Effects needs to be deleted before MainWindow. delete mEffects; @@ -139,11 +132,7 @@ { NM_FUNCTION; -#ifndef NM_WINS_ENV bool service = XQServiceUtil::isService(); -#else - bool service = false; -#endif // Register custom widget files HbStyleLoader::registerFilePath(":nmmessagelistviewitem.widgetml"); @@ -190,11 +179,17 @@ enterNmUiView(startParam); } - // Start to filter main window events to get "end key" event in all possible situations. Using - // event() is not enough to catch the event as it is only called if the view widget has the - // focus. Note: if key capturing (xqkeycapture.h) is required it is probably best to implement - // an own QMainWindow class and do the capturing there, not in the views. - mMainWindow->installEventFilter(this); + if (mMainWindow) { + // Start to filter main window events to get "end key" event in all possible situations. Using + // event() is not enough to catch the event as it is only called if the view widget has the + // focus. Note: if key capturing (xqkeycapture.h) is required it is probably best to implement + // an own QMainWindow class and do the capturing there, not in the views. + mMainWindow->installEventFilter(this); + + // Optimize the custom paint functions. + // Currently effects to NmViewerHeader::paint & NmAttachmentListWidget::paint + mMainWindow->setOptimizationFlag(QGraphicsView::DontSavePainterState); + } } /*! @@ -206,9 +201,9 @@ NM_FUNCTION; mViewReady = true; - if (!mViewStack->isEmpty()) { + if (mViewStack && !mViewStack->isEmpty()) { NmBaseView *currentView = mViewStack->top(); - if (currentView){ + if (currentView) { currentView->viewReady(); } } @@ -222,7 +217,7 @@ { NM_FUNCTION; - bool consumed = false; + bool consumed(false); if (obj && obj == mMainWindow && event && event->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast(event); @@ -247,7 +242,7 @@ { NM_FUNCTION; - if (newView) { + if (newView && mViewStack) { NM_COMMENT("nmailui: view exists"); newView->setNavigationAction(mBackAction); @@ -272,13 +267,13 @@ // Set toolbars orientation HbToolBar *tb = newView->toolBar(); - if(tb){ + if (tb) { tb->setOrientation(Qt::Horizontal); } // hide old view NM_COMMENT("nmailui: removeView"); - if (hideView){ + if (hideView) { mMainWindow->removeView(hideView); } @@ -292,16 +287,25 @@ */ void NmApplication::prepareForPopView() { - if (mViewStack->size() > 0) { + if (mViewStack && mViewStack->size() > 0) { // Get view pointer NmBaseView *view = mViewStack->top(); - - // View will call/signal popView if exitting is ok. - view->okToExitView(); + if (view){ + NmUiViewId topViewId = view->nmailViewId(); + + // We must know in popView, are we coming with back button from message view + // to prevent the send animation. + if (topViewId == NmUiViewMessageEditor) { + mBackButtonPressed = true; + } + + // View will call/signal popView if exitting is ok. + view->okToExitView(); + } } // If the view stack is now empty quit the app // This happens also when the app has been started as a service - else if (mViewStack->size() == 0) { + else if (mViewStack && mViewStack->size() == 0) { exitApplication(); } } @@ -312,70 +316,72 @@ void NmApplication::popView() { NM_FUNCTION; - - if (mViewStack->size() > 0) { - // Get view pointer - NmBaseView *view = mViewStack->top(); - - // ask view if it's ok to exit - NmUiViewId topViewId = view->nmailViewId(); - - // Prepare for send animation if returing from editor and message has been sent. - if (topViewId == NmUiViewMessageEditor && mUiEngine->isSendingMessage()) { - mEffects->prepareEffect(NmUiEffects::NmEditorSendMessageAnimation); - } - mViewStack->pop(); - // Call custom exit function - view->aboutToExitView(); - // Remove view from stack. - mMainWindow->removeView(view); - - // if we were in editor and sent a message, pop viewer from stack first - // so we can go straight to mail list - if (!mViewStack->isEmpty() && topViewId == NmUiViewMessageEditor && - mUiEngine->isSendingMessage() && - mViewStack->top()->nmailViewId() == NmUiViewMessageViewer) { - NmBaseView *tmpView = mViewStack->pop(); - mMainWindow->removeView(tmpView); - delete tmpView; - tmpView = NULL; - } - - if (!mViewStack->isEmpty()) { - // Activate next view in stack - NmBaseView *showView = mViewStack->top(); - mMainWindow->addView(showView); - mMainWindow->setCurrentView(showView); - // Store activated view id - mActiveViewId=showView->nmailViewId(); - // Perform send animation if requested. - mEffects->startEffect(NmUiEffects::NmEditorSendMessageAnimation); - } - - delete view; - view = NULL; - -#ifndef NM_WINS_ENV - // If view was started as service, move the app now - // to the background, unless it was started when the app - // was already in foreground.. - if (mServiceViewId == topViewId) { - mServiceViewId = NmUiViewNone; - NM_COMMENT("Returned from service view"); - - // if started as embedded or while the app was in foreground, - // do not hide the app - if (!XQServiceUtil::isEmbedded() && - !mForegroundService) { - XQServiceUtil::toBackground(true); + if (mViewStack && mViewStack->size() > 0) { + NmBaseView *view = mViewStack->top(); + if (view) { + // Get top view id + NmUiViewId topViewId = view->nmailViewId(); + + // Prepare for send animation if returing from editor and message has been sent. + if (topViewId == NmUiViewMessageEditor && mUiEngine->isSendingMessage()) { + // If we are coming from message editor with back button + // do not prepare the send animation. + if (!mBackButtonPressed) { + mEffects->prepareEffect(NmUiEffects::NmEditorSendMessageAnimation); + } + } + mBackButtonPressed = false; + mViewStack->pop(); + // Call custom exit function + view->aboutToExitView(); + // Remove view from stack. + mMainWindow->removeView(view); + + // if we were in editor and sent a message, pop viewer from stack first + // so we can go straight to mail list + if (!mViewStack->isEmpty() && topViewId == NmUiViewMessageEditor && + mUiEngine->isSendingMessage() && + mViewStack->top()->nmailViewId() == NmUiViewMessageViewer) { + NmBaseView *tmpView = mViewStack->pop(); + mMainWindow->removeView(tmpView); + delete tmpView; + tmpView = NULL; + } + + if (!mViewStack->isEmpty()) { + // Activate next view in stack + NmBaseView *showView = mViewStack->top(); + mMainWindow->addView(showView); + mMainWindow->setCurrentView(showView); + // Store activated view id + mActiveViewId=showView->nmailViewId(); + // Perform send animation if requested. + mEffects->startEffect(NmUiEffects::NmEditorSendMessageAnimation); + } + + delete view; + view = NULL; + + // If view was started as service, move the app now + // to the background, unless it was started when the app + // was already in foreground.. + if (mServiceViewId == topViewId) { + mServiceViewId = NmUiViewNone; + NM_COMMENT("Returned from service view"); + + // if started as embedded or while the app was in foreground, + // do not hide the app + if (!XQServiceUtil::isEmbedded() && + !mForegroundService) { + XQServiceUtil::toBackground(true); + } } } -#endif } // If the view stack is now empty quit the app // This happens also when the app has been started as a service - if (mViewStack->size()==0) { + if (mViewStack && mViewStack->size() == 0) { exitApplication(); } } @@ -390,12 +396,12 @@ if (mViewStack && !mViewStack->isEmpty()) { int viewCount = mViewStack->count(); // Pop and destroy all views - for (int i=0;ipop(); mMainWindow->removeView(view); delete view; } - mActiveViewId=NmUiViewNone; + mActiveViewId = NmUiViewNone; } } @@ -404,7 +410,7 @@ If requested view is already open, it is requested to reload. Otherwise view object is created and pushed to view stack */ -void NmApplication::enterNmUiView(NmUiStartParam* startParam) +void NmApplication::enterNmUiView(NmUiStartParam *startParam) { NM_FUNCTION; @@ -422,11 +428,11 @@ mForegroundService = true; // at least one view must remain in the stack - while (mViewStack->count()>1) { + while (mViewStack->count( )> 1) { NmUiViewId topId = mViewStack->top()->nmailViewId(); - if (topId!=NmUiViewMessageEditor && - topId!=NmUiViewMailboxList && - topId!=startParam->viewId()) { + if (topId != NmUiViewMessageEditor && + topId != NmUiViewMailboxList && + topId != startParam->viewId()) { prepareForPopView(); } else { @@ -440,7 +446,7 @@ // Check whether requested view is already active // and if so, ask it to reload contents with new start parameter data // Do not reuse the view if started as service to editor view (ShareUI) - if (mActiveViewId==startParam->viewId() && + if (mActiveViewId == startParam->viewId() && (!startParam->service() || mActiveViewId!=NmUiViewMessageEditor)) { mViewStack->top()->reloadViewContents(startParam); } @@ -499,7 +505,7 @@ default: // Reset view stack and exit application delete startParam; - startParam=NULL; + startParam = NULL; resetViewStack(); break; } @@ -521,7 +527,6 @@ { NM_FUNCTION; -#ifndef NM_WINS_ENV delete mSendServiceInterface; mSendServiceInterface = NULL; delete mSendServiceInterface2; @@ -532,9 +537,7 @@ mMailboxServiceInterface = NULL; delete mViewerServiceInterface; mViewerServiceInterface = NULL; -#endif resetViewStack(); - // Do housekeeping if needed. qApp->quit(); } @@ -546,13 +549,13 @@ NM_FUNCTION; // Exit the application in the next event loop - QTimer::singleShot(0, this, SLOT(exitApplication())); + QMetaObject::invokeMethod(this, "exitApplication", Qt::QueuedConnection); } /*! Getter for main window instance. */ -HbMainWindow* NmApplication::mainWindow() +HbMainWindow *NmApplication::mainWindow() { NM_FUNCTION; @@ -562,7 +565,7 @@ /*! Getter for main UI extension manager */ -NmUiExtensionManager& NmApplication::extManager() +NmUiExtensionManager &NmApplication::extManager() { NM_FUNCTION; @@ -572,7 +575,7 @@ /*! Getter for network access manager */ -NmViewerViewNetManager& NmApplication::networkAccessManager() +NmViewerViewNetManager &NmApplication::networkAccessManager() { NM_FUNCTION; @@ -592,9 +595,9 @@ HbDeviceProfile altP(currentP.alternateProfileName()); QSize curPSize = currentP.logicalSize(); QSize altPSize = altP.logicalSize(); - if (mMainWindow->orientation()==Qt::Horizontal){ + if (mMainWindow->orientation() == Qt::Horizontal) { // Get wide profile size in landscape - if (curPSize.width()>altPSize.width()){ + if (curPSize.width() > altPSize.width()) { ret = curPSize; } else{ @@ -603,7 +606,7 @@ } else { // Get narrow profile size in portrait - if (curPSize.width()mailboxById(mLastOperationMailbox); // no ownership - if( mailboxMetaData ) { - // launch - mSettingsViewLauncher->launchSettingsView(mLastOperationMailbox, mailboxMetaData->name()); - } + // mailboxname required + NmMailboxMetaData *mailboxMetaData = mUiEngine->mailboxById(mLastOperationMailbox); // no ownership + if( mailboxMetaData ) { + // launch + mSettingsViewLauncher->launchSettingsView(mLastOperationMailbox, mailboxMetaData->name()); } } } @@ -680,7 +680,7 @@ { // At the moment there is no good way to check the foreground state QWindowSurface *surface = mMainWindow->windowSurface(); - mForegroundService = (surface != NULL); + mForegroundService = (surface != 0); NM_COMMENT(QString("NmApplication::updateVisibilityState fg=%1").arg(mForegroundService)); return mForegroundService; } diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmattachmentlist.cpp --- a/emailuis/nmailui/src/nmattachmentlist.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmattachmentlist.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -37,12 +37,10 @@ NmAttachmentList::~NmAttachmentList() { NM_FUNCTION; - - clearList(); } /*! - Insert new list item. Returns the count of the attachment in list + Insert new list item. Returns the index of the attachment in list */ int NmAttachmentList::insertAttachment( const QString &fullFileName, @@ -95,13 +93,14 @@ } /*! - Remove attachment from list position + Removes attachment from list position */ void NmAttachmentList::removeAttachment(int arrayIndex) { NM_FUNCTION; - if (arrayIndex < count()) { + if (arrayIndex < count() && + arrayIndex >= 0 ) { // Remove UI mListWidget.removeAttachment(arrayIndex); // Remove from data structure diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmattachmentmanager.cpp --- a/emailuis/nmailui/src/nmattachmentmanager.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmattachmentmanager.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -17,7 +17,7 @@ #include "nmuiheaders.h" -const int NmAttachmentManagerInitialProgressPercent = 5; +static const int NmAttachmentManagerInitialProgressPercent = 5; /*! \class NmAttachmentManager @@ -32,6 +32,7 @@ mFetchOperation(NULL), mMsgFetchOperation(NULL), mFetchObserver(NULL), + mFetchMsg(NULL), mAttaId(0), mProgressValue(0), mIsFetching(false) @@ -48,6 +49,9 @@ // fetch operation deleted in cancel fetch cancelFetch(); + + delete mFetchMsg; + mFetchMsg = NULL; } /*! @@ -82,7 +86,7 @@ /*! Fetch attachments to a message. - Set observer with setObserver method to get process and complete events + Set observer with setObserver method to get progress and complete events \return bool true if fetch started, otherwise false. */ @@ -93,7 +97,7 @@ QList &messagePartIds) { NM_FUNCTION; - bool result = false; + bool result(false); // cancel old fetch operation, Does nothing if fetch not ongoing cancelFetch(); @@ -123,7 +127,7 @@ Fetch all message parts to a message. Fetches also message part data structure, if not fetched already. If earlier fetch operation exist it is cancelled and deleted. - Set observer with setObserver method to get process and complete events + Set observer with setObserver method to get progress and complete events */ void NmAttachmentManager::fetchAllMessageParts( const NmId &mailboxId, @@ -134,7 +138,7 @@ mFetchMsg = mUiEngine.message(mailboxId,folderId,messageId); // Check if we have part data structure. - if (mFetchMsg->childParts().count() == 0 && + if (mFetchMsg && mFetchMsg->childParts().count() == 0 && mFetchMsg->fetchedSize() < mFetchMsg->size()) { // cancel old fetch operation, Does nothing if fetch not ongoing @@ -239,30 +243,44 @@ if (result == NmNoError) { - // Reload message - mFetchMsg = mUiEngine.message( - mFetchMsg->envelope().mailboxId(), - mFetchMsg->envelope().folderId(), - mFetchMsg->envelope().messageId()); - if (mFetchMsg) { - QList partIds; - NmMessagePart *part; - foreach (part, mFetchMsg->childParts()) { - if (part->size() > part->fetchedSize()) { - partIds.append(part->partId()); + + NmId mailboxId = mFetchMsg->envelope().mailboxId(); + NmId folderId = mFetchMsg->envelope().folderId(); + NmId messageId = mFetchMsg->envelope().messageId(); + + // Delete object + delete mFetchMsg; + mFetchMsg = NULL; + + // Reload message + mFetchMsg = mUiEngine.message(mailboxId,folderId,messageId); + + if (mFetchMsg) { + QList partIds; + NmMessagePart *part; + foreach (part, mFetchMsg->childParts()) { + if (part->size() > part->fetchedSize()) { + partIds.append(part->partId()); + } } - } - if (partIds.count() > 0) { - mMsgFetchOperation = NULL; - fetchAttachments( - mFetchMsg->envelope().mailboxId(), - mFetchMsg->envelope().folderId(), - mFetchMsg->envelope().messageId(), - partIds); + if (partIds.count() > 0) { + mMsgFetchOperation = NULL; + fetchAttachments( + mFetchMsg->envelope().mailboxId(), + mFetchMsg->envelope().folderId(), + mFetchMsg->envelope().messageId(), + partIds); + } + else { + mFetchObserver->fetchCompleted(NmNoError); + } + // Delete object + delete mFetchMsg; + mFetchMsg = NULL; } else { - mFetchObserver->fetchCompleted(NmNoError); + mFetchObserver->fetchCompleted(NmNotFoundError); } } else { @@ -308,4 +326,3 @@ return mProgressValue; } - diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmattachmentpicker.cpp --- a/emailuis/nmailui/src/nmattachmentpicker.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmattachmentpicker.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -15,11 +15,10 @@ * */ -#include -#include #include "nmuiheaders.h" -const int NmAttachmentPickerStillMode = 0; -const int NmAttachmentPickerVideoMode = 1; + +static const int NmAttachmentPickerStillMode = 0; +static const int NmAttachmentPickerVideoMode = 1; /*! \class NmAttachmentPicker @@ -29,7 +28,7 @@ /*! Constructor */ -NmAttachmentPicker::NmAttachmentPicker(QObject* parent): +NmAttachmentPicker::NmAttachmentPicker(QObject *parent): QObject(parent), mRequest(NULL) { @@ -85,7 +84,7 @@ QString path; path = FmFileDialog::getSaveFileName(0, hbTrId("txt_mail_dialog_select_file")); - if(!path.isEmpty()) { + if (!path.isEmpty()) { QString temp = QDir::toNativeSeparators(path); emit attachmentsFetchOk(QVariant(temp)); } @@ -116,11 +115,11 @@ { NM_FUNCTION; - int cameraIndex = 0; //primary camera - int quality = 0; //default - bool allowModeSwitch = false; //not allowed to change - bool allowCameraSwitch = true; //allow changes - bool allowQualityChange = true; //allow changes + int cameraIndex(0); //primary camera + int quality(0); //default + bool allowModeSwitch(false); //not allowed to change + bool allowCameraSwitch(true); //allow changes + bool allowQualityChange(true); //allow changes QVariantMap parameters; parameters.insert(XQCAMERA_INDEX, cameraIndex); @@ -141,8 +140,8 @@ param the operation of the interface param the arguments that needed by the operation */ -void NmAttachmentPicker::fetch(const QString& interface, - const QString& operation, const QList* args) +void NmAttachmentPicker::fetch(const QString &interface, + const QString &operation, const QList *args) { NM_FUNCTION; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmbaseview.cpp --- a/emailuis/nmailui/src/nmbaseview.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmbaseview.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -26,7 +26,7 @@ /*! Constructor */ -NmBaseView::NmBaseView(NmUiStartParam* startParam, +NmBaseView::NmBaseView(NmUiStartParam *startParam, NmApplication &application, QGraphicsItem *parent) : HbView(parent), diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmeditorcontent.cpp --- a/emailuis/nmailui/src/nmeditorcontent.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmeditorcontent.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -19,26 +19,32 @@ // Layout static const char *NMUI_EDITOR_BODY = "BodyTextEdit"; +static const char *NMUI_EDITOR_SCROLL_AREA = "scrollArea"; +static const char *NMUI_EDITOR_SCROLL_AREA_CONTENTS = "scrollAreaContents"; +// Regular expression for selecting img tags with "cid" in the mail. +static const char *NMUI_EDITOR_REMOVE_EMBD_IMAGES_REG = + "(\\s*|/>\\s*|>\\s*))"; + /*! Constructor */ -NmEditorContent::NmEditorContent(QGraphicsItem *parent, - NmEditorView *parentView, +NmEditorContent::NmEditorContent(QObject *parent, HbDocumentLoader *documentLoader, - QNetworkAccessManager &manager) : - HbWidget(parent), + QNetworkAccessManager &manager, + NmApplication &application) : + QObject(parent), mHeaderWidget(NULL), - mParentView(parentView), - mEditorLayout(NULL), - mMessageBodyType(PlainText), + mMessageBodyType(NmPlainText), mEditorWidget(NULL), - mBackgroundScrollArea((NmBaseViewScrollArea*)parent) + mScrollArea(NULL), + mScrollAreaContents(NULL), + mApplication(application) { NM_FUNCTION; - // Add header area handling widget into layout - mHeaderWidget = new NmEditorHeader(documentLoader); + // Construct container for the header widgets + mHeaderWidget = new NmEditorHeader(this, documentLoader); // Get pointer to body text area handling widget mEditorWidget = qobject_cast(documentLoader->findWidget(NMUI_EDITOR_BODY)); @@ -48,14 +54,15 @@ mEditorWidget->setDocument(textDocument); textDocument->setParent(mEditorWidget); // ownership changes - mEditorWidget->init(mBackgroundScrollArea); - // we are interested in the editor widget's height changes - connect(mEditorWidget, SIGNAL(editorContentHeightChanged()), this, - SLOT(setEditorContentHeight())); + mScrollArea = qobject_cast + (documentLoader->findObject(NMUI_EDITOR_SCROLL_AREA)); // Enable style picker menu item. mEditorWidget->setFormatDialog(new HbFormatDialog()); + mScrollAreaContents = + qobject_cast(documentLoader->findWidget(NMUI_EDITOR_SCROLL_AREA_CONTENTS)); + // Create signal slot connections createConnections(); } @@ -66,8 +73,6 @@ NmEditorContent::~NmEditorContent() { NM_FUNCTION; - - delete mHeaderWidget; } /*! @@ -75,88 +80,76 @@ present, reply header is generated and set to editor. Reply envelope ownership is not transferred here. */ -void NmEditorContent::setMessageData(const NmMessage &originalMessage, - bool createReplyHeader) +void NmEditorContent::setMessageData(const NmMessage &originalMessage, + NmUiEditorStartMode &editorStartMode) { NM_FUNCTION; QString bodyContent; - // We create the "reply" header (also for forward message), but not to draft message. - if (mEditorWidget && createReplyHeader) { - QTextCursor cursor = mEditorWidget->textCursor(); - cursor.setPosition(0); - cursor.insertHtml(NmUtilities::createReplyHeader(originalMessage.envelope())); + // Create the "reply" header (also for forward message) + if (editorStartMode==NmUiEditorReply || editorStartMode==NmUiEditorReplyAll || + editorStartMode==NmUiEditorForward) { + bodyContent.append(NmUtilities::createReplyHeader(originalMessage.envelope())); } - // Take reply header as html format. - bodyContent.append(mEditorWidget->toHtml()); // Check which part is present. Html or plain text part. We use the original message parts. const NmMessagePart *htmlPart = originalMessage.htmlBodyPart(); const NmMessagePart *plainPart = originalMessage.plainTextBodyPart(); - if (htmlPart && mEditorWidget) { + if (htmlPart) { bodyContent.append(htmlPart->textContent()); + if(editorStartMode==NmUiEditorReply || editorStartMode==NmUiEditorReplyAll ) { + removeEmbeddedImages(bodyContent); + } emit setHtml(bodyContent); - mMessageBodyType = HTMLText; + mMessageBodyType = NmHTMLText; } else if (plainPart) { // Plain text part was present, set it to HbTextEdit bodyContent.append(plainPart->textContent()); emit setPlainText(bodyContent); - mMessageBodyType = PlainText; + mMessageBodyType = NmPlainText; } } /*! - This method set new height for the editor content when header or body field - height has been changed. - */ -void NmEditorContent::setEditorContentHeight() -{ - NM_FUNCTION; - - const QSizeF reso = HbDeviceProfile::current().logicalSize(); - qreal containerHeight = mEditorWidget->contentHeight() + mHeaderWidget->headerHeight(); - if (containerHeight < reso.height()) { - //Currently content height is too long because Chrome hiding is not supported. - //Fix this when Chrome works. - containerHeight = reso.height(); - qreal bodyContentHeight = - reso.height() - mHeaderWidget->headerHeight(); - mEditorWidget->setPreferredHeight(bodyContentHeight); - mEditorWidget->setMaximumHeight(bodyContentHeight); - } - mParentView->scrollAreaContents()->setMinimumHeight(containerHeight); - mParentView->scrollAreaContents()->setMaximumHeight(containerHeight); - mBackgroundScrollArea->setMaximumHeight(containerHeight); -} - -/*! This method creates all needed signal-slot connections */ void NmEditorContent::createConnections() { NM_FUNCTION; - // Body edit widget is also interested about bg scroll position change - connect(mBackgroundScrollArea, SIGNAL(scrollPositionChanged(QPointF)), - mEditorWidget, SLOT(updateScrollPosition(QPointF))); // Signal for setting HbTextEdit widgets html content connect(this, SIGNAL(setHtml(QString)), mEditorWidget, SLOT(setHtml(QString)), Qt::QueuedConnection); + // Signal for setting HbTextEdit widgets plain text content connect(this, SIGNAL(setPlainText(QString)), mEditorWidget, SLOT(setPlainText(QString)), Qt::QueuedConnection); + // Inform text edit widget that header height has been changed - connect(mHeaderWidget, SIGNAL(headerHeightChanged(int)), - mEditorWidget, SLOT(setHeaderHeight(int))); + connect(mHeaderWidget, SIGNAL(headerHeightChanged(int)), this, SLOT(setEditorContentHeight()), + Qt::QueuedConnection); + + // we are interested in the document's height changes + connect(mEditorWidget->document()->documentLayout(), SIGNAL(documentSizeChanged(QSizeF)), this, + SLOT(setEditorContentHeight()), Qt::QueuedConnection); + + // We need to update the scroll position according the editor cursor position + connect(mEditorWidget, SIGNAL(cursorPositionChanged(int, int)), this, + SLOT(setScrollPosition(int, int)), Qt::QueuedConnection); + + // We need to know the scroll area's current position for calculating the new position in + // setScrollPosition + connect(mScrollArea, SIGNAL(scrollPositionChanged(QPointF)), this, + SLOT(updateScrollPosition(QPointF)), Qt::QueuedConnection); } /*! Return pointer to the email body text edit widget */ -NmEditorTextEdit* NmEditorContent::editor() const +NmEditorTextEdit *NmEditorContent::editor() const { NM_FUNCTION; @@ -166,10 +159,116 @@ /*! Return pointer to the header widget */ -NmEditorHeader* NmEditorContent::header() const +NmEditorHeader *NmEditorContent::header() const { NM_FUNCTION; return mHeaderWidget; } +/*! + This slot is called when header widget height has been changed. Function performs + the repositioning of the body field and resizing of the editor and content area. + */ +void NmEditorContent::setEditorContentHeight() +{ + NM_FUNCTION; + + qreal topMargin = 0; + HbStyle().parameter("hb-param-margin-gene-top", topMargin); + + // header height + qreal headerHeight = mHeaderWidget->headerHeight(); + + // body area editor's document height with margins added + qreal documentHeightAndMargins = mEditorWidget->document()->size().height() + + (mEditorWidget->document()->documentMargin() * 2); + + // get the chrome height + qreal chromeHeight = 0; + HbStyle().parameter("hb-param-widget-chrome-height", chromeHeight); + + qreal toolbarHeight = 0; + HbStyle().parameter("hb-param-widget-toolbar-height", toolbarHeight); + + // screen height + qreal screenHeight = mApplication.screenSize().height(); + + // set min size for the body area so that at least the screen area is always filled + qreal bodyAreaMinSize = screenHeight - chromeHeight - topMargin - headerHeight; + + qreal bodyAreaSize = fmax(bodyAreaMinSize, documentHeightAndMargins); + + mScrollAreaContents->setPreferredHeight(topMargin + headerHeight + bodyAreaSize); +} + +/*! + This slot is called when cursor position is changed in body area using + 'pointing stick' or keyboard. Function will update the scroll position + of the content so that cursor does not go outside of the screen or + behind the virtual keyboard. + */ +void NmEditorContent::setScrollPosition(int oldPos, int newPos) +{ + NM_FUNCTION; + + Q_UNUSED(oldPos); + + qreal chromeHeight = 0; + HbStyle().parameter("hb-param-widget-chrome-height", chromeHeight); + + const QSizeF screenReso = mApplication.screenSize(); + qreal maxHeight = screenReso.height() - chromeHeight; + + // Get cursor position coordinates + QRectF cursorPosPix = mEditorWidget->rectForPosition(newPos); + + // Calculate the screen top and bottom boundaries, this means the part of the + // background scroll area which is currently visible. + qreal visibleRectTopBoundary; + qreal visibleRectBottomBoundary; + + qreal headerHeight = mHeaderWidget->headerHeight(); + + if (mScrollPosition.y() < headerHeight) { + // Header is completely or partially visible + visibleRectTopBoundary = headerHeight - mScrollPosition.y(); + visibleRectBottomBoundary = maxHeight - visibleRectTopBoundary; + } + else { + // Header is not visible + visibleRectTopBoundary = mScrollPosition.y() - headerHeight; + visibleRectBottomBoundary = visibleRectTopBoundary + maxHeight; + } + + // Do scrolling if cursor is out of the screen boundaries + if (cursorPosPix.y() > visibleRectBottomBoundary) { + // Do scroll forward + mScrollArea->scrollContentsTo(QPointF(0, cursorPosPix.y() - maxHeight + headerHeight)); + } + else if (cursorPosPix.y() + headerHeight < mScrollPosition.y()) { + // Do scroll backward + mScrollArea->scrollContentsTo(QPointF(0, cursorPosPix.y() + headerHeight)); + } +} + +/*! + This slot is called when background scroll areas scroll position has been shanged. +*/ +void NmEditorContent::updateScrollPosition(const QPointF &newPosition) +{ + NM_FUNCTION; + + mScrollPosition = newPosition; +} + +/*! + Removes embedded images from the message body + */ +void NmEditorContent::removeEmbeddedImages(QString &bodyContent) +{ + NM_FUNCTION; + + QRegExp regExp(NMUI_EDITOR_REMOVE_EMBD_IMAGES_REG, Qt::CaseInsensitive); + bodyContent.remove(regExp); +} \ No newline at end of file diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmeditorheader.cpp --- a/emailuis/nmailui/src/nmeditorheader.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmeditorheader.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -31,15 +31,16 @@ static const char *NMUI_EDITOR_PREFIX_CC = "editorCc"; static const char *NMUI_EDITOR_PREFIX_BCC = "editorBcc"; -static const int MaxRows = 10000; +static const int NmMaxRows = 10000; // this timeout seems to be long enough for all cases. see sendDelayedHeaderHeightChanged -static const int LayoutSystemWaitTimer = 500; // 0.5 sec +static const int NmLayoutSystemWaitTimer = 500; // 0.5 sec /*! Constructor */ -NmEditorHeader::NmEditorHeader(HbDocumentLoader *documentLoader) : +NmEditorHeader::NmEditorHeader(QObject *parent, HbDocumentLoader *documentLoader) : + QObject(parent), mDocumentLoader(documentLoader), mHeaderHeight(0), mIconVisible(false), @@ -76,52 +77,62 @@ // are hidden and removed from the layout at this phase. HbWidget *contentWidget = qobject_cast(mDocumentLoader->findWidget(NMUI_EDITOR_CONTAINER)); - mLayout = static_cast(contentWidget->layout()); - - // base class QObject takes the deleting responsibility - mToField = new NmRecipientField(this, *mDocumentLoader, NMUI_EDITOR_PREFIX_TO); - mCcField = new NmRecipientField(this, *mDocumentLoader, NMUI_EDITOR_PREFIX_CC); - mBccField = new NmRecipientField(this, *mDocumentLoader, NMUI_EDITOR_PREFIX_BCC); + if (contentWidget) { + mLayout = static_cast(contentWidget->layout()); + + // base class QObject takes the deleting responsibility + mToField = new NmRecipientField(this, *mDocumentLoader, NMUI_EDITOR_PREFIX_TO); + mCcField = new NmRecipientField(this, *mDocumentLoader, NMUI_EDITOR_PREFIX_CC); + mBccField = new NmRecipientField(this, *mDocumentLoader, NMUI_EDITOR_PREFIX_BCC); + + // Sets up editor properties like no prediction, lower case preferred etc. + HbEditorInterface toEditorInterface(mToField->editor()); + HbEditorInterface ccEditorInterface(mCcField->editor()); + HbEditorInterface bccEditorInterface(mBccField->editor()); + toEditorInterface.setUpAsLatinAlphabetOnlyEditor(); + ccEditorInterface.setUpAsLatinAlphabetOnlyEditor(); + bccEditorInterface.setUpAsLatinAlphabetOnlyEditor(); - // Cc field is not shown by default. It needs to be both hidden and removed from the layout. - mCcWidget = qobject_cast(mDocumentLoader->findWidget(NMUI_EDITOR_CC_FIELD)); - mCcWidget->hide(); - mLayout->removeItem(mCcWidget); - - // Bcc field is not shown by default. It needs to be both hidden and removed from the layout. - mBccWidget = qobject_cast(mDocumentLoader->findWidget(NMUI_EDITOR_BCC_FIELD)); - mBccWidget->hide(); - mLayout->removeItem(mBccWidget); - - mSubjectWidget = - qobject_cast(mDocumentLoader->findWidget(NMUI_EDITOR_SUBJECT_FIELD)); - mSubjectLayout = static_cast(mSubjectWidget->layout()); + // Cc field is not shown by default. It needs to be both hidden and removed from the layout. + mCcWidget = qobject_cast(mDocumentLoader->findWidget(NMUI_EDITOR_CC_FIELD)); + mCcWidget->hide(); + mLayout->removeItem(mCcWidget); + + // Bcc field is not shown by default. It needs to be both hidden and removed from the layout. + mBccWidget = qobject_cast(mDocumentLoader->findWidget(NMUI_EDITOR_BCC_FIELD)); + mBccWidget->hide(); + mLayout->removeItem(mBccWidget); - // Add Subject: field - mSubjectEdit = qobject_cast - (mDocumentLoader->findWidget(NMUI_EDITOR_SUBJECT_EDIT)); - mSubjectEdit->setMaxRows(MaxRows); - - // Add attachment list - NmAttachmentListWidget *attachmentList = qobject_cast - (mDocumentLoader->findWidget(NMUI_EDITOR_ATTACHMENT_LIST)); - // Create attachment list handling object - mAttachmentList = new NmAttachmentList(*attachmentList); - mAttachmentList->setParent(this); // ownership changes - attachmentList->hide(); - mLayout->removeItem(attachmentList); - - // Add priority icon - mPriorityIcon = qobject_cast - (mDocumentLoader->findWidget(NMUI_EDITOR_PRIORITY_ICON)); - mPriorityIcon->hide(); - mSubjectLayout->removeItem(mPriorityIcon); - - // follow-up icon is not yet supported - HbLabel *followUpIcon = qobject_cast - (mDocumentLoader->findWidget(NMUI_EDITOR_FOLLOWUP_ICON)); - followUpIcon->hide(); - mSubjectLayout->removeItem(followUpIcon); + mSubjectWidget = + qobject_cast(mDocumentLoader->findWidget(NMUI_EDITOR_SUBJECT_FIELD)); + mSubjectLayout = static_cast(mSubjectWidget->layout()); + + // Add Subject: field + mSubjectEdit = qobject_cast + (mDocumentLoader->findWidget(NMUI_EDITOR_SUBJECT_EDIT)); + mSubjectEdit->setMaxRows(NmMaxRows); + + // Add attachment list + NmAttachmentListWidget *attachmentList = qobject_cast + (mDocumentLoader->findWidget(NMUI_EDITOR_ATTACHMENT_LIST)); + // Create attachment list handling object + mAttachmentList = new NmAttachmentList(*attachmentList); + mAttachmentList->setParent(this); // ownership changes + attachmentList->hide(); + mLayout->removeItem(attachmentList); + + // Add priority icon + mPriorityIcon = qobject_cast + (mDocumentLoader->findWidget(NMUI_EDITOR_PRIORITY_ICON)); + mPriorityIcon->hide(); + mSubjectLayout->removeItem(mPriorityIcon); + + // follow-up icon is not yet supported + HbLabel *followUpIcon = qobject_cast + (mDocumentLoader->findWidget(NMUI_EDITOR_FOLLOWUP_ICON)); + followUpIcon->hide(); + mSubjectLayout->removeItem(followUpIcon); + } } /*! @@ -179,7 +190,7 @@ } /*! - Return the height of the whole header widget. + Return the sum of the header widget heights. This contains all the spacings a well. */ qreal NmEditorHeader::headerHeight() const { @@ -225,7 +236,7 @@ void NmEditorHeader::sendDelayedHeaderHeightChanged() { NM_FUNCTION; - QTimer::singleShot(LayoutSystemWaitTimer, this, SLOT(sendHeaderHeightChanged())); + QTimer::singleShot(NmLayoutSystemWaitTimer, this, SLOT(sendHeaderHeightChanged())); } /*! @@ -289,7 +300,7 @@ { NM_FUNCTION; - bool recipientsFieldsEmpty = true; + bool recipientsFieldsEmpty(true); if (mToField->text().length()) { recipientsFieldsEmpty = false; } @@ -380,7 +391,7 @@ mLayout->insertItem(mLayout->count() - 1, &mAttachmentList->listWidget()); mAttachmentList->listWidget().show(); } - sendDelayedHeaderHeightChanged(); + sendHeaderHeightChanged(); } /*! @@ -439,8 +450,7 @@ void NmEditorHeader::attachmentActivated(int arrayIndex) { NM_FUNCTION; - - // + emit attachmentShortPressed(mAttachmentList->nmIdByIndex(arrayIndex)); } diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmeditortextdocument.cpp --- a/emailuis/nmailui/src/nmeditortextdocument.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmeditortextdocument.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -67,8 +67,10 @@ emit documentLayoutChanged(); } } - mReplyList.removeAll(reply); - reply->deleteLater(); + // If this has created the request, then this needs to handle deletion also. + if (mReplyList.removeAll(reply)) { + reply->deleteLater(); + } } } diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmeditorview.cpp --- a/emailuis/nmailui/src/nmeditorview.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmeditorview.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -19,12 +19,8 @@ // Layout file and view static const char *NMUI_EDITOR_VIEW_XML = ":/docml/nmeditorview.docml"; static const char *NMUI_EDITOR_VIEW= "editorview"; -static const char *NMUI_EDITOR_SCROLL_AREA = "scrollArea"; -static const char *NMUI_EDITOR_SCROLL_AREA_CONTENTS = "scrollAreaContents"; -static const int NmOrientationTimer=100; - -static const QString Delimiter("; "); +static const QString NmDelimiter("; "); /*! \class NmEditorView @@ -45,7 +41,6 @@ mUiEngine(uiEngine), mAttaManager(attaManager), mDocumentLoader(NULL), - mScrollArea(NULL), mEditWidget(NULL), mHeaderWidget(NULL), mMessage(NULL), @@ -92,7 +87,6 @@ delete mMessage; mWidgetList.clear(); delete mDocumentLoader; - delete mContentWidget; delete mPrioritySubMenu; if (mAttachmentListContextMenu) { @@ -124,7 +118,7 @@ mPrioritySubMenu = NULL; // Use document loader to load the view - bool ok = false; + bool ok(false); mWidgetList = mDocumentLoader->load(NMUI_EDITOR_VIEW_XML, &ok); if (ok == true && mWidgetList.count()) { @@ -134,14 +128,11 @@ setWidget(view); } - mScrollArea = qobject_cast - (mDocumentLoader->findObject(NMUI_EDITOR_SCROLL_AREA)); - mScrollAreaContents = qobject_cast - (mDocumentLoader->findObject(NMUI_EDITOR_SCROLL_AREA_CONTENTS)); + mContentWidget = new NmEditorContent(this, mDocumentLoader, + mApplication.networkAccessManager(), mApplication); - mContentWidget = new NmEditorContent(mScrollArea, this, mDocumentLoader, - mApplication.networkAccessManager()); mEditWidget = mContentWidget->editor(); + mHeaderWidget = mContentWidget->header(); // Set default color for user - entered text if editor is in re/reAll/fw mode @@ -197,23 +188,45 @@ { NM_FUNCTION; - Q_UNUSED(orientation); - // Adjust content height - QTimer::singleShot(NmOrientationTimer, this, SLOT(adjustViewDimensions())); - QTimer::singleShot(NmOrientationTimer, mHeaderWidget, SLOT(sendHeaderHeightChanged())); + // If switching to horizontal, chrome must be hided + if (mVkbHost && orientation == Qt::Horizontal && + mVkbHost->keypadStatus() == HbVkbHost::HbVkbStatusOpened) { + showChrome(false); + } + + // content widget height needs to be set according to the new orientation to get the scroll + // area work correctly + mHeaderWidget->sendDelayedHeaderHeightChanged(); } /*! - Set new dimensions after orientation change. -*/ -void NmEditorView::adjustViewDimensions() + This slot is signaled by VKB when it opens + */ +void NmEditorView::vkbOpened() +{ + if (mApplication.mainWindow()->orientation() == Qt::Horizontal) { + showChrome(false); + } +} + +/*! + This slot is signaled by VKB when it closes. + */ +void NmEditorView::vkbClosed() { - NM_FUNCTION; - - if (mScrollAreaContents) { - const QSize reso = mApplication.screenSize(); - mScrollAreaContents->setMinimumWidth(reso.width()); - mScrollAreaContents->setMaximumWidth(reso.width()); + showChrome(true); +} + +/*! + Hide or show chrome. + */ +void NmEditorView::showChrome(bool show) +{ + if (show) { + showItems(Hb::StatusBarItem | Hb::TitleBarItem | Hb::ToolBarItem); + } + else { + hideItems(Hb::StatusBarItem | Hb::TitleBarItem | Hb::ToolBarItem); } } @@ -227,52 +240,45 @@ return NmUiViewMessageEditor; } -/*! - ScrollArea contents -*/ -HbWidget* NmEditorView::scrollAreaContents() -{ - NM_FUNCTION; - - return mScrollAreaContents; -} - /* Launch dialog for query user if we want to exit the editor */ void NmEditorView::okToExitView() { NM_FUNCTION; - - NmEditorHeader *header = mContentWidget->header(); - - bool okToExit = true; + + bool okToExit(true); - // show the query if the message has not been sent - if (mMessage && header) { - // see if editor has any content - int subjectLength = 0; - if (header->subjectEdit()) { - subjectLength = header->subjectEdit()->text().length(); - } - - QList attachmentList; - mMessage->attachmentList(attachmentList); - - okToExit = (subjectLength == 0 && mContentWidget->editor()->document()->isEmpty()); - - // content exists, verify exit from user - if (!okToExit) { - if (mQueryDialog) { - delete mQueryDialog; - mQueryDialog = 0; + if (mContentWidget) { + NmEditorHeader *header = mContentWidget->header(); + // show the query if the message has not been sent + if (mMessage && header) { + // see if editor has any content + int subjectLength = 0; + if (header->subjectEdit()) { + subjectLength = header->subjectEdit()->text().length(); } - // Launch query dialog. - mQueryDialog = - NmUtilities::displayQuestionNote(hbTrId("txt_mail_dialog_save_message_to_drafts"), - this, - SLOT(okToExitQuery(HbAction*))); - } + + QList attachmentList; + mMessage->attachmentList(attachmentList); + + if (mContentWidget->editor()) { + okToExit = (subjectLength == 0 && mContentWidget->editor()->document()->isEmpty()); + } + + // content exists, verify exit from user + if (!okToExit) { + if (mQueryDialog) { + delete mQueryDialog; + mQueryDialog = 0; + } + // Launch query dialog. + mQueryDialog = + NmUtilities::displayQuestionNote(hbTrId("txt_mail_dialog_save_message_to_drafts"), + this, + SLOT(okToExitQuery(HbAction*))); + } + } } // no need to query anything, just exit. @@ -286,7 +292,7 @@ /*! Handle the user selection is it ok to exit. */ -void NmEditorView::okToExitQuery(HbAction* action) +void NmEditorView::okToExitQuery(HbAction *action) { NM_FUNCTION; @@ -356,12 +362,16 @@ menu()->addAction(dummy); initializeVKB(); + + //Get VKB host instance and start to listen VKB open and close signals for hiding the chrome. + HbEditorInterface editorInterface(mContentWidget->editor()); + mVkbHost = editorInterface.vkbHost(); + connect(mVkbHost, SIGNAL(keypadOpened()), this, SLOT(vkbOpened())); + connect(mVkbHost, SIGNAL(keypadClosed()), this, SLOT(vkbClosed())); + connect(mContentWidget->header(), SIGNAL(recipientFieldsHaveContent(bool)), this, SLOT(setButtonsDimming(bool)) ); - // Set dimensions - adjustViewDimensions(); - // Connect to observe orientation change events connect(mApplication.mainWindow(), SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation))); @@ -427,19 +437,34 @@ startMessageCreation(*mStartParam); } else { - mWaitDialog->close(); - - // Show fetching failed note - HbNotificationDialog *note = new HbNotificationDialog(); - note->setIcon(HbIcon(QLatin1String("note_warning"))); - QString noteText = hbTrId("txt_mail_dpopinfo_loading_failed"); - note->setTitle(noteText); - note->setTitleTextWrapping(Hb::TextWordWrap); - note->setDismissPolicy(HbPopup::TapAnywhere); - note->setAttribute(Qt::WA_DeleteOnClose); - note->setSequentialShow(true); - note->show(); + // Show the fetching failed note only when + // the error is not Device/System errors, + if (result != NmNoError && + result != NmNotFoundError && + result != NmGeneralError && + result != NmCancelError && + result != NmAuthenticationError && + result != NmServerConnectionError && + result != NmConnectionError) { + + HbNotificationDialog *note = new HbNotificationDialog(); + + bool enalbeAttribute(true); + note->setAttribute(Qt::WA_DeleteOnClose, enalbeAttribute); + + note->setIcon(HbIcon(QLatin1String("note_warning"))); + + note->setTitle(hbTrId("txt_mail_dpopinfo_loading_failed")); + note->setTitleTextWrapping(Hb::TextWordWrap); + + note->setDismissPolicy(HbNotificationDialog::TapAnywhere); + note->setTimeout(HbNotificationDialog::StandardTimeout); + + note->setSequentialShow(true); + note->show(); + } + mWaitDialog->close(); QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection); } } @@ -486,7 +511,7 @@ if (mMessageCreationOperation && mMessageCreationOperation->isRunning()) { mMessageCreationOperation->cancelOperation(); } - + // original message is now fetched so start message creation if (startMode == NmUiEditorForward) { mMessageCreationOperation = mUiEngine.createForwardMessage(mailboxId, msgId); @@ -530,7 +555,7 @@ // verify addresses before sending QList invalidAddresses; if (mMessage) { - NmUtilities::getRecipientsFromMessage(*mMessage, invalidAddresses, NmUtilities::InvalidAddress); + NmUtilities::getRecipientsFromMessage(*mMessage, invalidAddresses, NmUtilities::NmInvalidAddress); } if (invalidAddresses.count() > 0) { @@ -575,11 +600,7 @@ mMessage = NULL; preliminaryOperations.clear(); -#ifndef NM_WINS_ENV bool service = XQServiceUtil::isService(); -#else - bool service = false; -#endif // If sending is started as a service, progress dialog needs to be shown // so long that sending is finished otherwise we can close pop current view. @@ -595,12 +616,10 @@ connect(mServiceSendingDialog, SIGNAL(cancelled()), this, SLOT(sendProgressDialogCancelled())); -#ifndef NM_WINS_ENV if (!XQServiceUtil::isEmbedded()) { // Hide the application. XQServiceUtil::toBackground(true); } -#endif // Display the wait dialog. mServiceSendingDialog->setModal(true); mServiceSendingDialog->setBackgroundFaded(true); @@ -803,12 +822,7 @@ *htmlPart); } - if (editorStartMode==NmUiEditorFromDrafts) { - mContentWidget->setMessageData(*originalMessage, false); - } - else { - mContentWidget->setMessageData(*originalMessage); - } + mContentWidget->setMessageData(*originalMessage, editorStartMode); } delete originalMessage; @@ -1367,7 +1381,7 @@ while (i != list.constEnd() && *i) { if (i > list.constBegin()) { // Add the delimiter. - addressesString += Delimiter; + addressesString += NmDelimiter; } addressesString += (*i)->address(); @@ -1395,7 +1409,7 @@ while (i != list.constEnd()) { if (i > list.constBegin()) { // Add the delimiter. - addressesString += Delimiter; + addressesString += NmDelimiter; } addressesString += (*i).address(); @@ -1493,6 +1507,3 @@ } } } - - -// End of file. diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmmailboxlistview.cpp --- a/emailuis/nmailui/src/nmmailboxlistview.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmmailboxlistview.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -78,14 +78,11 @@ NM_FUNCTION; // Use document loader to load the view - bool ok = false; + bool ok(false); setObjectName(QString(NMUI_MAILBOX_LIST_VIEW)); - QObjectList objectList; - objectList.append(this); // Pass the view to documentloader. Document loader uses this view // when docml is parsed, instead of creating new view. if (mDocumentLoader) { - mDocumentLoader->setObjectTree(objectList); mWidgetList = mDocumentLoader->load(NMUI_MAILBOX_LIST_VIEW_XML, &ok); } @@ -211,17 +208,4 @@ } } -/*! - handleActionCommand. From NmMenuObserver, extension manager calls this - call to handle menu command in the UI. -*/ -void NmMailboxListView::handleActionCommand(NmActionResponse &actionResponse) -{ - NM_FUNCTION; - - // Handle context menu commands here - Q_UNUSED(actionResponse); -} - - diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmmailboxlistviewitem.cpp --- a/emailuis/nmailui/src/nmmailboxlistviewitem.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmmailboxlistviewitem.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -132,17 +132,3 @@ QGraphicsWidget::polishEvent(); } -/*! - paint. Paint function for line painting. -*/ -void NmMailboxListViewItem::paint( - QPainter *painter, - const QStyleOptionGraphicsItem *option, - QWidget *widget) -{ - NM_FUNCTION; - - Q_UNUSED(option); - Q_UNUSED(widget); - Q_UNUSED(painter); -} diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmmailboxselectiondialog.cpp --- a/emailuis/nmailui/src/nmmailboxselectiondialog.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmmailboxselectiondialog.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -43,8 +43,6 @@ mMailboxId(0) { NM_FUNCTION; - - // No implementation required. } @@ -107,7 +105,7 @@ // Use the document loader to load the widgets. HbDocumentLoader documentLoader; - bool documentLoaded = false; + bool documentLoaded(false); QObjectList objectList; objectList.append(this); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmmailboxserviceinterface.cpp --- a/emailuis/nmailui/src/nmmailboxserviceinterface.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmmailboxserviceinterface.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -33,18 +33,12 @@ NmMailboxServiceInterface::NmMailboxServiceInterface(QObject *parent, NmUiEngine &uiEngine, NmApplication *application) -#ifndef NM_WINS_ENV : XQServiceProvider(emailFullServiceNameMailbox, parent), -#else - : QObject(parent), -#endif mUiEngine(uiEngine), mApplication(application), mAsyncReqId(0) { -#ifndef NM_WINS_ENV publishAll(); -#endif } @@ -66,7 +60,6 @@ { NM_FUNCTION; -#ifndef NM_WINS_ENV // Get the given ID and convert it into NmId type. NmId mailboxNmId(data.toULongLong()); @@ -84,21 +77,23 @@ // Bring the application to the foreground. XQServiceUtil::toBackground(false); - HbMainWindow *mainWindow = mApplication->mainWindow(); - mainWindow->show(); + if (mApplication) { + HbMainWindow *mainWindow = mApplication->mainWindow(); + mainWindow->show(); - // Launch the message list view. - NmUiStartParam *startParam = - new NmUiStartParam(NmUiViewMessageList, - mailboxNmId, - inboxId, // folder id - 0, // message id - NmUiEditorCreateNew, // editor start mode - NULL, // address list - NULL, // attachment list - true); // start as service - mApplication->enterNmUiView(startParam); - + // Launch the message list view. + NmUiStartParam *startParam = + new NmUiStartParam(NmUiViewMessageList, + mailboxNmId, + inboxId, // folder id + 0, // message id + NmUiEditorCreateNew, // editor start mode + NULL, // address list + NULL, // attachment list + true); // start as service + mApplication->enterNmUiView(startParam); + } + completeRequest(mAsyncReqId, 0); } else { @@ -117,7 +112,6 @@ mApplication, SLOT(delayedExitApplication())); } } -#endif } @@ -143,7 +137,9 @@ modelIndex = mailboxListModel.index(i, 0); mailbox = mailboxListModel.data(modelIndex); mailboxMetaData = mailbox.value(); - currentId = mailboxMetaData->id(); + if (mailboxMetaData) { + currentId = mailboxMetaData->id(); + } if (currentId.id() == mailboxId.id()) { // Found a mailbox with the matching ID. diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmmessagelistview.cpp --- a/emailuis/nmailui/src/nmmessagelistview.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmmessagelistview.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -20,11 +20,11 @@ static const char *NMUI_MESSAGE_LIST_TREE_LIST = "MessageTreeList"; static const char *NMUI_MESSAGE_LIST_NO_MESSAGES = "MessageListNoMessages"; static const char *NMUI_MESSAGE_LIST_FOLDER_LABEL = "labelGroupBox"; -// Old sync icon implementation commented out but preserved so it could be put back if need be -// static const char *NMUI_MESSAGE_LIST_SYNC_ICON = "syncIcon"; #include "nmuiheaders.h" +const QString syncIndicatorName = "com.nokia.nmail.indicatorplugin.sync/1.0"; + /*! \class NmMessageListView \brief Message list view @@ -52,23 +52,18 @@ mLongPressedItem(NULL), mNoMessagesLabel(NULL), mFolderLabel(NULL), -mSyncIcon(NULL), mViewReady(false), mCurrentFolderType(NmFolderInbox), mSettingsLaunched(false), -mPreviousModelCount(0) +mPreviousModelCount(0), +mIsFirstSyncInMessageList(true) { NM_FUNCTION; - // Load view layout loadViewLayout(); - //create toolbar createToolBar(); - // Init tree view initTreeView(); - // set title setMailboxName(); - // Set folder name setFolderName(); } @@ -95,14 +90,11 @@ NM_FUNCTION; // Use document loader to load the view - bool ok = false; + bool ok(false); setObjectName(QString(NMUI_MESSAGE_LIST_VIEW)); - QObjectList objectList; - objectList.append(this); // Pass the view to documentloader. Document loader uses this view // when docml is parsed, instead of creating new view. if (mDocumentLoader) { - mDocumentLoader->setObjectTree(objectList); mWidgetList = mDocumentLoader->load(NMUI_MESSAGE_LIST_VIEW_XML, &ok); } @@ -144,19 +136,11 @@ mFolderLabel = qobject_cast(mDocumentLoader->findWidget(NMUI_MESSAGE_LIST_FOLDER_LABEL)); - // Disable the old sync icon implementation for the time being (commment out loading the icon here) - //mSyncIcon = qobject_cast(mDocumentLoader->findWidget(NMUI_MESSAGE_LIST_SYNC_ICON)); - if (mSyncIcon) { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconOffline)); - } - // Connect options menu about to show to create options menu function QObject::connect(menu(), SIGNAL(aboutToShow()), this, SLOT(createOptionsMenu())); QObject::connect(&mUiEngine, SIGNAL(syncStateEvent(NmSyncState, const NmId &)), this, SLOT(handleSyncStateEvent(NmSyncState, const NmId &))); - QObject::connect(&mUiEngine, SIGNAL(connectionEvent(NmConnectState, const NmId &)), - this, SLOT(handleConnectionEvent(NmConnectState, const NmId &))); // Menu needs one dummy item so that aboutToShow signal is emitted. NmAction *dummy = new NmAction(0); @@ -235,7 +219,7 @@ /*! Reload view contents with new start parameters Typically when view is already open and external view activation occurs - for this same view + for this same view. Startparam ownership is transferred to this view */ void NmMessageListView::reloadViewContents(NmUiStartParam* startParam) { @@ -281,44 +265,38 @@ { NM_FUNCTION; - NmId mailboxId = mMessageListModel->currentMailboxId(); - if (mSyncIcon && mailboxId == mMessageListModel->currentMailboxId()) { - if (mUiEngine.syncState(mailboxId) == Synchronizing) { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconSynching)); - } - else { - if (mUiEngine.connectionState(mailboxId) == Connected) { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconOnline)); - } - else { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconOffline)); + if (mMessageListModel) { + NmId mailboxId = mMessageListModel->currentMailboxId(); + // In each refresh, e.g. in folder change the UI signals + // lower layer about the folder that has been opened. + if (mStartParam){ + mUiEngine.updateActiveFolder(mailboxId, mStartParam->folderId()); + + NmFolderType folderType = mUiEngine.folderTypeById(mStartParam->mailboxId(), + mStartParam->folderId()); + if (folderType == NmFolderInbox) { // If the new folder is an inbox, first automatic sync should be shown + mIsFirstSyncInMessageList = true; } } - } - - // In each refresh, e.g. in folder change the UI signals - // lower layer about the folder that has been opened. - if (mStartParam){ - mUiEngine.updateActiveFolder(mailboxId, mStartParam->folderId()); - } - // Set item model to message list widget - if (mMessageListWidget) { - mMessageListWidget->setModel(static_cast(mMessageListModel)); - QObject::connect(mMessageListModel, SIGNAL(rowsInserted(const QModelIndex&,int,int)), - this, SLOT(itemsAdded(const QModelIndex&,int,int))); - QObject::connect(mMessageListModel, SIGNAL(rowsRemoved(const QModelIndex&,int,int)), - this, SLOT(itemsRemoved())); - QObject::connect(mMessageListModel, SIGNAL(setNewParam(NmUiStartParam*)), - this, SLOT(reloadViewContents(NmUiStartParam*))); + // Set item model to message list widget + if (mMessageListWidget) { + mMessageListWidget->setModel(static_cast(mMessageListModel)); + QObject::connect(mMessageListModel, SIGNAL(rowsInserted(const QModelIndex&,int,int)), + this, SLOT(itemsAdded(const QModelIndex&,int,int))); + QObject::connect(mMessageListModel, SIGNAL(rowsRemoved(const QModelIndex&,int,int)), + this, SLOT(itemsRemoved())); + QObject::connect(mMessageListModel, SIGNAL(setNewParam(NmUiStartParam*)), + this, SLOT(reloadViewContents(NmUiStartParam*))); - mPreviousModelCount=mMessageListModel->rowCount(); - if (mPreviousModelCount==0){ - showNoMessagesText(); - } - else{ - hideNoMessagesText(); - } + mPreviousModelCount=mMessageListModel->rowCount(); + if (mPreviousModelCount==0){ + showNoMessagesText(); + } + else{ + hideNoMessagesText(); + } + } } } @@ -328,11 +306,9 @@ void NmMessageListView::handleSyncStateEvent(NmSyncState syncState, const NmId & mailboxId) { NM_FUNCTION; - - if (mSyncIcon && mailboxId == mMessageListModel->currentMailboxId()) { + if (mMessageListModel && mailboxId == mMessageListModel->currentMailboxId()) { if (syncState == Synchronizing) { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconSynching)); - // before first sync inbox id might be zero + // before first sync inbox id might be zero if (mStartParam->folderId() == 0) { // after sync inbox id should be updated to correct value NmId folderId = mUiEngine.standardFolderId( @@ -340,35 +316,17 @@ NmFolderInbox); mStartParam->setFolderId(folderId); } - } - else { - if (mUiEngine.connectionState(mailboxId) == Connected) { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconOnline)); - } - else { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconOffline)); + // Show sync icon only for the first automatic sync after opening message list. + // Sync icon for manual sync is shown in NmUiEngine::refreshMailbox, not here. + if (mIsFirstSyncInMessageList) { + HbIndicator indicator; + indicator.activate(syncIndicatorName, QVariant()); + mIsFirstSyncInMessageList = false; } } } } -/*! - Connection event handling -*/ -void NmMessageListView::handleConnectionEvent(NmConnectState connectState, const NmId &mailboxId) -{ - NM_FUNCTION; - - if (mSyncIcon && mailboxId == mMessageListModel->currentMailboxId() && mUiEngine.syncState(mailboxId) != Synchronizing) { - if (connectState == Connected) { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconOnline)); - } - else { - mSyncIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconOffline)); - } - } -} - /*! folder selection handling within current mailbox */ diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmmessagelistviewitem.cpp --- a/emailuis/nmailui/src/nmmessagelistviewitem.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmmessagelistviewitem.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -236,21 +236,6 @@ } /*! - paint. Paint function for line painting. -*/ -void NmMessageListViewItem::paint( - QPainter *painter, - const QStyleOptionGraphicsItem *option, - QWidget *widget) -{ - NM_FUNCTION; - - Q_UNUSED(option); - Q_UNUSED(widget); - Q_UNUSED(painter); -} - -/*! setFontsUnread */ void NmMessageListViewItem::setFontsUnread() @@ -258,8 +243,8 @@ NM_FUNCTION; static QColor colorRole = HbColorScheme::color("qtc_list_item_title_normal"); - HbFontSpec spekki(HbFontSpec::Primary); - setFonts(colorRole, spekki); + HbFontSpec fontSpec(HbFontSpec::Primary); + setFonts(colorRole, fontSpec); } /*! @@ -270,8 +255,8 @@ NM_FUNCTION; static QColor colorRole = HbColorScheme::color("qtc_list_item_content_normal"); - HbFontSpec spekki(HbFontSpec::Secondary); - setFonts(colorRole, spekki); + HbFontSpec fontSpec(HbFontSpec::Secondary); + setFonts(colorRole, fontSpec); } /*! @@ -283,16 +268,15 @@ // Get font sizes from style qreal currentSize; - HbStyle mystyle; - bool found = mystyle.parameter(QString("hb-param-text-height-primary"), currentSize ); + bool found = style()->parameter(QString("hb-param-text-height-primary"), currentSize ); if (found) { mPrimarySize = currentSize; } - found = mystyle.parameter(QString("hb-param-text-height-secondary"), currentSize ); + found = style()->parameter(QString("hb-param-text-height-secondary"), currentSize ); if (found) { mSecondarySize = currentSize; } - found = mystyle.parameter(QString("hb-param-text-height-tiny"), currentSize ); + found = style()->parameter(QString("hb-param-text-height-tiny"), currentSize ); if (found) { mTinySize = currentSize; } @@ -302,7 +286,7 @@ setFonts. */ void NmMessageListViewItem::setFonts(const QColor &colorRole, - HbFontSpec &spekki) + HbFontSpec &fontSpec) { NM_FUNCTION; @@ -310,21 +294,21 @@ if (mSender && mSubject && mTime) { if (mPrimarySize) { - spekki.setTextHeight(mPrimarySize); + fontSpec.setTextHeight(mPrimarySize); } - mSender->setFontSpec(spekki); + mSender->setFontSpec(fontSpec); mSender->setTextColor(colorRole); if (mSecondarySize) { - spekki.setTextHeight(mSecondarySize); + fontSpec.setTextHeight(mSecondarySize); } - mSubject->setFontSpec(spekki); + mSubject->setFontSpec(fontSpec); mSubject->setTextColor(colorRole); if (mTinySize) { - spekki.setTextHeight(mTinySize); + fontSpec.setTextHeight(mTinySize); } - mTime->setFontSpec(spekki); + mTime->setFontSpec(fontSpec); mTime->setTextColor(colorRole); } } diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmrecipientfield.cpp --- a/emailuis/nmailui/src/nmrecipientfield.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmrecipientfield.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -17,11 +17,11 @@ #include "nmuiheaders.h" -static const QString ContactsServiceName = "com.nokia.services.phonebookservices"; -static const QString ContactsInterfaceName = "Fetch"; -static const QString ContactsOperationName = "fetch(QString,QString,QString)"; +static const QString NmContactsServiceName = "com.nokia.services.phonebookservices"; +static const QString NmContactsInterfaceName = "Fetch"; +static const QString NmContactsOperationName = "fetch(QString,QString,QString)"; -static const int MaxRows = 10000; +static const int NmMaxRows = 10000; /*! widget is created using AD/docml @@ -46,12 +46,15 @@ mRecipientsEditor = qobject_cast (mDocumentLoader.findWidget(mObjectPrefix + "Edit")); - mRecipientsEditor->setMaxRows(MaxRows); + if (mRecipientsEditor) { + mRecipientsEditor->setMaxRows(NmMaxRows); + } mLaunchContactsPickerButton = qobject_cast (mDocumentLoader.findWidget(mObjectPrefix + "Button")); - - mLaunchContactsPickerButton->setIcon(NmIcons::getIcon(NmIcons::NmIconContacts)); + if (mLaunchContactsPickerButton) { + mLaunchContactsPickerButton->setIcon(NmIcons::getIcon(NmIcons::NmIconContacts)); + } createConnections(); } @@ -73,10 +76,8 @@ this, SIGNAL(selectionChanged())); connect(mLaunchContactsPickerButton, SIGNAL(pressed()), this, SIGNAL(launchContactsPickerButtonClicked())); - -#ifdef Q_OS_SYMBIAN - connect(mLaunchContactsPickerButton, SIGNAL(pressed()), this, SLOT(launchContactsPicker())); -#endif + connect(mLaunchContactsPickerButton, SIGNAL(pressed()), + this, SLOT(launchContactsPicker())); } @@ -134,7 +135,6 @@ } -#ifdef Q_OS_SYMBIAN /*! This Slot launches the contacts-picker */ @@ -146,12 +146,12 @@ XQAiwRequest *launchContactsPickerRequest; bool isEmbeded = true; - launchContactsPickerRequest = mAppmgr.create(ContactsServiceName, ContactsInterfaceName, - ContactsOperationName, isEmbeded); + launchContactsPickerRequest = mAppmgr.create(NmContactsServiceName, NmContactsInterfaceName, + NmContactsOperationName, isEmbeded); if (launchContactsPickerRequest) { connect(launchContactsPickerRequest, SIGNAL(requestOk(QVariant)), - mRecipientsEditor, SLOT(insertSelectedContacts(QVariant))); + mRecipientsEditor, SLOT(addSelectedContacts(QVariant))); } else { // Failed creating request @@ -172,6 +172,5 @@ } delete launchContactsPickerRequest; - launchContactsPickerRequest = 0; + launchContactsPickerRequest = NULL; } -#endif diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmsendserviceinterface.cpp --- a/emailuis/nmailui/src/nmsendserviceinterface.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmsendserviceinterface.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -58,7 +58,7 @@ { NM_FUNCTION; - bool success = false; + bool success(false); if (data.canConvert(QVariant::Map)) { // The given data may contain a mail subject and recipient lists. @@ -249,11 +249,7 @@ QObject *parent, NmUiEngine &uiEngine, NmApplication *application) -#ifndef NM_WINS_ENV : XQServiceProvider(interfaceName, parent), -#else - : QObject(parent), -#endif mApplication(application), mUiEngine(uiEngine), mAsyncReqId(0), @@ -261,9 +257,7 @@ mSelectionDialog(NULL), mCurrentView(NULL) { -#ifndef NM_WINS_ENV publishAll(); -#endif } @@ -311,17 +305,19 @@ { NM_FUNCTION; -#ifndef NM_WINS_ENV + HbMainWindow *mainWindow(NULL); // Make sure that qmail stays background if user presses back in editorview - mApplication->updateVisibilityState(); + if (mApplication) { + mApplication->updateVisibilityState(); + + mainWindow = mApplication->mainWindow(); + mCurrentView = mainWindow->currentView(); - HbMainWindow *mainWindow = mApplication->mainWindow(); - mCurrentView = mainWindow->currentView(); - - // Hide the current view. - if (mCurrentView) { - mCurrentView->hide(); + // Hide the current view. + if (mCurrentView) { + mCurrentView->hide(); + } } // Check the given data. @@ -347,9 +343,9 @@ cancelService(); } else { // count > 0 - // Make sure the NMail application is in the foreground. - XQServiceUtil::toBackground(false); - mainWindow->show(); + if (mainWindow) { + mainWindow->show(); + } mStartParam = new NmUiStartParam( NmUiViewMessageEditor, @@ -378,8 +374,9 @@ mSelectionDialog = new NmMailboxSelectionDialog(mUiEngine.mailboxListModel()); } - connect(mSelectionDialog,SIGNAL(selectionDialogClosed(NmId&)), - this,SLOT(selectionDialogClosed(NmId&))); + + connect(mSelectionDialog, SIGNAL(selectionDialogClosed(NmId&)), + this, SLOT(selectionDialogClosed(NmId&))); mSelectionDialog->open(); // launch the editor when the dialog is closed @@ -440,8 +437,4 @@ } } -#endif /* NM_WINS_ENV */ - - - // End of file. diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmuidocumentloader.cpp --- a/emailuis/nmailui/src/nmuidocumentloader.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmuidocumentloader.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -40,7 +40,7 @@ { NM_FUNCTION; - QObject *res = NULL; + QObject *res(NULL); if( type == NmMailViewerWK::staticMetaObject.className() ) { res = new NmMailViewerWK(); res->setObjectName(name); @@ -57,7 +57,7 @@ res = new NmAttachmentListWidget(); res->setObjectName(name); } - if (res == NULL) { + if (!res) { res = HbDocumentLoader::createObject(type, name); } return res; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmuieffects.cpp --- a/emailuis/nmailui/src/nmuieffects.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmuieffects.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -17,7 +17,7 @@ #include "nmuiheaders.h" -static const char *SendAnimation = ":/effects/mail_send.fxml"; +static const char *NmSendAnimation = ":/effects/mail_send.fxml"; /*! \class NmEffects @@ -55,32 +55,35 @@ NM_FUNCTION; switch (effect) { - case NmEditorSendMessageAnimation: - // delete any existing stuff - resetSendAnimation(); - - // This effect is for editor send message. Get the screen capture of - // editor view for animation which will be lauched soon. - mDoSendAnimation = true; - - // take screen shot - mSendAnimationScreenShot = screenShot(); + case NmEditorSendMessageAnimation: { + // delete any existing stuff + resetSendAnimation(); + + // This effect is for editor send message. Get the screen capture of + // editor view for animation which will be lauched soon. + mDoSendAnimation = true; + + // take screen shot + mSendAnimationScreenShot = screenShot(); + + if (mSendAnimationScreenShot){ + // Create graphics item based pixmap image but don't show it yet. + mSendAnimationScreenShot->hide(); + mSendAnimationScreenShot->setPos(0,0); + mSendAnimationScreenShot->setZValue(0); - // Create graphics item based pixmap image but don't show it yet. - mSendAnimationScreenShot->hide(); - mSendAnimationScreenShot->setPos(0,0); - mSendAnimationScreenShot->setZValue(0); - - // Adds or moves the item and all its childen to this scene. - // This scene takes ownership of the item. - mMainWindow.scene()->addItem(mSendAnimationScreenShot); - - // Set editor screen capture visible before old view is popped. - // New view is drawn under this image. - mSendAnimationScreenShot->show(); - - HbEffect::add(mSendAnimationScreenShot, SendAnimation, "mail_send"); - break; + // Adds or moves the item and all its childen to this scene. + // This scene takes ownership of the item. + mMainWindow.scene()->addItem(mSendAnimationScreenShot); + + // Set editor screen capture visible before old view is popped. + // New view is drawn under this image. + mSendAnimationScreenShot->show(); + + HbEffect::add(mSendAnimationScreenShot, NmSendAnimation, "mail_send"); + } + break; + } } } @@ -92,14 +95,15 @@ NM_FUNCTION; switch (effect) { - case NmEditorSendMessageAnimation: - // Send message animation for editor view. - if (mDoSendAnimation && mSendAnimationScreenShot) { - mDoSendAnimation = false; - // Start animation and connect completion signal to sendAnimationComplete slot. - HbEffect::start(mSendAnimationScreenShot, "mail_send", this, "sendAnimationComplete"); + case NmEditorSendMessageAnimation: { + // Send message animation for editor view. + if (mDoSendAnimation && mSendAnimationScreenShot) { + mDoSendAnimation = false; + // Start animation and connect completion signal to sendAnimationComplete slot. + HbEffect::start(mSendAnimationScreenShot, "mail_send", this, "sendAnimationComplete"); + } + break; } - break; } } @@ -113,8 +117,7 @@ // Grab whole view into pixmap image (also chrome is included) QPixmap screenCapture = QPixmap::grabWindow(mMainWindow.internalWinId()); - - QGraphicsPixmapItem *ret = NULL; + QGraphicsPixmapItem *ret(NULL); // for landscape, the screenshot must be rotated if(mMainWindow.orientation() == Qt::Horizontal) { @@ -138,7 +141,7 @@ if (mSendAnimationScreenShot) { // Clean send animation - HbEffect::remove(mSendAnimationScreenShot, SendAnimation, "mail_send"); + HbEffect::remove(mSendAnimationScreenShot, NmSendAnimation, "mail_send"); // Ownership of QGraphicsPixmapItem is tranferred to GraphicsScene when it has been added // to it GraphicsScene. // GraphicsPixmapItem needs to be removed from the GraphicsScene before deleting diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmuiextensionmanager.cpp --- a/emailuis/nmailui/src/nmuiextensionmanager.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmuiextensionmanager.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -17,13 +17,13 @@ #include "nmuiheaders.h" +static const QString NmSettingsPluginFolderPath("/resource/qt/plugins/nmail/uiext"); + /*! \class NmUiExtensionManager \brief Handles ui extension plugins */ -// ======== HELPER FUNCTIONS ======== - /*! Creates list of folder paths where plug-ins can be loaded from. \return folder path list. @@ -32,7 +32,6 @@ { NM_FUNCTION; - const QString NmSettingsPluginFolderPath("/resource/qt/plugins/nmail/uiext"); QStringList pluginDirectories; QFileInfoList driveList = QDir::drives(); @@ -81,7 +80,7 @@ NM_FUNCTION; for (int i = 0; i < mExtensions.count(); i++) { - NmUiExtensionInterface* interface = mExtensions[i]; + NmUiExtensionInterface *interface = mExtensions[i]; interface->getActions(menuRequest, actionList); } } @@ -107,7 +106,7 @@ } } - NmUiExtensionInterface *interface = NULL; + NmUiExtensionInterface *interface(NULL); foreach (QPluginLoader *loader, mPluginLoaders) { NM_COMMENT(QString("Plugin fileName() : %1").arg(loader->fileName())); QString fileName = loader->fileName(); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmuriserviceinterface.cpp --- a/emailuis/nmailui/src/nmuriserviceinterface.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmuriserviceinterface.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -17,7 +17,6 @@ */ // INCLUDES -#include #include "nmuiheaders.h" /*! @@ -32,10 +31,10 @@ Class constructor. */ inline NmStartParamDataHelper() - : mSubject(0), - mToAddresses(0), - mCcAddresses(0), - mBccAddresses(0) + : mSubject(NULL), + mToAddresses(NULL), + mCcAddresses(NULL), + mBccAddresses(NULL) { NM_FUNCTION; } @@ -57,7 +56,7 @@ { NM_FUNCTION; - bool success = false; + bool success(false); QUrl uri(data); @@ -165,11 +164,7 @@ NmUriServiceInterface::NmUriServiceInterface(QObject *parent, NmUiEngine &uiEngine, NmApplication *application) -#ifndef NM_WINS_ENV : XQServiceProvider(emailServiceName+"."+XQI_URI_VIEW, parent), -#else - : QObject(parent), -#endif mApplication(application), mUiEngine(uiEngine), mAsyncReqId(0), @@ -177,9 +172,7 @@ mSelectionDialog(NULL), mCurrentView(NULL) { -#ifndef NM_WINS_ENV publishAll(); -#endif } @@ -221,14 +214,17 @@ bool NmUriServiceInterface::view(const QString& uri) { NM_FUNCTION; - -#ifndef NM_WINS_ENV - - // Make sure that nmail stays background if user presses back in editorview - mApplication->updateVisibilityState(); - - HbMainWindow *mainWindow = mApplication->mainWindow(); - mCurrentView = mainWindow->currentView(); + + HbMainWindow *mainWindow(NULL); + if (mApplication) { + // Make sure that nmail stays background if user presses back in editorview + mApplication->updateVisibilityState(); + + mainWindow = mApplication->mainWindow(); + if (mainWindow) { + mCurrentView = mainWindow->currentView(); + } + } // Hide the current view. if (mCurrentView) { @@ -260,7 +256,9 @@ else { // count > 0 // Make sure the NMail application is in the foreground. XQServiceUtil::toBackground(false); - mainWindow->show(); + if (mainWindow) { + mainWindow->show(); + } mStartParam = new NmUiStartParam( NmUiViewMessageEditor, @@ -353,8 +351,4 @@ } } -#endif /* NM_WINS_ENV */ - - - // End of file. diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmutilities.cpp --- a/emailuis/nmailui/src/nmutilities.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmutilities.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -18,9 +18,9 @@ #include "nmuiheaders.h" static const int NmMegabyte = 1048576; - +static const qreal NmMinAttachmentSize = 0.1; // taken from http://www.regular-expressions.info/email.html -static const QRegExp EmailAddressPattern("[A-Za-z\\d!#$%&'*+/=?^_`{|}~-]+" +static const QRegExp NmEmailAddressPattern("[A-Za-z\\d!#$%&'*+/=?^_`{|}~-]+" "(?:" "\\." "[A-Za-z\\d!#$%&'*+/=?^_`{|}~-]+" @@ -48,44 +48,47 @@ { NM_FUNCTION; + // Get envelope from message + const NmMessageEnvelope &env = message.envelope(); + // validate TO addresses - QList toRecipients = message.envelope().toRecipients(); + QList toRecipients = env.toRecipients(); int recipientCount = toRecipients.count(); for (int i = 0; i < recipientCount; ++i) { bool validAddress = isValidEmailAddress(toRecipients.at(i).address()); - if (type == Default || - type == ValidAddress && validAddress || - type == InvalidAddress && !validAddress) { + if (type == NmDefault || + type == NmValidAddress && validAddress || + type == NmInvalidAddress && !validAddress) { recipients.append(toRecipients.at(i)); } } // validate CC addresses - QList ccRecipients = message.envelope().ccRecipients(); + QList ccRecipients = env.ccRecipients(); recipientCount = ccRecipients.count(); for (int i = 0; i < recipientCount; ++i) { bool validAddress = isValidEmailAddress(ccRecipients.at(i).address()); - if (type == Default || - type == ValidAddress && validAddress || - type == InvalidAddress && !validAddress) { + if (type == NmDefault || + type == NmValidAddress && validAddress || + type == NmInvalidAddress && !validAddress) { recipients.append(ccRecipients.at(i)); } } // validate BCC addresses - QList bccRecipients = message.envelope().bccRecipients(); + QList bccRecipients = env.bccRecipients(); recipientCount = bccRecipients.count(); for (int i = 0; i < recipientCount; ++i) { bool validAddress = isValidEmailAddress(bccRecipients.at(i).address()); - if (type == Default || - type == ValidAddress && validAddress || - type == InvalidAddress && !validAddress) { + if (type == NmDefault || + type == NmValidAddress && validAddress || + type == NmInvalidAddress && !validAddress) { recipients.append(bccRecipients.at(i)); } } @@ -98,7 +101,7 @@ { NM_FUNCTION; - return EmailAddressPattern.exactMatch(emailAddress); + return NmEmailAddressPattern.exactMatch(emailAddress); } /*! @@ -128,9 +131,9 @@ { NM_FUNCTION; - bool foundAddress = false; + bool foundAddress(false); - QRegExp rx(EmailAddressPattern); + QRegExp rx(NmEmailAddressPattern); // locate the email address in the string int pos = rx.indexIn(emailAddress); if (pos != -1) { @@ -169,7 +172,7 @@ } /*! - Opens file specified by RFile handle. Usually used by viewer + Opens file specified by XQSharableFile handle. Usually used by viewer for opening attachments from message store as RFiles */ int NmUtilities::openFile(XQSharableFile &file) @@ -243,10 +246,10 @@ NM_FUNCTION; qreal sizeMb = (qreal)sizeInBytes / (qreal)NmMegabyte; - if (sizeMb < 0.1) { - // 0.1 Mb is the minimum size shown for attachment - sizeMb = 0.1; - } + if (sizeMb < NmMinAttachmentSize) { + // NmMinAttachmentSize (0.1Mb) is the minimum size shown for attachment + sizeMb = NmMinAttachmentSize; + } return QString().sprintf("(%.1f Mb)", sizeMb); // Use loc string when available } diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmviewerheader.cpp --- a/emailuis/nmailui/src/nmviewerheader.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmviewerheader.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -11,14 +11,14 @@ * * Contributors: * -* Description: +* Description: NMail viewer view header widget implementation * */ #include "nmuiheaders.h" -static const qreal nmHeaderLineOpacity = 0.4; +static const qreal NmHeaderLineOpacity = 0.4; /*! \class NmViewerHeader @@ -119,7 +119,7 @@ Q_UNUSED(widget); if (painter) { painter->save(); - painter->setOpacity(nmHeaderLineOpacity); + painter->setOpacity(NmHeaderLineOpacity); QLineF line1( rect().topLeft().x(), rect().bottomRight().y(), rect().bottomRight().x(), rect().bottomRight().y()); painter->drawLine(line1); @@ -160,7 +160,7 @@ // Set recipients to text edit field as html NmAddress sender = mMessage->envelope().sender(); if (mRecipientsBox){ - mRecipientsBox->setHtml(formatRecipientList(addressToDisplayInHtml(sender), + mRecipientsBox->setHtml(formatRecipientList(addressToDisplay(sender), mMessage->envelope().toRecipients(), mMessage->envelope().ccRecipients())); } @@ -272,7 +272,7 @@ // Set recipients to text edit field as html NmAddress sender = mMessage->envelope().sender(); if (mMessage) { - mRecipientsBox->setHtml(formatRecipientList(addressToDisplayInHtml(sender), + mRecipientsBox->setHtml(formatRecipientList(addressToDisplay(sender), mMessage->envelope().toRecipients(), mMessage->envelope().ccRecipients())); } @@ -294,8 +294,8 @@ QString result; result.append(""); - result.append(""); + result.append(""); // Set text in HTML format based on layout direction @@ -309,7 +309,7 @@ result.append(" "); int reciCount = to.count(); for (int i=0; i < reciCount; i++) { - result.append(addressToDisplayInHtml(to[i])); + result.append(addressToDisplay(to[i])); result.append(" "); } reciCount = cc.count(); @@ -318,7 +318,7 @@ result.append(hbTrId("txt_mail_list_cc")); result.append(" "); for (int i=0; i < reciCount; i++) { - result.append(addressToDisplayInHtml(cc[i])); + result.append(addressToDisplay(cc[i])); result.append(" "); } } @@ -333,7 +333,7 @@ result.append(" "); int reciCount = to.count(); for (int i=0; i < reciCount; i++) { - result.append(addressToDisplayInHtml(to[i])); + result.append(addressToDisplay(to[i])); result.append("; "); } reciCount = cc.count(); @@ -342,7 +342,7 @@ result.append(hbTrId("txt_mail_list_cc")); result.append(" "); for (int i=0; i < reciCount; i++) { - result.append(addressToDisplayInHtml(cc[i])); + result.append(addressToDisplay(cc[i])); result.append("; "); } } @@ -355,7 +355,7 @@ Function retursn address string from NmAddress to be displayed in HTML format */ -QString NmViewerHeader::addressToDisplayInHtml(const NmAddress &addr) +QString NmViewerHeader::addressToDisplay(const NmAddress &addr) { NM_FUNCTION; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmviewerserviceinterface.cpp --- a/emailuis/nmailui/src/nmviewerserviceinterface.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmviewerserviceinterface.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -31,18 +31,12 @@ NmViewerServiceInterface::NmViewerServiceInterface(QObject *parent, NmApplication *application, NmUiEngine &uiEngine) -#ifndef NM_WINS_ENV : XQServiceProvider(emailFullServiceNameMessage, parent), -#else - : QObject(parent), -#endif mApplication(application), mUiEngine(uiEngine), mAsyncReqId(0) { -#ifndef NM_WINS_ENV publishAll(); -#endif } @@ -62,7 +56,6 @@ { NM_FUNCTION; -#ifndef NM_WINS_ENV mAsyncReqId = setCurrentRequestAsync(); NmId mailboxNmId(mailboxId.toULongLong()); @@ -122,7 +115,6 @@ mApplication, SLOT(delayedExitApplication())); } } -#endif } // End of file. diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmviewerview.cpp --- a/emailuis/nmailui/src/nmviewerview.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmviewerview.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -72,7 +72,7 @@ mViewReady(false), mWaitNoteCancelled(false), mErrorNote(NULL) - { +{ // Create documentloader mDocumentLoader = new NmUiDocumentLoader(mMainWindow); // Get screensize @@ -117,6 +117,7 @@ // View is about to exit, for safety, stop // loading of content before closing the view if (mWebView){ + mAttaManager.cancelFetch(); mWebView->stop(); if (mWebView->page()){ mWebView->page()->deleteLater(); @@ -132,14 +133,11 @@ NM_FUNCTION; // Use document loader to load the view - bool ok = false; + bool ok(false); setObjectName(QString(NMUI_MESSAGE_VIEWER_VIEW)); - QObjectList objectList; - objectList.append(this); // Pass the view to documentloader. Document loader uses this view // when docml is parsed, instead of creating new view. // documentloader is created in constructor - mDocumentLoader->setObjectTree(objectList); mWidgetList = mDocumentLoader->load(NMUI_MESSAGE_VIEWER_XML, &ok); int widgetCount = mWidgetList.count(); if (ok == true && widgetCount) @@ -385,8 +383,9 @@ // if everything is ok, set message to html viewer if (mMessage && mWebView && page) { // Set initial size of component and content before loading data - mWebView->setMaximumWidth(mScreenSize.width()); - page->setPreferredContentsSize(mScreenSize); + mWebView->setPreferredWidth(mScreenSize.width()); + QRectF myGeometry = geometry(); + page->setViewportSize(myGeometry.size().toSize()); //Set message data to html viewer. mWebView->setHtml(formatMessage()); // Connect to link clicked @@ -416,7 +415,7 @@ // Set attawidget minimum & maximum size mAttaWidget->setMinimumWidth(mScreenSize.width()); mAttaWidget->setMaximumWidth(mScreenSize.width()); - bool inserted = false; + bool inserted(false); QList messageParts; mMessage->attachmentList(messageParts); for (int i = 0; i < messageParts.count();i++) { @@ -481,6 +480,7 @@ } // attachment is fetched, open file else if (messageParts[i]->partId() == attaId) { + mAttaManager.cancelFetch(); XQSharableFile file = mUiEngine.messagePartFile(mailboxId, folderId, messageId, attaId); int error = NmUtilities::openFile(file); @@ -637,18 +637,17 @@ // same size value is received more than once. if (size != mLatestLoadingSize) { if (!webFrameloadingCompleted && mWebView && mWebView->page() && - (size.width() > mScreenSize.width() || size.height() > mScreenSize.height())) { + (size.width() > mScreenSize.width() || size.height() > geometry().height())) { int width = (int)size.width(); int height = (int)size.height(); // Set content (webview) width if (mDisplayingPlainText){ - setWebViewWidth(mScreenSize.width()); + mWebView->setPreferredWidth(geometry().width()); } else { - setWebViewWidth(width); + mWebView->setPreferredWidth(width); } - mWebView->setMinimumHeight(height); - mWebView->setPreferredHeight(height); + mWebView->setPreferredHeight(height); } } mLatestLoadingSize = size; @@ -659,33 +658,17 @@ */ void NmViewerView::scaleWebViewWhenLoaded() { - if (mWebView&&mWebView->page()) { + QRectF myGeometry = geometry(); + if (mWebView && mWebView->page()) { + mWebView->page()->setViewportSize(myGeometry.size().toSize()); QSizeF contentSize = mWebView->page()->mainFrame()->contentsSize(); int width = (int)contentSize.width(); - int height = (int)contentSize.height(); - // Set content (webview) width - if (mDisplayingPlainText) { - mWebView->page()->setPreferredContentsSize(mScreenSize); - setWebViewWidth(mScreenSize.width()); - } else { - setWebViewWidth(width); - } - // Set content (webview) height - if (mScrollAreaContents){ - QRectF contentRect = mScrollAreaContents->geometry(); - if (contentRect.height()setPreferredHeight(contentRect.height()); - qreal webViewHeight = geometry().height()-mHeaderWidget->geometry().height(); - setWebViewHeighth(webViewHeight); - } else { - setWebViewHeighth(height); - } - } + int height = (int)contentSize.height(); + mWebView->setPreferredWidth(width); + mWebView->setPreferredHeight(height); } } - /*! Set new dimensions after orientation change. */ @@ -701,31 +684,8 @@ // Set attawidget minimum & maximum size mAttaWidget->setMinimumWidth(mScreenSize.width()); mAttaWidget->setMaximumWidth(mScreenSize.width()); - } - - // Scale web view and its contens - if (mWebView){ - if (mDisplayingPlainText){ - mWebView->setMaximumWidth((int)mScreenSize.width()); - mWebView->page()->setPreferredContentsSize(QSize((int)mScreenSize.width(), - (int)mScreenSize.height())); - } - else{ - // Check whether contentsize fits to screen - // and if not, set preferred size again to allow panning - QSizeF contentSize = mWebView->page()->mainFrame()->contentsSize(); - if (contentSize.width()>mScreenSize.width()){ - mWebView->setMaximumWidth((int)contentSize.width()); - mWebView->page()->setPreferredContentsSize(QSize((int)contentSize.width(), - (int)contentSize.height())); - } - else{ - mWebView->setMaximumWidth((int)mScreenSize.width()); - mWebView->page()->setPreferredContentsSize(QSize((int)mScreenSize.width(), - (int)mScreenSize.height())); - } - } - } + } + scaleWebViewWhenLoaded(); if (mToolbarEnabled) { // Re-create toolbar in orientation switch @@ -733,7 +693,6 @@ } } - /*! Screen orientation changed. Web view needs to be scaled when landscape <-> portrait switch occurs because text needs to @@ -752,25 +711,28 @@ { NM_FUNCTION; - if (link.scheme() == "http" || - link.scheme() == "https" ) { - QDesktopServices::openUrl(link); - } - else if (link.scheme() == "mailto"){ - QList *addrList = new QList(); - NmAddress *mailtoAddr = new NmAddress(); - QString address = link.toString(QUrl::RemoveScheme); - mailtoAddr->setAddress(address); - mailtoAddr->setDisplayName(address); - addrList->append(mailtoAddr); - // Create start parameters. Address list ownership - // is transferred to startparam object - NmUiStartParam* param = new NmUiStartParam(NmUiViewMessageEditor, - mStartParam->mailboxId(), - mStartParam->folderId(), - 0, NmUiEditorMailto, addrList ); - mApplication.enterNmUiView(param); - } + if (link.scheme() == "http" || + link.scheme() == "https" ) { + mAttaManager.cancelFetch(); + QDesktopServices::openUrl(link); + } else if (link.scheme() == "mailto"){ + mAttaManager.cancelFetch(); + QList *addrList = new QList(); + NmAddress *mailtoAddr = new NmAddress(); + QString address = link.toString(QUrl::RemoveScheme); + mailtoAddr->setAddress(address); + mailtoAddr->setDisplayName(address); + addrList->append(mailtoAddr); + // Create start parameters. Address list ownership + // is transferred to startparam object + NmUiStartParam* param = new NmUiStartParam(NmUiViewMessageEditor, + mStartParam->mailboxId(), + mStartParam->folderId(), + 0, + NmUiEditorMailto, + addrList); + mApplication.enterNmUiView(param); + } } /*! @@ -934,6 +896,7 @@ actionResponse.menuType() == NmActionToolbar) { switch (actionResponse.responseCommand()) { case NmActionResponseCommandReply: { + mAttaManager.cancelFetch(); NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor, mStartParam->mailboxId(), mStartParam->folderId(), mStartParam->messageId(), NmUiEditorReply); @@ -941,6 +904,7 @@ } break; case NmActionResponseCommandReplyAll: { + mAttaManager.cancelFetch(); NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor, mStartParam->mailboxId(), mStartParam->folderId(), mStartParam->messageId(), NmUiEditorReplyAll); @@ -948,6 +912,7 @@ } break; case NmActionResponseCommandForward: { + mAttaManager.cancelFetch(); NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor, mStartParam->mailboxId(), mStartParam->folderId(), mStartParam->messageId(), NmUiEditorForward); @@ -955,6 +920,7 @@ } break; case NmActionResponseCommandDeleteMail: { + mAttaManager.cancelFetch(); deleteMessage(); } break; @@ -1047,25 +1013,3 @@ // Display wait dialog mWaitDialog->show(); } - -/*! - Helper function for width. -*/ -void NmViewerView::setWebViewWidth(int width) -{ - // null pointer check for mWebView in calling function - mWebView->setMinimumWidth(width); - mWebView->setMaximumWidth(width); - mWebView->setPreferredWidth(width); -} - -/*! - Helper function for heigth. -*/ -void NmViewerView::setWebViewHeighth(int height) -{ - // null pointer check for mWebView in calling function - mWebView->setMinimumHeight(height); - mWebView->setMaximumHeight(height); - mWebView->setPreferredHeight(height); -} diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmviewerviewnetmanager.cpp --- a/emailuis/nmailui/src/nmviewerviewnetmanager.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmviewerviewnetmanager.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -73,12 +73,12 @@ && requestUrl.scheme()==NmViewerViewNetManagerScheme) { QString id = requestUrl.path(); NmId partId; - bool isFetched = false; + bool isFetched(false); NmMessage *message = mMessageView->message(); if (message) { QVariant data = mMessageView->webView()->loadResource( QTextDocument::ImageResource, requestUrl, partId, isFetched); - NmViewerViewNetReply* reply = NULL; + NmViewerViewNetReply* reply(NULL); if (isFetched) { reply = new NmViewerViewNetReply(data, mUiEngine); } diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmviewerviewnetreply.cpp --- a/emailuis/nmailui/src/nmviewerviewnetreply.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmviewerviewnetreply.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -94,6 +94,9 @@ // Insert embedded images into cache manually if(manager()) { if(manager()->cache() && request().url().scheme() == NMUI_NET_REPLY_CONTENT_ID) { + // Store url to use for reply in access manager finished emitting. + setUrl(request().url()); + // Metadata required for inserted data QNetworkCacheMetaData metaData; metaData.setUrl(request().url()); @@ -120,7 +123,7 @@ NM_FUNCTION; Q_UNUSED(result); - NmMessage *message = NULL; + NmMessage *message(NULL); message = mUiEngine.message( mMailboxId, mFolderId, @@ -128,7 +131,7 @@ if (message) { QList partList; message->attachmentList(partList); - NmMessagePart *part = NULL; + NmMessagePart *part(NULL); for (int i = 0; !part && i < partList.count(); i++) { if (partList[i]->partId() == mMessagePartId) { part = partList[i]; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/src/nmviewerwebview.cpp --- a/emailuis/nmailui/src/nmviewerwebview.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/src/nmviewerwebview.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -21,11 +21,16 @@ Constructor. */ NmMailViewerWK::NmMailViewerWK() -: QGraphicsWebView() +: QGraphicsWebView(), + mContent(), + mParentView(NULL), + mSuppressRelease(false) { + // Subscribe this widget to tap and pinch gestures. + grabGesture(Qt::TapGesture); grabGesture(Qt::PinchGesture); - installEventFilter(new NmEventFilterWK(this)); - setFlag(QGraphicsItem::ItemIsFocusable,false); + // Prevent this widget from accepting focus. + setFocusPolicy(Qt::NoFocus); } /*! @@ -75,36 +80,29 @@ } /*! - Filter class' constructor. + This is the main event handler that processes all incoming events in an + appropriate manner. */ -NmEventFilterWK::NmEventFilterWK(QObject* parent) -: QObject(parent) +bool NmMailViewerWK::event(QEvent* event) { -} - -/* - Filters events if this object has been installed as an event filter. - */ -bool NmEventFilterWK::eventFilter(QObject* object, QEvent* event) { - Q_UNUSED(object); bool consumed = false; if (event) { switch (event->type()) { case QEvent::Gesture: - consumed = gestureEvent(static_cast(event)); - break; - case QEvent::GraphicsSceneMouseDoubleClick: - // Handle double click (instant zoom). - // At the moment we simply consume the event. - event->accept(); - consumed = true; + // Handle gesture events. + gestureEvent(static_cast(event)); + consumed = event->isAccepted(); break; case QEvent::GraphicsSceneContextMenu: - case QEvent::GraphicsSceneMouseMove: - event->accept(); - consumed = true; + // Handle context-menu events. + // contextMenuEvent() is invoked directly in order to override + // text selection in QWebPage. + contextMenuEvent(static_cast(event)); + consumed = event->isAccepted(); break; default: + // Invoke base class' event handler. + consumed = QGraphicsWebView::event(event); break; } } @@ -112,18 +110,78 @@ } /*! - Handles gesture events. This function is invoked by the eventFilter() - function in case of gesture events. + Handles context-menu events. + */ +void NmMailViewerWK::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + if (event) { + // Suppress context-menu invocations. + event->accept(); + } +} + +/*! + Handles gesture events. */ -bool NmEventFilterWK::gestureEvent(QGestureEvent* event) { - bool consumed = false; +void NmMailViewerWK::gestureEvent(QGestureEvent* event) +{ if (event) { + if (QTapGesture* tap = static_cast(event->gesture(Qt::TapGesture))) { + switch (tap->state()) { + case Qt::GestureCanceled: + // Tap cancellation suppresses the following mouse release. + mSuppressRelease = true; + break; + default: + // Other states disclose the following mouse release. + mSuppressRelease = false; + break; + } + event->accept(); + } if (QPinchGesture* pinch = static_cast(event->gesture(Qt::PinchGesture))) { // Handle pinch (zoom). // At the moment we simply consume the event. event->accept(); - consumed = true; } } - return consumed; +} + +/*! + Handles double-click events. + */ +void NmMailViewerWK::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + if (event) { + // Handle double clicks (instant zoom). + // At the moment we simply consume the event. + event->accept(); + } } + +/*! + Handles mouse-move events. + */ +void NmMailViewerWK::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + if (event) { + // Suppress drag selection. + event->accept(); + } +} + +/*! + Handles mouse-release events. + */ +void NmMailViewerWK::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + if (event) { + // Suppress mouse release if the previous tap was cancelled. + // Otherwise, invoke the base class' event handler. + if (mSuppressRelease) { + event->accept(); + } else { + QGraphicsWebView::mouseReleaseEvent(event); + } + } +} diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/translations/mail.qm Binary file emailuis/nmailui/translations/mail.qm has changed diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailui/translations/mail.ts --- a/emailuis/nmailui/translations/mail.ts Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailui/translations/mail.ts Thu Jun 24 14:32:18 2010 +0300 @@ -426,7 +426,7 @@ Secondary text for status menu item: indicates the there are new mail messages New Mail - + qtl_notifdialog_sec_medium_graphic mail_01_d list mail @@ -682,6 +682,16 @@ mail False + + Title text shown in status pane when contacts are fetched from Phonebook. + Select contacts + + qtl_dialog_pri_heading + mail + dpophead + mail + False + Button for notes txt_mail_dialog_server_settings_incorrect and txt_mail_dialog_address_or_password_incorrect. No diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiengine/bwins/nmailuiengineu.def --- a/emailuis/nmailuiengine/bwins/nmailuiengineu.def Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiengine/bwins/nmailuiengineu.def Thu Jun 24 14:32:18 2010 +0300 @@ -69,246 +69,247 @@ ?sendMail@NmBaseClientPlugin@@QAEXXZ @ 68 NONAME ; void NmBaseClientPlugin::sendMail(void) ?insertNewMessageIntoModel@NmMessageListModel@@AAEXABVNmId@@00@Z @ 69 NONAME ; void NmMessageListModel::insertNewMessageIntoModel(class NmId const &, class NmId const &, class NmId const &) ?getStaticMetaObject@NmUiEngine@@SAABUQMetaObject@@XZ @ 70 NONAME ; struct QMetaObject const & NmUiEngine::getStaticMetaObject(void) - ?applicationStateInterfaceInstance@NmDataPluginFactory@@AAEPAVNmApplicationStateInterface@@PAVQObject@@@Z @ 71 NONAME ; class NmApplicationStateInterface * NmDataPluginFactory::applicationStateInterfaceInstance(class QObject *) - ?metaObject@NmMessageListModel@@UBEPBUQMetaObject@@XZ @ 72 NONAME ; struct QMetaObject const * NmMessageListModel::metaObject(void) const - ?messageBeingSent@NmUiEngine@@QBEPBVNmMessage@@XZ @ 73 NONAME ; class NmMessage const * NmUiEngine::messageBeingSent(void) const - ?handleMailboxEvent@NmUiEngine@@AAEXW4NmMailboxEvent@@ABV?$QList@VNmId@@@@@Z @ 74 NONAME ; void NmUiEngine::handleMailboxEvent(enum NmMailboxEvent, class QList const &) - ?interfaceInstance@NmDataPluginFactory@@QAEPAVNmDataPluginInterface@@VNmId@@@Z @ 75 NONAME ; class NmDataPluginInterface * NmDataPluginFactory::interfaceInstance(class NmId) - ?goOffline@NmBaseClientPlugin@@AAEXABVNmId@@@Z @ 76 NONAME ; void NmBaseClientPlugin::goOffline(class NmId const &) - ?sendMessage@NmUiEngine@@QAEXPAVNmMessage@@ABV?$QList@PAVNmOperation@@@@@Z @ 77 NONAME ; void NmUiEngine::sendMessage(class NmMessage *, class QList const &) - ?tr@NmDataManager@@SA?AVQString@@PBD0H@Z @ 78 NONAME ; class QString NmDataManager::tr(char const *, char const *, int) - ??0NmMailboxListModel@@QAE@AAVNmDataManager@@PAVQObject@@@Z @ 79 NONAME ; NmMailboxListModel::NmMailboxListModel(class NmDataManager &, class QObject *) - ?handleMessageEvent@NmMessageListModel@@QAEXW4NmMessageEvent@@ABVNmId@@ABV?$QList@VNmId@@@@1@Z @ 80 NONAME ; void NmMessageListModel::handleMessageEvent(enum NmMessageEvent, class NmId const &, class QList const &, class NmId const &) - ?setPriorityNormal@NmBaseClientPlugin@@QAEXXZ @ 81 NONAME ; void NmBaseClientPlugin::setPriorityNormal(void) - ??_ENmMessageSendingOperation@@UAE@I@Z @ 82 NONAME ; NmMessageSendingOperation::~NmMessageSendingOperation(unsigned int) - ?changed@NmMessageListModel@@AAE_NABVNmMessageEnvelope@@0@Z @ 83 NONAME ; bool NmMessageListModel::changed(class NmMessageEnvelope const &, class NmMessageEnvelope const &) - ?openAttachment@NmBaseClientPlugin@@QAEXXZ @ 84 NONAME ; void NmBaseClientPlugin::openAttachment(void) - ?staticMetaObject@NmMessageCreationOperation@@2UQMetaObject@@B @ 85 NONAME ; struct QMetaObject const NmMessageCreationOperation::staticMetaObject - ?handleMailboxEvent@NmMailboxListModel@@QAEXW4NmMailboxEvent@@ABV?$QList@VNmId@@@@@Z @ 86 NONAME ; void NmMailboxListModel::handleMailboxEvent(enum NmMailboxEvent, class QList const &) - ?metaObject@NmStoreEnvelopesOperation@@UBEPBUQMetaObject@@XZ @ 87 NONAME ; struct QMetaObject const * NmStoreEnvelopesOperation::metaObject(void) const - ?trUtf8@NmMailboxListModel@@SA?AVQString@@PBD0H@Z @ 88 NONAME ; class QString NmMailboxListModel::trUtf8(char const *, char const *, int) - ?mPluginArray@NmDataPluginFactory@@0PAV?$QList@PAVQObject@@@@A @ 89 NONAME ; class QList * NmDataPluginFactory::mPluginArray - ?instance@NmDataPluginFactory@@SAPAV1@XZ @ 90 NONAME ; class NmDataPluginFactory * NmDataPluginFactory::instance(void) - ?getStaticMetaObject@NmMessageListModel@@SAABUQMetaObject@@XZ @ 91 NONAME ; struct QMetaObject const & NmMessageListModel::getStaticMetaObject(void) - ?deleteMessageFromViewerView@NmBaseClientPlugin@@QAEXXZ @ 92 NONAME ; void NmBaseClientPlugin::deleteMessageFromViewerView(void) - ?tr@NmUiEngine@@SA?AVQString@@PBD0H@Z @ 93 NONAME ; class QString NmUiEngine::tr(char const *, char const *, int) - ?refresh@NmMessageListModel@@QAEXVNmId@@0ABV?$QList@PAVNmMessageEnvelope@@@@@Z @ 94 NONAME ; void NmMessageListModel::refresh(class NmId, class NmId, class QList const &) - ?mailboxById@NmUiEngine@@QAEPAVNmMailboxMetaData@@ABVNmId@@@Z @ 95 NONAME ; class NmMailboxMetaData * NmUiEngine::mailboxById(class NmId const &) - ?createNewMessage@NmUiEngine@@QAE?AV?$QPointer@VNmMessageCreationOperation@@@@ABVNmId@@@Z @ 96 NONAME ; class QPointer NmUiEngine::createNewMessage(class NmId const &) - ??_ENmMessageListModelItem@@UAE@I@Z @ 97 NONAME ; NmMessageListModelItem::~NmMessageListModelItem(unsigned int) - ?replyAllMail@NmBaseClientPlugin@@QAEXXZ @ 98 NONAME ; void NmBaseClientPlugin::replyAllMail(void) - ?handleMatchFound@NmUiEngine@@AAEXABVNmId@@0@Z @ 99 NONAME ; void NmUiEngine::handleMatchFound(class NmId const &, class NmId const &) - ?syncStateEvent@NmUiEngine@@IAEXW4NmSyncState@@ABVNmId@@@Z @ 100 NONAME ; void NmUiEngine::syncStateEvent(enum NmSyncState, class NmId const &) - ?trUtf8@NmDataManager@@SA?AVQString@@PBD0@Z @ 101 NONAME ; class QString NmDataManager::trUtf8(char const *, char const *) - ?setEnvelopeProperties@NmMessageListModel@@QAEXW4NmEnvelopeProperties@@ABV?$QList@VNmId@@@@@Z @ 102 NONAME ; void NmMessageListModel::setEnvelopeProperties(enum NmEnvelopeProperties, class QList const &) - ??1NmStoreEnvelopesOperation@@MAE@XZ @ 103 NONAME ; NmStoreEnvelopesOperation::~NmStoreEnvelopesOperation(void) - ?tr@NmUiEngine@@SA?AVQString@@PBD0@Z @ 104 NONAME ; class QString NmUiEngine::tr(char const *, char const *) - ?mPluginLoaderArray@NmDataPluginFactory@@0V?$QList@PAVQPluginLoader@@@@A @ 105 NONAME ; class QList NmDataPluginFactory::mPluginLoaderArray - ?trUtf8@NmBaseClientPlugin@@SA?AVQString@@PBD0@Z @ 106 NONAME ; class QString NmBaseClientPlugin::trUtf8(char const *, char const *) - ?deleteOperation@NmOperation@@AAEXXZ @ 107 NONAME ; void NmOperation::deleteOperation(void) - ?trUtf8@NmBaseClientPlugin@@SA?AVQString@@PBD0H@Z @ 108 NONAME ; class QString NmBaseClientPlugin::trUtf8(char const *, char const *, int) - ?createViewerViewCommands@NmBaseClientPlugin@@AAEXABVNmActionRequest@@AAV?$QList@PAVNmAction@@@@@Z @ 109 NONAME ; void NmBaseClientPlugin::createViewerViewCommands(class NmActionRequest const &, class QList &) - ?fetchMessagePart@NmUiEngine@@QAE?AV?$QPointer@VNmOperation@@@@ABVNmId@@000@Z @ 110 NONAME ; class QPointer NmUiEngine::fetchMessagePart(class NmId const &, class NmId const &, class NmId const &, class NmId const &) - ?tr@NmMailboxListModel@@SA?AVQString@@PBD0H@Z @ 111 NONAME ; class QString NmMailboxListModel::tr(char const *, char const *, int) - ?handleConnectEvent@NmUiEngine@@QAEXW4NmConnectState@@ABVNmId@@H@Z @ 112 NONAME ; void NmUiEngine::handleConnectEvent(enum NmConnectState, class NmId const &, int) - ?trUtf8@NmUiEngine@@SA?AVQString@@PBD0H@Z @ 113 NONAME ; class QString NmUiEngine::trUtf8(char const *, char const *, int) - ?createMailboxItem@NmMailboxListModel@@AAEPAVNmMailboxListModelItem@@PBVNmMailbox@@@Z @ 114 NONAME ; class NmMailboxListModelItem * NmMailboxListModel::createMailboxItem(class NmMailbox const *) - ?setTitleDivider@NmMessageListModelItem@@QAEXABVQString@@@Z @ 115 NONAME ; void NmMessageListModelItem::setTitleDivider(class QString const &) - ?markAsRead@NmBaseClientPlugin@@QAEXXZ @ 116 NONAME ; void NmBaseClientPlugin::markAsRead(void) - ?getInsertionIndex@NmMessageListModel@@ABEHABVNmMessageEnvelope@@@Z @ 117 NONAME ; int NmMessageListModel::getInsertionIndex(class NmMessageEnvelope const &) const - ?updateOperationProgress@NmOperation@@QAEXH@Z @ 118 NONAME ; void NmOperation::updateOperationProgress(int) - ??1NmFolderListModel@@UAE@XZ @ 119 NONAME ; NmFolderListModel::~NmFolderListModel(void) - ?operationCompleted@NmUiEngine@@IAEXABVNmOperationCompletionEvent@@@Z @ 120 NONAME ; void NmUiEngine::operationCompleted(class NmOperationCompletionEvent const &) - ??1NmDataManager@@UAE@XZ @ 121 NONAME ; NmDataManager::~NmDataManager(void) - ?trUtf8@NmStoreEnvelopesOperation@@SA?AVQString@@PBD0@Z @ 122 NONAME ; class QString NmStoreEnvelopesOperation::trUtf8(char const *, char const *) - ?setAddress@NmMailboxMetaData@@QAEXABVQString@@@Z @ 123 NONAME ; void NmMailboxMetaData::setAddress(class QString const &) - ?getStaticMetaObject@NmMessageCreationOperation@@SAABUQMetaObject@@XZ @ 124 NONAME ; struct QMetaObject const & NmMessageCreationOperation::getStaticMetaObject(void) - ?updateActiveFolder@NmUiEngine@@QAEXABVNmId@@0@Z @ 125 NONAME ; void NmUiEngine::updateActiveFolder(class NmId const &, class NmId const &) - ?trUtf8@NmAddAttachmentsOperation@@SA?AVQString@@PBD0@Z @ 126 NONAME ; class QString NmAddAttachmentsOperation::trUtf8(char const *, char const *) - ?name@NmMailboxMetaData@@QBE?AVQString@@XZ @ 127 NONAME ; class QString NmMailboxMetaData::name(void) const - ?qt_metacall@NmDataManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 128 NONAME ; int NmDataManager::qt_metacall(enum QMetaObject::Call, int, void * *) - ?runAsyncOperation@NmOperation@@MAEXXZ @ 129 NONAME ; void NmOperation::runAsyncOperation(void) - ??0NmFolderListModel@@QAE@AAVNmDataManager@@PAVQObject@@@Z @ 130 NONAME ; NmFolderListModel::NmFolderListModel(class NmDataManager &, class QObject *) - ?folderTypeById@NmDataManager@@QAE?AW4NmFolderType@@VNmId@@0@Z @ 131 NONAME ; enum NmFolderType NmDataManager::folderTypeById(class NmId, class NmId) - ?tr@NmBaseClientPlugin@@SA?AVQString@@PBD0H@Z @ 132 NONAME ; class QString NmBaseClientPlugin::tr(char const *, char const *, int) - ??0NmMailboxMetaData@@QAE@XZ @ 133 NONAME ; NmMailboxMetaData::NmMailboxMetaData(void) - ?setEnvelope@NmMessageListModelItem@@QAEXPAVNmMessageEnvelope@@@Z @ 134 NONAME ; void NmMessageListModelItem::setEnvelope(class NmMessageEnvelope *) - ?saveMessage@NmUiEngine@@QAEHABVNmMessage@@@Z @ 135 NONAME ; int NmUiEngine::saveMessage(class NmMessage const &) - ?setId@NmMailboxMetaData@@QAEXABVNmId@@@Z @ 136 NONAME ; void NmMailboxMetaData::setId(class NmId const &) - ?folderTypeById@NmUiEngine@@QAE?AW4NmFolderType@@VNmId@@0@Z @ 137 NONAME ; enum NmFolderType NmUiEngine::folderTypeById(class NmId, class NmId) - ?mReferenceCount@NmDataPluginFactory@@0HA @ 138 NONAME ; int NmDataPluginFactory::mReferenceCount - ?tr@NmOperation@@SA?AVQString@@PBD0@Z @ 139 NONAME ; class QString NmOperation::tr(char const *, char const *) - ?updateMessageEnvelope@NmMessageListModel@@AAEXABVNmId@@00@Z @ 140 NONAME ; void NmMessageListModel::updateMessageEnvelope(class NmId const &, class NmId const &, class NmId const &) - ?tr@NmStoreEnvelopesOperation@@SA?AVQString@@PBD0@Z @ 141 NONAME ; class QString NmStoreEnvelopesOperation::tr(char const *, char const *) - ?messagesBelongUnderSameDivider@NmMessageListModel@@ABE_NPBVNmMessageEnvelope@@0@Z @ 142 NONAME ; bool NmMessageListModel::messagesBelongUnderSameDivider(class NmMessageEnvelope const *, class NmMessageEnvelope const *) const - ?matchFound@NmUiEngine@@IAEXABVNmId@@0@Z @ 143 NONAME ; void NmUiEngine::matchFound(class NmId const &, class NmId const &) - ?metaObject@NmDataManager@@UBEPBUQMetaObject@@XZ @ 144 NONAME ; struct QMetaObject const * NmDataManager::metaObject(void) const - ?isSendingMessage@NmUiEngine@@QBE_NXZ @ 145 NONAME ; bool NmUiEngine::isSendingMessage(void) const - ?freeIcons@NmIcons@@SAXXZ @ 146 NONAME ; void NmIcons::freeIcons(void) - ?tr@NmAddAttachmentsOperation@@SA?AVQString@@PBD0@Z @ 147 NONAME ; class QString NmAddAttachmentsOperation::tr(char const *, char const *) - ?itemFromModel@NmMessageListModel@@AAEPAVNmMessageListModelItem@@ABVNmId@@@Z @ 148 NONAME ; class NmMessageListModelItem * NmMessageListModel::itemFromModel(class NmId const &) - ?instance@NmUiEngine@@SAPAV1@XZ @ 149 NONAME ; class NmUiEngine * NmUiEngine::instance(void) - ?createMessageListCommands@NmBaseClientPlugin@@AAEXABVNmActionRequest@@AAV?$QList@PAVNmAction@@@@@Z @ 150 NONAME ; void NmBaseClientPlugin::createMessageListCommands(class NmActionRequest const &, class QList &) - ?updateEnvelopeProperty@NmBaseClientPlugin@@AAEXW4NmEnvelopeProperties@@@Z @ 151 NONAME ; void NmBaseClientPlugin::updateEnvelopeProperty(enum NmEnvelopeProperties) - ??1NmAddAttachmentsOperation@@MAE@XZ @ 152 NONAME ; NmAddAttachmentsOperation::~NmAddAttachmentsOperation(void) - ?goOffline@NmUiEngine@@QAEHABVNmId@@@Z @ 153 NONAME ; int NmUiEngine::goOffline(class NmId const &) - ?staticMetaObject@NmDataManager@@2UQMetaObject@@B @ 154 NONAME ; struct QMetaObject const NmDataManager::staticMetaObject - ?mInstance@NmUiEngine@@0PAV1@A @ 155 NONAME ; class NmUiEngine * NmUiEngine::mInstance - ?attach@NmBaseClientPlugin@@QAEXXZ @ 156 NONAME ; void NmBaseClientPlugin::attach(void) - ?setIgnoreFolderIds@NmMessageListModel@@QAEX_N@Z @ 157 NONAME ; void NmMessageListModel::setIgnoreFolderIds(bool) - ?metaObject@NmAddAttachmentsOperation@@UBEPBUQMetaObject@@XZ @ 158 NONAME ; struct QMetaObject const * NmAddAttachmentsOperation::metaObject(void) const - ?refresh@NmFolderListModel@@QAEXAAV?$QList@PAVNmFolder@@@@@Z @ 159 NONAME ; void NmFolderListModel::refresh(class QList &) - ?handleCompletedRemoveDraftOperation@NmUiEngine@@QAEXXZ @ 160 NONAME ; void NmUiEngine::handleCompletedRemoveDraftOperation(void) - ?trUtf8@NmMailboxListModel@@SA?AVQString@@PBD0@Z @ 161 NONAME ; class QString NmMailboxListModel::trUtf8(char const *, char const *) - ?envelopeById@NmDataManager@@QAEPAVNmMessageEnvelope@@ABVNmId@@00@Z @ 162 NONAME ; class NmMessageEnvelope * NmDataManager::envelopeById(class NmId const &, class NmId const &, class NmId const &) - ?getStaticMetaObject@NmOperation@@SAABUQMetaObject@@XZ @ 163 NONAME ; struct QMetaObject const & NmOperation::getStaticMetaObject(void) - ?trUtf8@NmOperation@@SA?AVQString@@PBD0@Z @ 164 NONAME ; class QString NmOperation::trUtf8(char const *, char const *) - ?addAttachments@NmUiEngine@@QAE?AV?$QPointer@VNmAddAttachmentsOperation@@@@ABVNmMessage@@ABV?$QList@VQString@@@@@Z @ 165 NONAME ; class QPointer NmUiEngine::addAttachments(class NmMessage const &, class QList const &) - ?doCancelOperation@NmOperation@@MAEXXZ @ 166 NONAME ; void NmOperation::doCancelOperation(void) - ?tr@NmOperation@@SA?AVQString@@PBD0H@Z @ 167 NONAME ; class QString NmOperation::tr(char const *, char const *, int) - ??_ENmOperation@@UAE@I@Z @ 168 NONAME ; NmOperation::~NmOperation(unsigned int) - ?tr@NmMessageCreationOperation@@SA?AVQString@@PBD0@Z @ 169 NONAME ; class QString NmMessageCreationOperation::tr(char const *, char const *) - ?qt_metacall@NmMessageListModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 170 NONAME ; int NmMessageListModel::qt_metacall(enum QMetaObject::Call, int, void * *) - ?staticMetaObject@NmOperation@@2UQMetaObject@@B @ 171 NONAME ; struct QMetaObject const NmOperation::staticMetaObject - ??1NmUiEngine@@EAE@XZ @ 172 NONAME ; NmUiEngine::~NmUiEngine(void) - ?messagePartFile@NmUiEngine@@QAE?AVXQSharableFile@@ABVNmId@@000@Z @ 173 NONAME ; class XQSharableFile NmUiEngine::messagePartFile(class NmId const &, class NmId const &, class NmId const &, class NmId const &) - ??_ENmMessageListModel@@UAE@I@Z @ 174 NONAME ; NmMessageListModel::~NmMessageListModel(unsigned int) - ?addPreliminaryOperation@NmOperation@@QAEXPAV1@@Z @ 175 NONAME ; void NmOperation::addPreliminaryOperation(class NmOperation *) - ?deleteMessages@NmUiEngine@@QAEHABVNmId@@0ABV?$QList@VNmId@@@@@Z @ 176 NONAME ; int NmUiEngine::deleteMessages(class NmId const &, class NmId const &, class QList const &) - ??_ENmStoreEnvelopesOperation@@UAE@I@Z @ 177 NONAME ; NmStoreEnvelopesOperation::~NmStoreEnvelopesOperation(unsigned int) - ?mailboxById@NmDataManager@@QAEPAVNmMailboxMetaData@@ABVNmId@@@Z @ 178 NONAME ; class NmMailboxMetaData * NmDataManager::mailboxById(class NmId const &) - ?messageListModelForSearch@NmUiEngine@@QAEAAVNmMessageListModel@@ABVNmId@@@Z @ 179 NONAME ; class NmMessageListModel & NmUiEngine::messageListModelForSearch(class NmId const &) - ?search@NmBaseClientPlugin@@QAEXXZ @ 180 NONAME ; void NmBaseClientPlugin::search(void) - ?pluginInstances@NmDataPluginFactory@@QAEPAV?$QList@PAVQObject@@@@XZ @ 181 NONAME ; class QList * NmDataPluginFactory::pluginInstances(void) - ?tr@NmBaseClientPlugin@@SA?AVQString@@PBD0@Z @ 182 NONAME ; class QString NmBaseClientPlugin::tr(char const *, char const *) - ?listMessages@NmDataManager@@QAEXABVNmId@@0AAV?$QList@PAVNmMessageEnvelope@@@@@Z @ 183 NONAME ; void NmDataManager::listMessages(class NmId const &, class NmId const &, class QList &) - ??1NmBaseClientPlugin@@UAE@XZ @ 184 NONAME ; NmBaseClientPlugin::~NmBaseClientPlugin(void) - ?qt_metacast@NmDataManager@@UAEPAXPBD@Z @ 185 NONAME ; void * NmDataManager::qt_metacast(char const *) - ??0NmMessageCreationOperation@@QAE@XZ @ 186 NONAME ; NmMessageCreationOperation::NmMessageCreationOperation(void) - ?qt_metacall@NmBaseClientPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 187 NONAME ; int NmBaseClientPlugin::qt_metacall(enum QMetaObject::Call, int, void * *) - ?envelopePtr@NmMessageListModelItem@@QAEPAVNmMessageEnvelope@@XZ @ 188 NONAME ; class NmMessageEnvelope * NmMessageListModelItem::envelopePtr(void) - ?messageListModel@NmUiEngine@@QAEAAVNmMessageListModel@@ABVNmId@@0@Z @ 189 NONAME ; class NmMessageListModel & NmUiEngine::messageListModel(class NmId const &, class NmId const &) - ??1NmMailboxMetaData@@UAE@XZ @ 190 NONAME ; NmMailboxMetaData::~NmMailboxMetaData(void) - ?connectionEvent@NmUiEngine@@IAEXW4NmConnectState@@ABVNmId@@@Z @ 191 NONAME ; void NmUiEngine::connectionEvent(enum NmConnectState, class NmId const &) - ?mailbox@NmDataManager@@QAEPAVNmMailbox@@ABVNmId@@@Z @ 192 NONAME ; class NmMailbox * NmDataManager::mailbox(class NmId const &) - ?interfaceInstance@NmDataPluginFactory@@QAEPAVNmDataPluginInterface@@PAVQObject@@@Z @ 193 NONAME ; class NmDataPluginInterface * NmDataPluginFactory::interfaceInstance(class QObject *) - ?refreshModelItem@NmMailboxListModel@@QAEXABVNmId@@@Z @ 194 NONAME ; void NmMailboxListModel::refreshModelItem(class NmId const &) - ?metaObject@NmMailboxListModel@@UBEPBUQMetaObject@@XZ @ 195 NONAME ; struct QMetaObject const * NmMailboxListModel::metaObject(void) const - ?IconId@NmMailboxMetaData@@QBE?AVNmId@@XZ @ 196 NONAME ; class NmId NmMailboxMetaData::IconId(void) const - ?sendOperationCompleted@NmUiEngine@@IAEXXZ @ 197 NONAME ; void NmUiEngine::sendOperationCompleted(void) - ??0NmFolderMetaData@@QAE@XZ @ 198 NONAME ; NmFolderMetaData::NmFolderMetaData(void) - ?staticMetaObject@NmAddAttachmentsOperation@@2UQMetaObject@@B @ 199 NONAME ; struct QMetaObject const NmAddAttachmentsOperation::staticMetaObject - ?connectionState@NmUiEngine@@QAE?AW4NmConnectState@@ABVNmId@@@Z @ 200 NONAME ; enum NmConnectState NmUiEngine::connectionState(class NmId const &) - ?createTitleDividerItem@NmMessageListModel@@AAEPAVNmMessageListModelItem@@PAVNmMessageEnvelope@@@Z @ 201 NONAME ; class NmMessageListModelItem * NmMessageListModel::createTitleDividerItem(class NmMessageEnvelope *) - ?setId@NmFolderMetaData@@QAEXABVNmId@@@Z @ 202 NONAME ; void NmFolderMetaData::setId(class NmId const &) - ??0NmOperation@@QAE@XZ @ 203 NONAME ; NmOperation::NmOperation(void) - ?cancelOperation@NmOperation@@QAEXXZ @ 204 NONAME ; void NmOperation::cancelOperation(void) - ??_ENmFolderMetaData@@UAE@I@Z @ 205 NONAME ; NmFolderMetaData::~NmFolderMetaData(unsigned int) - ?qt_metacast@NmMessageListModel@@UAEPAXPBD@Z @ 206 NONAME ; void * NmMessageListModel::qt_metacast(char const *) - ?operationProgressChanged@NmOperation@@IAEXH@Z @ 207 NONAME ; void NmOperation::operationProgressChanged(int) - ?trUtf8@NmOperation@@SA?AVQString@@PBD0H@Z @ 208 NONAME ; class QString NmOperation::trUtf8(char const *, char const *, int) - ??_ENmMailboxListModel@@UAE@I@Z @ 209 NONAME ; NmMailboxListModel::~NmMailboxListModel(unsigned int) - ?messageDeleted@NmUiEngine@@IAEXABVNmId@@00@Z @ 210 NONAME ; void NmUiEngine::messageDeleted(class NmId const &, class NmId const &, class NmId const &) - ?trUtf8@NmMessageCreationOperation@@SA?AVQString@@PBD0@Z @ 211 NONAME ; class QString NmMessageCreationOperation::trUtf8(char const *, char const *) - ?metaObject@NmUiEngine@@UBEPBUQMetaObject@@XZ @ 212 NONAME ; struct QMetaObject const * NmUiEngine::metaObject(void) const - ??_ENmBaseClientPlugin@@UAE@I@Z @ 213 NONAME ; NmBaseClientPlugin::~NmBaseClientPlugin(unsigned int) - ?markAsUnread@NmBaseClientPlugin@@QAEXXZ @ 214 NONAME ; void NmBaseClientPlugin::markAsUnread(void) - ?metaObject@NmBaseClientPlugin@@UBEPBUQMetaObject@@XZ @ 215 NONAME ; struct QMetaObject const * NmBaseClientPlugin::metaObject(void) const - ?tr@NmDataManager@@SA?AVQString@@PBD0@Z @ 216 NONAME ; class QString NmDataManager::tr(char const *, char const *) - ?mailboxListModel@NmUiEngine@@QAEAAVNmMailboxListModel@@XZ @ 217 NONAME ; class NmMailboxListModel & NmUiEngine::mailboxListModel(void) - ?fetchMessage@NmUiEngine@@QAE?AV?$QPointer@VNmOperation@@@@ABVNmId@@00@Z @ 218 NONAME ; class QPointer NmUiEngine::fetchMessage(class NmId const &, class NmId const &, class NmId const &) - ?setIconId@NmMailboxMetaData@@QAEXABVNmId@@@Z @ 219 NONAME ; void NmMailboxMetaData::setIconId(class NmId const &) - ??1NmDataPluginFactory@@EAE@XZ @ 220 NONAME ; NmDataPluginFactory::~NmDataPluginFactory(void) - ?refreshMailboxListModel@NmUiEngine@@QAEXXZ @ 221 NONAME ; void NmUiEngine::refreshMailboxListModel(void) - ?qt_metacall@NmStoreEnvelopesOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 222 NONAME ; int NmStoreEnvelopesOperation::qt_metacall(enum QMetaObject::Call, int, void * *) - ?trUtf8@NmMessageListModel@@SA?AVQString@@PBD0@Z @ 223 NONAME ; class QString NmMessageListModel::trUtf8(char const *, char const *) - ?rowCount@NmFolderListModel@@UBEHABVQModelIndex@@@Z @ 224 NONAME ; int NmFolderListModel::rowCount(class QModelIndex const &) const - ?doUpdateOperationProgress@NmOperation@@MAEXXZ @ 225 NONAME ; void NmOperation::doUpdateOperationProgress(void) - ?tr@NmMailboxListModel@@SA?AVQString@@PBD0@Z @ 226 NONAME ; class QString NmMailboxListModel::tr(char const *, char const *) - ?removeMessage@NmUiEngine@@QAEHABVNmId@@00@Z @ 227 NONAME ; int NmUiEngine::removeMessage(class NmId const &, class NmId const &, class NmId const &) - ??_ENmUiEngine@@UAE@I@Z @ 228 NONAME ; NmUiEngine::~NmUiEngine(unsigned int) - ?operationCompleted@NmOperation@@IAEXH@Z @ 229 NONAME ; void NmOperation::operationCompleted(int) - ?callEmitDataChanged@NmMessageListModelItem@@QAEXXZ @ 230 NONAME ; void NmMessageListModelItem::callEmitDataChanged(void) - ?handleRequest@NmBaseClientPlugin@@IAEXW4NmActionResponseCommand@@ABVNmActionRequest@@@Z @ 231 NONAME ; void NmBaseClientPlugin::handleRequest(enum NmActionResponseCommand, class NmActionRequest const &) - ??0NmMessageListModel@@QAE@AAVNmDataManager@@PAVQObject@@@Z @ 232 NONAME ; NmMessageListModel::NmMessageListModel(class NmDataManager &, class QObject *) - ??_ENmAddAttachmentsOperation@@UAE@I@Z @ 233 NONAME ; NmAddAttachmentsOperation::~NmAddAttachmentsOperation(unsigned int) - ?syncState@NmUiEngine@@QAE?AW4NmSyncState@@ABVNmId@@@Z @ 234 NONAME ; enum NmSyncState NmUiEngine::syncState(class NmId const &) - ??1NmOperation@@MAE@XZ @ 235 NONAME ; NmOperation::~NmOperation(void) - ?tr@NmStoreEnvelopesOperation@@SA?AVQString@@PBD0H@Z @ 236 NONAME ; class QString NmStoreEnvelopesOperation::tr(char const *, char const *, int) - ?listMailboxes@NmDataManager@@QAEXAAV?$QList@PAVNmMailbox@@@@@Z @ 237 NONAME ; void NmDataManager::listMailboxes(class QList &) - ?message@NmUiEngine@@QAEPAVNmMessage@@ABVNmId@@00@Z @ 238 NONAME ; class NmMessage * NmUiEngine::message(class NmId const &, class NmId const &, class NmId const &) - ?refreshMailbox@NmUiEngine@@QAEHABVNmId@@@Z @ 239 NONAME ; int NmUiEngine::refreshMailbox(class NmId const &) - ?trUtf8@NmUiEngine@@SA?AVQString@@PBD0@Z @ 240 NONAME ; class QString NmUiEngine::trUtf8(char const *, char const *) - ?contentToMessagePart@NmUiEngine@@QAEHABVNmId@@00AAVNmMessagePart@@@Z @ 241 NONAME ; int NmUiEngine::contentToMessagePart(class NmId const &, class NmId const &, class NmId const &, class NmMessagePart &) - ?removeItem@NmMessageListModel@@AAEXHAAVNmMessageListModelItem@@@Z @ 242 NONAME ; void NmMessageListModel::removeItem(int, class NmMessageListModelItem &) - ??1NmMailboxListModel@@UAE@XZ @ 243 NONAME ; NmMailboxListModel::~NmMailboxListModel(void) - ??0NmBaseClientPlugin@@QAE@XZ @ 244 NONAME ; NmBaseClientPlugin::NmBaseClientPlugin(void) - ?forwardMail@NmBaseClientPlugin@@QAEXXZ @ 245 NONAME ; void NmBaseClientPlugin::forwardMail(void) - ?setItemType@NmMessageListModelItem@@QAEXW4NmMessageItemType@1@@Z @ 246 NONAME ; void NmMessageListModelItem::setItemType(enum NmMessageListModelItem::NmMessageItemType) - ??_ENmDataPluginFactory@@UAE@I@Z @ 247 NONAME ; NmDataPluginFactory::~NmDataPluginFactory(unsigned int) - ?mailboxListChanged@NmBaseClientPlugin@@AAEXABVNmId@@W4MailboxEventType@NmSettings@@@Z @ 248 NONAME ; void NmBaseClientPlugin::mailboxListChanged(class NmId const &, enum NmSettings::MailboxEventType) - ?expanded@NmMessageListModelItem@@QBE_NXZ @ 249 NONAME ; bool NmMessageListModelItem::expanded(void) const - ?columnCount@NmFolderListModel@@UBEHABVQModelIndex@@@Z @ 250 NONAME ; int NmFolderListModel::columnCount(class QModelIndex const &) const - ?pluginInstance@NmDataPluginFactory@@QAEPAVQObject@@VNmId@@@Z @ 251 NONAME ; class QObject * NmDataPluginFactory::pluginInstance(class NmId) - ?setNewParam@NmMessageListModel@@IAEXPAVNmUiStartParam@@@Z @ 252 NONAME ; void NmMessageListModel::setNewParam(class NmUiStartParam *) - ?data@NmMessageListModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 253 NONAME ; class QVariant NmMessageListModel::data(class QModelIndex const &, int) const - ?goOnline@NmBaseClientPlugin@@AAEXABVNmId@@@Z @ 254 NONAME ; void NmBaseClientPlugin::goOnline(class NmId const &) - ?createNewMail@NmBaseClientPlugin@@QAEXXZ @ 255 NONAME ; void NmBaseClientPlugin::createNewMail(void) - ?qt_metacast@NmBaseClientPlugin@@UAEPAXPBD@Z @ 256 NONAME ; void * NmBaseClientPlugin::qt_metacast(char const *) - ?staticMetaObject@NmBaseClientPlugin@@2UQMetaObject@@B @ 257 NONAME ; struct QMetaObject const NmBaseClientPlugin::staticMetaObject - ?searchComplete@NmUiEngine@@IAEXXZ @ 258 NONAME ; void NmUiEngine::searchComplete(void) - ?setEnvelope@NmMessageListModelItem@@QAEXABVNmMessageEnvelope@@@Z @ 259 NONAME ; void NmMessageListModelItem::setEnvelope(class NmMessageEnvelope const &) - ?qt_metacast@NmAddAttachmentsOperation@@UAEPAXPBD@Z @ 260 NONAME ; void * NmAddAttachmentsOperation::qt_metacast(char const *) - ?createNewMailViewerToolBar@NmBaseClientPlugin@@QAEXXZ @ 261 NONAME ; void NmBaseClientPlugin::createNewMailViewerToolBar(void) - ?staticMetaObject@NmMailboxListModel@@2UQMetaObject@@B @ 262 NONAME ; struct QMetaObject const NmMailboxListModel::staticMetaObject - ?qt_metacall@NmMessageCreationOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 263 NONAME ; int NmMessageCreationOperation::qt_metacall(enum QMetaObject::Call, int, void * *) - ?trUtf8@NmDataManager@@SA?AVQString@@PBD0H@Z @ 264 NONAME ; class QString NmDataManager::trUtf8(char const *, char const *, int) - ?trUtf8@NmMessageCreationOperation@@SA?AVQString@@PBD0H@Z @ 265 NONAME ; class QString NmMessageCreationOperation::trUtf8(char const *, char const *, int) - ?createForwardMessage@NmUiEngine@@QAE?AV?$QPointer@VNmMessageCreationOperation@@@@ABVNmId@@0@Z @ 266 NONAME ; class QPointer NmUiEngine::createForwardMessage(class NmId const &, class NmId const &) - ?handleSyncStateEvent@NmUiEngine@@QAEXW4NmSyncState@@ABVNmOperationCompletionEvent@@@Z @ 267 NONAME ; void NmUiEngine::handleSyncStateEvent(enum NmSyncState, class NmOperationCompletionEvent const &) - ?completeOperation@NmOperation@@QAEXH@Z @ 268 NONAME ; void NmOperation::completeOperation(int) - ?parent@NmFolderListModel@@UBE?AVQModelIndex@@ABV2@@Z @ 269 NONAME ; class QModelIndex NmFolderListModel::parent(class QModelIndex const &) const - ?folder@NmDataManager@@QAEPAVNmFolder@@ABVNmId@@0@Z @ 270 NONAME ; class NmFolder * NmDataManager::folder(class NmId const &, class NmId const &) - ??0NmMessageSendingOperation@@QAE@XZ @ 271 NONAME ; NmMessageSendingOperation::NmMessageSendingOperation(void) - ?replyMail@NmBaseClientPlugin@@QAEXXZ @ 272 NONAME ; void NmBaseClientPlugin::replyMail(void) - ??1NmMessageListModelItem@@UAE@XZ @ 273 NONAME ; NmMessageListModelItem::~NmMessageListModelItem(void) - ?mailboxPropertyChanged@NmBaseClientPlugin@@AAEXABVNmId@@VQVariant@@1@Z @ 274 NONAME ; void NmBaseClientPlugin::mailboxPropertyChanged(class NmId const &, class QVariant, class QVariant) - ?qt_metacall@NmOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 275 NONAME ; int NmOperation::qt_metacall(enum QMetaObject::Call, int, void * *) - ?removeMessageFromModel@NmMessageListModel@@AAEXABVNmId@@@Z @ 276 NONAME ; void NmMessageListModel::removeMessageFromModel(class NmId const &) - ?trUtf8@NmMessageListModel@@SA?AVQString@@PBD0H@Z @ 277 NONAME ; class QString NmMessageListModel::trUtf8(char const *, char const *, int) - ?operationPartCompleted@NmAddAttachmentsOperation@@IAEXABVQString@@ABVNmId@@H@Z @ 278 NONAME ; void NmAddAttachmentsOperation::operationPartCompleted(class QString const &, class NmId const &, int) - ?trUtf8@NmStoreEnvelopesOperation@@SA?AVQString@@PBD0H@Z @ 279 NONAME ; class QString NmStoreEnvelopesOperation::trUtf8(char const *, char const *, int) - ?tr@NmMessageListModel@@SA?AVQString@@PBD0@Z @ 280 NONAME ; class QString NmMessageListModel::tr(char const *, char const *) - ?doCompleteOperation@NmOperation@@MAEXXZ @ 281 NONAME ; void NmOperation::doCompleteOperation(void) - ?dividerInsertionIndex@NmMessageListModel@@AAEHH@Z @ 282 NONAME ; int NmMessageListModel::dividerInsertionIndex(int) - ?createMessageItem@NmMessageListModel@@AAEPAVNmMessageListModelItem@@PAVNmMessageEnvelope@@@Z @ 283 NONAME ; class NmMessageListModelItem * NmMessageListModel::createMessageItem(class NmMessageEnvelope *) - ?id@NmFolderMetaData@@QBE?AVNmId@@XZ @ 284 NONAME ; class NmId NmFolderMetaData::id(void) const - ?createReplyMessage@NmUiEngine@@QAE?AV?$QPointer@VNmMessageCreationOperation@@@@ABVNmId@@0_N@Z @ 285 NONAME ; class QPointer NmUiEngine::createReplyMessage(class NmId const &, class NmId const &, bool) - ?getStandardFolderId@NmDataManager@@QAE?AVNmId@@ABV2@W4NmFolderType@@@Z @ 286 NONAME ; class NmId NmDataManager::getStandardFolderId(class NmId const &, enum NmFolderType) - ?address@NmMailboxMetaData@@QBE?AVQString@@XZ @ 287 NONAME ; class QString NmMailboxMetaData::address(void) const - ?dividersActive@NmMessageListModel@@QAE_NXZ @ 288 NONAME ; bool NmMessageListModel::dividersActive(void) - ?titleDivider@NmMessageListModelItem@@QBE?AVQString@@XZ @ 289 NONAME ; class QString NmMessageListModelItem::titleDivider(void) const - ?getStaticMetaObject@NmBaseClientPlugin@@SAABUQMetaObject@@XZ @ 290 NONAME ; struct QMetaObject const & NmBaseClientPlugin::getStaticMetaObject(void) - ?qt_metacast@NmMessageCreationOperation@@UAEPAXPBD@Z @ 291 NONAME ; void * NmMessageCreationOperation::qt_metacast(char const *) - ?updateEnvelope@NmMessageListModel@@AAEXW4NmEnvelopeProperties@@ABVNmId@@@Z @ 292 NONAME ; void NmMessageListModel::updateEnvelope(enum NmEnvelopeProperties, class NmId const &) - ??_ENmDataManager@@UAE@I@Z @ 293 NONAME ; NmDataManager::~NmDataManager(unsigned int) - ?qt_metacast@NmMailboxListModel@@UAEPAXPBD@Z @ 294 NONAME ; void * NmMailboxListModel::qt_metacast(char const *) - ?search@NmUiEngine@@QAEHABVNmId@@ABVQStringList@@@Z @ 295 NONAME ; int NmUiEngine::search(class NmId const &, class QStringList const &) - ?setEnvelopes@NmUiEngine@@QAE?AV?$QPointer@VNmStoreEnvelopesOperation@@@@ABVNmId@@0W4NmEnvelopeProperties@@ABV?$QList@PB$$CBVNmMessageEnvelope@@@@@Z @ 296 NONAME ; class QPointer NmUiEngine::setEnvelopes(class NmId const &, class NmId const &, enum NmEnvelopeProperties, class QList const &) - ?getActions@NmBaseClientPlugin@@UAEXABVNmActionRequest@@AAV?$QList@PAVNmAction@@@@@Z @ 297 NONAME ; void NmBaseClientPlugin::getActions(class NmActionRequest const &, class QList &) - ?qt_metacast@NmStoreEnvelopesOperation@@UAEPAXPBD@Z @ 298 NONAME ; void * NmStoreEnvelopesOperation::qt_metacast(char const *) - ??_ENmMailboxMetaData@@UAE@I@Z @ 299 NONAME ; NmMailboxMetaData::~NmMailboxMetaData(unsigned int) - ??0NmMessageListModelItem@@QAE@XZ @ 300 NONAME ; NmMessageListModelItem::NmMessageListModelItem(void) - ?tr@NmAddAttachmentsOperation@@SA?AVQString@@PBD0H@Z @ 301 NONAME ; class QString NmAddAttachmentsOperation::tr(char const *, char const *, int) - ?setDividers@NmMessageListModel@@QAEX_N@Z @ 302 NONAME ; void NmMessageListModel::setDividers(bool) - ?loadPlugin@NmDataPluginFactory@@QAEPAVQObject@@ABVQDir@@ABVQString@@@Z @ 303 NONAME ; class QObject * NmDataPluginFactory::loadPlugin(class QDir const &, class QString const &) - ?qt_metacast@NmOperation@@UAEPAXPBD@Z @ 304 NONAME ; void * NmOperation::qt_metacast(char const *) - ?tr@NmMessageListModel@@SA?AVQString@@PBD0H@Z @ 305 NONAME ; class QString NmMessageListModel::tr(char const *, char const *, int) - ?removeAttachment@NmUiEngine@@QAE?AV?$QPointer@VNmOperation@@@@ABVNmMessage@@ABVNmId@@@Z @ 306 NONAME ; class QPointer NmUiEngine::removeAttachment(class NmMessage const &, class NmId const &) - ?staticMetaObject@NmMessageListModel@@2UQMetaObject@@B @ 307 NONAME ; struct QMetaObject const NmMessageListModel::staticMetaObject - ?qt_metacall@NmAddAttachmentsOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 308 NONAME ; int NmAddAttachmentsOperation::qt_metacall(enum QMetaObject::Call, int, void * *) - ?qt_metacall@NmUiEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 309 NONAME ; int NmUiEngine::qt_metacall(enum QMetaObject::Call, int, void * *) - ?message@NmDataManager@@QAEPAVNmMessage@@ABVNmId@@00@Z @ 310 NONAME ; class NmMessage * NmDataManager::message(class NmId const &, class NmId const &, class NmId const &) - ?metaObject@NmOperation@@UBEPBUQMetaObject@@XZ @ 311 NONAME ; struct QMetaObject const * NmOperation::metaObject(void) const - ?messageEventForListModel@NmUiEngine@@AAEXW4NmMessageEvent@@ABVNmId@@ABV?$QList@VNmId@@@@1@Z @ 312 NONAME ; void NmUiEngine::messageEventForListModel(enum NmMessageEvent, class NmId const &, class QList const &, class NmId const &) + ?getPluginIdByMailboxId@NmUiEngine@@QAE?AVNmId@@I@Z @ 71 NONAME ; class NmId NmUiEngine::getPluginIdByMailboxId(unsigned int) + ?applicationStateInterfaceInstance@NmDataPluginFactory@@AAEPAVNmApplicationStateInterface@@PAVQObject@@@Z @ 72 NONAME ; class NmApplicationStateInterface * NmDataPluginFactory::applicationStateInterfaceInstance(class QObject *) + ?metaObject@NmMessageListModel@@UBEPBUQMetaObject@@XZ @ 73 NONAME ; struct QMetaObject const * NmMessageListModel::metaObject(void) const + ?messageBeingSent@NmUiEngine@@QBEPBVNmMessage@@XZ @ 74 NONAME ; class NmMessage const * NmUiEngine::messageBeingSent(void) const + ?handleMailboxEvent@NmUiEngine@@AAEXW4NmMailboxEvent@@ABV?$QList@VNmId@@@@@Z @ 75 NONAME ; void NmUiEngine::handleMailboxEvent(enum NmMailboxEvent, class QList const &) + ?interfaceInstance@NmDataPluginFactory@@QAEPAVNmDataPluginInterface@@VNmId@@@Z @ 76 NONAME ; class NmDataPluginInterface * NmDataPluginFactory::interfaceInstance(class NmId) + ?goOffline@NmBaseClientPlugin@@AAEXABVNmId@@@Z @ 77 NONAME ; void NmBaseClientPlugin::goOffline(class NmId const &) + ?sendMessage@NmUiEngine@@QAEXPAVNmMessage@@ABV?$QList@PAVNmOperation@@@@@Z @ 78 NONAME ; void NmUiEngine::sendMessage(class NmMessage *, class QList const &) + ?tr@NmDataManager@@SA?AVQString@@PBD0H@Z @ 79 NONAME ; class QString NmDataManager::tr(char const *, char const *, int) + ??0NmMailboxListModel@@QAE@AAVNmDataManager@@PAVQObject@@@Z @ 80 NONAME ; NmMailboxListModel::NmMailboxListModel(class NmDataManager &, class QObject *) + ?handleMessageEvent@NmMessageListModel@@QAEXW4NmMessageEvent@@ABVNmId@@ABV?$QList@VNmId@@@@1@Z @ 81 NONAME ; void NmMessageListModel::handleMessageEvent(enum NmMessageEvent, class NmId const &, class QList const &, class NmId const &) + ?setPriorityNormal@NmBaseClientPlugin@@QAEXXZ @ 82 NONAME ; void NmBaseClientPlugin::setPriorityNormal(void) + ??_ENmMessageSendingOperation@@UAE@I@Z @ 83 NONAME ; NmMessageSendingOperation::~NmMessageSendingOperation(unsigned int) + ?changed@NmMessageListModel@@AAE_NABVNmMessageEnvelope@@0@Z @ 84 NONAME ; bool NmMessageListModel::changed(class NmMessageEnvelope const &, class NmMessageEnvelope const &) + ?openAttachment@NmBaseClientPlugin@@QAEXXZ @ 85 NONAME ; void NmBaseClientPlugin::openAttachment(void) + ?staticMetaObject@NmMessageCreationOperation@@2UQMetaObject@@B @ 86 NONAME ; struct QMetaObject const NmMessageCreationOperation::staticMetaObject + ?handleMailboxEvent@NmMailboxListModel@@QAEXW4NmMailboxEvent@@ABV?$QList@VNmId@@@@@Z @ 87 NONAME ; void NmMailboxListModel::handleMailboxEvent(enum NmMailboxEvent, class QList const &) + ?metaObject@NmStoreEnvelopesOperation@@UBEPBUQMetaObject@@XZ @ 88 NONAME ; struct QMetaObject const * NmStoreEnvelopesOperation::metaObject(void) const + ?trUtf8@NmMailboxListModel@@SA?AVQString@@PBD0H@Z @ 89 NONAME ; class QString NmMailboxListModel::trUtf8(char const *, char const *, int) + ?mPluginArray@NmDataPluginFactory@@0PAV?$QList@PAVQObject@@@@A @ 90 NONAME ; class QList * NmDataPluginFactory::mPluginArray + ?instance@NmDataPluginFactory@@SAPAV1@XZ @ 91 NONAME ; class NmDataPluginFactory * NmDataPluginFactory::instance(void) + ?getStaticMetaObject@NmMessageListModel@@SAABUQMetaObject@@XZ @ 92 NONAME ; struct QMetaObject const & NmMessageListModel::getStaticMetaObject(void) + ?deleteMessageFromViewerView@NmBaseClientPlugin@@QAEXXZ @ 93 NONAME ; void NmBaseClientPlugin::deleteMessageFromViewerView(void) + ?tr@NmUiEngine@@SA?AVQString@@PBD0H@Z @ 94 NONAME ; class QString NmUiEngine::tr(char const *, char const *, int) + ?refresh@NmMessageListModel@@QAEXVNmId@@0ABV?$QList@PAVNmMessageEnvelope@@@@@Z @ 95 NONAME ; void NmMessageListModel::refresh(class NmId, class NmId, class QList const &) + ?mailboxById@NmUiEngine@@QAEPAVNmMailboxMetaData@@ABVNmId@@@Z @ 96 NONAME ; class NmMailboxMetaData * NmUiEngine::mailboxById(class NmId const &) + ?createNewMessage@NmUiEngine@@QAE?AV?$QPointer@VNmMessageCreationOperation@@@@ABVNmId@@@Z @ 97 NONAME ; class QPointer NmUiEngine::createNewMessage(class NmId const &) + ??_ENmMessageListModelItem@@UAE@I@Z @ 98 NONAME ; NmMessageListModelItem::~NmMessageListModelItem(unsigned int) + ?replyAllMail@NmBaseClientPlugin@@QAEXXZ @ 99 NONAME ; void NmBaseClientPlugin::replyAllMail(void) + ?handleMatchFound@NmUiEngine@@AAEXABVNmId@@0@Z @ 100 NONAME ; void NmUiEngine::handleMatchFound(class NmId const &, class NmId const &) + ?syncStateEvent@NmUiEngine@@IAEXW4NmSyncState@@ABVNmId@@@Z @ 101 NONAME ; void NmUiEngine::syncStateEvent(enum NmSyncState, class NmId const &) + ?refreshModelItem@NmMailboxListModel@@QAEXABVNmId@@@Z @ 102 NONAME ; void NmMailboxListModel::refreshModelItem(class NmId const &) + ?trUtf8@NmDataManager@@SA?AVQString@@PBD0@Z @ 103 NONAME ; class QString NmDataManager::trUtf8(char const *, char const *) + ?setEnvelopeProperties@NmMessageListModel@@QAEXW4NmEnvelopeProperties@@ABV?$QList@VNmId@@@@@Z @ 104 NONAME ; void NmMessageListModel::setEnvelopeProperties(enum NmEnvelopeProperties, class QList const &) + ??1NmStoreEnvelopesOperation@@MAE@XZ @ 105 NONAME ; NmStoreEnvelopesOperation::~NmStoreEnvelopesOperation(void) + ?tr@NmUiEngine@@SA?AVQString@@PBD0@Z @ 106 NONAME ; class QString NmUiEngine::tr(char const *, char const *) + ?mPluginLoaderArray@NmDataPluginFactory@@0V?$QList@PAVQPluginLoader@@@@A @ 107 NONAME ; class QList NmDataPluginFactory::mPluginLoaderArray + ?trUtf8@NmBaseClientPlugin@@SA?AVQString@@PBD0@Z @ 108 NONAME ; class QString NmBaseClientPlugin::trUtf8(char const *, char const *) + ?deleteOperation@NmOperation@@AAEXXZ @ 109 NONAME ; void NmOperation::deleteOperation(void) + ?trUtf8@NmBaseClientPlugin@@SA?AVQString@@PBD0H@Z @ 110 NONAME ; class QString NmBaseClientPlugin::trUtf8(char const *, char const *, int) + ?createViewerViewCommands@NmBaseClientPlugin@@AAEXABVNmActionRequest@@AAV?$QList@PAVNmAction@@@@@Z @ 111 NONAME ; void NmBaseClientPlugin::createViewerViewCommands(class NmActionRequest const &, class QList &) + ?fetchMessagePart@NmUiEngine@@QAE?AV?$QPointer@VNmOperation@@@@ABVNmId@@000@Z @ 112 NONAME ; class QPointer NmUiEngine::fetchMessagePart(class NmId const &, class NmId const &, class NmId const &, class NmId const &) + ?tr@NmMailboxListModel@@SA?AVQString@@PBD0H@Z @ 113 NONAME ; class QString NmMailboxListModel::tr(char const *, char const *, int) + ?handleConnectEvent@NmUiEngine@@QAEXW4NmConnectState@@ABVNmId@@H@Z @ 114 NONAME ; void NmUiEngine::handleConnectEvent(enum NmConnectState, class NmId const &, int) + ?trUtf8@NmUiEngine@@SA?AVQString@@PBD0H@Z @ 115 NONAME ; class QString NmUiEngine::trUtf8(char const *, char const *, int) + ?createMailboxItem@NmMailboxListModel@@AAEPAVNmMailboxListModelItem@@PBVNmMailbox@@@Z @ 116 NONAME ; class NmMailboxListModelItem * NmMailboxListModel::createMailboxItem(class NmMailbox const *) + ?setTitleDivider@NmMessageListModelItem@@QAEXABVQString@@@Z @ 117 NONAME ; void NmMessageListModelItem::setTitleDivider(class QString const &) + ?markAsRead@NmBaseClientPlugin@@QAEXXZ @ 118 NONAME ; void NmBaseClientPlugin::markAsRead(void) + ?getInsertionIndex@NmMessageListModel@@ABEHABVNmMessageEnvelope@@@Z @ 119 NONAME ; int NmMessageListModel::getInsertionIndex(class NmMessageEnvelope const &) const + ?updateOperationProgress@NmOperation@@QAEXH@Z @ 120 NONAME ; void NmOperation::updateOperationProgress(int) + ?messageEventForListModel@NmUiEngine@@AAEXW4NmMessageEvent@@ABVNmId@@ABV?$QList@VNmId@@@@1@Z @ 121 NONAME ; void NmUiEngine::messageEventForListModel(enum NmMessageEvent, class NmId const &, class QList const &, class NmId const &) + ??1NmFolderListModel@@UAE@XZ @ 122 NONAME ; NmFolderListModel::~NmFolderListModel(void) + ?operationCompleted@NmUiEngine@@IAEXABVNmOperationCompletionEvent@@@Z @ 123 NONAME ; void NmUiEngine::operationCompleted(class NmOperationCompletionEvent const &) + ??1NmDataManager@@UAE@XZ @ 124 NONAME ; NmDataManager::~NmDataManager(void) + ?trUtf8@NmStoreEnvelopesOperation@@SA?AVQString@@PBD0@Z @ 125 NONAME ; class QString NmStoreEnvelopesOperation::trUtf8(char const *, char const *) + ?setAddress@NmMailboxMetaData@@QAEXABVQString@@@Z @ 126 NONAME ; void NmMailboxMetaData::setAddress(class QString const &) + ?getStaticMetaObject@NmMessageCreationOperation@@SAABUQMetaObject@@XZ @ 127 NONAME ; struct QMetaObject const & NmMessageCreationOperation::getStaticMetaObject(void) + ?updateActiveFolder@NmUiEngine@@QAEXABVNmId@@0@Z @ 128 NONAME ; void NmUiEngine::updateActiveFolder(class NmId const &, class NmId const &) + ?trUtf8@NmAddAttachmentsOperation@@SA?AVQString@@PBD0@Z @ 129 NONAME ; class QString NmAddAttachmentsOperation::trUtf8(char const *, char const *) + ?name@NmMailboxMetaData@@QBE?AVQString@@XZ @ 130 NONAME ; class QString NmMailboxMetaData::name(void) const + ?qt_metacall@NmDataManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 131 NONAME ; int NmDataManager::qt_metacall(enum QMetaObject::Call, int, void * *) + ?runAsyncOperation@NmOperation@@MAEXXZ @ 132 NONAME ; void NmOperation::runAsyncOperation(void) + ??0NmFolderListModel@@QAE@AAVNmDataManager@@PAVQObject@@@Z @ 133 NONAME ; NmFolderListModel::NmFolderListModel(class NmDataManager &, class QObject *) + ?folderTypeById@NmDataManager@@QAE?AW4NmFolderType@@VNmId@@0@Z @ 134 NONAME ; enum NmFolderType NmDataManager::folderTypeById(class NmId, class NmId) + ?tr@NmBaseClientPlugin@@SA?AVQString@@PBD0H@Z @ 135 NONAME ; class QString NmBaseClientPlugin::tr(char const *, char const *, int) + ??0NmMailboxMetaData@@QAE@XZ @ 136 NONAME ; NmMailboxMetaData::NmMailboxMetaData(void) + ?setEnvelope@NmMessageListModelItem@@QAEXPAVNmMessageEnvelope@@@Z @ 137 NONAME ; void NmMessageListModelItem::setEnvelope(class NmMessageEnvelope *) + ?saveMessage@NmUiEngine@@QAEHABVNmMessage@@@Z @ 138 NONAME ; int NmUiEngine::saveMessage(class NmMessage const &) + ?setId@NmMailboxMetaData@@QAEXABVNmId@@@Z @ 139 NONAME ; void NmMailboxMetaData::setId(class NmId const &) + ?folderTypeById@NmUiEngine@@QAE?AW4NmFolderType@@VNmId@@0@Z @ 140 NONAME ; enum NmFolderType NmUiEngine::folderTypeById(class NmId, class NmId) + ?mReferenceCount@NmDataPluginFactory@@0HA @ 141 NONAME ; int NmDataPluginFactory::mReferenceCount + ?tr@NmOperation@@SA?AVQString@@PBD0@Z @ 142 NONAME ; class QString NmOperation::tr(char const *, char const *) + ?updateMessageEnvelope@NmMessageListModel@@AAEXABVNmId@@00@Z @ 143 NONAME ; void NmMessageListModel::updateMessageEnvelope(class NmId const &, class NmId const &, class NmId const &) + ?tr@NmStoreEnvelopesOperation@@SA?AVQString@@PBD0@Z @ 144 NONAME ; class QString NmStoreEnvelopesOperation::tr(char const *, char const *) + ?messagesBelongUnderSameDivider@NmMessageListModel@@ABE_NPBVNmMessageEnvelope@@0@Z @ 145 NONAME ; bool NmMessageListModel::messagesBelongUnderSameDivider(class NmMessageEnvelope const *, class NmMessageEnvelope const *) const + ?matchFound@NmUiEngine@@IAEXABVNmId@@0@Z @ 146 NONAME ; void NmUiEngine::matchFound(class NmId const &, class NmId const &) + ?metaObject@NmDataManager@@UBEPBUQMetaObject@@XZ @ 147 NONAME ; struct QMetaObject const * NmDataManager::metaObject(void) const + ?isSendingMessage@NmUiEngine@@QBE_NXZ @ 148 NONAME ; bool NmUiEngine::isSendingMessage(void) const + ?freeIcons@NmIcons@@SAXXZ @ 149 NONAME ; void NmIcons::freeIcons(void) + ?tr@NmAddAttachmentsOperation@@SA?AVQString@@PBD0@Z @ 150 NONAME ; class QString NmAddAttachmentsOperation::tr(char const *, char const *) + ?itemFromModel@NmMessageListModel@@AAEPAVNmMessageListModelItem@@ABVNmId@@@Z @ 151 NONAME ; class NmMessageListModelItem * NmMessageListModel::itemFromModel(class NmId const &) + ?instance@NmUiEngine@@SAPAV1@XZ @ 152 NONAME ; class NmUiEngine * NmUiEngine::instance(void) + ?createMessageListCommands@NmBaseClientPlugin@@AAEXABVNmActionRequest@@AAV?$QList@PAVNmAction@@@@@Z @ 153 NONAME ; void NmBaseClientPlugin::createMessageListCommands(class NmActionRequest const &, class QList &) + ?updateEnvelopeProperty@NmBaseClientPlugin@@AAEXW4NmEnvelopeProperties@@@Z @ 154 NONAME ; void NmBaseClientPlugin::updateEnvelopeProperty(enum NmEnvelopeProperties) + ??1NmAddAttachmentsOperation@@MAE@XZ @ 155 NONAME ; NmAddAttachmentsOperation::~NmAddAttachmentsOperation(void) + ?goOffline@NmUiEngine@@QAEHABVNmId@@@Z @ 156 NONAME ; int NmUiEngine::goOffline(class NmId const &) + ?staticMetaObject@NmDataManager@@2UQMetaObject@@B @ 157 NONAME ; struct QMetaObject const NmDataManager::staticMetaObject + ?mInstance@NmUiEngine@@0PAV1@A @ 158 NONAME ; class NmUiEngine * NmUiEngine::mInstance + ?attach@NmBaseClientPlugin@@QAEXXZ @ 159 NONAME ; void NmBaseClientPlugin::attach(void) + ?setIgnoreFolderIds@NmMessageListModel@@QAEX_N@Z @ 160 NONAME ; void NmMessageListModel::setIgnoreFolderIds(bool) + ?metaObject@NmAddAttachmentsOperation@@UBEPBUQMetaObject@@XZ @ 161 NONAME ; struct QMetaObject const * NmAddAttachmentsOperation::metaObject(void) const + ?refresh@NmFolderListModel@@QAEXAAV?$QList@PAVNmFolder@@@@@Z @ 162 NONAME ; void NmFolderListModel::refresh(class QList &) + ?handleCompletedRemoveDraftOperation@NmUiEngine@@QAEXXZ @ 163 NONAME ; void NmUiEngine::handleCompletedRemoveDraftOperation(void) + ?trUtf8@NmMailboxListModel@@SA?AVQString@@PBD0@Z @ 164 NONAME ; class QString NmMailboxListModel::trUtf8(char const *, char const *) + ?envelopeById@NmDataManager@@QAEPAVNmMessageEnvelope@@ABVNmId@@00@Z @ 165 NONAME ; class NmMessageEnvelope * NmDataManager::envelopeById(class NmId const &, class NmId const &, class NmId const &) + ?getStaticMetaObject@NmOperation@@SAABUQMetaObject@@XZ @ 166 NONAME ; struct QMetaObject const & NmOperation::getStaticMetaObject(void) + ?trUtf8@NmOperation@@SA?AVQString@@PBD0@Z @ 167 NONAME ; class QString NmOperation::trUtf8(char const *, char const *) + ?addAttachments@NmUiEngine@@QAE?AV?$QPointer@VNmAddAttachmentsOperation@@@@ABVNmMessage@@ABV?$QList@VQString@@@@@Z @ 168 NONAME ; class QPointer NmUiEngine::addAttachments(class NmMessage const &, class QList const &) + ?doCancelOperation@NmOperation@@MAEXXZ @ 169 NONAME ; void NmOperation::doCancelOperation(void) + ?tr@NmOperation@@SA?AVQString@@PBD0H@Z @ 170 NONAME ; class QString NmOperation::tr(char const *, char const *, int) + ??_ENmOperation@@UAE@I@Z @ 171 NONAME ; NmOperation::~NmOperation(unsigned int) + ?tr@NmMessageCreationOperation@@SA?AVQString@@PBD0@Z @ 172 NONAME ; class QString NmMessageCreationOperation::tr(char const *, char const *) + ?qt_metacall@NmMessageListModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 173 NONAME ; int NmMessageListModel::qt_metacall(enum QMetaObject::Call, int, void * *) + ?staticMetaObject@NmOperation@@2UQMetaObject@@B @ 174 NONAME ; struct QMetaObject const NmOperation::staticMetaObject + ??1NmUiEngine@@EAE@XZ @ 175 NONAME ; NmUiEngine::~NmUiEngine(void) + ?messagePartFile@NmUiEngine@@QAE?AVXQSharableFile@@ABVNmId@@000@Z @ 176 NONAME ; class XQSharableFile NmUiEngine::messagePartFile(class NmId const &, class NmId const &, class NmId const &, class NmId const &) + ??_ENmMessageListModel@@UAE@I@Z @ 177 NONAME ; NmMessageListModel::~NmMessageListModel(unsigned int) + ?addPreliminaryOperation@NmOperation@@QAEXPAV1@@Z @ 178 NONAME ; void NmOperation::addPreliminaryOperation(class NmOperation *) + ?deleteMessages@NmUiEngine@@QAEHABVNmId@@0ABV?$QList@VNmId@@@@@Z @ 179 NONAME ; int NmUiEngine::deleteMessages(class NmId const &, class NmId const &, class QList const &) + ??_ENmStoreEnvelopesOperation@@UAE@I@Z @ 180 NONAME ; NmStoreEnvelopesOperation::~NmStoreEnvelopesOperation(unsigned int) + ?mailboxById@NmDataManager@@QAEPAVNmMailboxMetaData@@ABVNmId@@@Z @ 181 NONAME ; class NmMailboxMetaData * NmDataManager::mailboxById(class NmId const &) + ?messageListModelForSearch@NmUiEngine@@QAEAAVNmMessageListModel@@ABVNmId@@@Z @ 182 NONAME ; class NmMessageListModel & NmUiEngine::messageListModelForSearch(class NmId const &) + ?search@NmBaseClientPlugin@@QAEXXZ @ 183 NONAME ; void NmBaseClientPlugin::search(void) + ?pluginInstances@NmDataPluginFactory@@QAEPAV?$QList@PAVQObject@@@@XZ @ 184 NONAME ; class QList * NmDataPluginFactory::pluginInstances(void) + ?tr@NmBaseClientPlugin@@SA?AVQString@@PBD0@Z @ 185 NONAME ; class QString NmBaseClientPlugin::tr(char const *, char const *) + ?listMessages@NmDataManager@@QAEXABVNmId@@0AAV?$QList@PAVNmMessageEnvelope@@@@@Z @ 186 NONAME ; void NmDataManager::listMessages(class NmId const &, class NmId const &, class QList &) + ??1NmBaseClientPlugin@@UAE@XZ @ 187 NONAME ; NmBaseClientPlugin::~NmBaseClientPlugin(void) + ?qt_metacast@NmDataManager@@UAEPAXPBD@Z @ 188 NONAME ; void * NmDataManager::qt_metacast(char const *) + ??0NmMessageCreationOperation@@QAE@XZ @ 189 NONAME ; NmMessageCreationOperation::NmMessageCreationOperation(void) + ?qt_metacall@NmBaseClientPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 190 NONAME ; int NmBaseClientPlugin::qt_metacall(enum QMetaObject::Call, int, void * *) + ?envelopePtr@NmMessageListModelItem@@QAEPAVNmMessageEnvelope@@XZ @ 191 NONAME ; class NmMessageEnvelope * NmMessageListModelItem::envelopePtr(void) + ?messageListModel@NmUiEngine@@QAEAAVNmMessageListModel@@ABVNmId@@0@Z @ 192 NONAME ; class NmMessageListModel & NmUiEngine::messageListModel(class NmId const &, class NmId const &) + ??1NmMailboxMetaData@@UAE@XZ @ 193 NONAME ; NmMailboxMetaData::~NmMailboxMetaData(void) + ?connectionEvent@NmUiEngine@@IAEXW4NmConnectState@@ABVNmId@@@Z @ 194 NONAME ; void NmUiEngine::connectionEvent(enum NmConnectState, class NmId const &) + ?mailbox@NmDataManager@@QAEPAVNmMailbox@@ABVNmId@@@Z @ 195 NONAME ; class NmMailbox * NmDataManager::mailbox(class NmId const &) + ?interfaceInstance@NmDataPluginFactory@@QAEPAVNmDataPluginInterface@@PAVQObject@@@Z @ 196 NONAME ; class NmDataPluginInterface * NmDataPluginFactory::interfaceInstance(class QObject *) + ?metaObject@NmMailboxListModel@@UBEPBUQMetaObject@@XZ @ 197 NONAME ; struct QMetaObject const * NmMailboxListModel::metaObject(void) const + ?IconId@NmMailboxMetaData@@QBE?AVNmId@@XZ @ 198 NONAME ; class NmId NmMailboxMetaData::IconId(void) const + ?sendOperationCompleted@NmUiEngine@@IAEXXZ @ 199 NONAME ; void NmUiEngine::sendOperationCompleted(void) + ??0NmFolderMetaData@@QAE@XZ @ 200 NONAME ; NmFolderMetaData::NmFolderMetaData(void) + ?staticMetaObject@NmAddAttachmentsOperation@@2UQMetaObject@@B @ 201 NONAME ; struct QMetaObject const NmAddAttachmentsOperation::staticMetaObject + ?connectionState@NmUiEngine@@QAE?AW4NmConnectState@@ABVNmId@@@Z @ 202 NONAME ; enum NmConnectState NmUiEngine::connectionState(class NmId const &) + ?createTitleDividerItem@NmMessageListModel@@AAEPAVNmMessageListModelItem@@PAVNmMessageEnvelope@@@Z @ 203 NONAME ; class NmMessageListModelItem * NmMessageListModel::createTitleDividerItem(class NmMessageEnvelope *) + ?setId@NmFolderMetaData@@QAEXABVNmId@@@Z @ 204 NONAME ; void NmFolderMetaData::setId(class NmId const &) + ??0NmOperation@@QAE@XZ @ 205 NONAME ; NmOperation::NmOperation(void) + ?cancelOperation@NmOperation@@QAEXXZ @ 206 NONAME ; void NmOperation::cancelOperation(void) + ??_ENmFolderMetaData@@UAE@I@Z @ 207 NONAME ; NmFolderMetaData::~NmFolderMetaData(unsigned int) + ?qt_metacast@NmMessageListModel@@UAEPAXPBD@Z @ 208 NONAME ; void * NmMessageListModel::qt_metacast(char const *) + ?operationProgressChanged@NmOperation@@IAEXH@Z @ 209 NONAME ; void NmOperation::operationProgressChanged(int) + ?trUtf8@NmOperation@@SA?AVQString@@PBD0H@Z @ 210 NONAME ; class QString NmOperation::trUtf8(char const *, char const *, int) + ??_ENmMailboxListModel@@UAE@I@Z @ 211 NONAME ; NmMailboxListModel::~NmMailboxListModel(unsigned int) + ?messageDeleted@NmUiEngine@@IAEXABVNmId@@00@Z @ 212 NONAME ; void NmUiEngine::messageDeleted(class NmId const &, class NmId const &, class NmId const &) + ?trUtf8@NmMessageCreationOperation@@SA?AVQString@@PBD0@Z @ 213 NONAME ; class QString NmMessageCreationOperation::trUtf8(char const *, char const *) + ?metaObject@NmUiEngine@@UBEPBUQMetaObject@@XZ @ 214 NONAME ; struct QMetaObject const * NmUiEngine::metaObject(void) const + ??_ENmBaseClientPlugin@@UAE@I@Z @ 215 NONAME ; NmBaseClientPlugin::~NmBaseClientPlugin(unsigned int) + ?markAsUnread@NmBaseClientPlugin@@QAEXXZ @ 216 NONAME ; void NmBaseClientPlugin::markAsUnread(void) + ?metaObject@NmBaseClientPlugin@@UBEPBUQMetaObject@@XZ @ 217 NONAME ; struct QMetaObject const * NmBaseClientPlugin::metaObject(void) const + ?tr@NmDataManager@@SA?AVQString@@PBD0@Z @ 218 NONAME ; class QString NmDataManager::tr(char const *, char const *) + ?mailboxListModel@NmUiEngine@@QAEAAVNmMailboxListModel@@XZ @ 219 NONAME ; class NmMailboxListModel & NmUiEngine::mailboxListModel(void) + ?fetchMessage@NmUiEngine@@QAE?AV?$QPointer@VNmOperation@@@@ABVNmId@@00@Z @ 220 NONAME ; class QPointer NmUiEngine::fetchMessage(class NmId const &, class NmId const &, class NmId const &) + ?setIconId@NmMailboxMetaData@@QAEXABVNmId@@@Z @ 221 NONAME ; void NmMailboxMetaData::setIconId(class NmId const &) + ??1NmDataPluginFactory@@EAE@XZ @ 222 NONAME ; NmDataPluginFactory::~NmDataPluginFactory(void) + ?refreshMailboxListModel@NmUiEngine@@QAEXXZ @ 223 NONAME ; void NmUiEngine::refreshMailboxListModel(void) + ?qt_metacall@NmStoreEnvelopesOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 224 NONAME ; int NmStoreEnvelopesOperation::qt_metacall(enum QMetaObject::Call, int, void * *) + ?trUtf8@NmMessageListModel@@SA?AVQString@@PBD0@Z @ 225 NONAME ; class QString NmMessageListModel::trUtf8(char const *, char const *) + ?rowCount@NmFolderListModel@@UBEHABVQModelIndex@@@Z @ 226 NONAME ; int NmFolderListModel::rowCount(class QModelIndex const &) const + ?doUpdateOperationProgress@NmOperation@@MAEXXZ @ 227 NONAME ; void NmOperation::doUpdateOperationProgress(void) + ?tr@NmMailboxListModel@@SA?AVQString@@PBD0@Z @ 228 NONAME ; class QString NmMailboxListModel::tr(char const *, char const *) + ?removeMessage@NmUiEngine@@QAEHABVNmId@@00@Z @ 229 NONAME ; int NmUiEngine::removeMessage(class NmId const &, class NmId const &, class NmId const &) + ??_ENmUiEngine@@UAE@I@Z @ 230 NONAME ; NmUiEngine::~NmUiEngine(unsigned int) + ?operationCompleted@NmOperation@@IAEXH@Z @ 231 NONAME ; void NmOperation::operationCompleted(int) + ?callEmitDataChanged@NmMessageListModelItem@@QAEXXZ @ 232 NONAME ; void NmMessageListModelItem::callEmitDataChanged(void) + ?handleRequest@NmBaseClientPlugin@@IAEXW4NmActionResponseCommand@@ABVNmActionRequest@@@Z @ 233 NONAME ; void NmBaseClientPlugin::handleRequest(enum NmActionResponseCommand, class NmActionRequest const &) + ??0NmMessageListModel@@QAE@AAVNmDataManager@@PAVQObject@@@Z @ 234 NONAME ; NmMessageListModel::NmMessageListModel(class NmDataManager &, class QObject *) + ??_ENmAddAttachmentsOperation@@UAE@I@Z @ 235 NONAME ; NmAddAttachmentsOperation::~NmAddAttachmentsOperation(unsigned int) + ?syncState@NmUiEngine@@QAE?AW4NmSyncState@@ABVNmId@@@Z @ 236 NONAME ; enum NmSyncState NmUiEngine::syncState(class NmId const &) + ??1NmOperation@@MAE@XZ @ 237 NONAME ; NmOperation::~NmOperation(void) + ?tr@NmStoreEnvelopesOperation@@SA?AVQString@@PBD0H@Z @ 238 NONAME ; class QString NmStoreEnvelopesOperation::tr(char const *, char const *, int) + ?listMailboxes@NmDataManager@@QAEXAAV?$QList@PAVNmMailbox@@@@@Z @ 239 NONAME ; void NmDataManager::listMailboxes(class QList &) + ?message@NmUiEngine@@QAEPAVNmMessage@@ABVNmId@@00@Z @ 240 NONAME ; class NmMessage * NmUiEngine::message(class NmId const &, class NmId const &, class NmId const &) + ?refreshMailbox@NmUiEngine@@QAEHABVNmId@@@Z @ 241 NONAME ; int NmUiEngine::refreshMailbox(class NmId const &) + ?trUtf8@NmUiEngine@@SA?AVQString@@PBD0@Z @ 242 NONAME ; class QString NmUiEngine::trUtf8(char const *, char const *) + ?contentToMessagePart@NmUiEngine@@QAEHABVNmId@@00AAVNmMessagePart@@@Z @ 243 NONAME ; int NmUiEngine::contentToMessagePart(class NmId const &, class NmId const &, class NmId const &, class NmMessagePart &) + ?removeItem@NmMessageListModel@@AAEXHAAVNmMessageListModelItem@@@Z @ 244 NONAME ; void NmMessageListModel::removeItem(int, class NmMessageListModelItem &) + ??1NmMailboxListModel@@UAE@XZ @ 245 NONAME ; NmMailboxListModel::~NmMailboxListModel(void) + ??0NmBaseClientPlugin@@QAE@XZ @ 246 NONAME ; NmBaseClientPlugin::NmBaseClientPlugin(void) + ?forwardMail@NmBaseClientPlugin@@QAEXXZ @ 247 NONAME ; void NmBaseClientPlugin::forwardMail(void) + ?setItemType@NmMessageListModelItem@@QAEXW4NmMessageItemType@1@@Z @ 248 NONAME ; void NmMessageListModelItem::setItemType(enum NmMessageListModelItem::NmMessageItemType) + ??_ENmDataPluginFactory@@UAE@I@Z @ 249 NONAME ; NmDataPluginFactory::~NmDataPluginFactory(unsigned int) + ?mailboxListChanged@NmBaseClientPlugin@@AAEXABVNmId@@W4MailboxEventType@NmSettings@@@Z @ 250 NONAME ; void NmBaseClientPlugin::mailboxListChanged(class NmId const &, enum NmSettings::MailboxEventType) + ?expanded@NmMessageListModelItem@@QBE_NXZ @ 251 NONAME ; bool NmMessageListModelItem::expanded(void) const + ?columnCount@NmFolderListModel@@UBEHABVQModelIndex@@@Z @ 252 NONAME ; int NmFolderListModel::columnCount(class QModelIndex const &) const + ?pluginInstance@NmDataPluginFactory@@QAEPAVQObject@@VNmId@@@Z @ 253 NONAME ; class QObject * NmDataPluginFactory::pluginInstance(class NmId) + ?setNewParam@NmMessageListModel@@IAEXPAVNmUiStartParam@@@Z @ 254 NONAME ; void NmMessageListModel::setNewParam(class NmUiStartParam *) + ?data@NmMessageListModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 255 NONAME ; class QVariant NmMessageListModel::data(class QModelIndex const &, int) const + ?goOnline@NmBaseClientPlugin@@AAEXABVNmId@@@Z @ 256 NONAME ; void NmBaseClientPlugin::goOnline(class NmId const &) + ?createNewMail@NmBaseClientPlugin@@QAEXXZ @ 257 NONAME ; void NmBaseClientPlugin::createNewMail(void) + ?qt_metacast@NmBaseClientPlugin@@UAEPAXPBD@Z @ 258 NONAME ; void * NmBaseClientPlugin::qt_metacast(char const *) + ?staticMetaObject@NmBaseClientPlugin@@2UQMetaObject@@B @ 259 NONAME ; struct QMetaObject const NmBaseClientPlugin::staticMetaObject + ?searchComplete@NmUiEngine@@IAEXXZ @ 260 NONAME ; void NmUiEngine::searchComplete(void) + ?setEnvelope@NmMessageListModelItem@@QAEXABVNmMessageEnvelope@@@Z @ 261 NONAME ; void NmMessageListModelItem::setEnvelope(class NmMessageEnvelope const &) + ?qt_metacast@NmAddAttachmentsOperation@@UAEPAXPBD@Z @ 262 NONAME ; void * NmAddAttachmentsOperation::qt_metacast(char const *) + ?createNewMailViewerToolBar@NmBaseClientPlugin@@QAEXXZ @ 263 NONAME ; void NmBaseClientPlugin::createNewMailViewerToolBar(void) + ?staticMetaObject@NmMailboxListModel@@2UQMetaObject@@B @ 264 NONAME ; struct QMetaObject const NmMailboxListModel::staticMetaObject + ?qt_metacall@NmMessageCreationOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 265 NONAME ; int NmMessageCreationOperation::qt_metacall(enum QMetaObject::Call, int, void * *) + ?trUtf8@NmDataManager@@SA?AVQString@@PBD0H@Z @ 266 NONAME ; class QString NmDataManager::trUtf8(char const *, char const *, int) + ?trUtf8@NmMessageCreationOperation@@SA?AVQString@@PBD0H@Z @ 267 NONAME ; class QString NmMessageCreationOperation::trUtf8(char const *, char const *, int) + ?createForwardMessage@NmUiEngine@@QAE?AV?$QPointer@VNmMessageCreationOperation@@@@ABVNmId@@0@Z @ 268 NONAME ; class QPointer NmUiEngine::createForwardMessage(class NmId const &, class NmId const &) + ?handleSyncStateEvent@NmUiEngine@@QAEXW4NmSyncState@@ABVNmOperationCompletionEvent@@@Z @ 269 NONAME ; void NmUiEngine::handleSyncStateEvent(enum NmSyncState, class NmOperationCompletionEvent const &) + ?completeOperation@NmOperation@@QAEXH@Z @ 270 NONAME ; void NmOperation::completeOperation(int) + ?parent@NmFolderListModel@@UBE?AVQModelIndex@@ABV2@@Z @ 271 NONAME ; class QModelIndex NmFolderListModel::parent(class QModelIndex const &) const + ?folder@NmDataManager@@QAEPAVNmFolder@@ABVNmId@@0@Z @ 272 NONAME ; class NmFolder * NmDataManager::folder(class NmId const &, class NmId const &) + ??0NmMessageSendingOperation@@QAE@XZ @ 273 NONAME ; NmMessageSendingOperation::NmMessageSendingOperation(void) + ?replyMail@NmBaseClientPlugin@@QAEXXZ @ 274 NONAME ; void NmBaseClientPlugin::replyMail(void) + ??1NmMessageListModelItem@@UAE@XZ @ 275 NONAME ; NmMessageListModelItem::~NmMessageListModelItem(void) + ?mailboxPropertyChanged@NmBaseClientPlugin@@AAEXABVNmId@@VQVariant@@1@Z @ 276 NONAME ; void NmBaseClientPlugin::mailboxPropertyChanged(class NmId const &, class QVariant, class QVariant) + ?qt_metacall@NmOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 277 NONAME ; int NmOperation::qt_metacall(enum QMetaObject::Call, int, void * *) + ?removeMessageFromModel@NmMessageListModel@@AAEXABVNmId@@@Z @ 278 NONAME ; void NmMessageListModel::removeMessageFromModel(class NmId const &) + ?trUtf8@NmMessageListModel@@SA?AVQString@@PBD0H@Z @ 279 NONAME ; class QString NmMessageListModel::trUtf8(char const *, char const *, int) + ?operationPartCompleted@NmAddAttachmentsOperation@@IAEXABVQString@@ABVNmId@@H@Z @ 280 NONAME ; void NmAddAttachmentsOperation::operationPartCompleted(class QString const &, class NmId const &, int) + ?trUtf8@NmStoreEnvelopesOperation@@SA?AVQString@@PBD0H@Z @ 281 NONAME ; class QString NmStoreEnvelopesOperation::trUtf8(char const *, char const *, int) + ?tr@NmMessageListModel@@SA?AVQString@@PBD0@Z @ 282 NONAME ; class QString NmMessageListModel::tr(char const *, char const *) + ?doCompleteOperation@NmOperation@@MAEXXZ @ 283 NONAME ; void NmOperation::doCompleteOperation(void) + ?dividerInsertionIndex@NmMessageListModel@@AAEHH@Z @ 284 NONAME ; int NmMessageListModel::dividerInsertionIndex(int) + ?createMessageItem@NmMessageListModel@@AAEPAVNmMessageListModelItem@@PAVNmMessageEnvelope@@@Z @ 285 NONAME ; class NmMessageListModelItem * NmMessageListModel::createMessageItem(class NmMessageEnvelope *) + ?id@NmFolderMetaData@@QBE?AVNmId@@XZ @ 286 NONAME ; class NmId NmFolderMetaData::id(void) const + ?createReplyMessage@NmUiEngine@@QAE?AV?$QPointer@VNmMessageCreationOperation@@@@ABVNmId@@0_N@Z @ 287 NONAME ; class QPointer NmUiEngine::createReplyMessage(class NmId const &, class NmId const &, bool) + ?getStandardFolderId@NmDataManager@@QAE?AVNmId@@ABV2@W4NmFolderType@@@Z @ 288 NONAME ; class NmId NmDataManager::getStandardFolderId(class NmId const &, enum NmFolderType) + ?address@NmMailboxMetaData@@QBE?AVQString@@XZ @ 289 NONAME ; class QString NmMailboxMetaData::address(void) const + ?dividersActive@NmMessageListModel@@QAE_NXZ @ 290 NONAME ; bool NmMessageListModel::dividersActive(void) + ?titleDivider@NmMessageListModelItem@@QBE?AVQString@@XZ @ 291 NONAME ; class QString NmMessageListModelItem::titleDivider(void) const + ?getStaticMetaObject@NmBaseClientPlugin@@SAABUQMetaObject@@XZ @ 292 NONAME ; struct QMetaObject const & NmBaseClientPlugin::getStaticMetaObject(void) + ?qt_metacast@NmMessageCreationOperation@@UAEPAXPBD@Z @ 293 NONAME ; void * NmMessageCreationOperation::qt_metacast(char const *) + ?updateEnvelope@NmMessageListModel@@AAEXW4NmEnvelopeProperties@@ABVNmId@@@Z @ 294 NONAME ; void NmMessageListModel::updateEnvelope(enum NmEnvelopeProperties, class NmId const &) + ??_ENmDataManager@@UAE@I@Z @ 295 NONAME ; NmDataManager::~NmDataManager(unsigned int) + ?qt_metacast@NmMailboxListModel@@UAEPAXPBD@Z @ 296 NONAME ; void * NmMailboxListModel::qt_metacast(char const *) + ?search@NmUiEngine@@QAEHABVNmId@@ABVQStringList@@@Z @ 297 NONAME ; int NmUiEngine::search(class NmId const &, class QStringList const &) + ?setEnvelopes@NmUiEngine@@QAE?AV?$QPointer@VNmStoreEnvelopesOperation@@@@ABVNmId@@0W4NmEnvelopeProperties@@ABV?$QList@PB$$CBVNmMessageEnvelope@@@@@Z @ 298 NONAME ; class QPointer NmUiEngine::setEnvelopes(class NmId const &, class NmId const &, enum NmEnvelopeProperties, class QList const &) + ?getActions@NmBaseClientPlugin@@UAEXABVNmActionRequest@@AAV?$QList@PAVNmAction@@@@@Z @ 299 NONAME ; void NmBaseClientPlugin::getActions(class NmActionRequest const &, class QList &) + ?qt_metacast@NmStoreEnvelopesOperation@@UAEPAXPBD@Z @ 300 NONAME ; void * NmStoreEnvelopesOperation::qt_metacast(char const *) + ??_ENmMailboxMetaData@@UAE@I@Z @ 301 NONAME ; NmMailboxMetaData::~NmMailboxMetaData(unsigned int) + ??0NmMessageListModelItem@@QAE@XZ @ 302 NONAME ; NmMessageListModelItem::NmMessageListModelItem(void) + ?tr@NmAddAttachmentsOperation@@SA?AVQString@@PBD0H@Z @ 303 NONAME ; class QString NmAddAttachmentsOperation::tr(char const *, char const *, int) + ?setDividers@NmMessageListModel@@QAEX_N@Z @ 304 NONAME ; void NmMessageListModel::setDividers(bool) + ?loadPlugin@NmDataPluginFactory@@QAEPAVQObject@@ABVQDir@@ABVQString@@@Z @ 305 NONAME ; class QObject * NmDataPluginFactory::loadPlugin(class QDir const &, class QString const &) + ?qt_metacast@NmOperation@@UAEPAXPBD@Z @ 306 NONAME ; void * NmOperation::qt_metacast(char const *) + ?tr@NmMessageListModel@@SA?AVQString@@PBD0H@Z @ 307 NONAME ; class QString NmMessageListModel::tr(char const *, char const *, int) + ?removeAttachment@NmUiEngine@@QAE?AV?$QPointer@VNmOperation@@@@ABVNmMessage@@ABVNmId@@@Z @ 308 NONAME ; class QPointer NmUiEngine::removeAttachment(class NmMessage const &, class NmId const &) + ?staticMetaObject@NmMessageListModel@@2UQMetaObject@@B @ 309 NONAME ; struct QMetaObject const NmMessageListModel::staticMetaObject + ?qt_metacall@NmAddAttachmentsOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 310 NONAME ; int NmAddAttachmentsOperation::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@NmUiEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 311 NONAME ; int NmUiEngine::qt_metacall(enum QMetaObject::Call, int, void * *) + ?message@NmDataManager@@QAEPAVNmMessage@@ABVNmId@@00@Z @ 312 NONAME ; class NmMessage * NmDataManager::message(class NmId const &, class NmId const &, class NmId const &) + ?metaObject@NmOperation@@UBEPBUQMetaObject@@XZ @ 313 NONAME ; struct QMetaObject const * NmOperation::metaObject(void) const diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiengine/eabi/nmailuiengineu.def --- a/emailuis/nmailuiengine/eabi/nmailuiengineu.def Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiengine/eabi/nmailuiengineu.def Thu Jun 24 14:32:18 2010 +0300 @@ -43,279 +43,280 @@ _ZN10NmUiEngine20contentToMessagePartERK4NmIdS2_S2_R13NmMessagePart @ 42 NONAME _ZN10NmUiEngine20createForwardMessageERK4NmIdS2_ @ 43 NONAME _ZN10NmUiEngine20handleSyncStateEventE11NmSyncStateRK26NmOperationCompletionEvent @ 44 NONAME - _ZN10NmUiEngine22sendOperationCompletedEv @ 45 NONAME - _ZN10NmUiEngine23refreshMailboxListModelEv @ 46 NONAME - _ZN10NmUiEngine25messageListModelForSearchERK4NmId @ 47 NONAME - _ZN10NmUiEngine28handleCompletedSendOperationEv @ 48 NONAME - _ZN10NmUiEngine33handleCompletedSaveDraftOperationEv @ 49 NONAME - _ZN10NmUiEngine35handleCompletedRemoveDraftOperationEv @ 50 NONAME - _ZN10NmUiEngine6searchERK4NmIdRK11QStringList @ 51 NONAME - _ZN10NmUiEngine7messageERK4NmIdS2_S2_ @ 52 NONAME - _ZN10NmUiEngine8goOnlineERK4NmId @ 53 NONAME - _ZN10NmUiEngine8instanceEv @ 54 NONAME - _ZN10NmUiEngine9goOfflineERK4NmId @ 55 NONAME - _ZN10NmUiEngine9mInstanceE @ 56 NONAME DATA 4 - _ZN10NmUiEngine9syncStateERK4NmId @ 57 NONAME - _ZN10NmUiEngineC1Ev @ 58 NONAME - _ZN10NmUiEngineC2Ev @ 59 NONAME - _ZN10NmUiEngineD0Ev @ 60 NONAME - _ZN10NmUiEngineD1Ev @ 61 NONAME - _ZN10NmUiEngineD2Ev @ 62 NONAME - _ZN11NmOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 63 NONAME - _ZN11NmOperation11qt_metacastEPKc @ 64 NONAME - _ZN11NmOperation15cancelOperationEv @ 65 NONAME - _ZN11NmOperation15deleteOperationEv @ 66 NONAME - _ZN11NmOperation16staticMetaObjectE @ 67 NONAME DATA 16 - _ZN11NmOperation17completeOperationEi @ 68 NONAME - _ZN11NmOperation17doCancelOperationEv @ 69 NONAME - _ZN11NmOperation17runAsyncOperationEv @ 70 NONAME - _ZN11NmOperation18operationCancelledEv @ 71 NONAME - _ZN11NmOperation18operationCompletedEi @ 72 NONAME - _ZN11NmOperation19doCompleteOperationEv @ 73 NONAME - _ZN11NmOperation19getStaticMetaObjectEv @ 74 NONAME - _ZN11NmOperation23addPreliminaryOperationEPS_ @ 75 NONAME - _ZN11NmOperation23updateOperationProgressEi @ 76 NONAME - _ZN11NmOperation24operationProgressChangedEi @ 77 NONAME - _ZN11NmOperation25doUpdateOperationProgressEv @ 78 NONAME - _ZN11NmOperation34handlePreliminaryOperationFinishedEv @ 79 NONAME - _ZN11NmOperationC2Ev @ 80 NONAME - _ZN11NmOperationD0Ev @ 81 NONAME - _ZN11NmOperationD1Ev @ 82 NONAME - _ZN11NmOperationD2Ev @ 83 NONAME - _ZN13NmDataManager10folderByIdERK4NmIdS2_ @ 84 NONAME - _ZN13NmDataManager11listFoldersE4NmIdR5QListIP8NmFolderE @ 85 NONAME - _ZN13NmDataManager11mailboxByIdERK4NmId @ 86 NONAME - _ZN13NmDataManager11qt_metacallEN11QMetaObject4CallEiPPv @ 87 NONAME - _ZN13NmDataManager11qt_metacastEPKc @ 88 NONAME - _ZN13NmDataManager12envelopeByIdERK4NmIdS2_S2_ @ 89 NONAME - _ZN13NmDataManager12listMessagesERK4NmIdS2_R5QListIP17NmMessageEnvelopeE @ 90 NONAME - _ZN13NmDataManager13listMailboxesER5QListIP9NmMailboxE @ 91 NONAME - _ZN13NmDataManager14folderTypeByIdE4NmIdS0_ @ 92 NONAME - _ZN13NmDataManager14listMailboxIdsER5QListI4NmIdE @ 93 NONAME - _ZN13NmDataManager16staticMetaObjectE @ 94 NONAME DATA 16 - _ZN13NmDataManager19getStandardFolderIdERK4NmId12NmFolderType @ 95 NONAME - _ZN13NmDataManager19getStaticMetaObjectEv @ 96 NONAME - _ZN13NmDataManager20contentToMessagePartERK4NmIdS2_S2_R13NmMessagePart @ 97 NONAME - _ZN13NmDataManager6folderERK4NmIdS2_ @ 98 NONAME - _ZN13NmDataManager7mailboxERK4NmId @ 99 NONAME - _ZN13NmDataManager7messageERK4NmIdS2_S2_ @ 100 NONAME - _ZN13NmDataManagerC1Ev @ 101 NONAME - _ZN13NmDataManagerC2Ev @ 102 NONAME - _ZN13NmDataManagerD0Ev @ 103 NONAME - _ZN13NmDataManagerD1Ev @ 104 NONAME - _ZN13NmDataManagerD2Ev @ 105 NONAME - _ZN16NmFolderMetaData5setIdERK4NmId @ 106 NONAME - _ZN16NmFolderMetaData7setNameERK7QString @ 107 NONAME - _ZN16NmFolderMetaDataC1Ev @ 108 NONAME - _ZN16NmFolderMetaDataC2Ev @ 109 NONAME - _ZN16NmFolderMetaDataD0Ev @ 110 NONAME - _ZN16NmFolderMetaDataD1Ev @ 111 NONAME - _ZN16NmFolderMetaDataD2Ev @ 112 NONAME - _ZN17NmFolderListModel7refreshER5QListIP8NmFolderE @ 113 NONAME - _ZN17NmFolderListModelC1ER13NmDataManagerP7QObject @ 114 NONAME - _ZN17NmFolderListModelC2ER13NmDataManagerP7QObject @ 115 NONAME - _ZN17NmFolderListModelD0Ev @ 116 NONAME - _ZN17NmFolderListModelD1Ev @ 117 NONAME - _ZN17NmFolderListModelD2Ev @ 118 NONAME - _ZN17NmMailboxMetaData10setAddressERK7QString @ 119 NONAME - _ZN17NmMailboxMetaData5setIdERK4NmId @ 120 NONAME - _ZN17NmMailboxMetaData7setNameERK7QString @ 121 NONAME - _ZN17NmMailboxMetaData9setIconIdERK4NmId @ 122 NONAME - _ZN17NmMailboxMetaDataC1Ev @ 123 NONAME - _ZN17NmMailboxMetaDataC2Ev @ 124 NONAME - _ZN17NmMailboxMetaDataD0Ev @ 125 NONAME - _ZN17NmMailboxMetaDataD1Ev @ 126 NONAME - _ZN17NmMailboxMetaDataD2Ev @ 127 NONAME - _ZN18NmBaseClientPlugin10getActionsERK15NmActionRequestR5QListIP8NmActionE @ 128 NONAME - _ZN18NmBaseClientPlugin10markAsReadEv @ 129 NONAME - _ZN18NmBaseClientPlugin11forwardMailEv @ 130 NONAME - _ZN18NmBaseClientPlugin11openMessageEv @ 131 NONAME - _ZN18NmBaseClientPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 132 NONAME - _ZN18NmBaseClientPlugin11qt_metacastEPKc @ 133 NONAME - _ZN18NmBaseClientPlugin12markAsUnreadEv @ 134 NONAME - _ZN18NmBaseClientPlugin12replyAllMailEv @ 135 NONAME - _ZN18NmBaseClientPlugin13createNewMailEv @ 136 NONAME - _ZN18NmBaseClientPlugin13deleteMessageEv @ 137 NONAME - _ZN18NmBaseClientPlugin13handleRequestE23NmActionResponseCommandRK15NmActionRequest @ 138 NONAME - _ZN18NmBaseClientPlugin14openAttachmentEv @ 139 NONAME - _ZN18NmBaseClientPlugin14setPriorityLowEv @ 140 NONAME - _ZN18NmBaseClientPlugin15setPriorityHighEv @ 141 NONAME - _ZN18NmBaseClientPlugin16removeAttachmentEv @ 142 NONAME - _ZN18NmBaseClientPlugin16staticMetaObjectE @ 143 NONAME DATA 16 - _ZN18NmBaseClientPlugin17setPriorityNormalEv @ 144 NONAME - _ZN18NmBaseClientPlugin18mailboxListChangedERK4NmIdN10NmSettings16MailboxEventTypeE @ 145 NONAME - _ZN18NmBaseClientPlugin19getStaticMetaObjectEv @ 146 NONAME - _ZN18NmBaseClientPlugin22mailboxPropertyChangedERK4NmId8QVariantS3_ @ 147 NONAME - _ZN18NmBaseClientPlugin22updateEnvelopePropertyE20NmEnvelopeProperties @ 148 NONAME - _ZN18NmBaseClientPlugin24createEditorViewCommandsERK15NmActionRequestR5QListIP8NmActionE @ 149 NONAME - _ZN18NmBaseClientPlugin24createViewerViewCommandsERK15NmActionRequestR5QListIP8NmActionE @ 150 NONAME - _ZN18NmBaseClientPlugin25createMessageListCommandsERK15NmActionRequestR5QListIP8NmActionE @ 151 NONAME - _ZN18NmBaseClientPlugin26createNewMailViewerToolBarEv @ 152 NONAME - _ZN18NmBaseClientPlugin27deleteMessageFromViewerViewEv @ 153 NONAME - _ZN18NmBaseClientPlugin6attachEv @ 154 NONAME - _ZN18NmBaseClientPlugin6searchEv @ 155 NONAME - _ZN18NmBaseClientPlugin7refreshEv @ 156 NONAME - _ZN18NmBaseClientPlugin8goOnlineERK4NmId @ 157 NONAME - _ZN18NmBaseClientPlugin8sendMailEv @ 158 NONAME - _ZN18NmBaseClientPlugin8settingsEv @ 159 NONAME - _ZN18NmBaseClientPlugin9goOfflineERK4NmId @ 160 NONAME - _ZN18NmBaseClientPlugin9replyMailEv @ 161 NONAME - _ZN18NmBaseClientPluginC2Ev @ 162 NONAME - _ZN18NmBaseClientPluginD0Ev @ 163 NONAME - _ZN18NmBaseClientPluginD1Ev @ 164 NONAME - _ZN18NmBaseClientPluginD2Ev @ 165 NONAME - _ZN18NmMailboxListModel11qt_metacallEN11QMetaObject4CallEiPPv @ 166 NONAME - _ZN18NmMailboxListModel11qt_metacastEPKc @ 167 NONAME - _ZN18NmMailboxListModel16refreshModelItemERK4NmId @ 168 NONAME - _ZN18NmMailboxListModel16staticMetaObjectE @ 169 NONAME DATA 16 - _ZN18NmMailboxListModel17createMailboxItemEPK9NmMailbox @ 170 NONAME - _ZN18NmMailboxListModel18handleMailboxEventE14NmMailboxEventRK5QListI4NmIdE @ 171 NONAME - _ZN18NmMailboxListModel19getStaticMetaObjectEv @ 172 NONAME - _ZN18NmMailboxListModel7refreshER5QListIP9NmMailboxE @ 173 NONAME - _ZN18NmMailboxListModelC1ER13NmDataManagerP7QObject @ 174 NONAME - _ZN18NmMailboxListModelC2ER13NmDataManagerP7QObject @ 175 NONAME - _ZN18NmMailboxListModelD0Ev @ 176 NONAME - _ZN18NmMailboxListModelD1Ev @ 177 NONAME - _ZN18NmMailboxListModelD2Ev @ 178 NONAME - _ZN18NmMessageListModel10removeItemEiR22NmMessageListModelItem @ 179 NONAME - _ZN18NmMessageListModel11qt_metacallEN11QMetaObject4CallEiPPv @ 180 NONAME - _ZN18NmMessageListModel11qt_metacastEPKc @ 181 NONAME - _ZN18NmMessageListModel11setDividersEb @ 182 NONAME - _ZN18NmMessageListModel11setNewParamEP14NmUiStartParam @ 183 NONAME - _ZN18NmMessageListModel13itemFromModelERK4NmId @ 184 NONAME - _ZN18NmMessageListModel14dividersActiveEv @ 185 NONAME - _ZN18NmMessageListModel14updateEnvelopeE20NmEnvelopePropertiesRK4NmId @ 186 NONAME - _ZN18NmMessageListModel16currentMailboxIdEv @ 187 NONAME - _ZN18NmMessageListModel16staticMetaObjectE @ 188 NONAME DATA 16 - _ZN18NmMessageListModel17createMessageItemEP17NmMessageEnvelope @ 189 NONAME - _ZN18NmMessageListModel18handleMessageEventE14NmMessageEventRK4NmIdRK5QListIS1_ES3_ @ 190 NONAME - _ZN18NmMessageListModel18setIgnoreFolderIdsEb @ 191 NONAME - _ZN18NmMessageListModel19getStaticMetaObjectEv @ 192 NONAME - _ZN18NmMessageListModel21dividerInsertionIndexEi @ 193 NONAME - _ZN18NmMessageListModel21setEnvelopePropertiesE20NmEnvelopePropertiesRK5QListI4NmIdE @ 194 NONAME - _ZN18NmMessageListModel21updateMessageEnvelopeERK4NmIdS2_S2_ @ 195 NONAME - _ZN18NmMessageListModel22createTitleDividerItemEP17NmMessageEnvelope @ 196 NONAME - _ZN18NmMessageListModel22insertDividerIntoModelEP17NmMessageEnvelopei @ 197 NONAME - _ZN18NmMessageListModel22insertMessageIntoModelEP17NmMessageEnvelopeib @ 198 NONAME - _ZN18NmMessageListModel22removeMessageFromModelERK4NmId @ 199 NONAME - _ZN18NmMessageListModel25insertNewMessageIntoModelERK4NmIdS2_S2_ @ 200 NONAME - _ZN18NmMessageListModel7changedERK17NmMessageEnvelopeS2_ @ 201 NONAME - _ZN18NmMessageListModel7refreshE4NmIdS0_RK5QListIP17NmMessageEnvelopeE @ 202 NONAME - _ZN18NmMessageListModelC1ER13NmDataManagerP7QObject @ 203 NONAME - _ZN18NmMessageListModelC2ER13NmDataManagerP7QObject @ 204 NONAME - _ZN18NmMessageListModelD0Ev @ 205 NONAME - _ZN18NmMessageListModelD1Ev @ 206 NONAME - _ZN18NmMessageListModelD2Ev @ 207 NONAME - _ZN19NmDataPluginFactory10loadPluginERK4QDirRK7QString @ 208 NONAME - _ZN19NmDataPluginFactory12mPluginArrayE @ 209 NONAME DATA 4 - _ZN19NmDataPluginFactory14pluginInstanceE4NmId @ 210 NONAME - _ZN19NmDataPluginFactory15mReferenceCountE @ 211 NONAME DATA 4 - _ZN19NmDataPluginFactory15pluginInstancesEv @ 212 NONAME - _ZN19NmDataPluginFactory15releaseInstanceERPS_ @ 213 NONAME - _ZN19NmDataPluginFactory17interfaceInstanceE4NmId @ 214 NONAME - _ZN19NmDataPluginFactory17interfaceInstanceEP7QObject @ 215 NONAME - _ZN19NmDataPluginFactory18mPluginLoaderArrayE @ 216 NONAME DATA 4 - _ZN19NmDataPluginFactory33applicationStateInterfaceInstanceE4NmId @ 217 NONAME - _ZN19NmDataPluginFactory33applicationStateInterfaceInstanceEP7QObject @ 218 NONAME - _ZN19NmDataPluginFactory8instanceEv @ 219 NONAME - _ZN19NmDataPluginFactory9mInstanceE @ 220 NONAME DATA 4 - _ZN19NmDataPluginFactoryC1Ev @ 221 NONAME - _ZN19NmDataPluginFactoryC2Ev @ 222 NONAME - _ZN19NmDataPluginFactoryD0Ev @ 223 NONAME - _ZN19NmDataPluginFactoryD1Ev @ 224 NONAME - _ZN19NmDataPluginFactoryD2Ev @ 225 NONAME - _ZN22NmMessageListModelItem11envelopePtrEv @ 226 NONAME - _ZN22NmMessageListModelItem11setEnvelopeEP17NmMessageEnvelope @ 227 NONAME - _ZN22NmMessageListModelItem11setEnvelopeERK17NmMessageEnvelope @ 228 NONAME - _ZN22NmMessageListModelItem11setExpandedEb @ 229 NONAME - _ZN22NmMessageListModelItem11setItemTypeENS_17NmMessageItemTypeE @ 230 NONAME - _ZN22NmMessageListModelItem15setTitleDividerERK7QString @ 231 NONAME - _ZN22NmMessageListModelItem19callEmitDataChangedEv @ 232 NONAME - _ZN22NmMessageListModelItemC1Ev @ 233 NONAME - _ZN22NmMessageListModelItemC2Ev @ 234 NONAME - _ZN22NmMessageListModelItemD0Ev @ 235 NONAME - _ZN22NmMessageListModelItemD1Ev @ 236 NONAME - _ZN22NmMessageListModelItemD2Ev @ 237 NONAME - _ZN25NmAddAttachmentsOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 238 NONAME - _ZN25NmAddAttachmentsOperation11qt_metacastEPKc @ 239 NONAME - _ZN25NmAddAttachmentsOperation16staticMetaObjectE @ 240 NONAME DATA 16 - _ZN25NmAddAttachmentsOperation19getStaticMetaObjectEv @ 241 NONAME - _ZN25NmAddAttachmentsOperation21completeOperationPartERK7QStringRK4NmIdi @ 242 NONAME - _ZN25NmAddAttachmentsOperation22operationPartCompletedERK7QStringRK4NmIdi @ 243 NONAME - _ZN25NmAddAttachmentsOperationC2Ev @ 244 NONAME - _ZN25NmAddAttachmentsOperationD0Ev @ 245 NONAME - _ZN25NmAddAttachmentsOperationD1Ev @ 246 NONAME - _ZN25NmAddAttachmentsOperationD2Ev @ 247 NONAME - _ZN25NmStoreEnvelopesOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 248 NONAME - _ZN25NmStoreEnvelopesOperation11qt_metacastEPKc @ 249 NONAME - _ZN25NmStoreEnvelopesOperation16staticMetaObjectE @ 250 NONAME DATA 16 - _ZN25NmStoreEnvelopesOperation19getStaticMetaObjectEv @ 251 NONAME - _ZN26NmMessageCreationOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 252 NONAME - _ZN26NmMessageCreationOperation11qt_metacastEPKc @ 253 NONAME - _ZN26NmMessageCreationOperation16staticMetaObjectE @ 254 NONAME DATA 16 - _ZN26NmMessageCreationOperation19getStaticMetaObjectEv @ 255 NONAME - _ZN7NmIcons7getIconENS_4IconE @ 256 NONAME - _ZN7NmIcons9freeIconsEv @ 257 NONAME - _ZNK10NmUiEngine10metaObjectEv @ 258 NONAME - _ZNK10NmUiEngine16isSendingMessageEv @ 259 NONAME - _ZNK10NmUiEngine16messageBeingSentEv @ 260 NONAME - _ZNK11NmOperation10metaObjectEv @ 261 NONAME - _ZNK11NmOperation9isRunningEv @ 262 NONAME - _ZNK13NmDataManager10metaObjectEv @ 263 NONAME - _ZNK16NmFolderMetaData2idEv @ 264 NONAME - _ZNK16NmFolderMetaData4nameEv @ 265 NONAME - _ZNK17NmFolderListModel11columnCountERK11QModelIndex @ 266 NONAME - _ZNK17NmFolderListModel4dataERK11QModelIndexi @ 267 NONAME - _ZNK17NmFolderListModel6parentERK11QModelIndex @ 268 NONAME - _ZNK17NmFolderListModel8rowCountERK11QModelIndex @ 269 NONAME - _ZNK17NmMailboxMetaData2idEv @ 270 NONAME - _ZNK17NmMailboxMetaData4nameEv @ 271 NONAME - _ZNK17NmMailboxMetaData6IconIdEv @ 272 NONAME - _ZNK17NmMailboxMetaData7addressEv @ 273 NONAME - _ZNK18NmBaseClientPlugin10metaObjectEv @ 274 NONAME - _ZNK18NmMailboxListModel10metaObjectEv @ 275 NONAME - _ZNK18NmMailboxListModel4dataERK11QModelIndexi @ 276 NONAME - _ZNK18NmMessageListModel10metaObjectEv @ 277 NONAME - _ZNK18NmMessageListModel17getInsertionIndexERK17NmMessageEnvelope @ 278 NONAME - _ZNK18NmMessageListModel30messagesBelongUnderSameDividerEPK17NmMessageEnvelopeS2_ @ 279 NONAME - _ZNK18NmMessageListModel4dataERK11QModelIndexi @ 280 NONAME - _ZNK22NmMessageListModelItem12titleDividerEv @ 281 NONAME - _ZNK22NmMessageListModelItem8envelopeEv @ 282 NONAME - _ZNK22NmMessageListModelItem8expandedEv @ 283 NONAME - _ZNK22NmMessageListModelItem8itemTypeEv @ 284 NONAME - _ZNK25NmAddAttachmentsOperation10metaObjectEv @ 285 NONAME - _ZNK25NmStoreEnvelopesOperation10metaObjectEv @ 286 NONAME - _ZNK26NmMessageCreationOperation10metaObjectEv @ 287 NONAME - _ZTI10NmUiEngine @ 288 NONAME - _ZTI11NmOperation @ 289 NONAME - _ZTI13NmDataManager @ 290 NONAME - _ZTI16NmFolderMetaData @ 291 NONAME - _ZTI17NmFolderListModel @ 292 NONAME - _ZTI17NmMailboxMetaData @ 293 NONAME - _ZTI18NmBaseClientPlugin @ 294 NONAME - _ZTI18NmMailboxListModel @ 295 NONAME - _ZTI18NmMessageListModel @ 296 NONAME - _ZTI19NmDataPluginFactory @ 297 NONAME - _ZTI22NmMessageListModelItem @ 298 NONAME - _ZTI25NmAddAttachmentsOperation @ 299 NONAME - _ZTI25NmStoreEnvelopesOperation @ 300 NONAME - _ZTI26NmMessageCreationOperation @ 301 NONAME - _ZTV10NmUiEngine @ 302 NONAME - _ZTV11NmOperation @ 303 NONAME - _ZTV13NmDataManager @ 304 NONAME - _ZTV16NmFolderMetaData @ 305 NONAME - _ZTV17NmFolderListModel @ 306 NONAME - _ZTV17NmMailboxMetaData @ 307 NONAME - _ZTV18NmBaseClientPlugin @ 308 NONAME - _ZTV18NmMailboxListModel @ 309 NONAME - _ZTV18NmMessageListModel @ 310 NONAME - _ZTV19NmDataPluginFactory @ 311 NONAME - _ZTV22NmMessageListModelItem @ 312 NONAME - _ZTV25NmAddAttachmentsOperation @ 313 NONAME - _ZTV25NmStoreEnvelopesOperation @ 314 NONAME - _ZTV26NmMessageCreationOperation @ 315 NONAME - _ZThn8_N18NmBaseClientPlugin10getActionsERK15NmActionRequestR5QListIP8NmActionE @ 316 NONAME - _ZThn8_N18NmBaseClientPluginD0Ev @ 317 NONAME - _ZThn8_N18NmBaseClientPluginD1Ev @ 318 NONAME - _ZN10NmUiEngine24messageEventForListModelE14NmMessageEventRK4NmIdRK5QListIS1_ES3_ @ 319 NONAME + _ZN10NmUiEngine22getPluginIdByMailboxIdEj @ 45 NONAME + _ZN10NmUiEngine22sendOperationCompletedEv @ 46 NONAME + _ZN10NmUiEngine23refreshMailboxListModelEv @ 47 NONAME + _ZN10NmUiEngine24messageEventForListModelE14NmMessageEventRK4NmIdRK5QListIS1_ES3_ @ 48 NONAME + _ZN10NmUiEngine25messageListModelForSearchERK4NmId @ 49 NONAME + _ZN10NmUiEngine28handleCompletedSendOperationEv @ 50 NONAME + _ZN10NmUiEngine33handleCompletedSaveDraftOperationEv @ 51 NONAME + _ZN10NmUiEngine35handleCompletedRemoveDraftOperationEv @ 52 NONAME + _ZN10NmUiEngine6searchERK4NmIdRK11QStringList @ 53 NONAME + _ZN10NmUiEngine7messageERK4NmIdS2_S2_ @ 54 NONAME + _ZN10NmUiEngine8goOnlineERK4NmId @ 55 NONAME + _ZN10NmUiEngine8instanceEv @ 56 NONAME + _ZN10NmUiEngine9goOfflineERK4NmId @ 57 NONAME + _ZN10NmUiEngine9mInstanceE @ 58 NONAME DATA 4 + _ZN10NmUiEngine9syncStateERK4NmId @ 59 NONAME + _ZN10NmUiEngineC1Ev @ 60 NONAME + _ZN10NmUiEngineC2Ev @ 61 NONAME + _ZN10NmUiEngineD0Ev @ 62 NONAME + _ZN10NmUiEngineD1Ev @ 63 NONAME + _ZN10NmUiEngineD2Ev @ 64 NONAME + _ZN11NmOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 65 NONAME + _ZN11NmOperation11qt_metacastEPKc @ 66 NONAME + _ZN11NmOperation15cancelOperationEv @ 67 NONAME + _ZN11NmOperation15deleteOperationEv @ 68 NONAME + _ZN11NmOperation16staticMetaObjectE @ 69 NONAME DATA 16 + _ZN11NmOperation17completeOperationEi @ 70 NONAME + _ZN11NmOperation17doCancelOperationEv @ 71 NONAME + _ZN11NmOperation17runAsyncOperationEv @ 72 NONAME + _ZN11NmOperation18operationCancelledEv @ 73 NONAME + _ZN11NmOperation18operationCompletedEi @ 74 NONAME + _ZN11NmOperation19doCompleteOperationEv @ 75 NONAME + _ZN11NmOperation19getStaticMetaObjectEv @ 76 NONAME + _ZN11NmOperation23addPreliminaryOperationEPS_ @ 77 NONAME + _ZN11NmOperation23updateOperationProgressEi @ 78 NONAME + _ZN11NmOperation24operationProgressChangedEi @ 79 NONAME + _ZN11NmOperation25doUpdateOperationProgressEv @ 80 NONAME + _ZN11NmOperation34handlePreliminaryOperationFinishedEv @ 81 NONAME + _ZN11NmOperationC2Ev @ 82 NONAME + _ZN11NmOperationD0Ev @ 83 NONAME + _ZN11NmOperationD1Ev @ 84 NONAME + _ZN11NmOperationD2Ev @ 85 NONAME + _ZN13NmDataManager10folderByIdERK4NmIdS2_ @ 86 NONAME + _ZN13NmDataManager11listFoldersE4NmIdR5QListIP8NmFolderE @ 87 NONAME + _ZN13NmDataManager11mailboxByIdERK4NmId @ 88 NONAME + _ZN13NmDataManager11qt_metacallEN11QMetaObject4CallEiPPv @ 89 NONAME + _ZN13NmDataManager11qt_metacastEPKc @ 90 NONAME + _ZN13NmDataManager12envelopeByIdERK4NmIdS2_S2_ @ 91 NONAME + _ZN13NmDataManager12listMessagesERK4NmIdS2_R5QListIP17NmMessageEnvelopeE @ 92 NONAME + _ZN13NmDataManager13listMailboxesER5QListIP9NmMailboxE @ 93 NONAME + _ZN13NmDataManager14folderTypeByIdE4NmIdS0_ @ 94 NONAME + _ZN13NmDataManager14listMailboxIdsER5QListI4NmIdE @ 95 NONAME + _ZN13NmDataManager16staticMetaObjectE @ 96 NONAME DATA 16 + _ZN13NmDataManager19getStandardFolderIdERK4NmId12NmFolderType @ 97 NONAME + _ZN13NmDataManager19getStaticMetaObjectEv @ 98 NONAME + _ZN13NmDataManager20contentToMessagePartERK4NmIdS2_S2_R13NmMessagePart @ 99 NONAME + _ZN13NmDataManager6folderERK4NmIdS2_ @ 100 NONAME + _ZN13NmDataManager7mailboxERK4NmId @ 101 NONAME + _ZN13NmDataManager7messageERK4NmIdS2_S2_ @ 102 NONAME + _ZN13NmDataManagerC1Ev @ 103 NONAME + _ZN13NmDataManagerC2Ev @ 104 NONAME + _ZN13NmDataManagerD0Ev @ 105 NONAME + _ZN13NmDataManagerD1Ev @ 106 NONAME + _ZN13NmDataManagerD2Ev @ 107 NONAME + _ZN16NmFolderMetaData5setIdERK4NmId @ 108 NONAME + _ZN16NmFolderMetaData7setNameERK7QString @ 109 NONAME + _ZN16NmFolderMetaDataC1Ev @ 110 NONAME + _ZN16NmFolderMetaDataC2Ev @ 111 NONAME + _ZN16NmFolderMetaDataD0Ev @ 112 NONAME + _ZN16NmFolderMetaDataD1Ev @ 113 NONAME + _ZN16NmFolderMetaDataD2Ev @ 114 NONAME + _ZN17NmFolderListModel7refreshER5QListIP8NmFolderE @ 115 NONAME + _ZN17NmFolderListModelC1ER13NmDataManagerP7QObject @ 116 NONAME + _ZN17NmFolderListModelC2ER13NmDataManagerP7QObject @ 117 NONAME + _ZN17NmFolderListModelD0Ev @ 118 NONAME + _ZN17NmFolderListModelD1Ev @ 119 NONAME + _ZN17NmFolderListModelD2Ev @ 120 NONAME + _ZN17NmMailboxMetaData10setAddressERK7QString @ 121 NONAME + _ZN17NmMailboxMetaData5setIdERK4NmId @ 122 NONAME + _ZN17NmMailboxMetaData7setNameERK7QString @ 123 NONAME + _ZN17NmMailboxMetaData9setIconIdERK4NmId @ 124 NONAME + _ZN17NmMailboxMetaDataC1Ev @ 125 NONAME + _ZN17NmMailboxMetaDataC2Ev @ 126 NONAME + _ZN17NmMailboxMetaDataD0Ev @ 127 NONAME + _ZN17NmMailboxMetaDataD1Ev @ 128 NONAME + _ZN17NmMailboxMetaDataD2Ev @ 129 NONAME + _ZN18NmBaseClientPlugin10getActionsERK15NmActionRequestR5QListIP8NmActionE @ 130 NONAME + _ZN18NmBaseClientPlugin10markAsReadEv @ 131 NONAME + _ZN18NmBaseClientPlugin11forwardMailEv @ 132 NONAME + _ZN18NmBaseClientPlugin11openMessageEv @ 133 NONAME + _ZN18NmBaseClientPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 134 NONAME + _ZN18NmBaseClientPlugin11qt_metacastEPKc @ 135 NONAME + _ZN18NmBaseClientPlugin12markAsUnreadEv @ 136 NONAME + _ZN18NmBaseClientPlugin12replyAllMailEv @ 137 NONAME + _ZN18NmBaseClientPlugin13createNewMailEv @ 138 NONAME + _ZN18NmBaseClientPlugin13deleteMessageEv @ 139 NONAME + _ZN18NmBaseClientPlugin13handleRequestE23NmActionResponseCommandRK15NmActionRequest @ 140 NONAME + _ZN18NmBaseClientPlugin14openAttachmentEv @ 141 NONAME + _ZN18NmBaseClientPlugin14setPriorityLowEv @ 142 NONAME + _ZN18NmBaseClientPlugin15setPriorityHighEv @ 143 NONAME + _ZN18NmBaseClientPlugin16removeAttachmentEv @ 144 NONAME + _ZN18NmBaseClientPlugin16staticMetaObjectE @ 145 NONAME DATA 16 + _ZN18NmBaseClientPlugin17setPriorityNormalEv @ 146 NONAME + _ZN18NmBaseClientPlugin18mailboxListChangedERK4NmIdN10NmSettings16MailboxEventTypeE @ 147 NONAME + _ZN18NmBaseClientPlugin19getStaticMetaObjectEv @ 148 NONAME + _ZN18NmBaseClientPlugin22mailboxPropertyChangedERK4NmId8QVariantS3_ @ 149 NONAME + _ZN18NmBaseClientPlugin22updateEnvelopePropertyE20NmEnvelopeProperties @ 150 NONAME + _ZN18NmBaseClientPlugin24createEditorViewCommandsERK15NmActionRequestR5QListIP8NmActionE @ 151 NONAME + _ZN18NmBaseClientPlugin24createViewerViewCommandsERK15NmActionRequestR5QListIP8NmActionE @ 152 NONAME + _ZN18NmBaseClientPlugin25createMessageListCommandsERK15NmActionRequestR5QListIP8NmActionE @ 153 NONAME + _ZN18NmBaseClientPlugin26createNewMailViewerToolBarEv @ 154 NONAME + _ZN18NmBaseClientPlugin27deleteMessageFromViewerViewEv @ 155 NONAME + _ZN18NmBaseClientPlugin6attachEv @ 156 NONAME + _ZN18NmBaseClientPlugin6searchEv @ 157 NONAME + _ZN18NmBaseClientPlugin7refreshEv @ 158 NONAME + _ZN18NmBaseClientPlugin8goOnlineERK4NmId @ 159 NONAME + _ZN18NmBaseClientPlugin8sendMailEv @ 160 NONAME + _ZN18NmBaseClientPlugin8settingsEv @ 161 NONAME + _ZN18NmBaseClientPlugin9goOfflineERK4NmId @ 162 NONAME + _ZN18NmBaseClientPlugin9replyMailEv @ 163 NONAME + _ZN18NmBaseClientPluginC2Ev @ 164 NONAME + _ZN18NmBaseClientPluginD0Ev @ 165 NONAME + _ZN18NmBaseClientPluginD1Ev @ 166 NONAME + _ZN18NmBaseClientPluginD2Ev @ 167 NONAME + _ZN18NmMailboxListModel11qt_metacallEN11QMetaObject4CallEiPPv @ 168 NONAME + _ZN18NmMailboxListModel11qt_metacastEPKc @ 169 NONAME + _ZN18NmMailboxListModel16refreshModelItemERK4NmId @ 170 NONAME + _ZN18NmMailboxListModel16staticMetaObjectE @ 171 NONAME DATA 16 + _ZN18NmMailboxListModel17createMailboxItemEPK9NmMailbox @ 172 NONAME + _ZN18NmMailboxListModel18handleMailboxEventE14NmMailboxEventRK5QListI4NmIdE @ 173 NONAME + _ZN18NmMailboxListModel19getStaticMetaObjectEv @ 174 NONAME + _ZN18NmMailboxListModel7refreshER5QListIP9NmMailboxE @ 175 NONAME + _ZN18NmMailboxListModelC1ER13NmDataManagerP7QObject @ 176 NONAME + _ZN18NmMailboxListModelC2ER13NmDataManagerP7QObject @ 177 NONAME + _ZN18NmMailboxListModelD0Ev @ 178 NONAME + _ZN18NmMailboxListModelD1Ev @ 179 NONAME + _ZN18NmMailboxListModelD2Ev @ 180 NONAME + _ZN18NmMessageListModel10removeItemEiR22NmMessageListModelItem @ 181 NONAME + _ZN18NmMessageListModel11qt_metacallEN11QMetaObject4CallEiPPv @ 182 NONAME + _ZN18NmMessageListModel11qt_metacastEPKc @ 183 NONAME + _ZN18NmMessageListModel11setDividersEb @ 184 NONAME + _ZN18NmMessageListModel11setNewParamEP14NmUiStartParam @ 185 NONAME + _ZN18NmMessageListModel13itemFromModelERK4NmId @ 186 NONAME + _ZN18NmMessageListModel14dividersActiveEv @ 187 NONAME + _ZN18NmMessageListModel14updateEnvelopeE20NmEnvelopePropertiesRK4NmId @ 188 NONAME + _ZN18NmMessageListModel16currentMailboxIdEv @ 189 NONAME + _ZN18NmMessageListModel16staticMetaObjectE @ 190 NONAME DATA 16 + _ZN18NmMessageListModel17createMessageItemEP17NmMessageEnvelope @ 191 NONAME + _ZN18NmMessageListModel18handleMessageEventE14NmMessageEventRK4NmIdRK5QListIS1_ES3_ @ 192 NONAME + _ZN18NmMessageListModel18setIgnoreFolderIdsEb @ 193 NONAME + _ZN18NmMessageListModel19getStaticMetaObjectEv @ 194 NONAME + _ZN18NmMessageListModel21dividerInsertionIndexEi @ 195 NONAME + _ZN18NmMessageListModel21setEnvelopePropertiesE20NmEnvelopePropertiesRK5QListI4NmIdE @ 196 NONAME + _ZN18NmMessageListModel21updateMessageEnvelopeERK4NmIdS2_S2_ @ 197 NONAME + _ZN18NmMessageListModel22createTitleDividerItemEP17NmMessageEnvelope @ 198 NONAME + _ZN18NmMessageListModel22insertDividerIntoModelEP17NmMessageEnvelopei @ 199 NONAME + _ZN18NmMessageListModel22insertMessageIntoModelEP17NmMessageEnvelopeib @ 200 NONAME + _ZN18NmMessageListModel22removeMessageFromModelERK4NmId @ 201 NONAME + _ZN18NmMessageListModel25insertNewMessageIntoModelERK4NmIdS2_S2_ @ 202 NONAME + _ZN18NmMessageListModel7changedERK17NmMessageEnvelopeS2_ @ 203 NONAME + _ZN18NmMessageListModel7refreshE4NmIdS0_RK5QListIP17NmMessageEnvelopeE @ 204 NONAME + _ZN18NmMessageListModelC1ER13NmDataManagerP7QObject @ 205 NONAME + _ZN18NmMessageListModelC2ER13NmDataManagerP7QObject @ 206 NONAME + _ZN18NmMessageListModelD0Ev @ 207 NONAME + _ZN18NmMessageListModelD1Ev @ 208 NONAME + _ZN18NmMessageListModelD2Ev @ 209 NONAME + _ZN19NmDataPluginFactory10loadPluginERK4QDirRK7QString @ 210 NONAME + _ZN19NmDataPluginFactory12mPluginArrayE @ 211 NONAME DATA 4 + _ZN19NmDataPluginFactory14pluginInstanceE4NmId @ 212 NONAME + _ZN19NmDataPluginFactory15mReferenceCountE @ 213 NONAME DATA 4 + _ZN19NmDataPluginFactory15pluginInstancesEv @ 214 NONAME + _ZN19NmDataPluginFactory15releaseInstanceERPS_ @ 215 NONAME + _ZN19NmDataPluginFactory17interfaceInstanceE4NmId @ 216 NONAME + _ZN19NmDataPluginFactory17interfaceInstanceEP7QObject @ 217 NONAME + _ZN19NmDataPluginFactory18mPluginLoaderArrayE @ 218 NONAME DATA 4 + _ZN19NmDataPluginFactory33applicationStateInterfaceInstanceE4NmId @ 219 NONAME + _ZN19NmDataPluginFactory33applicationStateInterfaceInstanceEP7QObject @ 220 NONAME + _ZN19NmDataPluginFactory8instanceEv @ 221 NONAME + _ZN19NmDataPluginFactory9mInstanceE @ 222 NONAME DATA 4 + _ZN19NmDataPluginFactoryC1Ev @ 223 NONAME + _ZN19NmDataPluginFactoryC2Ev @ 224 NONAME + _ZN19NmDataPluginFactoryD0Ev @ 225 NONAME + _ZN19NmDataPluginFactoryD1Ev @ 226 NONAME + _ZN19NmDataPluginFactoryD2Ev @ 227 NONAME + _ZN22NmMessageListModelItem11envelopePtrEv @ 228 NONAME + _ZN22NmMessageListModelItem11setEnvelopeEP17NmMessageEnvelope @ 229 NONAME + _ZN22NmMessageListModelItem11setEnvelopeERK17NmMessageEnvelope @ 230 NONAME + _ZN22NmMessageListModelItem11setExpandedEb @ 231 NONAME + _ZN22NmMessageListModelItem11setItemTypeENS_17NmMessageItemTypeE @ 232 NONAME + _ZN22NmMessageListModelItem15setTitleDividerERK7QString @ 233 NONAME + _ZN22NmMessageListModelItem19callEmitDataChangedEv @ 234 NONAME + _ZN22NmMessageListModelItemC1Ev @ 235 NONAME + _ZN22NmMessageListModelItemC2Ev @ 236 NONAME + _ZN22NmMessageListModelItemD0Ev @ 237 NONAME + _ZN22NmMessageListModelItemD1Ev @ 238 NONAME + _ZN22NmMessageListModelItemD2Ev @ 239 NONAME + _ZN25NmAddAttachmentsOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 240 NONAME + _ZN25NmAddAttachmentsOperation11qt_metacastEPKc @ 241 NONAME + _ZN25NmAddAttachmentsOperation16staticMetaObjectE @ 242 NONAME DATA 16 + _ZN25NmAddAttachmentsOperation19getStaticMetaObjectEv @ 243 NONAME + _ZN25NmAddAttachmentsOperation21completeOperationPartERK7QStringRK4NmIdi @ 244 NONAME + _ZN25NmAddAttachmentsOperation22operationPartCompletedERK7QStringRK4NmIdi @ 245 NONAME + _ZN25NmAddAttachmentsOperationC2Ev @ 246 NONAME + _ZN25NmAddAttachmentsOperationD0Ev @ 247 NONAME + _ZN25NmAddAttachmentsOperationD1Ev @ 248 NONAME + _ZN25NmAddAttachmentsOperationD2Ev @ 249 NONAME + _ZN25NmStoreEnvelopesOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 250 NONAME + _ZN25NmStoreEnvelopesOperation11qt_metacastEPKc @ 251 NONAME + _ZN25NmStoreEnvelopesOperation16staticMetaObjectE @ 252 NONAME DATA 16 + _ZN25NmStoreEnvelopesOperation19getStaticMetaObjectEv @ 253 NONAME + _ZN26NmMessageCreationOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 254 NONAME + _ZN26NmMessageCreationOperation11qt_metacastEPKc @ 255 NONAME + _ZN26NmMessageCreationOperation16staticMetaObjectE @ 256 NONAME DATA 16 + _ZN26NmMessageCreationOperation19getStaticMetaObjectEv @ 257 NONAME + _ZN7NmIcons7getIconENS_4IconE @ 258 NONAME + _ZN7NmIcons9freeIconsEv @ 259 NONAME + _ZNK10NmUiEngine10metaObjectEv @ 260 NONAME + _ZNK10NmUiEngine16isSendingMessageEv @ 261 NONAME + _ZNK10NmUiEngine16messageBeingSentEv @ 262 NONAME + _ZNK11NmOperation10metaObjectEv @ 263 NONAME + _ZNK11NmOperation9isRunningEv @ 264 NONAME + _ZNK13NmDataManager10metaObjectEv @ 265 NONAME + _ZNK16NmFolderMetaData2idEv @ 266 NONAME + _ZNK16NmFolderMetaData4nameEv @ 267 NONAME + _ZNK17NmFolderListModel11columnCountERK11QModelIndex @ 268 NONAME + _ZNK17NmFolderListModel4dataERK11QModelIndexi @ 269 NONAME + _ZNK17NmFolderListModel6parentERK11QModelIndex @ 270 NONAME + _ZNK17NmFolderListModel8rowCountERK11QModelIndex @ 271 NONAME + _ZNK17NmMailboxMetaData2idEv @ 272 NONAME + _ZNK17NmMailboxMetaData4nameEv @ 273 NONAME + _ZNK17NmMailboxMetaData6IconIdEv @ 274 NONAME + _ZNK17NmMailboxMetaData7addressEv @ 275 NONAME + _ZNK18NmBaseClientPlugin10metaObjectEv @ 276 NONAME + _ZNK18NmMailboxListModel10metaObjectEv @ 277 NONAME + _ZNK18NmMailboxListModel4dataERK11QModelIndexi @ 278 NONAME + _ZNK18NmMessageListModel10metaObjectEv @ 279 NONAME + _ZNK18NmMessageListModel17getInsertionIndexERK17NmMessageEnvelope @ 280 NONAME + _ZNK18NmMessageListModel30messagesBelongUnderSameDividerEPK17NmMessageEnvelopeS2_ @ 281 NONAME + _ZNK18NmMessageListModel4dataERK11QModelIndexi @ 282 NONAME + _ZNK22NmMessageListModelItem12titleDividerEv @ 283 NONAME + _ZNK22NmMessageListModelItem8envelopeEv @ 284 NONAME + _ZNK22NmMessageListModelItem8expandedEv @ 285 NONAME + _ZNK22NmMessageListModelItem8itemTypeEv @ 286 NONAME + _ZNK25NmAddAttachmentsOperation10metaObjectEv @ 287 NONAME + _ZNK25NmStoreEnvelopesOperation10metaObjectEv @ 288 NONAME + _ZNK26NmMessageCreationOperation10metaObjectEv @ 289 NONAME + _ZTI10NmUiEngine @ 290 NONAME + _ZTI11NmOperation @ 291 NONAME + _ZTI13NmDataManager @ 292 NONAME + _ZTI16NmFolderMetaData @ 293 NONAME + _ZTI17NmFolderListModel @ 294 NONAME + _ZTI17NmMailboxMetaData @ 295 NONAME + _ZTI18NmBaseClientPlugin @ 296 NONAME + _ZTI18NmMailboxListModel @ 297 NONAME + _ZTI18NmMessageListModel @ 298 NONAME + _ZTI19NmDataPluginFactory @ 299 NONAME + _ZTI22NmMessageListModelItem @ 300 NONAME + _ZTI25NmAddAttachmentsOperation @ 301 NONAME + _ZTI25NmStoreEnvelopesOperation @ 302 NONAME + _ZTI26NmMessageCreationOperation @ 303 NONAME + _ZTV10NmUiEngine @ 304 NONAME + _ZTV11NmOperation @ 305 NONAME + _ZTV13NmDataManager @ 306 NONAME + _ZTV16NmFolderMetaData @ 307 NONAME + _ZTV17NmFolderListModel @ 308 NONAME + _ZTV17NmMailboxMetaData @ 309 NONAME + _ZTV18NmBaseClientPlugin @ 310 NONAME + _ZTV18NmMailboxListModel @ 311 NONAME + _ZTV18NmMessageListModel @ 312 NONAME + _ZTV19NmDataPluginFactory @ 313 NONAME + _ZTV22NmMessageListModelItem @ 314 NONAME + _ZTV25NmAddAttachmentsOperation @ 315 NONAME + _ZTV25NmStoreEnvelopesOperation @ 316 NONAME + _ZTV26NmMessageCreationOperation @ 317 NONAME + _ZThn8_N18NmBaseClientPlugin10getActionsERK15NmActionRequestR5QListIP8NmActionE @ 318 NONAME + _ZThn8_N18NmBaseClientPluginD0Ev @ 319 NONAME + _ZThn8_N18NmBaseClientPluginD1Ev @ 320 NONAME diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiengine/inc/nmdataplugininterface.h --- a/emailuis/nmailuiengine/inc/nmdataplugininterface.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiengine/inc/nmdataplugininterface.h Thu Jun 24 14:32:18 2010 +0300 @@ -59,7 +59,7 @@ virtual int getMailboxById(const NmId &id, NmMailbox *&mailbox) = 0; - virtual int deleteMailboxById(const NmId &id) = 0; + virtual QPointer deleteMailboxById(const NmId &id) = 0; virtual int getMessageById( const NmId &mailboxId, @@ -186,6 +186,12 @@ virtual int cancelSearch(const NmId &mailboxId) = 0; virtual QPointer removeDraftMessage(NmMessage *message) = 0; + + virtual int copyMessages( + const NmId &mailboxId, + const QList &messageIds, + const NmId &sourceFolderId, + const NmId &destinationFolderId) = 0; }; Q_DECLARE_INTERFACE(NmDataPluginInterface, "sf.app.commonmail.emailuis.nmailuiengine.NmDataPluginInterface/1.0") diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiengine/inc/nmuiengine.h --- a/emailuis/nmailuiengine/inc/nmuiengine.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiengine/inc/nmuiengine.h Thu Jun 24 14:32:18 2010 +0300 @@ -55,6 +55,8 @@ void refreshMailboxListModel(); + NmId getPluginIdByMailboxId(quint32 accountId); + NmMessageListModel &messageListModel(const NmId &mailboxId, const NmId &folderId); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiengine/src/nmuiengine.cpp --- a/emailuis/nmailuiengine/src/nmuiengine.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiengine/src/nmuiengine.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -82,7 +82,7 @@ /*! - Destructor + Class destructor. */ NmUiEngine::~NmUiEngine() { @@ -95,46 +95,66 @@ delete mMessageSearchListModel; mMessageSearchListModel = NULL; } + if (mInboxListModel) { delete mInboxListModel; mInboxListModel = NULL; - } + } + if (mMessageListModel) { delete mMessageListModel; mMessageListModel = NULL; } + if (mMailboxListModel) { delete mMailboxListModel; mMailboxListModel = NULL; } - // do the unsubscriptions + + // Do the unsubscriptions. QList mailboxIdList; mDataManager->listMailboxIds(mailboxIdList); + for (int i(0); i < mailboxIdList.count(); i++) { NmId id = mailboxIdList[i]; - NmDataPluginInterface *pluginInterface = mPluginFactory->interfaceInstance(id); + NmDataPluginInterface *pluginInterface = + mPluginFactory->interfaceInstance(id); + if (pluginInterface) { pluginInterface->unsubscribeMailboxEvents(id); } } + mailboxIdList.clear(); + NmDataPluginFactory::releaseInstance(mPluginFactory); + delete mDataManager; + + // Cancel all operations. if (mSendOperation && mSendOperation->isRunning()) { mSendOperation->cancelOperation(); } - if(mRemoveDraftOperation && mRemoveDraftOperation->isRunning()) { + + if (mRemoveDraftOperation && mRemoveDraftOperation->isRunning()) { mRemoveDraftOperation->cancelOperation(); } - if(mSaveDraftOperation && mSaveDraftOperation->isRunning()) { + + if (mSaveDraftOperation && mSaveDraftOperation->isRunning()) { mSaveDraftOperation->cancelOperation(); } + + // Call processEvents() to ensure that the cancelled operations get the time + // they need to destroy themselves. + qApp->processEvents(); + if(mDraftMessage) { delete mDraftMessage; mDraftMessage = NULL; } } + /*! */ @@ -1235,3 +1255,23 @@ emit operationCompleted(event); } } + +/*! + returns full mailbox id from plain account id +*/ +NmId NmUiEngine::getPluginIdByMailboxId(quint32 accountId) +{ + NM_FUNCTION; + + NmId fullId = NULL; + fullId.setId32(accountId); + QList mailboxList; + if(mDataManager){ + mDataManager->listMailboxIds(mailboxList); + for(int i=0;i NmRecipientLineEdit::emailAddressList(void) - ?getStaticMetaObject@NmAttachmentListItem@@SAABUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const & NmAttachmentListItem::getStaticMetaObject(void) - ?getStaticMetaObject@NmBaseViewScrollArea@@SAABUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const & NmBaseViewScrollArea::getStaticMetaObject(void) - ?getStaticMetaObject@NmAttachmentListWidget@@SAABUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const & NmAttachmentListWidget::getStaticMetaObject(void) - ??_ENmAttachmentListItem@@UAE@I@Z @ 14 NONAME ; NmAttachmentListItem::~NmAttachmentListItem(unsigned int) - ?updateEditorHeight@NmEditorTextEdit@@QAEXXZ @ 15 NONAME ; void NmEditorTextEdit::updateEditorHeight(void) - ?qt_metacast@NmHtmlLineEdit@@UAEPAXPBD@Z @ 16 NONAME ; void * NmHtmlLineEdit::qt_metacast(char const *) - ?metaObject@NmEditorTextEdit@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * NmEditorTextEdit::metaObject(void) const - ?setFileNameText@NmAttachmentListItem@@QAEXABVQString@@@Z @ 18 NONAME ; void NmAttachmentListItem::setFileNameText(class QString const &) - ?qt_metacast@NmBaseViewScrollArea@@UAEPAXPBD@Z @ 19 NONAME ; void * NmBaseViewScrollArea::qt_metacast(char const *) - ?tr@NmBaseViewScrollArea@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString NmBaseViewScrollArea::tr(char const *, char const *, int) - ?qt_metacall@NmAttachmentListWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 21 NONAME ; int NmAttachmentListWidget::qt_metacall(enum QMetaObject::Call, int, void * *) - ?trUtf8@NmAttachmentListWidget@@SA?AVQString@@PBD0H@Z @ 22 NONAME ; class QString NmAttachmentListWidget::trUtf8(char const *, char const *, int) - ?qt_metacall@NmRecipientLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 23 NONAME ; int NmRecipientLineEdit::qt_metacall(enum QMetaObject::Call, int, void * *) - ??0NmAttachmentListItem@@QAE@PAVQGraphicsItem@@@Z @ 24 NONAME ; NmAttachmentListItem::NmAttachmentListItem(class QGraphicsItem *) - ?trUtf8@NmBaseViewScrollArea@@SA?AVQString@@PBD0H@Z @ 25 NONAME ; class QString NmBaseViewScrollArea::trUtf8(char const *, char const *, int) - ??1NmHtmlLineEdit@@UAE@XZ @ 26 NONAME ; NmHtmlLineEdit::~NmHtmlLineEdit(void) - ?setProgressBarValue@NmAttachmentListItem@@QAEXH@Z @ 27 NONAME ; void NmAttachmentListItem::setProgressBarValue(int) - ?trUtf8@NmHtmlLineEdit@@SA?AVQString@@PBD0@Z @ 28 NONAME ; class QString NmHtmlLineEdit::trUtf8(char const *, char const *) - ?gestureEvent@NmAttachmentListItem@@MAEXPAVQGestureEvent@@@Z @ 29 NONAME ; void NmAttachmentListItem::gestureEvent(class QGestureEvent *) - ??0NmRecipientLineEdit@@QAE@PAVQGraphicsItem@@@Z @ 30 NONAME ; NmRecipientLineEdit::NmRecipientLineEdit(class QGraphicsItem *) - ?setAttachmentSize@NmAttachmentListWidget@@QAEXHABVQString@@@Z @ 31 NONAME ; void NmAttachmentListWidget::setAttachmentSize(int, class QString const &) - ?trUtf8@NmEditorTextEdit@@SA?AVQString@@PBD0H@Z @ 32 NONAME ; class QString NmEditorTextEdit::trUtf8(char const *, char const *, int) - ?setPlainText@NmHtmlLineEdit@@QAEXABVQString@@@Z @ 33 NONAME ; void NmHtmlLineEdit::setPlainText(class QString const &) - ?longPressGesture@NmBaseViewScrollArea@@MAEXABVQPointF@@@Z @ 34 NONAME ; void NmBaseViewScrollArea::longPressGesture(class QPointF const &) - ?updateCustomTextColor@NmEditorTextEdit@@QAEXXZ @ 35 NONAME ; void NmEditorTextEdit::updateCustomTextColor(void) - ?orientationChanged@NmAttachmentListWidget@@AAEXW4Orientation@Qt@@@Z @ 36 NONAME ; void NmAttachmentListWidget::orientationChanged(enum Qt::Orientation) - ?insertSelectedContacts@NmRecipientLineEdit@@QAEXABVQVariant@@@Z @ 37 NONAME ; void NmRecipientLineEdit::insertSelectedContacts(class QVariant const &) - ?qt_metacast@NmAttachmentListWidget@@UAEPAXPBD@Z @ 38 NONAME ; void * NmAttachmentListWidget::qt_metacast(char const *) - ?getStaticMetaObject@NmHtmlLineEdit@@SAABUQMetaObject@@XZ @ 39 NONAME ; struct QMetaObject const & NmHtmlLineEdit::getStaticMetaObject(void) - ?qt_metacall@NmEditorTextEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 40 NONAME ; int NmEditorTextEdit::qt_metacall(enum QMetaObject::Call, int, void * *) - ??1NmAttachmentListWidget@@UAE@XZ @ 41 NONAME ; NmAttachmentListWidget::~NmAttachmentListWidget(void) - ??_ENmRecipientLineEdit@@UAE@I@Z @ 42 NONAME ; NmRecipientLineEdit::~NmRecipientLineEdit(unsigned int) - ?qt_metacast@NmRecipientLineEdit@@UAEPAXPBD@Z @ 43 NONAME ; void * NmRecipientLineEdit::qt_metacast(char const *) - ?setCustomTextColor@NmEditorTextEdit@@QAEXABU?$QPair@_NVQColor@@@@@Z @ 44 NONAME ; void NmEditorTextEdit::setCustomTextColor(struct QPair const &) - ?setDocument@NmHtmlLineEdit@@QAEXPAVQTextDocument@@@Z @ 45 NONAME ; void NmHtmlLineEdit::setDocument(class QTextDocument *) - ?trUtf8@NmEditorTextEdit@@SA?AVQString@@PBD0@Z @ 46 NONAME ; class QString NmEditorTextEdit::trUtf8(char const *, char const *) - ??0NmBaseViewScrollArea@@QAE@PAVQGraphicsItem@@@Z @ 47 NONAME ; NmBaseViewScrollArea::NmBaseViewScrollArea(class QGraphicsItem *) - ?longPressed@NmAttachmentListWidget@@IAEXHVQPointF@@@Z @ 48 NONAME ; void NmAttachmentListWidget::longPressed(int, class QPointF) - ?staticMetaObject@NmEditorTextEdit@@2UQMetaObject@@B @ 49 NONAME ; struct QMetaObject const NmEditorTextEdit::staticMetaObject - ??0NmEditorTextEdit@@QAE@PAVQGraphicsItem@@@Z @ 50 NONAME ; NmEditorTextEdit::NmEditorTextEdit(class QGraphicsItem *) - ??_ENmEditorTextEdit@@UAE@I@Z @ 51 NONAME ; NmEditorTextEdit::~NmEditorTextEdit(unsigned int) - ?hideProgressBar@NmAttachmentListItem@@QAEXXZ @ 52 NONAME ; void NmAttachmentListItem::hideProgressBar(void) - ?qt_metacast@NmAttachmentListItem@@UAEPAXPBD@Z @ 53 NONAME ; void * NmAttachmentListItem::qt_metacast(char const *) - ?handleMouseReleaseEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 54 NONAME ; void NmBaseViewScrollArea::handleMouseReleaseEvent(class QGraphicsSceneMouseEvent *) - ?removeProgressBar@NmAttachmentListItem@@AAEXXZ @ 55 NONAME ; void NmAttachmentListItem::removeProgressBar(void) - ??1NmBaseViewScrollArea@@UAE@XZ @ 56 NONAME ; NmBaseViewScrollArea::~NmBaseViewScrollArea(void) - ??_ENmHtmlLineEdit@@UAE@I@Z @ 57 NONAME ; NmHtmlLineEdit::~NmHtmlLineEdit(unsigned int) - ?tr@NmAttachmentListWidget@@SA?AVQString@@PBD0H@Z @ 58 NONAME ; class QString NmAttachmentListWidget::tr(char const *, char const *, int) - ?handleMousePressEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 59 NONAME ; void NmBaseViewScrollArea::handleMousePressEvent(class QGraphicsSceneMouseEvent *) - ?insertItemToLayout@NmAttachmentListWidget@@AAEXPAVNmAttachmentListItem@@@Z @ 60 NONAME ; void NmAttachmentListWidget::insertItemToLayout(class NmAttachmentListItem *) - ?metaObject@NmHtmlLineEdit@@UBEPBUQMetaObject@@XZ @ 61 NONAME ; struct QMetaObject const * NmHtmlLineEdit::metaObject(void) const - ?editorContentHeightChanged@NmEditorTextEdit@@IAEXXZ @ 62 NONAME ; void NmEditorTextEdit::editorContentHeightChanged(void) - ?setTextColor@NmAttachmentListItem@@QAEXVQColor@@@Z @ 63 NONAME ; void NmAttachmentListItem::setTextColor(class QColor) - ??1NmAttachmentListItem@@UAE@XZ @ 64 NONAME ; NmAttachmentListItem::~NmAttachmentListItem(void) - ?count@NmAttachmentListWidget@@QBEHXZ @ 65 NONAME ; int NmAttachmentListWidget::count(void) const - ?handleTextChanged@NmRecipientLineEdit@@AAEXABVQString@@@Z @ 66 NONAME ; void NmRecipientLineEdit::handleTextChanged(class QString const &) - ?handleLongPressGesture@NmBaseViewScrollArea@@IAEXABVQPointF@@@Z @ 67 NONAME ; void NmBaseViewScrollArea::handleLongPressGesture(class QPointF const &) - ?updateScrollPosition@NmEditorTextEdit@@QAEXABVQPointF@@@Z @ 68 NONAME ; void NmEditorTextEdit::updateScrollPosition(class QPointF const &) - ?contentHeight@NmEditorTextEdit@@QBEMXZ @ 69 NONAME ; float NmEditorTextEdit::contentHeight(void) const - ?qt_metacast@NmEditorTextEdit@@UAEPAXPBD@Z @ 70 NONAME ; void * NmEditorTextEdit::qt_metacast(char const *) - ?mouseMoveEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 71 NONAME ; void NmBaseViewScrollArea::mouseMoveEvent(class QGraphicsSceneMouseEvent *) - ?qt_metacall@NmAttachmentListItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 72 NONAME ; int NmAttachmentListItem::qt_metacall(enum QMetaObject::Call, int, void * *) - ?handleLongPressed@NmAttachmentListWidget@@AAEXVQPointF@@@Z @ 73 NONAME ; void NmAttachmentListWidget::handleLongPressed(class QPointF) - ?staticMetaObject@NmBaseViewScrollArea@@2UQMetaObject@@B @ 74 NONAME ; struct QMetaObject const NmBaseViewScrollArea::staticMetaObject - ?setHeaderHeight@NmEditorTextEdit@@QAEXH@Z @ 75 NONAME ; void NmEditorTextEdit::setHeaderHeight(int) - ?init@NmAttachmentListWidget@@AAEXXZ @ 76 NONAME ; void NmAttachmentListWidget::init(void) - ?rearrangeLayout@NmAttachmentListWidget@@AAEXXZ @ 77 NONAME ; void NmAttachmentListWidget::rearrangeLayout(void) - ?trUtf8@NmRecipientLineEdit@@SA?AVQString@@PBD0@Z @ 78 NONAME ; class QString NmRecipientLineEdit::trUtf8(char const *, char const *) - ?metaObject@NmRecipientLineEdit@@UBEPBUQMetaObject@@XZ @ 79 NONAME ; struct QMetaObject const * NmRecipientLineEdit::metaObject(void) const - ?tr@NmAttachmentListItem@@SA?AVQString@@PBD0@Z @ 80 NONAME ; class QString NmAttachmentListItem::tr(char const *, char const *) - ?trUtf8@NmAttachmentListItem@@SA?AVQString@@PBD0@Z @ 81 NONAME ; class QString NmAttachmentListItem::trUtf8(char const *, char const *) - ?tr@NmBaseViewScrollArea@@SA?AVQString@@PBD0@Z @ 82 NONAME ; class QString NmBaseViewScrollArea::tr(char const *, char const *) - ?trUtf8@NmBaseViewScrollArea@@SA?AVQString@@PBD0@Z @ 83 NONAME ; class QString NmBaseViewScrollArea::trUtf8(char const *, char const *) - ?setFileSizeText@NmAttachmentListItem@@QAEXABVQString@@@Z @ 84 NONAME ; void NmAttachmentListItem::setFileSizeText(class QString const &) - ?customTextColor@NmEditorTextEdit@@QBE?AU?$QPair@_NVQColor@@@@XZ @ 85 NONAME ; struct QPair NmEditorTextEdit::customTextColor(void) const - ?staticMetaObject@NmHtmlLineEdit@@2UQMetaObject@@B @ 86 NONAME ; struct QMetaObject const NmHtmlLineEdit::staticMetaObject - ?inputMethodEvent@NmRecipientLineEdit@@MAEXPAVQInputMethodEvent@@@Z @ 87 NONAME ; void NmRecipientLineEdit::inputMethodEvent(class QInputMethodEvent *) - ?mouseReleaseEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 88 NONAME ; void NmBaseViewScrollArea::mouseReleaseEvent(class QGraphicsSceneMouseEvent *) - ?constructUi@NmAttachmentListWidget@@AAEXXZ @ 89 NONAME ; void NmAttachmentListWidget::constructUi(void) - ?toPlainText@NmHtmlLineEdit@@QBE?AVQString@@XZ @ 90 NONAME ; class QString NmHtmlLineEdit::toPlainText(void) const - ?getStaticMetaObject@NmEditorTextEdit@@SAABUQMetaObject@@XZ @ 91 NONAME ; struct QMetaObject const & NmEditorTextEdit::getStaticMetaObject(void) - ?setScrollPosition@NmEditorTextEdit@@QAEXHH@Z @ 92 NONAME ; void NmEditorTextEdit::setScrollPosition(int, int) - ?tr@NmEditorTextEdit@@SA?AVQString@@PBD0@Z @ 93 NONAME ; class QString NmEditorTextEdit::tr(char const *, char const *) - ?staticMetaObject@NmAttachmentListItem@@2UQMetaObject@@B @ 94 NONAME ; struct QMetaObject const NmAttachmentListItem::staticMetaObject - ??_ENmBaseViewScrollArea@@UAE@I@Z @ 95 NONAME ; NmBaseViewScrollArea::~NmBaseViewScrollArea(unsigned int) - ?itemLongPressed@NmAttachmentListItem@@IAEXVQPointF@@@Z @ 96 NONAME ; void NmAttachmentListItem::itemLongPressed(class QPointF) - ?progressBarValue@NmAttachmentListItem@@QBEHXZ @ 97 NONAME ; int NmAttachmentListItem::progressBarValue(void) const - ?setCustomTextColor@NmEditorTextEdit@@QAEX_NABVQColor@@@Z @ 98 NONAME ; void NmEditorTextEdit::setCustomTextColor(bool, class QColor const &) - ??0NmHtmlLineEdit@@QAE@PAVQGraphicsItem@@@Z @ 99 NONAME ; NmHtmlLineEdit::NmHtmlLineEdit(class QGraphicsItem *) - ?init@NmAttachmentListItem@@AAEXXZ @ 100 NONAME ; void NmAttachmentListItem::init(void) - ?tr@NmRecipientLineEdit@@SA?AVQString@@PBD0@Z @ 101 NONAME ; class QString NmRecipientLineEdit::tr(char const *, char const *) - ??1NmEditorTextEdit@@UAE@XZ @ 102 NONAME ; NmEditorTextEdit::~NmEditorTextEdit(void) - ?generateEmailAddressList@NmRecipientLineEdit@@AAEXXZ @ 103 NONAME ; void NmRecipientLineEdit::generateEmailAddressList(void) - ?trUtf8@NmAttachmentListWidget@@SA?AVQString@@PBD0@Z @ 104 NONAME ; class QString NmAttachmentListWidget::trUtf8(char const *, char const *) - ?mousePressEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 105 NONAME ; void NmBaseViewScrollArea::mousePressEvent(class QGraphicsSceneMouseEvent *) - ?handleItemActivated@NmAttachmentListWidget@@AAEXXZ @ 106 NONAME ; void NmAttachmentListWidget::handleItemActivated(void) - ?metaObject@NmAttachmentListWidget@@UBEPBUQMetaObject@@XZ @ 107 NONAME ; struct QMetaObject const * NmAttachmentListWidget::metaObject(void) const - ?constructUi@NmAttachmentListItem@@AAEXXZ @ 108 NONAME ; void NmAttachmentListItem::constructUi(void) - ?trUtf8@NmHtmlLineEdit@@SA?AVQString@@PBD0H@Z @ 109 NONAME ; class QString NmHtmlLineEdit::trUtf8(char const *, char const *, int) - ?setHtml@NmHtmlLineEdit@@QAEXABVQString@@@Z @ 110 NONAME ; void NmHtmlLineEdit::setHtml(class QString const &) - ?tr@NmHtmlLineEdit@@SA?AVQString@@PBD0H@Z @ 111 NONAME ; class QString NmHtmlLineEdit::tr(char const *, char const *, int) - ?itemActivated@NmAttachmentListItem@@IAEXXZ @ 112 NONAME ; void NmAttachmentListItem::itemActivated(void) - ?tr@NmAttachmentListWidget@@SA?AVQString@@PBD0@Z @ 113 NONAME ; class QString NmAttachmentListWidget::tr(char const *, char const *) - ?getStaticMetaObject@NmRecipientLineEdit@@SAABUQMetaObject@@XZ @ 114 NONAME ; struct QMetaObject const & NmRecipientLineEdit::getStaticMetaObject(void) - ?findItem@NmAttachmentListWidget@@AAEHPBVQObject@@@Z @ 115 NONAME ; int NmAttachmentListWidget::findItem(class QObject const *) - ??1NmRecipientLineEdit@@UAE@XZ @ 116 NONAME ; NmRecipientLineEdit::~NmRecipientLineEdit(void) - ?removeAttachment@NmAttachmentListWidget@@QAEXH@Z @ 117 NONAME ; void NmAttachmentListWidget::removeAttachment(int) - ?tr@NmRecipientLineEdit@@SA?AVQString@@PBD0H@Z @ 118 NONAME ; class QString NmRecipientLineEdit::tr(char const *, char const *, int) - ?trUtf8@NmRecipientLineEdit@@SA?AVQString@@PBD0H@Z @ 119 NONAME ; class QString NmRecipientLineEdit::trUtf8(char const *, char const *, int) - ?progressValue@NmAttachmentListWidget@@QBEHH@Z @ 120 NONAME ; int NmAttachmentListWidget::progressValue(int) const - ?staticMetaObject@NmAttachmentListWidget@@2UQMetaObject@@B @ 121 NONAME ; struct QMetaObject const NmAttachmentListWidget::staticMetaObject - ??_ENmAttachmentListWidget@@UAE@I@Z @ 122 NONAME ; NmAttachmentListWidget::~NmAttachmentListWidget(unsigned int) - ?setTextColor@NmAttachmentListWidget@@QAEXVQColor@@@Z @ 123 NONAME ; void NmAttachmentListWidget::setTextColor(class QColor) - ?setTextCursor@NmHtmlLineEdit@@QAEXABVQTextCursor@@@Z @ 124 NONAME ; void NmHtmlLineEdit::setTextCursor(class QTextCursor const &) - ?handleMouseMoveEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 125 NONAME ; void NmBaseViewScrollArea::handleMouseMoveEvent(class QGraphicsSceneMouseEvent *) - ?staticMetaObject@NmRecipientLineEdit@@2UQMetaObject@@B @ 126 NONAME ; struct QMetaObject const NmRecipientLineEdit::staticMetaObject - ?setProgressBarValue@NmAttachmentListWidget@@QAEXHH@Z @ 127 NONAME ; void NmAttachmentListWidget::setProgressBarValue(int, int) - ?metaObject@NmAttachmentListItem@@UBEPBUQMetaObject@@XZ @ 128 NONAME ; struct QMetaObject const * NmAttachmentListItem::metaObject(void) const - ?insertAttachment@NmAttachmentListWidget@@QAEXHABVQString@@0@Z @ 129 NONAME ; void NmAttachmentListWidget::insertAttachment(int, class QString const &, class QString const &) - ?hideProgressBar@NmAttachmentListWidget@@QAEXH@Z @ 130 NONAME ; void NmAttachmentListWidget::hideProgressBar(int) - ??0NmAttachmentListWidget@@QAE@PAVQGraphicsItem@@@Z @ 131 NONAME ; NmAttachmentListWidget::NmAttachmentListWidget(class QGraphicsItem *) - ?tr@NmAttachmentListItem@@SA?AVQString@@PBD0H@Z @ 132 NONAME ; class QString NmAttachmentListItem::tr(char const *, char const *, int) - ?document@NmHtmlLineEdit@@QBEPAVQTextDocument@@XZ @ 133 NONAME ; class QTextDocument * NmHtmlLineEdit::document(void) const - ?qt_metacall@NmBaseViewScrollArea@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 134 NONAME ; int NmBaseViewScrollArea::qt_metacall(enum QMetaObject::Call, int, void * *) - ?qt_metacall@NmHtmlLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 135 NONAME ; int NmHtmlLineEdit::qt_metacall(enum QMetaObject::Call, int, void * *) - ?tr@NmHtmlLineEdit@@SA?AVQString@@PBD0@Z @ 136 NONAME ; class QString NmHtmlLineEdit::tr(char const *, char const *) + ?handleLongPressGesture@NmBaseViewScrollArea@@IAEXABVQPointF@@@Z @ 2 NONAME ; void NmBaseViewScrollArea::handleLongPressGesture(class QPointF const &) + ?qt_metacast@NmEditorTextEdit@@UAEPAXPBD@Z @ 3 NONAME ; void * NmEditorTextEdit::qt_metacast(char const *) + ?itemActivated@NmAttachmentListWidget@@IAEXH@Z @ 4 NONAME ; void NmAttachmentListWidget::itemActivated(int) + ?mouseMoveEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 5 NONAME ; void NmBaseViewScrollArea::mouseMoveEvent(class QGraphicsSceneMouseEvent *) + ?textCursor@NmHtmlLineEdit@@QBE?AVQTextCursor@@XZ @ 6 NONAME ; class QTextCursor NmHtmlLineEdit::textCursor(void) const + ?qt_metacall@NmAttachmentListItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 7 NONAME ; int NmAttachmentListItem::qt_metacall(enum QMetaObject::Call, int, void * *) + ?keyPressEvent@NmRecipientLineEdit@@MAEXPAVQKeyEvent@@@Z @ 8 NONAME ; void NmRecipientLineEdit::keyPressEvent(class QKeyEvent *) + ?handleLongPressed@NmAttachmentListWidget@@AAEXVQPointF@@@Z @ 9 NONAME ; void NmAttachmentListWidget::handleLongPressed(class QPointF) + ?staticMetaObject@NmBaseViewScrollArea@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const NmBaseViewScrollArea::staticMetaObject + ?paint@NmAttachmentListWidget@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 11 NONAME ; void NmAttachmentListWidget::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *) + ?tr@NmEditorTextEdit@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString NmEditorTextEdit::tr(char const *, char const *, int) + ?init@NmAttachmentListWidget@@AAEXXZ @ 13 NONAME ; void NmAttachmentListWidget::init(void) + ?rearrangeLayout@NmAttachmentListWidget@@AAEXXZ @ 14 NONAME ; void NmAttachmentListWidget::rearrangeLayout(void) + ?trUtf8@NmRecipientLineEdit@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString NmRecipientLineEdit::trUtf8(char const *, char const *) + ?toHtml@NmHtmlLineEdit@@QBE?AVQString@@XZ @ 16 NONAME ; class QString NmHtmlLineEdit::toHtml(void) const + ?trUtf8@NmAttachmentListItem@@SA?AVQString@@PBD0@Z @ 17 NONAME ; class QString NmAttachmentListItem::trUtf8(char const *, char const *) + ?tr@NmAttachmentListItem@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString NmAttachmentListItem::tr(char const *, char const *) + ?metaObject@NmRecipientLineEdit@@UBEPBUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const * NmRecipientLineEdit::metaObject(void) const + ?metaObject@NmBaseViewScrollArea@@UBEPBUQMetaObject@@XZ @ 20 NONAME ; struct QMetaObject const * NmBaseViewScrollArea::metaObject(void) const + ?emailAddressList@NmRecipientLineEdit@@QAE?AV?$QList@VNmAddress@@@@XZ @ 21 NONAME ; class QList NmRecipientLineEdit::emailAddressList(void) + ?trUtf8@NmBaseViewScrollArea@@SA?AVQString@@PBD0@Z @ 22 NONAME ; class QString NmBaseViewScrollArea::trUtf8(char const *, char const *) + ?tr@NmBaseViewScrollArea@@SA?AVQString@@PBD0@Z @ 23 NONAME ; class QString NmBaseViewScrollArea::tr(char const *, char const *) + ?getStaticMetaObject@NmAttachmentListItem@@SAABUQMetaObject@@XZ @ 24 NONAME ; struct QMetaObject const & NmAttachmentListItem::getStaticMetaObject(void) + ?getStaticMetaObject@NmBaseViewScrollArea@@SAABUQMetaObject@@XZ @ 25 NONAME ; struct QMetaObject const & NmBaseViewScrollArea::getStaticMetaObject(void) + ?getStaticMetaObject@NmAttachmentListWidget@@SAABUQMetaObject@@XZ @ 26 NONAME ; struct QMetaObject const & NmAttachmentListWidget::getStaticMetaObject(void) + ??_ENmAttachmentListItem@@UAE@I@Z @ 27 NONAME ; NmAttachmentListItem::~NmAttachmentListItem(unsigned int) + ?setFileSizeText@NmAttachmentListItem@@QAEXABVQString@@@Z @ 28 NONAME ; void NmAttachmentListItem::setFileSizeText(class QString const &) + ?qt_metacast@NmHtmlLineEdit@@UAEPAXPBD@Z @ 29 NONAME ; void * NmHtmlLineEdit::qt_metacast(char const *) + ?metaObject@NmEditorTextEdit@@UBEPBUQMetaObject@@XZ @ 30 NONAME ; struct QMetaObject const * NmEditorTextEdit::metaObject(void) const + ?staticMetaObject@NmHtmlLineEdit@@2UQMetaObject@@B @ 31 NONAME ; struct QMetaObject const NmHtmlLineEdit::staticMetaObject + ?setFileNameText@NmAttachmentListItem@@QAEXABVQString@@@Z @ 32 NONAME ; void NmAttachmentListItem::setFileNameText(class QString const &) + ?customTextColor@NmEditorTextEdit@@QBE?AU?$QPair@_NVQColor@@@@XZ @ 33 NONAME ; struct QPair NmEditorTextEdit::customTextColor(void) const + ?qt_metacast@NmBaseViewScrollArea@@UAEPAXPBD@Z @ 34 NONAME ; void * NmBaseViewScrollArea::qt_metacast(char const *) + ?inputMethodEvent@NmRecipientLineEdit@@MAEXPAVQInputMethodEvent@@@Z @ 35 NONAME ; void NmRecipientLineEdit::inputMethodEvent(class QInputMethodEvent *) + ?mouseReleaseEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 36 NONAME ; void NmBaseViewScrollArea::mouseReleaseEvent(class QGraphicsSceneMouseEvent *) + ?tr@NmBaseViewScrollArea@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString NmBaseViewScrollArea::tr(char const *, char const *, int) + ?qt_metacall@NmAttachmentListWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 38 NONAME ; int NmAttachmentListWidget::qt_metacall(enum QMetaObject::Call, int, void * *) + ?trUtf8@NmAttachmentListWidget@@SA?AVQString@@PBD0H@Z @ 39 NONAME ; class QString NmAttachmentListWidget::trUtf8(char const *, char const *, int) + ?constructUi@NmAttachmentListWidget@@AAEXXZ @ 40 NONAME ; void NmAttachmentListWidget::constructUi(void) + ?qt_metacall@NmRecipientLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 41 NONAME ; int NmRecipientLineEdit::qt_metacall(enum QMetaObject::Call, int, void * *) + ??0NmAttachmentListItem@@QAE@PAVQGraphicsItem@@@Z @ 42 NONAME ; NmAttachmentListItem::NmAttachmentListItem(class QGraphicsItem *) + ?addSelectedContacts@NmRecipientLineEdit@@QAEXABVQVariant@@@Z @ 43 NONAME ; void NmRecipientLineEdit::addSelectedContacts(class QVariant const &) + ?toPlainText@NmHtmlLineEdit@@QBE?AVQString@@XZ @ 44 NONAME ; class QString NmHtmlLineEdit::toPlainText(void) const + ?trUtf8@NmBaseViewScrollArea@@SA?AVQString@@PBD0H@Z @ 45 NONAME ; class QString NmBaseViewScrollArea::trUtf8(char const *, char const *, int) + ?tr@NmEditorTextEdit@@SA?AVQString@@PBD0@Z @ 46 NONAME ; class QString NmEditorTextEdit::tr(char const *, char const *) + ?getStaticMetaObject@NmEditorTextEdit@@SAABUQMetaObject@@XZ @ 47 NONAME ; struct QMetaObject const & NmEditorTextEdit::getStaticMetaObject(void) + ?staticMetaObject@NmAttachmentListItem@@2UQMetaObject@@B @ 48 NONAME ; struct QMetaObject const NmAttachmentListItem::staticMetaObject + ??1NmHtmlLineEdit@@UAE@XZ @ 49 NONAME ; NmHtmlLineEdit::~NmHtmlLineEdit(void) + ?setProgressBarValue@NmAttachmentListItem@@QAEXH@Z @ 50 NONAME ; void NmAttachmentListItem::setProgressBarValue(int) + ?trUtf8@NmHtmlLineEdit@@SA?AVQString@@PBD0@Z @ 51 NONAME ; class QString NmHtmlLineEdit::trUtf8(char const *, char const *) + ??_ENmBaseViewScrollArea@@UAE@I@Z @ 52 NONAME ; NmBaseViewScrollArea::~NmBaseViewScrollArea(unsigned int) + ?progressBarValue@NmAttachmentListItem@@QBEHXZ @ 53 NONAME ; int NmAttachmentListItem::progressBarValue(void) const + ?itemLongPressed@NmAttachmentListItem@@IAEXVQPointF@@@Z @ 54 NONAME ; void NmAttachmentListItem::itemLongPressed(class QPointF) + ?gestureEvent@NmAttachmentListItem@@MAEXPAVQGestureEvent@@@Z @ 55 NONAME ; void NmAttachmentListItem::gestureEvent(class QGestureEvent *) + ?setCustomTextColor@NmEditorTextEdit@@QAEX_NABVQColor@@@Z @ 56 NONAME ; void NmEditorTextEdit::setCustomTextColor(bool, class QColor const &) + ?init@NmAttachmentListItem@@AAEXXZ @ 57 NONAME ; void NmAttachmentListItem::init(void) + ??0NmRecipientLineEdit@@QAE@PAVQGraphicsItem@@@Z @ 58 NONAME ; NmRecipientLineEdit::NmRecipientLineEdit(class QGraphicsItem *) + ??0NmHtmlLineEdit@@QAE@PAVQGraphicsItem@@@Z @ 59 NONAME ; NmHtmlLineEdit::NmHtmlLineEdit(class QGraphicsItem *) + ?tr@NmRecipientLineEdit@@SA?AVQString@@PBD0@Z @ 60 NONAME ; class QString NmRecipientLineEdit::tr(char const *, char const *) + ?setAttachmentSize@NmAttachmentListWidget@@QAEXHABVQString@@@Z @ 61 NONAME ; void NmAttachmentListWidget::setAttachmentSize(int, class QString const &) + ?trUtf8@NmEditorTextEdit@@SA?AVQString@@PBD0H@Z @ 62 NONAME ; class QString NmEditorTextEdit::trUtf8(char const *, char const *, int) + ?setPlainText@NmHtmlLineEdit@@QAEXABVQString@@@Z @ 63 NONAME ; void NmHtmlLineEdit::setPlainText(class QString const &) + ?longPressGesture@NmBaseViewScrollArea@@MAEXABVQPointF@@@Z @ 64 NONAME ; void NmBaseViewScrollArea::longPressGesture(class QPointF const &) + ?updateCustomTextColor@NmEditorTextEdit@@QAEXXZ @ 65 NONAME ; void NmEditorTextEdit::updateCustomTextColor(void) + ?orientationChanged@NmAttachmentListWidget@@AAEXW4Orientation@Qt@@@Z @ 66 NONAME ; void NmAttachmentListWidget::orientationChanged(enum Qt::Orientation) + ?qt_metacast@NmAttachmentListWidget@@UAEPAXPBD@Z @ 67 NONAME ; void * NmAttachmentListWidget::qt_metacast(char const *) + ?getStaticMetaObject@NmHtmlLineEdit@@SAABUQMetaObject@@XZ @ 68 NONAME ; struct QMetaObject const & NmHtmlLineEdit::getStaticMetaObject(void) + ?qt_metacall@NmEditorTextEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 69 NONAME ; int NmEditorTextEdit::qt_metacall(enum QMetaObject::Call, int, void * *) + ??1NmEditorTextEdit@@UAE@XZ @ 70 NONAME ; NmEditorTextEdit::~NmEditorTextEdit(void) + ?generateEmailAddressList@NmRecipientLineEdit@@AAEXXZ @ 71 NONAME ; void NmRecipientLineEdit::generateEmailAddressList(void) + ?trUtf8@NmAttachmentListWidget@@SA?AVQString@@PBD0@Z @ 72 NONAME ; class QString NmAttachmentListWidget::trUtf8(char const *, char const *) + ??1NmAttachmentListWidget@@UAE@XZ @ 73 NONAME ; NmAttachmentListWidget::~NmAttachmentListWidget(void) + ??_ENmRecipientLineEdit@@UAE@I@Z @ 74 NONAME ; NmRecipientLineEdit::~NmRecipientLineEdit(unsigned int) + ?mousePressEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 75 NONAME ; void NmBaseViewScrollArea::mousePressEvent(class QGraphicsSceneMouseEvent *) + ?qt_metacast@NmRecipientLineEdit@@UAEPAXPBD@Z @ 76 NONAME ; void * NmRecipientLineEdit::qt_metacast(char const *) + ?setCustomTextColor@NmEditorTextEdit@@QAEXABU?$QPair@_NVQColor@@@@@Z @ 77 NONAME ; void NmEditorTextEdit::setCustomTextColor(struct QPair const &) + ?setDocument@NmHtmlLineEdit@@QAEXPAVQTextDocument@@@Z @ 78 NONAME ; void NmHtmlLineEdit::setDocument(class QTextDocument *) + ?handleItemActivated@NmAttachmentListWidget@@AAEXXZ @ 79 NONAME ; void NmAttachmentListWidget::handleItemActivated(void) + ?trUtf8@NmEditorTextEdit@@SA?AVQString@@PBD0@Z @ 80 NONAME ; class QString NmEditorTextEdit::trUtf8(char const *, char const *) + ??0NmBaseViewScrollArea@@QAE@PAVQGraphicsItem@@@Z @ 81 NONAME ; NmBaseViewScrollArea::NmBaseViewScrollArea(class QGraphicsItem *) + ?metaObject@NmAttachmentListWidget@@UBEPBUQMetaObject@@XZ @ 82 NONAME ; struct QMetaObject const * NmAttachmentListWidget::metaObject(void) const + ?constructUi@NmAttachmentListItem@@AAEXXZ @ 83 NONAME ; void NmAttachmentListItem::constructUi(void) + ?longPressed@NmAttachmentListWidget@@IAEXHVQPointF@@@Z @ 84 NONAME ; void NmAttachmentListWidget::longPressed(int, class QPointF) + ?trUtf8@NmHtmlLineEdit@@SA?AVQString@@PBD0H@Z @ 85 NONAME ; class QString NmHtmlLineEdit::trUtf8(char const *, char const *, int) + ?staticMetaObject@NmEditorTextEdit@@2UQMetaObject@@B @ 86 NONAME ; struct QMetaObject const NmEditorTextEdit::staticMetaObject + ??0NmEditorTextEdit@@QAE@PAVQGraphicsItem@@@Z @ 87 NONAME ; NmEditorTextEdit::NmEditorTextEdit(class QGraphicsItem *) + ?tr@NmHtmlLineEdit@@SA?AVQString@@PBD0H@Z @ 88 NONAME ; class QString NmHtmlLineEdit::tr(char const *, char const *, int) + ?setHtml@NmHtmlLineEdit@@QAEXABVQString@@@Z @ 89 NONAME ; void NmHtmlLineEdit::setHtml(class QString const &) + ??_ENmEditorTextEdit@@UAE@I@Z @ 90 NONAME ; NmEditorTextEdit::~NmEditorTextEdit(unsigned int) + ?tr@NmAttachmentListWidget@@SA?AVQString@@PBD0@Z @ 91 NONAME ; class QString NmAttachmentListWidget::tr(char const *, char const *) + ?itemActivated@NmAttachmentListItem@@IAEXXZ @ 92 NONAME ; void NmAttachmentListItem::itemActivated(void) + ?hideProgressBar@NmAttachmentListItem@@QAEXXZ @ 93 NONAME ; void NmAttachmentListItem::hideProgressBar(void) + ?qt_metacast@NmAttachmentListItem@@UAEPAXPBD@Z @ 94 NONAME ; void * NmAttachmentListItem::qt_metacast(char const *) + ?getStaticMetaObject@NmRecipientLineEdit@@SAABUQMetaObject@@XZ @ 95 NONAME ; struct QMetaObject const & NmRecipientLineEdit::getStaticMetaObject(void) + ?findItem@NmAttachmentListWidget@@AAEHPBVQObject@@@Z @ 96 NONAME ; int NmAttachmentListWidget::findItem(class QObject const *) + ?removeAttachment@NmAttachmentListWidget@@QAEXH@Z @ 97 NONAME ; void NmAttachmentListWidget::removeAttachment(int) + ??1NmRecipientLineEdit@@UAE@XZ @ 98 NONAME ; NmRecipientLineEdit::~NmRecipientLineEdit(void) + ?trUtf8@NmRecipientLineEdit@@SA?AVQString@@PBD0H@Z @ 99 NONAME ; class QString NmRecipientLineEdit::trUtf8(char const *, char const *, int) + ?tr@NmRecipientLineEdit@@SA?AVQString@@PBD0H@Z @ 100 NONAME ; class QString NmRecipientLineEdit::tr(char const *, char const *, int) + ?progressValue@NmAttachmentListWidget@@QBEHH@Z @ 101 NONAME ; int NmAttachmentListWidget::progressValue(int) const + ?staticMetaObject@NmAttachmentListWidget@@2UQMetaObject@@B @ 102 NONAME ; struct QMetaObject const NmAttachmentListWidget::staticMetaObject + ??_ENmAttachmentListWidget@@UAE@I@Z @ 103 NONAME ; NmAttachmentListWidget::~NmAttachmentListWidget(unsigned int) + ?setTextCursor@NmHtmlLineEdit@@QAEXABVQTextCursor@@@Z @ 104 NONAME ; void NmHtmlLineEdit::setTextCursor(class QTextCursor const &) + ?setTextColor@NmAttachmentListWidget@@QAEXVQColor@@@Z @ 105 NONAME ; void NmAttachmentListWidget::setTextColor(class QColor) + ?handleMouseMoveEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 106 NONAME ; void NmBaseViewScrollArea::handleMouseMoveEvent(class QGraphicsSceneMouseEvent *) + ?staticMetaObject@NmRecipientLineEdit@@2UQMetaObject@@B @ 107 NONAME ; struct QMetaObject const NmRecipientLineEdit::staticMetaObject + ?setProgressBarValue@NmAttachmentListWidget@@QAEXHH@Z @ 108 NONAME ; void NmAttachmentListWidget::setProgressBarValue(int, int) + ?handleMouseReleaseEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 109 NONAME ; void NmBaseViewScrollArea::handleMouseReleaseEvent(class QGraphicsSceneMouseEvent *) + ?insertAttachment@NmAttachmentListWidget@@QAEXHABVQString@@0@Z @ 110 NONAME ; void NmAttachmentListWidget::insertAttachment(int, class QString const &, class QString const &) + ?metaObject@NmAttachmentListItem@@UBEPBUQMetaObject@@XZ @ 111 NONAME ; struct QMetaObject const * NmAttachmentListItem::metaObject(void) const + ?removeProgressBar@NmAttachmentListItem@@AAEXXZ @ 112 NONAME ; void NmAttachmentListItem::removeProgressBar(void) + ??1NmBaseViewScrollArea@@UAE@XZ @ 113 NONAME ; NmBaseViewScrollArea::~NmBaseViewScrollArea(void) + ?hideProgressBar@NmAttachmentListWidget@@QAEXH@Z @ 114 NONAME ; void NmAttachmentListWidget::hideProgressBar(int) + ??0NmAttachmentListWidget@@QAE@PAVQGraphicsItem@@@Z @ 115 NONAME ; NmAttachmentListWidget::NmAttachmentListWidget(class QGraphicsItem *) + ??_ENmHtmlLineEdit@@UAE@I@Z @ 116 NONAME ; NmHtmlLineEdit::~NmHtmlLineEdit(unsigned int) + ?tr@NmAttachmentListWidget@@SA?AVQString@@PBD0H@Z @ 117 NONAME ; class QString NmAttachmentListWidget::tr(char const *, char const *, int) + ?handleMousePressEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 118 NONAME ; void NmBaseViewScrollArea::handleMousePressEvent(class QGraphicsSceneMouseEvent *) + ?insertItemToLayout@NmAttachmentListWidget@@AAEXPAVNmAttachmentListItem@@@Z @ 119 NONAME ; void NmAttachmentListWidget::insertItemToLayout(class NmAttachmentListItem *) + ?metaObject@NmHtmlLineEdit@@UBEPBUQMetaObject@@XZ @ 120 NONAME ; struct QMetaObject const * NmHtmlLineEdit::metaObject(void) const + ?setTextColor@NmAttachmentListItem@@QAEXVQColor@@@Z @ 121 NONAME ; void NmAttachmentListItem::setTextColor(class QColor) + ??1NmAttachmentListItem@@UAE@XZ @ 122 NONAME ; NmAttachmentListItem::~NmAttachmentListItem(void) + ?rectForPosition@NmEditorTextEdit@@QAE?AVQRectF@@H@Z @ 123 NONAME ; class QRectF NmEditorTextEdit::rectForPosition(int) + ?count@NmAttachmentListWidget@@QBEHXZ @ 124 NONAME ; int NmAttachmentListWidget::count(void) const + ?tr@NmAttachmentListItem@@SA?AVQString@@PBD0H@Z @ 125 NONAME ; class QString NmAttachmentListItem::tr(char const *, char const *, int) + ?handleTextChanged@NmRecipientLineEdit@@AAEXABVQString@@@Z @ 126 NONAME ; void NmRecipientLineEdit::handleTextChanged(class QString const &) + ?document@NmHtmlLineEdit@@QBEPAVQTextDocument@@XZ @ 127 NONAME ; class QTextDocument * NmHtmlLineEdit::document(void) const + ?tr@NmHtmlLineEdit@@SA?AVQString@@PBD0@Z @ 128 NONAME ; class QString NmHtmlLineEdit::tr(char const *, char const *) + ?qt_metacall@NmHtmlLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 129 NONAME ; int NmHtmlLineEdit::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@NmBaseViewScrollArea@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 130 NONAME ; int NmBaseViewScrollArea::qt_metacall(enum QMetaObject::Call, int, void * *) diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def --- a/emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def Thu Jun 24 14:32:18 2010 +0300 @@ -14,155 +14,149 @@ _ZN14NmHtmlLineEditD2Ev @ 13 NONAME _ZN16NmEditorTextEdit11qt_metacallEN11QMetaObject4CallEiPPv @ 14 NONAME _ZN16NmEditorTextEdit11qt_metacastEPKc @ 15 NONAME - _ZN16NmEditorTextEdit15setHeaderHeightEi @ 16 NONAME + _ZN16NmEditorTextEdit15rectForPositionEi @ 16 NONAME _ZN16NmEditorTextEdit16staticMetaObjectE @ 17 NONAME DATA 16 - _ZN16NmEditorTextEdit17setScrollPositionEii @ 18 NONAME - _ZN16NmEditorTextEdit18setCustomTextColorERK5QPairIb6QColorE @ 19 NONAME - _ZN16NmEditorTextEdit18setCustomTextColorEbRK6QColor @ 20 NONAME - _ZN16NmEditorTextEdit18updateEditorHeightEv @ 21 NONAME - _ZN16NmEditorTextEdit19getStaticMetaObjectEv @ 22 NONAME - _ZN16NmEditorTextEdit20updateScrollPositionERK7QPointF @ 23 NONAME - _ZN16NmEditorTextEdit21updateCustomTextColorEv @ 24 NONAME - _ZN16NmEditorTextEdit26editorContentHeightChangedEv @ 25 NONAME - _ZN16NmEditorTextEdit4initEP20NmBaseViewScrollArea @ 26 NONAME - _ZN16NmEditorTextEditC1EP13QGraphicsItem @ 27 NONAME - _ZN16NmEditorTextEditC2EP13QGraphicsItem @ 28 NONAME - _ZN16NmEditorTextEditD0Ev @ 29 NONAME - _ZN16NmEditorTextEditD1Ev @ 30 NONAME - _ZN16NmEditorTextEditD2Ev @ 31 NONAME - _ZN19NmRecipientLineEdit11qt_metacallEN11QMetaObject4CallEiPPv @ 32 NONAME - _ZN19NmRecipientLineEdit11qt_metacastEPKc @ 33 NONAME - _ZN19NmRecipientLineEdit13keyPressEventEP9QKeyEvent @ 34 NONAME - _ZN19NmRecipientLineEdit16emailAddressListEv @ 35 NONAME - _ZN19NmRecipientLineEdit16inputMethodEventEP17QInputMethodEvent @ 36 NONAME - _ZN19NmRecipientLineEdit16staticMetaObjectE @ 37 NONAME DATA 16 - _ZN19NmRecipientLineEdit17handleTextChangedERK7QString @ 38 NONAME - _ZN19NmRecipientLineEdit19getStaticMetaObjectEv @ 39 NONAME - _ZN19NmRecipientLineEdit22insertSelectedContactsERK8QVariant @ 40 NONAME - _ZN19NmRecipientLineEdit24generateEmailAddressListEv @ 41 NONAME - _ZN19NmRecipientLineEditC1EP13QGraphicsItem @ 42 NONAME - _ZN19NmRecipientLineEditC2EP13QGraphicsItem @ 43 NONAME - _ZN19NmRecipientLineEditD0Ev @ 44 NONAME - _ZN19NmRecipientLineEditD1Ev @ 45 NONAME - _ZN19NmRecipientLineEditD2Ev @ 46 NONAME - _ZN20NmAttachmentListItem11constructUiEv @ 47 NONAME - _ZN20NmAttachmentListItem11qt_metacallEN11QMetaObject4CallEiPPv @ 48 NONAME - _ZN20NmAttachmentListItem11qt_metacastEPKc @ 49 NONAME - _ZN20NmAttachmentListItem12gestureEventEP13QGestureEvent @ 50 NONAME - _ZN20NmAttachmentListItem12setTextColorE6QColor @ 51 NONAME - _ZN20NmAttachmentListItem13itemActivatedEv @ 52 NONAME - _ZN20NmAttachmentListItem15hideProgressBarEv @ 53 NONAME - _ZN20NmAttachmentListItem15itemLongPressedE7QPointF @ 54 NONAME - _ZN20NmAttachmentListItem15setFileNameTextERK7QString @ 55 NONAME - _ZN20NmAttachmentListItem15setFileSizeTextERK7QString @ 56 NONAME - _ZN20NmAttachmentListItem16staticMetaObjectE @ 57 NONAME DATA 16 - _ZN20NmAttachmentListItem17removeProgressBarEv @ 58 NONAME - _ZN20NmAttachmentListItem19getStaticMetaObjectEv @ 59 NONAME - _ZN20NmAttachmentListItem19setProgressBarValueEi @ 60 NONAME - _ZN20NmAttachmentListItem4initEv @ 61 NONAME - _ZN20NmAttachmentListItemC1EP13QGraphicsItem @ 62 NONAME - _ZN20NmAttachmentListItemC2EP13QGraphicsItem @ 63 NONAME - _ZN20NmAttachmentListItemD0Ev @ 64 NONAME - _ZN20NmAttachmentListItemD1Ev @ 65 NONAME - _ZN20NmAttachmentListItemD2Ev @ 66 NONAME - _ZN20NmBaseViewScrollArea11qt_metacallEN11QMetaObject4CallEiPPv @ 67 NONAME - _ZN20NmBaseViewScrollArea11qt_metacastEPKc @ 68 NONAME - _ZN20NmBaseViewScrollArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 69 NONAME - _ZN20NmBaseViewScrollArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 70 NONAME - _ZN20NmBaseViewScrollArea16longPressGestureERK7QPointF @ 71 NONAME - _ZN20NmBaseViewScrollArea16staticMetaObjectE @ 72 NONAME DATA 16 - _ZN20NmBaseViewScrollArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 73 NONAME - _ZN20NmBaseViewScrollArea19getStaticMetaObjectEv @ 74 NONAME - _ZN20NmBaseViewScrollArea20handleMouseMoveEventEP24QGraphicsSceneMouseEvent @ 75 NONAME - _ZN20NmBaseViewScrollArea21handleMousePressEventEP24QGraphicsSceneMouseEvent @ 76 NONAME - _ZN20NmBaseViewScrollArea22handleLongPressGestureERK7QPointF @ 77 NONAME - _ZN20NmBaseViewScrollArea23handleMouseReleaseEventEP24QGraphicsSceneMouseEvent @ 78 NONAME - _ZN20NmBaseViewScrollAreaC1EP13QGraphicsItem @ 79 NONAME - _ZN20NmBaseViewScrollAreaC2EP13QGraphicsItem @ 80 NONAME - _ZN20NmBaseViewScrollAreaD0Ev @ 81 NONAME - _ZN20NmBaseViewScrollAreaD1Ev @ 82 NONAME - _ZN20NmBaseViewScrollAreaD2Ev @ 83 NONAME - _ZN22NmAttachmentListWidget11constructUiEv @ 84 NONAME - _ZN22NmAttachmentListWidget11longPressedEi7QPointF @ 85 NONAME - _ZN22NmAttachmentListWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 86 NONAME - _ZN22NmAttachmentListWidget11qt_metacastEPKc @ 87 NONAME - _ZN22NmAttachmentListWidget12setTextColorE6QColor @ 88 NONAME - _ZN22NmAttachmentListWidget13itemActivatedEi @ 89 NONAME - _ZN22NmAttachmentListWidget15hideProgressBarEi @ 90 NONAME - _ZN22NmAttachmentListWidget15rearrangeLayoutEv @ 91 NONAME - _ZN22NmAttachmentListWidget16insertAttachmentEiRK7QStringS2_ @ 92 NONAME - _ZN22NmAttachmentListWidget16removeAttachmentEi @ 93 NONAME - _ZN22NmAttachmentListWidget16staticMetaObjectE @ 94 NONAME DATA 16 - _ZN22NmAttachmentListWidget17handleLongPressedE7QPointF @ 95 NONAME - _ZN22NmAttachmentListWidget17setAttachmentSizeEiRK7QString @ 96 NONAME - _ZN22NmAttachmentListWidget18insertItemToLayoutEP20NmAttachmentListItem @ 97 NONAME - _ZN22NmAttachmentListWidget18orientationChangedEN2Qt11OrientationE @ 98 NONAME - _ZN22NmAttachmentListWidget19getStaticMetaObjectEv @ 99 NONAME - _ZN22NmAttachmentListWidget19handleItemActivatedEv @ 100 NONAME - _ZN22NmAttachmentListWidget19setProgressBarValueEii @ 101 NONAME - _ZN22NmAttachmentListWidget4initEv @ 102 NONAME - _ZN22NmAttachmentListWidget5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 103 NONAME - _ZN22NmAttachmentListWidget8findItemEPK7QObject @ 104 NONAME - _ZN22NmAttachmentListWidgetC1EP13QGraphicsItem @ 105 NONAME - _ZN22NmAttachmentListWidgetC2EP13QGraphicsItem @ 106 NONAME - _ZN22NmAttachmentListWidgetD0Ev @ 107 NONAME - _ZN22NmAttachmentListWidgetD1Ev @ 108 NONAME - _ZN22NmAttachmentListWidgetD2Ev @ 109 NONAME - _ZNK14NmHtmlLineEdit10metaObjectEv @ 110 NONAME - _ZNK14NmHtmlLineEdit10textCursorEv @ 111 NONAME - _ZNK14NmHtmlLineEdit11toPlainTextEv @ 112 NONAME - _ZNK14NmHtmlLineEdit6toHtmlEv @ 113 NONAME - _ZNK14NmHtmlLineEdit8documentEv @ 114 NONAME - _ZNK16NmEditorTextEdit10metaObjectEv @ 115 NONAME - _ZNK16NmEditorTextEdit13contentHeightEv @ 116 NONAME - _ZNK16NmEditorTextEdit15customTextColorEv @ 117 NONAME - _ZNK19NmRecipientLineEdit10metaObjectEv @ 118 NONAME - _ZNK20NmAttachmentListItem10metaObjectEv @ 119 NONAME - _ZNK20NmAttachmentListItem16progressBarValueEv @ 120 NONAME - _ZNK20NmBaseViewScrollArea10metaObjectEv @ 121 NONAME - _ZNK22NmAttachmentListWidget10metaObjectEv @ 122 NONAME - _ZNK22NmAttachmentListWidget13progressValueEi @ 123 NONAME - _ZNK22NmAttachmentListWidget5countEv @ 124 NONAME - _ZTI14NmHtmlLineEdit @ 125 NONAME - _ZTI16NmEditorTextEdit @ 126 NONAME - _ZTI19NmRecipientLineEdit @ 127 NONAME - _ZTI20NmAttachmentListItem @ 128 NONAME - _ZTI20NmBaseViewScrollArea @ 129 NONAME - _ZTI22NmAttachmentListWidget @ 130 NONAME - _ZTV14NmHtmlLineEdit @ 131 NONAME - _ZTV16NmEditorTextEdit @ 132 NONAME - _ZTV19NmRecipientLineEdit @ 133 NONAME - _ZTV20NmAttachmentListItem @ 134 NONAME - _ZTV20NmBaseViewScrollArea @ 135 NONAME - _ZTV22NmAttachmentListWidget @ 136 NONAME - _ZThn16_N14NmHtmlLineEditD0Ev @ 137 NONAME - _ZThn16_N14NmHtmlLineEditD1Ev @ 138 NONAME - _ZThn16_N16NmEditorTextEditD0Ev @ 139 NONAME - _ZThn16_N16NmEditorTextEditD1Ev @ 140 NONAME - _ZThn16_N19NmRecipientLineEditD0Ev @ 141 NONAME - _ZThn16_N19NmRecipientLineEditD1Ev @ 142 NONAME - _ZThn16_N20NmAttachmentListItemD0Ev @ 143 NONAME - _ZThn16_N20NmAttachmentListItemD1Ev @ 144 NONAME - _ZThn16_N20NmBaseViewScrollAreaD0Ev @ 145 NONAME - _ZThn16_N20NmBaseViewScrollAreaD1Ev @ 146 NONAME - _ZThn16_N22NmAttachmentListWidgetD0Ev @ 147 NONAME - _ZThn16_N22NmAttachmentListWidgetD1Ev @ 148 NONAME - _ZThn8_N14NmHtmlLineEditD0Ev @ 149 NONAME - _ZThn8_N14NmHtmlLineEditD1Ev @ 150 NONAME - _ZThn8_N16NmEditorTextEditD0Ev @ 151 NONAME - _ZThn8_N16NmEditorTextEditD1Ev @ 152 NONAME - _ZThn8_N19NmRecipientLineEdit13keyPressEventEP9QKeyEvent @ 153 NONAME - _ZThn8_N19NmRecipientLineEdit16inputMethodEventEP17QInputMethodEvent @ 154 NONAME - _ZThn8_N19NmRecipientLineEditD0Ev @ 155 NONAME - _ZThn8_N19NmRecipientLineEditD1Ev @ 156 NONAME - _ZThn8_N20NmAttachmentListItemD0Ev @ 157 NONAME - _ZThn8_N20NmAttachmentListItemD1Ev @ 158 NONAME - _ZThn8_N20NmBaseViewScrollArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 159 NONAME - _ZThn8_N20NmBaseViewScrollArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 160 NONAME - _ZThn8_N20NmBaseViewScrollArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 161 NONAME - _ZThn8_N20NmBaseViewScrollAreaD0Ev @ 162 NONAME - _ZThn8_N20NmBaseViewScrollAreaD1Ev @ 163 NONAME - _ZThn8_N22NmAttachmentListWidget5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 164 NONAME - _ZThn8_N22NmAttachmentListWidgetD0Ev @ 165 NONAME - _ZThn8_N22NmAttachmentListWidgetD1Ev @ 166 NONAME + _ZN16NmEditorTextEdit18setCustomTextColorERK5QPairIb6QColorE @ 18 NONAME + _ZN16NmEditorTextEdit18setCustomTextColorEbRK6QColor @ 19 NONAME + _ZN16NmEditorTextEdit19getStaticMetaObjectEv @ 20 NONAME + _ZN16NmEditorTextEdit21updateCustomTextColorEv @ 21 NONAME + _ZN16NmEditorTextEditC1EP13QGraphicsItem @ 22 NONAME + _ZN16NmEditorTextEditC2EP13QGraphicsItem @ 23 NONAME + _ZN16NmEditorTextEditD0Ev @ 24 NONAME + _ZN16NmEditorTextEditD1Ev @ 25 NONAME + _ZN16NmEditorTextEditD2Ev @ 26 NONAME + _ZN19NmRecipientLineEdit11qt_metacallEN11QMetaObject4CallEiPPv @ 27 NONAME + _ZN19NmRecipientLineEdit11qt_metacastEPKc @ 28 NONAME + _ZN19NmRecipientLineEdit13keyPressEventEP9QKeyEvent @ 29 NONAME + _ZN19NmRecipientLineEdit16emailAddressListEv @ 30 NONAME + _ZN19NmRecipientLineEdit16inputMethodEventEP17QInputMethodEvent @ 31 NONAME + _ZN19NmRecipientLineEdit16staticMetaObjectE @ 32 NONAME DATA 16 + _ZN19NmRecipientLineEdit17handleTextChangedERK7QString @ 33 NONAME + _ZN19NmRecipientLineEdit19addSelectedContactsERK8QVariant @ 34 NONAME + _ZN19NmRecipientLineEdit19getStaticMetaObjectEv @ 35 NONAME + _ZN19NmRecipientLineEdit24generateEmailAddressListEv @ 36 NONAME + _ZN19NmRecipientLineEditC1EP13QGraphicsItem @ 37 NONAME + _ZN19NmRecipientLineEditC2EP13QGraphicsItem @ 38 NONAME + _ZN19NmRecipientLineEditD0Ev @ 39 NONAME + _ZN19NmRecipientLineEditD1Ev @ 40 NONAME + _ZN19NmRecipientLineEditD2Ev @ 41 NONAME + _ZN20NmAttachmentListItem11constructUiEv @ 42 NONAME + _ZN20NmAttachmentListItem11qt_metacallEN11QMetaObject4CallEiPPv @ 43 NONAME + _ZN20NmAttachmentListItem11qt_metacastEPKc @ 44 NONAME + _ZN20NmAttachmentListItem12gestureEventEP13QGestureEvent @ 45 NONAME + _ZN20NmAttachmentListItem12setTextColorE6QColor @ 46 NONAME + _ZN20NmAttachmentListItem13itemActivatedEv @ 47 NONAME + _ZN20NmAttachmentListItem15hideProgressBarEv @ 48 NONAME + _ZN20NmAttachmentListItem15itemLongPressedE7QPointF @ 49 NONAME + _ZN20NmAttachmentListItem15setFileNameTextERK7QString @ 50 NONAME + _ZN20NmAttachmentListItem15setFileSizeTextERK7QString @ 51 NONAME + _ZN20NmAttachmentListItem16staticMetaObjectE @ 52 NONAME DATA 16 + _ZN20NmAttachmentListItem17removeProgressBarEv @ 53 NONAME + _ZN20NmAttachmentListItem19getStaticMetaObjectEv @ 54 NONAME + _ZN20NmAttachmentListItem19setProgressBarValueEi @ 55 NONAME + _ZN20NmAttachmentListItem4initEv @ 56 NONAME + _ZN20NmAttachmentListItemC1EP13QGraphicsItem @ 57 NONAME + _ZN20NmAttachmentListItemC2EP13QGraphicsItem @ 58 NONAME + _ZN20NmAttachmentListItemD0Ev @ 59 NONAME + _ZN20NmAttachmentListItemD1Ev @ 60 NONAME + _ZN20NmAttachmentListItemD2Ev @ 61 NONAME + _ZN20NmBaseViewScrollArea11qt_metacallEN11QMetaObject4CallEiPPv @ 62 NONAME + _ZN20NmBaseViewScrollArea11qt_metacastEPKc @ 63 NONAME + _ZN20NmBaseViewScrollArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 64 NONAME + _ZN20NmBaseViewScrollArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 65 NONAME + _ZN20NmBaseViewScrollArea16longPressGestureERK7QPointF @ 66 NONAME + _ZN20NmBaseViewScrollArea16staticMetaObjectE @ 67 NONAME DATA 16 + _ZN20NmBaseViewScrollArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 68 NONAME + _ZN20NmBaseViewScrollArea19getStaticMetaObjectEv @ 69 NONAME + _ZN20NmBaseViewScrollArea20handleMouseMoveEventEP24QGraphicsSceneMouseEvent @ 70 NONAME + _ZN20NmBaseViewScrollArea21handleMousePressEventEP24QGraphicsSceneMouseEvent @ 71 NONAME + _ZN20NmBaseViewScrollArea22handleLongPressGestureERK7QPointF @ 72 NONAME + _ZN20NmBaseViewScrollArea23handleMouseReleaseEventEP24QGraphicsSceneMouseEvent @ 73 NONAME + _ZN20NmBaseViewScrollAreaC1EP13QGraphicsItem @ 74 NONAME + _ZN20NmBaseViewScrollAreaC2EP13QGraphicsItem @ 75 NONAME + _ZN20NmBaseViewScrollAreaD0Ev @ 76 NONAME + _ZN20NmBaseViewScrollAreaD1Ev @ 77 NONAME + _ZN20NmBaseViewScrollAreaD2Ev @ 78 NONAME + _ZN22NmAttachmentListWidget11constructUiEv @ 79 NONAME + _ZN22NmAttachmentListWidget11longPressedEi7QPointF @ 80 NONAME + _ZN22NmAttachmentListWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 81 NONAME + _ZN22NmAttachmentListWidget11qt_metacastEPKc @ 82 NONAME + _ZN22NmAttachmentListWidget12setTextColorE6QColor @ 83 NONAME + _ZN22NmAttachmentListWidget13itemActivatedEi @ 84 NONAME + _ZN22NmAttachmentListWidget15hideProgressBarEi @ 85 NONAME + _ZN22NmAttachmentListWidget15rearrangeLayoutEv @ 86 NONAME + _ZN22NmAttachmentListWidget16insertAttachmentEiRK7QStringS2_ @ 87 NONAME + _ZN22NmAttachmentListWidget16removeAttachmentEi @ 88 NONAME + _ZN22NmAttachmentListWidget16staticMetaObjectE @ 89 NONAME DATA 16 + _ZN22NmAttachmentListWidget17handleLongPressedE7QPointF @ 90 NONAME + _ZN22NmAttachmentListWidget17setAttachmentSizeEiRK7QString @ 91 NONAME + _ZN22NmAttachmentListWidget18insertItemToLayoutEP20NmAttachmentListItem @ 92 NONAME + _ZN22NmAttachmentListWidget18orientationChangedEN2Qt11OrientationE @ 93 NONAME + _ZN22NmAttachmentListWidget19getStaticMetaObjectEv @ 94 NONAME + _ZN22NmAttachmentListWidget19handleItemActivatedEv @ 95 NONAME + _ZN22NmAttachmentListWidget19setProgressBarValueEii @ 96 NONAME + _ZN22NmAttachmentListWidget4initEv @ 97 NONAME + _ZN22NmAttachmentListWidget5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 98 NONAME + _ZN22NmAttachmentListWidget8findItemEPK7QObject @ 99 NONAME + _ZN22NmAttachmentListWidgetC1EP13QGraphicsItem @ 100 NONAME + _ZN22NmAttachmentListWidgetC2EP13QGraphicsItem @ 101 NONAME + _ZN22NmAttachmentListWidgetD0Ev @ 102 NONAME + _ZN22NmAttachmentListWidgetD1Ev @ 103 NONAME + _ZN22NmAttachmentListWidgetD2Ev @ 104 NONAME + _ZNK14NmHtmlLineEdit10metaObjectEv @ 105 NONAME + _ZNK14NmHtmlLineEdit10textCursorEv @ 106 NONAME + _ZNK14NmHtmlLineEdit11toPlainTextEv @ 107 NONAME + _ZNK14NmHtmlLineEdit6toHtmlEv @ 108 NONAME + _ZNK14NmHtmlLineEdit8documentEv @ 109 NONAME + _ZNK16NmEditorTextEdit10metaObjectEv @ 110 NONAME + _ZNK16NmEditorTextEdit15customTextColorEv @ 111 NONAME + _ZNK19NmRecipientLineEdit10metaObjectEv @ 112 NONAME + _ZNK20NmAttachmentListItem10metaObjectEv @ 113 NONAME + _ZNK20NmAttachmentListItem16progressBarValueEv @ 114 NONAME + _ZNK20NmBaseViewScrollArea10metaObjectEv @ 115 NONAME + _ZNK22NmAttachmentListWidget10metaObjectEv @ 116 NONAME + _ZNK22NmAttachmentListWidget13progressValueEi @ 117 NONAME + _ZNK22NmAttachmentListWidget5countEv @ 118 NONAME + _ZTI14NmHtmlLineEdit @ 119 NONAME + _ZTI16NmEditorTextEdit @ 120 NONAME + _ZTI19NmRecipientLineEdit @ 121 NONAME + _ZTI20NmAttachmentListItem @ 122 NONAME + _ZTI20NmBaseViewScrollArea @ 123 NONAME + _ZTI22NmAttachmentListWidget @ 124 NONAME + _ZTV14NmHtmlLineEdit @ 125 NONAME + _ZTV16NmEditorTextEdit @ 126 NONAME + _ZTV19NmRecipientLineEdit @ 127 NONAME + _ZTV20NmAttachmentListItem @ 128 NONAME + _ZTV20NmBaseViewScrollArea @ 129 NONAME + _ZTV22NmAttachmentListWidget @ 130 NONAME + _ZThn16_N14NmHtmlLineEditD0Ev @ 131 NONAME + _ZThn16_N14NmHtmlLineEditD1Ev @ 132 NONAME + _ZThn16_N16NmEditorTextEditD0Ev @ 133 NONAME + _ZThn16_N16NmEditorTextEditD1Ev @ 134 NONAME + _ZThn16_N19NmRecipientLineEditD0Ev @ 135 NONAME + _ZThn16_N19NmRecipientLineEditD1Ev @ 136 NONAME + _ZThn16_N20NmAttachmentListItemD0Ev @ 137 NONAME + _ZThn16_N20NmAttachmentListItemD1Ev @ 138 NONAME + _ZThn16_N20NmBaseViewScrollAreaD0Ev @ 139 NONAME + _ZThn16_N20NmBaseViewScrollAreaD1Ev @ 140 NONAME + _ZThn16_N22NmAttachmentListWidgetD0Ev @ 141 NONAME + _ZThn16_N22NmAttachmentListWidgetD1Ev @ 142 NONAME + _ZThn8_N14NmHtmlLineEditD0Ev @ 143 NONAME + _ZThn8_N14NmHtmlLineEditD1Ev @ 144 NONAME + _ZThn8_N16NmEditorTextEditD0Ev @ 145 NONAME + _ZThn8_N16NmEditorTextEditD1Ev @ 146 NONAME + _ZThn8_N19NmRecipientLineEdit13keyPressEventEP9QKeyEvent @ 147 NONAME + _ZThn8_N19NmRecipientLineEdit16inputMethodEventEP17QInputMethodEvent @ 148 NONAME + _ZThn8_N19NmRecipientLineEditD0Ev @ 149 NONAME + _ZThn8_N19NmRecipientLineEditD1Ev @ 150 NONAME + _ZThn8_N20NmAttachmentListItemD0Ev @ 151 NONAME + _ZThn8_N20NmAttachmentListItemD1Ev @ 152 NONAME + _ZThn8_N20NmBaseViewScrollArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 153 NONAME + _ZThn8_N20NmBaseViewScrollArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 154 NONAME + _ZThn8_N20NmBaseViewScrollArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 155 NONAME + _ZThn8_N20NmBaseViewScrollAreaD0Ev @ 156 NONAME + _ZThn8_N20NmBaseViewScrollAreaD1Ev @ 157 NONAME + _ZThn8_N22NmAttachmentListWidget5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 158 NONAME + _ZThn8_N22NmAttachmentListWidgetD0Ev @ 159 NONAME + _ZThn8_N22NmAttachmentListWidgetD1Ev @ 160 NONAME diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiwidgets/inc/nmeditortextedit.h --- a/emailuis/nmailuiwidgets/inc/nmeditortextedit.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiwidgets/inc/nmeditortextedit.h Thu Jun 24 14:32:18 2010 +0300 @@ -21,10 +21,6 @@ #include #include "nmailuiwidgetsdef.h" -class NmBaseViewScrollArea; -class HbScrollArea; - - class NMAILUIWIDGETS_EXPORT NmEditorTextEdit : public HbTextEdit { Q_OBJECT @@ -33,32 +29,16 @@ NmEditorTextEdit(QGraphicsItem *parent = 0); virtual ~NmEditorTextEdit(); - void init(NmBaseViewScrollArea *bgScrollArea); - qreal contentHeight() const; - void setCustomTextColor(const QPair &customColor); void setCustomTextColor(bool useCustom, const QColor& color = Qt::black); QPair customTextColor() const; -signals: - void editorContentHeightChanged(); + QRectF rectForPosition(int position); public slots: - void updateEditorHeight(); - void setHeaderHeight(int); - void setScrollPosition(int oldPos, int newPos); - void updateScrollPosition(const QPointF &newPosition); void updateCustomTextColor(); private: - HbScrollArea *mScrollArea; - NmBaseViewScrollArea *mBackgroundScrollArea; - qreal mPreviousContentsHeight; - int mHeaderHeight; - QPointF mBgScrollPosition; - bool mFirstTime; - bool mFirstTimeToScrollPosUpdate; - QPair mCustomTextColor;//!resources/nmattachmentlistwidget.docml resources/nmattachmentlistitem.widgetml resources/nmattachmentlistitem.css + resources/nmeditortextedit.css + resources/nmeditortextedit.widgetml diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp --- a/emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -119,7 +119,10 @@ { NM_FUNCTION; + qDeleteAll(mItemList); + mItemList.clear(); + } /*! @@ -257,6 +260,8 @@ Q_UNUSED(option); Q_UNUSED(widget); if (painter&&mLayout){ + painter->save(); + // Use text color as a line color if set, otherwise use theme // normal list content color. if (mTextColor.isValid()){ @@ -280,7 +285,8 @@ layoutRect.bottomRight().x(), itemRect.bottomRight().y()); painter->drawLine(line1); } - } + } + painter->restore(); } } @@ -318,8 +324,9 @@ //construct UI after orientation has been figured out constructUi(); - //set default values, needed? - setFlag(QGraphicsItem::ItemIsFocusable); + //set flags + setFlag(QGraphicsItem::ItemIsFocusable); + setFlag(QGraphicsItem::ItemHasNoContents,false); } /*! diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiwidgets/src/nmeditortextedit.cpp --- a/emailuis/nmailuiwidgets/src/nmeditortextedit.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiwidgets/src/nmeditortextedit.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -17,23 +17,36 @@ #include "nmailuiwidgetsheaders.h" -// Following constants will be removed later when possible -static const double Un = 6.66; -static const double BodyMargin = Un; -static const int ChromeHeight = 160; -static const double FieldHeightWhenSecondaryFont = 7.46 * Un; -static const int GroupBoxTitleHeight = 42; -static const double HeightOfTheHeaderOnStartup = - 2 * FieldHeightWhenSecondaryFont + GroupBoxTitleHeight; +static const QString FILE_PATH_CSS = ":nmeditortextedit.css"; +static const QString FILE_PATH_WIDGETML = ":nmeditortextedit.widgetml"; /*! Constructor */ NmEditorTextEdit::NmEditorTextEdit(QGraphicsItem *parent) : - HbTextEdit(parent), - mFirstTimeToScrollPosUpdate(true) + HbTextEdit(parent) { NM_FUNCTION; + + HbStyleLoader::registerFilePath(FILE_PATH_WIDGETML); + HbStyleLoader::registerFilePath(FILE_PATH_CSS); + + mCustomTextColor = QPair(false, Qt::black); + + // Enable scrolling using cursor + setScrollable(true); + scrollArea()->setScrollDirections(Qt::Horizontal); + + // set background colour to plain white + QPixmap whitePixmap(10,10); + whitePixmap.fill(Qt::white); + QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem (whitePixmap); + setBackgroundItem(pixmapItem); + + // disables highlight frame for now - new api to set the frame item should be release somewhere wk26 + setFocusHighlight(HbStyle::P_TextEdit_frame_highlight, HbWidget::FocusHighlightNone); + + connect(this, SIGNAL(contentsChanged()), this, SLOT(updateCustomTextColor())); } /*! @@ -42,132 +55,9 @@ NmEditorTextEdit::~NmEditorTextEdit() { NM_FUNCTION; -} - -void NmEditorTextEdit::init(NmBaseViewScrollArea *bgScrollArea) -{ - NM_FUNCTION; - mPreviousContentsHeight = 0; - mFirstTime = true; - mCustomTextColor = QPair(false,Qt::black); - mBackgroundScrollArea = bgScrollArea; - mHeaderHeight = (int)HeightOfTheHeaderOnStartup; - mBgScrollPosition.setX(0); - mBgScrollPosition.setY(0); - document()->setDocumentMargin(BodyMargin); - - mScrollArea = this->scrollArea(); - - // Enable scrolling using cursor - setScrollable(true); - mScrollArea->setScrollDirections(Qt::Horizontal); - - connect(this, SIGNAL(contentsChanged()), this, SLOT(updateEditorHeight())); - connect(this, SIGNAL(cursorPositionChanged(int, int)), - this, SLOT(setScrollPosition(int, int))); - connect(this, SIGNAL(contentsChanged()), this, SLOT(updateCustomTextColor())); -} - -/*! - This function returns the height (pixels) of the body fields document content. - */ -qreal NmEditorTextEdit::contentHeight() const -{ - NM_FUNCTION; - - QSizeF s = document()->size(); - return s.height(); -} - -/*! - This slot updates the editor height. It is called every time when text edit - widget content has been changed. - */ -void NmEditorTextEdit::updateEditorHeight() -{ - NM_FUNCTION; - - // Get current body content height - qreal heightOfTheTextEdit = contentHeight(); - - // Check if height is changed - if (mPreviousContentsHeight != heightOfTheTextEdit) { - mPreviousContentsHeight = heightOfTheTextEdit; - setPreferredHeight(heightOfTheTextEdit); - setMaximumHeight(heightOfTheTextEdit); - } - // Inform parent that content height has been changed - emit editorContentHeightChanged(); -} - -/*! - This slot is called when cursor position is changed in body area using - 'pointing stick' or keyboard. Function will update the scroll position - of the content so that cursor does not go outside of the screen or - behind the virtual keyboard. - */ -void NmEditorTextEdit::setScrollPosition(int oldPos, int newPos) -{ - NM_FUNCTION; - - Q_UNUSED(oldPos); - - if (mFirstTime) { - // For some reason content height of the HbTextEdit is wrong - // right after construction. That is the reason why this mFirstTime - // member is used to set content height bit later. - mFirstTime = false; - updateEditorHeight(); - } - const QSizeF screenReso = HbDeviceProfile::current().logicalSize(); - qreal maxHeight = screenReso.height() - ChromeHeight; - - // Get cursor position coordinates - QRectF cursorPosPix = rectForPosition(newPos); - - // Calculate the screen top and bottom boundaries, this means the part of the - // background scroll area which is currently visible. - qreal visibleRectTopBoundary; - qreal visibleRectBottomBoundary; - - if (mBgScrollPosition.y() < mHeaderHeight) { - // Header is completely or partially visible - visibleRectTopBoundary = mHeaderHeight - mBgScrollPosition.y(); - visibleRectBottomBoundary = maxHeight - visibleRectTopBoundary; - } - else { - // Header is not visible - visibleRectTopBoundary = mBgScrollPosition.y() - mHeaderHeight; - visibleRectBottomBoundary = visibleRectTopBoundary + maxHeight; - } - - // Do scrolling if cursor is out of the screen boundaries - if (cursorPosPix.y() > visibleRectBottomBoundary) { - // Do scroll forward - mBackgroundScrollArea->scrollContentsTo( - QPointF(0,cursorPosPix.y() - maxHeight + mHeaderHeight)); - } - else if (cursorPosPix.y() + mHeaderHeight < mBgScrollPosition.y()) { - // Do scroll backward - mBackgroundScrollArea->scrollContentsTo(QPointF(0,cursorPosPix.y() + mHeaderHeight)); - } -} - -/*! - This slot is called when background scroll areas scroll position has been shanged. -*/ -void NmEditorTextEdit::updateScrollPosition(const QPointF &newPosition) -{ - NM_FUNCTION; - - // Temporary fix: When this is called for the first time, the editor is scrolled down for - // some reason so this will restore the scroll position. - if(mFirstTimeToScrollPosUpdate) { - mFirstTimeToScrollPosUpdate = false; - mBackgroundScrollArea->scrollContentsTo(QPointF(0,0)); - } - mBgScrollPosition = newPosition; + HbStyleLoader::unregisterFilePath(FILE_PATH_WIDGETML); + HbStyleLoader::unregisterFilePath(FILE_PATH_CSS); } /*! @@ -193,7 +83,8 @@ tcursor.mergeCharFormat(fmt); } } - } else { + } + else { fmt = tcursor.charFormat(); fmt.setForeground(mCustomTextColor.second); tcursor.mergeCharFormat(fmt); @@ -203,18 +94,6 @@ } /*! - This slot is called when header widget height has been changed. Function performs - the repositioning of the body field and resizing of the editor and content area. - */ -void NmEditorTextEdit::setHeaderHeight(int newHeight) -{ - NM_FUNCTION; - - mHeaderHeight = newHeight; - updateEditorHeight(); -} - -/*! Sets flag is custom text color should be used and sets the custom color. Function does not affect the color of existing content, only text that will be entered later. @@ -254,3 +133,12 @@ return mCustomTextColor; } + +/*! + * Returns the calculated rect in item coordinates of the editor for the the given \a position inside a document. + */ +QRectF NmEditorTextEdit::rectForPosition(int position) +{ + return HbTextEdit::rectForPosition(position); +} + diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmailuiwidgets/src/nmrecipientlineedit.cpp --- a/emailuis/nmailuiwidgets/src/nmrecipientlineedit.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmailuiwidgets/src/nmrecipientlineedit.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -65,29 +65,43 @@ #ifdef Q_OS_SYMBIAN /*! - This Slot inserts the selected contacts from Contacts-picker into the lineedit cursor position. + This Slot appends the selected contacts to the end of the lineedit content. */ -void NmRecipientLineEdit::insertSelectedContacts(const QVariant &selectedContacts) +void NmRecipientLineEdit::addSelectedContacts(const QVariant &selectedContacts) { NM_FUNCTION; - if (!selectedContacts.isNull()) { - CntServicesContactList contactList; - contactList = qVariantValue(selectedContacts); + // If user selected contact + if (!selectedContacts.isNull()) { + + // If the lineedit is not empty and if there is no ";" or "; " at the end, + // add a delimiter("; ") at the end. + if (this->text().length() != 0 && !(this->text().endsWith(Semicolon)) && + !(this->text().endsWith(Delimiter))){ + + // Move cursor to the end of the lineedit. + this->setCursorPosition(this->text().length()); + QTextCursor textCursor(this->textCursor()); + // Append delimiter("; ") to the end of the lineedit + textCursor.insertText(Delimiter); + } + + CntServicesContactList contactList = qVariantValue(selectedContacts); // Loop through all the selected contacts. for (int i = 0; i < contactList.count(); ++i) { + QString contactName = contactList[i].mDisplayName; QString contactEmailAddress = contactList[i].mEmailAddress; - QString contactName = contactList[i].mDisplayName; - - // If this contact has no name. - if(contactName.isEmpty()) { - // Generate a custom keyevent for this contact's emailaddress. - QKeyEvent contactEmailAddressKeyEvent(QEvent::KeyPress, Qt::Key_unknown, - Qt::NoModifier, contactEmailAddress); - // Forward this contactEmailAddressKeyEvent to base class to handle. - NmHtmlLineEdit::keyPressEvent(&contactEmailAddressKeyEvent); + + // If this contact has no name, use it's emailaddress as the display name + if(contactName.isEmpty()) { + // Move cursor to the end of the lineedit. + this->setCursorPosition(this->text().length()); + QTextCursor textCursor(this->textCursor()); + // Append contactEmailAddress to the end of the lineedit + textCursor.insertText(contactEmailAddress); } + // If this contact has name, use the name as the display name else { // Handle a rare case: there are contacts has same name but different emailaddress. for (int i = 0; i != mRecipientsAddedFromContacts.count(); ++i) { @@ -100,19 +114,17 @@ } } - // Generate custom keyevent for this contact's name. - QKeyEvent contactNameKeyEvent(QEvent::KeyPress, Qt::Key_unknown, - Qt::NoModifier, contactName); - // Forward this contactNameKeyEvent to base class to handle. - NmHtmlLineEdit::keyPressEvent(&contactNameKeyEvent); + // Move cursor to the end of the lineedit. + this->setCursorPosition(this->text().length()); + QTextCursor textCursor(this->textCursor()); + // Append contactName to the end of the lineedit + textCursor.insertText(contactName); } - - // Generate custom keyevent for Delimiter("; "). - QKeyEvent delimiterKeyEvent(QEvent::KeyPress, Qt::Key_unknown, - Qt::NoModifier, Delimiter); - // Forward the delimiterKeyEvent to base class to handle. - NmHtmlLineEdit::keyPressEvent(&delimiterKeyEvent); - + + QTextCursor textCursor(this->textCursor()); + // Append delimiter("; ") + textCursor.insertText(Delimiter); + // Form the contact into Qmail NmAddress format. NmAddress contact; contact.setAddress(contactEmailAddress); @@ -120,7 +132,7 @@ // Add this NmAddress formated contact into mRecipientsAddedFromContacts. mRecipientsAddedFromContacts.append(contact); - } + } // end of for (int i = 0; i < contactList.count(); ++i) } else { //Request returned NULL diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmframeworkadapter/inc/nmframeworkadapter.h --- a/emailuis/nmframeworkadapter/inc/nmframeworkadapter.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmframeworkadapter/inc/nmframeworkadapter.h Thu Jun 24 14:32:18 2010 +0300 @@ -66,7 +66,7 @@ int getMailboxById(const NmId& id, NmMailbox*& mailbox); - int deleteMailboxById(const NmId& id); + QPointer deleteMailboxById(const NmId& id); int getMessageById( const NmId& mailboxId, @@ -200,6 +200,12 @@ void updateActiveFolder(const NmId &mailboxId, const NmId &folderId); QPointer removeDraftMessage(NmMessage *message); + + int copyMessages( + const NmId &mailboxId, + const QList &messageIds, + const NmId &sourceFolderId, + const NmId &destinationFolderId); signals: @@ -295,7 +301,15 @@ void doUpdateActiveFolderL(const NmId &mailboxId, const NmId &folderId); - CEmailExtension* getEMailStateExtensionL(); + CEmailExtension* getEMailStateExtensionL(); + + void copyMessagesL( + const NmId &mailboxId, + const QList &messageIds, + const NmId &sourceFolderId, + const NmId &destinationFolderId); + + void deleteMailboxByIdL(const NmId &mailboxId); private: // Data @@ -303,7 +317,9 @@ CFSMailClient* mFSfw; // Singleton, not owned NmMailboxSearchObserver *mSearchObserver; // Owned CFSMailBox* mCurrentMailBox; // Owned - CEmailExtension* mEmailExtension; // not owned + CEmailExtension* mStateExtension; // not owned + + }; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmframeworkadapter/inc/nmframeworkadapterheaders.h --- a/emailuis/nmframeworkadapter/inc/nmframeworkadapterheaders.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmframeworkadapter/inc/nmframeworkadapterheaders.h Thu Jun 24 14:32:18 2010 +0300 @@ -67,6 +67,7 @@ #include "nmfwastoremessageoperation.h" #include "nmmailboxsearchobserver.h" #include "nmfwaremovedraftmessageoperation.h" +#include "nmfwadeletemailboxoperation.h" // fs email #include diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmframeworkadapter/inc/nmfwadeletemailboxoperation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailuis/nmframeworkadapter/inc/nmfwadeletemailboxoperation.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +#ifndef NMFWADELETEMAILBOXOPERATION_H_ +#define NMFWADELETEMAILBOXOPERATION_H_ + +#include +#include +#include +#include +#include + +class NmId; +class NmDataPluginInterface; +class CFSMailClient; + +class NmFwaDeleteMailboxOperation : public NmOperation, + public MFSMailRequestObserver +{ + Q_OBJECT +public: + NmFwaDeleteMailboxOperation(const NmId &mailboxId, + CFSMailClient &mailClient); + + // from MFSMailRequestObserver + void RequestResponseL(TFSProgress aEvent, TInt aRequestId); + +protected: + void doRunAsyncOperation(); + void doCompleteOperation(); + void doCancelOperation(); + +private: + ~NmFwaDeleteMailboxOperation(); + + void deleteMailboxL(); + +private: + const NmId &mMailboxId; // Owned + CFSMailClient &mMailClient; + TInt mRequestId; +}; + +#endif /* NMFWADELETEMAILBOXOPERATION_H_ */ diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmframeworkadapter/nmframeworkadapter.pro --- a/emailuis/nmframeworkadapter/nmframeworkadapter.pro Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmframeworkadapter/nmframeworkadapter.pro Thu Jun 24 14:32:18 2010 +0300 @@ -13,7 +13,7 @@ # # Description: # -# Version : %version: e003sa37#30 % +# Version : %version: e002sa38#31 % TEMPLATE = lib TARGET = nmframeworkadapter @@ -39,7 +39,8 @@ inc/nmfwamessagepartfetchingoperation.h \ inc/nmmailboxsearchobserver.h \ inc/nmfwamessagepartsfetchingoperation.h \ - inc/nmfwaremovedraftmessageoperation.h + inc/nmfwaremovedraftmessageoperation.h \ + inc/nmfwadeletemailboxoperation.h SOURCES += src/nmframeworkadapter.cpp \ src/nmfwamessagefetchingoperation.cpp \ @@ -54,7 +55,9 @@ src/nmfwamessagepartfetchingoperation.cpp \ src/nmmailboxsearchobserver.cpp \ src/nmfwamessagepartsfetchingoperation.cpp \ - src/nmfwaremovedraftmessageoperation.cpp + src/nmfwaremovedraftmessageoperation.cpp \ + src/nmfwadeletemailboxoperation.cpp + RESOURCES += diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmframeworkadapter/src/nmframeworkadapter.cpp --- a/emailuis/nmframeworkadapter/src/nmframeworkadapter.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmframeworkadapter/src/nmframeworkadapter.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -40,7 +40,7 @@ : mFSfw(NULL), mSearchObserver(NULL), mCurrentMailBox(NULL), - mEmailExtension(NULL) + mStateExtension(NULL) { NM_FUNCTION; @@ -59,13 +59,10 @@ { NM_FUNCTION; - if (mCurrentMailBox && mEmailExtension) { - mCurrentMailBox->ReleaseExtension( mEmailExtension ); - } delete mCurrentMailBox; mCurrentMailBox = NULL; - mEmailExtension = NULL; + mStateExtension = NULL; if (mSearchObserver) { delete mSearchObserver; @@ -167,17 +164,17 @@ } /*! - Delete the mailbox with the given id. Not implemented yet. + Deletes the mailbox with the given id asynchronously. - \param id Id of the mailbox to be deleted. + \param mailboxId Id of the mailbox to be deleted. \return Error code. */ -int NmFrameworkAdapter::deleteMailboxById(const NmId& /*id*/) +QPointer NmFrameworkAdapter::deleteMailboxById(const NmId& mailboxId) { NM_FUNCTION; - - return 0; + QPointer oper = new NmFwaDeleteMailboxOperation(mailboxId, *mFSfw); + return oper; } /*! @@ -685,16 +682,15 @@ const NmId &mailboxId, const NmId &folderId) { if ((mFSfw) && (!mCurrentMailBox || mCurrentMailBox->GetId()!=mailboxId)) { - mEmailExtension = NULL; delete mCurrentMailBox; mCurrentMailBox = NULL; mCurrentMailBox = mFSfw->GetMailBoxByUidL(mailboxId); } CEmailExtension *extension = getEMailStateExtensionL(); - CMailboxStateExtension *boxExtension = + CMailboxStateExtension *stateExtension = static_cast(extension); - if (boxExtension) { - boxExtension->NotifyActiveFolderChanged(mailboxId, folderId); + if (stateExtension) { + stateExtension->NotifyActiveFolderChanged(mailboxId, folderId); } } @@ -703,11 +699,12 @@ */ CEmailExtension* NmFrameworkAdapter::getEMailStateExtensionL() { - if (!mEmailExtension && mCurrentMailBox) { - mEmailExtension = - mCurrentMailBox->ExtensionL(KEmailMailboxStateExtensionUid); + if (!mStateExtension && mCurrentMailBox) { + // This extension is owned and deleted by the plugin, so no need to + // use release unless the extension will be relocated into extensionbase. + mStateExtension = mCurrentMailBox->ExtensionL(KEmailMailboxStateExtensionUid); } - return mEmailExtension; + return mStateExtension; } /*! @@ -1348,6 +1345,26 @@ } /*! + Copy messages between folders from specific mailbox. + + \param mailboxId Id of the mailbox containing messages. + \param messageIds The list of source message Ids. + \param newMessages The list of destination message Ids. + \param sourceFolderId Id of source folder. + \param destinationFolderId Id of destination folder. + */ +int NmFrameworkAdapter::copyMessages( + const NmId &mailboxId, + const QList& messageIds, + const NmId& sourceFolderId, + const NmId& destinationFolderId) +{ + NM_FUNCTION; + TRAPD(error, copyMessagesL(mailboxId, messageIds, sourceFolderId, destinationFolderId)); + return error; +} + +/*! Subscribe to events from a mailbox. \param mailboxId Id of the mailbox. @@ -1409,6 +1426,39 @@ CleanupStack::PopAndDestroy(folder); } +/*! + Leaving version of copyMessages +*/ +void NmFrameworkAdapter::copyMessagesL( + const NmId &mailboxId, + const QList& messageIds, + const NmId& sourceFolderId, + const NmId& destinationFolderId) +{ + NM_FUNCTION; + + RArray messages; + RArray copiedMessages; + + CleanupClosePushL(messages); + CleanupClosePushL(copiedMessages); + + for (TInt i = 0; i < messageIds.count(); i++) { + NmId tmpId(messageIds[i]); + messages.AppendL(TFSMailMsgId(tmpId)); + } + + CFSMailBox* mailBox = NULL; + mailBox = mFSfw->GetMailBoxByUidL(mailboxId); + if (mailBox) { + mailBox->CopyMessagesL(messages, copiedMessages, + TFSMailMsgId(sourceFolderId), + TFSMailMsgId(destinationFolderId)); + delete mailBox; + } + + CleanupStack::PopAndDestroy(2,&messages); +} /*! Sends the given message. diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmframeworkadapter/src/nmfwadeletemailboxoperation.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailuis/nmframeworkadapter/src/nmfwadeletemailboxoperation.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +#include "nmframeworkadapterheaders.h" + +/*! + \class NmFwaDeleteMailboxOperation + + \brief NmFwaDeleteMailboxOperation is an async operation which deletes a mailbox. + + NmFwaDeleteMailboxOperation is an async operation which deletes a mailbox. + \sa NmOperation + */ + +/*! + Constructor + + \param mailboxId Mailbox id to be deleted. + \param mailClient Reference to mail client object. + */ +NmFwaDeleteMailboxOperation::NmFwaDeleteMailboxOperation( + const NmId &mailboxId, + CFSMailClient &mailClient) : + mMailboxId(mailboxId), + mMailClient(mailClient), + mRequestId(NmNotFoundError) +{ + NM_FUNCTION; + + mMailClient.IncReferenceCount(); +} + +/*! + Destructor + */ +NmFwaDeleteMailboxOperation::~NmFwaDeleteMailboxOperation() +{ + NM_FUNCTION; + + doCancelOperation(); + mMailClient.Close(); // decrease ref count +} + +/*! + Called after base object construction via timer event, runs the + async operation. + + \sa NmOperation + */ +void NmFwaDeleteMailboxOperation::doRunAsyncOperation() +{ + NM_FUNCTION; + + TRAPD(err, deleteMailboxL()); + + if (err != KErrNone) { + completeOperation(NmGeneralError); + } +} + +/*! + + */ +void NmFwaDeleteMailboxOperation::doCompleteOperation() +{ + NM_FUNCTION; + + mRequestId = NmNotFoundError; +} + +/*! + + */ +void NmFwaDeleteMailboxOperation::doCancelOperation() +{ + NM_FUNCTION; + + // delete mailbox operation is not cancellable +} + +/*! + Asynchronous request response message. + + \param aEvent Plugin event description. + \param aRequestId Request id of asyncronous operation. + */ +void NmFwaDeleteMailboxOperation::RequestResponseL(TFSProgress aEvent, + TInt aRequestId) +{ + NM_FUNCTION; + + TFSProgress::TFSProgressStatus status = aEvent.iProgressStatus; + + if (aRequestId == mRequestId) { + if (status == TFSProgress::EFSStatus_RequestComplete && !aEvent.iError) { + completeOperation(NmNoError); + } + else { + completeOperation(NmGeneralError); + } + } +} + +/*! + Removes the message. + */ +void NmFwaDeleteMailboxOperation::deleteMailboxL() +{ + NM_FUNCTION; + const TFSMailMsgId mailboxId(mMailboxId); + mRequestId = mMailClient.DeleteMailBoxByUidL(mailboxId, *this); +} diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/conf/nmhswidgettitle.docml --- a/emailuis/nmhswidget/conf/nmhswidgettitle.docml Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/conf/nmhswidgettitle.docml Thu Jun 24 14:32:18 2010 +0300 @@ -21,7 +21,7 @@ - + @@ -29,9 +29,9 @@ - - - + + + @@ -43,7 +43,7 @@ - + diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/inc/nmhswidget.h --- a/emailuis/nmhswidget/inc/nmhswidget.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/inc/nmhswidget.h Thu Jun 24 14:32:18 2010 +0300 @@ -28,6 +28,7 @@ class QTranslator; class HbFrameDrawer; class NmHsWidgetDateTimeObserver; +class HbLabel; class NmHsWidget : public HbWidget { @@ -40,13 +41,14 @@ public: NmHsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0); ~NmHsWidget(); + + QPainterPath shape() const; public slots: //from home screen fw void onInitialize(); void onShow(); void onHide(); - void onUninitialize(); //engine void updateMailData(); void onEngineException(const int& exc); @@ -65,13 +67,18 @@ void setPreferences(const QStringList &names); void error(); private: - bool setupLocalization(); + void setupLocalization(); void setupUi(); void updateMailRowsVisibility(const int visibleCount); + void addNoMailsLabelToLayout(); + void removeNoMailsLabelFromLayout(); + void addEmailRowsToLayout(); + void removeEmailRowsFromLayout(); + void updateLayout(const int visibleCount); void toggleExpansionState(); protected: - void updateMailRowsList(const int mailCount); + void createMailRowsList(); private: NmHsWidgetEmailEngine* mEngine; @@ -83,8 +90,8 @@ QTranslator *mTranslator; HbFrameDrawer* mBackgroundFrameDrawer; bool mIsExpanded; - bool mStaticWidget; NmHsWidgetDateTimeObserver* mDateObserver; + HbLabel *mNoMailsLabel; public: friend class TestNmHsWidget; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/inc/nmhswidgetconsts.h --- a/emailuis/nmhswidget/inc/nmhswidgetconsts.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/inc/nmhswidgetconsts.h Thu Jun 24 14:32:18 2010 +0300 @@ -23,7 +23,7 @@ *************************************************/ //Maximum amount of envelopes that can be provided to client in getData function //This is also the amount of envelopes that is kept in mData all the time -const int KMaxNumberOfEnvelopesProvided = 2; +const int KMaxNumberOfEnvelopesProvided = 3; //Maximum value for unread count const int KMaxUnreadCount = 999; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/inc/nmhswidgetemailrow.h --- a/emailuis/nmhswidget/inc/nmhswidgetemailrow.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/inc/nmhswidgetemailrow.h Thu Jun 24 14:32:18 2010 +0300 @@ -26,6 +26,7 @@ //FORWARD DECLARATIONS: class HbLabel; +class HbFrameItem; class NmHsWidgetEmailRow : public HbWidget { @@ -35,9 +36,7 @@ NmHsWidgetEmailRow(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0); ~NmHsWidgetEmailRow(); NmId messageId(); - bool loadDocML(); - void setFontsSize( bool read ); - void setFontsColor( bool pressed ); + bool setupUI(); public slots: void updateMailData( const NmMessageEnvelope& envelope ); @@ -49,6 +48,11 @@ private: void setIconsToWidget( const NmMessageEnvelope& envelope ); void hideIcons(); + bool loadDocML(); + bool setupGraphics(); + void setFontsSize( bool read ); + void setHighlighedFontsColor( bool pressed ); + void showHighlight( bool pressed ); protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); @@ -65,6 +69,7 @@ QDateTime mMessageSentTime; QList mStatusIcons; NmMessageEnvelope mEnvelope; + HbFrameItem* mBackgroundLayoutItem; }; diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/inc/nmhswidgettitlerow.h --- a/emailuis/nmhswidget/inc/nmhswidgettitlerow.h Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/inc/nmhswidgettitlerow.h Thu Jun 24 14:32:18 2010 +0300 @@ -23,6 +23,7 @@ //FORWARD DECLARATIONS: class HbLabel; class HbPushButton; +class HbFrameItem; class NmHsWidgetTitleRow : public HbWidget { @@ -31,15 +32,17 @@ public: NmHsWidgetTitleRow(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0); ~NmHsWidgetTitleRow(); - bool loadDocML(); - + QPainterPath shape() const; + bool setupUI(); void setAccountIcon(const QString& accountIconName ); void setExpandCollapseIcon(const bool& expand); - void setFontsColor( bool pressed ); private: - + bool loadDocML(); + bool setupGraphics(); void updateData(); + void setHighlighedFontsColor( bool pressed ); + void showHighlight( bool pressed ); public slots: void updateAccountName(const QString& accountName ); @@ -61,6 +64,7 @@ HbPushButton *mCollapseExpIconLabel; QString mAccountName; int mUnreadCount; + HbFrameItem* mBackgroundLayoutItem; }; #endif // NMHSWIDGETTITLEROW_H_ diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/src/nmhswidget.cpp --- a/emailuis/nmhswidget/src/nmhswidget.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/src/nmhswidget.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -20,6 +20,7 @@ #include #include #include +#include #include "nmcommon.h" #include "nmhswidget.h" #include "nmhswidgetemailengine.h" @@ -40,15 +41,15 @@ mTranslator(0), mBackgroundFrameDrawer(0), mIsExpanded(false), - mStaticWidget(true), - mDateObserver(0) + mDateObserver(0), + mNoMailsLabel(0) { NM_FUNCTION; } /*! - Destructor -*/ + Destructor + */ NmHsWidget::~NmHsWidget() { NM_FUNCTION; @@ -67,134 +68,163 @@ } /*! - \fn void NmHsWidget::onShow() + \fn QPainterPath NmHsWidget::shape() - called by home screen fw when widget gets visible -*/ + Called by home screen fw to check widget boundaries, needed to draw + outside widget boundingRect. + /return QPainterPath path describing actual boundaries of widget + including child items + */ +QPainterPath NmHsWidget::shape() const +{ + NM_FUNCTION; + + QPainterPath path; + path.setFillRule(Qt::WindingFill); + + path.addRect(this->rect()); + if (mTitleRow){ + path.addPath(mTitleRow->shape()); + } + return path.simplified(); +} + +/*! + \fn void NmHsWidget::onShow() + + called by home screen fw when widget gets visible + */ void NmHsWidget::onShow() { NM_FUNCTION; - if (mEngine) - { + if (mEngine) { mEngine->activate(); - } -} - -/*! - \fn void NmHsWidget::onHide() - - called by home screen fw when widget gets hidden -*/ -void NmHsWidget::onHide() -{ - NM_FUNCTION; - if (mEngine) - { - mEngine->suspend(); - } + } } /*! - Initializes Localization. - /post mTranslator constructed & localization file loaded - returns false in failure, otherwise true -*/ -bool NmHsWidget::setupLocalization() + \fn void NmHsWidget::onHide() + + called by home screen fw when widget gets hidden + */ +void NmHsWidget::onHide() { NM_FUNCTION; - - //Use correct localisation - bool ret(false); - mTranslator = new QTranslator(); - QString lang = QLocale::system().name(); - ret = mTranslator->load(KNmHsWidgetLocFileName + lang, KNmHsWidgetLocLocation); - QCoreApplication::installTranslator(mTranslator); - - return ret; + if (mEngine) { + mEngine->suspend(); + } } /*! - Initializes UI. Everything that is not done in docml files should be here. - return true if ok, in error false. -*/ + Initializes Localization. + /post mTranslator constructed & localization file loaded + */ +void NmHsWidget::setupLocalization() +{ + NM_FUNCTION; + + //Use correct localisation + mTranslator = new QTranslator(); + QString lang = QLocale::system().name(); + mTranslator->load(KNmHsWidgetLocFileName + lang, KNmHsWidgetLocLocation); + QCoreApplication::installTranslator(mTranslator); +} + +/*! + Initializes UI. Everything that is not done in docml files should be here. + return true if ok, in error false. + */ void NmHsWidget::setupUi() { NM_FUNCTION; - - setContentsMargins( KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin, - KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin); - + + setContentsMargins(KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin, + KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin); + //Setup layout mRowLayout = new QGraphicsLinearLayout(Qt::Vertical); mRowLayout->setContentsMargins(KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin, - KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin); + KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin); mRowLayout->setSpacing(KNmHsWidgetContentsMargin); setLayout(mRowLayout); - - //background - mBackgroundFrameDrawer = new HbFrameDrawer( KNmHsWidgetBackgroundImage, HbFrameDrawer::NinePieces ); - HbFrameItem* backgroundLayoutItem = new HbFrameItem( mBackgroundFrameDrawer ); - //set to NULL to indicate that ownership transferred - mBackgroundFrameDrawer = NULL; - setBackgroundItem( backgroundLayoutItem ); + + //background + mBackgroundFrameDrawer = new HbFrameDrawer(KNmHsWidgetBackgroundImage, + HbFrameDrawer::NinePieces); + HbFrameItem* backgroundLayoutItem = new HbFrameItem(mBackgroundFrameDrawer); + //set to NULL to indicate that ownership transferred + mBackgroundFrameDrawer = NULL; + setBackgroundItem(backgroundLayoutItem); + + //Create NoMails Label. + mNoMailsLabel = new HbLabel(this); + mNoMailsLabel->setPlainText(hbTrId("txt_mail_widget_info_no_messages")); + HbFontSpec fontSpec(HbFontSpec::Secondary); + HbStyle style; + qreal size; + bool found = style.parameter(QString("hb-param-text-height-tiny"), size); + if (found) { + fontSpec.setTextHeight(size); + } + mNoMailsLabel->setFontSpec(fontSpec); + QColor newFontColor; + newFontColor = HbColorScheme::color("qtc_hs_list_item_content_normal"); + mNoMailsLabel->setTextColor(newFontColor); + mNoMailsLabel->setAlignment(Qt::AlignCenter); + mNoMailsLabel->setVisible(false); + } /*! - Initializes the widget. - - called by home screen fw when widget is added to home screen -*/ + Initializes the widget. + + called by home screen fw when widget is added to home screen + */ void NmHsWidget::onInitialize() { NM_FUNCTION; - - QT_TRY{ + + QT_TRY { setupUi(); - //emit error if localization fails - if(!setupLocalization()){ + setupLocalization(); + + //Engine construction is 2 phased. + mEngine = new NmHsWidgetEmailEngine(mAccountId); + //Client must connect to exception signals before calling the initialize function + //because we don't want to miss any signals. + connect(mEngine, SIGNAL( exceptionOccured(const int&) ), this, + SLOT( onEngineException(const int&) )); + if (!mEngine->initialize()) { + //engine construction failed. Give up. emit error(); return; } - - //Engine construction is 2 phased. - mEngine = new NmHsWidgetEmailEngine( mAccountId ); - //Client must connect to exception signals before calling the initialize function - //because we don't want to miss any signals. - connect(mEngine, SIGNAL( exceptionOccured(const int&) ) - ,this, SLOT( onEngineException(const int&) ) ); - if(!mEngine->initialize()) - { - //engine construction failed. Give up. - emit error(); - return; - } //construct and load docml for title row - mTitleRow = new NmHsWidgetTitleRow(); - if( !mTitleRow->loadDocML()){ + mTitleRow = new NmHsWidgetTitleRow(this); + if (!mTitleRow->setupUI()) { //if docml loading fails no point to proceed - //but memoryleak must be prevented - delete mTitleRow; - mTitleRow = NULL; emit error(); return; } mRowLayout->addItem(mTitleRow); mTitleRow->updateAccountName(mEngine->accountName()); - - //create observer for date/time change events - mDateObserver = new NmHsWidgetDateTimeObserver(); - + + //create observer for date/time change events + mDateObserver = new NmHsWidgetDateTimeObserver(); + + //Crete MailRows and associated connections + createMailRowsList(); + updateMailData(); mTitleRow->updateUnreadCount(mEngine->unreadCount()); mTitleRow->setAccountIcon(mAccountIconName); mTitleRow->setExpandCollapseIcon(mIsExpanded); - + //Get signals about changes in mail data - connect(mEngine, SIGNAL( mailDataChanged() ) - ,this, SLOT( updateMailData() ) ); - + connect(mEngine, SIGNAL( mailDataChanged() ), this, SLOT( updateMailData() )); + //Get Signals about changes in unread count connect(mEngine, SIGNAL( unreadCountChanged(const int&) ) ,mTitleRow, SLOT( updateUnreadCount(const int&) ) ); @@ -209,76 +239,58 @@ connect(mTitleRow, SIGNAL( expandCollapseButtonPressed() ) ,this, SLOT( handleExpandCollapseEvent() ) ); - //resize here so homescreen will place widget correctly on screen - setPreferredSize( mRowLayout->preferredSize() ); - if (parentWidget()) { - //to place widget properly after adding to homescreen - parentWidget()->resize(preferredSize()); - } } - QT_CATCH(...){ + QT_CATCH(...) { emit error(); } } -/*! - Uninitializes the widget. - - called by home screen fw when widget is removed from home screen -*/ -void NmHsWidget::onUninitialize() -{ - NM_FUNCTION; -} /*! - updateMailData slot -*/ + updateMailData slot + */ void NmHsWidget::updateMailData() { NM_FUNCTION; - + QList envelopes; int count = 0; if (mIsExpanded) { count = mEngine->getEnvelopes(envelopes, KMaxNumberOfMailsShown); - } + } - updateMailRowsList(count); - - for(int i=0; iupdateMailData( envelopes[i] ); - } + updateLayout(count); + //count is safe for envelopes and mMailRows + for (int i = 0; i < count; i++) { + mMailRows.at(i)->updateMailData(envelopes.at(i)); + } } /*! - Sets monitored account id from given string - Needed for home screen framework which supports only QString type properties -*/ + Sets monitored account id from given string + Needed for home screen framework which supports only QString type properties + */ void NmHsWidget::setAccountId(const QString &text) { NM_FUNCTION; - + bool ok; quint64 id = text.toULongLong(&ok); - if (!ok) - { - NM_ERROR(1,"NmHsWidget::setAccountId: invalid account ID data, signal finished()!!!"); + if (!ok) { + NM_ERROR(1, "NmHsWidget::setAccountId: invalid account ID data, signal finished()!!!"); //No valid account id so give up emit finished(); - } - else - { - mAccountId.setId(id); - } + return; + } + + mAccountId.setId(id); } /*! - Returns monitored account id as a string - Needed for home screen framework which supports only QString type properties -*/ + Returns monitored account id as a string + Needed for home screen framework which supports only QString type properties + */ QString NmHsWidget::accountId() const { NM_FUNCTION; @@ -286,8 +298,8 @@ } /*! - Sets monitored account icon name from given string -*/ + Sets monitored account icon name from given string + */ void NmHsWidget::setAccountIconName(const QString &text) { NM_FUNCTION; @@ -295,8 +307,8 @@ } /*! - Returns monitored account icon name -*/ + Returns monitored account icon name + */ QString NmHsWidget::accountIconName() const { NM_FUNCTION; @@ -304,8 +316,8 @@ } /*! - Slot to handle expand/collapse trigger event -*/ + Slot to handle expand/collapse trigger event + */ void NmHsWidget::handleExpandCollapseEvent() { NM_FUNCTION; @@ -313,153 +325,212 @@ } /*! - Sets widget expand/collapse state - /post widget expansion state is changed -*/ + Sets widget expand/collapse state + /post widget expansion state is changed + */ void NmHsWidget::toggleExpansionState() { NM_FUNCTION; mIsExpanded = !mIsExpanded; - + //save new state to home screen QStringList propertiesList; propertiesList.append("widgetState"); emit setPreferences(propertiesList); - + //handle state change drawing updateMailData(); - + mTitleRow->setExpandCollapseIcon(mIsExpanded); } /*! - Sets expand/collapse state from given string (needed by homescreen) -*/ + Sets expand/collapse state from given string (needed by homescreen) + */ void NmHsWidget::setWidgetStateProperty(QString value) { NM_FUNCTION; - if (value == KNmHsWidgetStateCollapsed) - { + if (value == KNmHsWidgetStateCollapsed) { mIsExpanded = false; + } + else { + mIsExpanded = true; + } +} + +/*! + Returns widget expand/collapse state as string (needed by homescreen) + */ +QString NmHsWidget::widgetStateProperty() +{ + NM_FUNCTION; + if (mIsExpanded) { + return KNmHsWidgetStateExpanded; + } + else { + return KNmHsWidgetStateCollapsed; + } +} + +/*! + Updates mMailRows list to include KMaxNumberOfMailsShown mail row widgets + /post mMailRows contains KMaxNumberOfMailsShown mailRows + */ +void NmHsWidget::createMailRowsList() +{ + NM_FUNCTION; + + //make sure that there are as many email rows as needed + while (mMailRows.count() < KMaxNumberOfMailsShown) { + NmHsWidgetEmailRow *row = new NmHsWidgetEmailRow(this); + if (!row->setupUI()) { + NM_ERROR(1, "NmHsWidget::createMailRowsList row->setUpUI() fails"); + //if setupUI fails no point to proceed + emit error(); + return; } - else - { - mIsExpanded = true; - } + connect(row, SIGNAL(mailViewerLaunchTriggered(const NmId&)), mEngine, + SLOT(launchMailAppMailViewer(const NmId&))); + connect(mDateObserver, SIGNAL(dateTimeChanged()), row, SLOT(updateDateTime())); + mMailRows.append(row); + } + } /*! - Returns widget expand/collapse state as string (needed by homescreen) -*/ -QString NmHsWidget::widgetStateProperty() + Updates the Layout to contain the right items + /param mailCount defines how many emails is to be shown + /post If widget is collapsed, the layout contains only titleRow widget. + If widget is expanded and mailCount is 0 layout will contain + titlerow & noMailsLabel. + If widget is expanded and mailCount is greter + than zero, layout will contain titlerow and KMaxNumberOfMailsShown times + emailrow(s) + */ +void NmHsWidget::updateLayout(const int mailCount) { NM_FUNCTION; - if (mIsExpanded) - { - return KNmHsWidgetStateExpanded; + if (mIsExpanded) { + if (mailCount == 0) { + addNoMailsLabelToLayout(); + removeEmailRowsFromLayout(); + } + else { + removeNoMailsLabelFromLayout(); + addEmailRowsToLayout(); } - else + } + else { + removeNoMailsLabelFromLayout(); + removeEmailRowsFromLayout(); + } + + //resize the widget to new layout size + setPreferredSize(mRowLayout->preferredSize()); + + updateMailRowsVisibility(mailCount); +} + +/*! + Updates mNoMailsLabel visibility based on widget state + /param mailCount defines how many mail rows is needed + /post if mail count is 0 and mIsExpanded equals true, then + the mNoMailLabel is added to the mRowLayout. + */ +void NmHsWidget::addNoMailsLabelToLayout() +{ + NM_FUNCTION; + //Use sizes defined for titlerow and mailrow docml to indentify the correct size + //for the mNoMailslabel + if (mNoMailsLabel->isVisible() || mMailRows.isEmpty()) { + return; + } + QSizeF mailLabelSize(mTitleRow->maximumWidth(), KMaxNumberOfMailsShown + * mMailRows.first()->maximumHeight()); + mNoMailsLabel->setPreferredSize(mailLabelSize); + mNoMailsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + //Add mNoMailsLabel to layout if not yet there and show it + mRowLayout->addItem(mNoMailsLabel); + //resize the widget to new layout size + mNoMailsLabel->show(); +} + +/*! + removeNoMailsLabelFromLayout removes mNoMailsLabel from the layout + /post mNoMailsLabel is not in mRowLayout + */ +void NmHsWidget::removeNoMailsLabelFromLayout() +{ + NM_FUNCTION; + //remove mNoMailsLabel from Layout and hide it + mRowLayout->removeItem(mNoMailsLabel); + mNoMailsLabel->hide(); +} + +/*! + addEmailRowsToLayout adds every emailrow to the layout + /post all elements in mMailRows are added to mRowLayout + */ +void NmHsWidget::addEmailRowsToLayout() +{ + NM_FUNCTION; + foreach(NmHsWidgetEmailRow *row, mMailRows) { - return KNmHsWidgetStateCollapsed; + mRowLayout->addItem(row); } } /*! - Updates mMailRows list to include correct amount of mail row widgets - /param mailCount defines how many mail rows is needed - /post mMailRows list includes NmHsWidgetEmailRow for each mail item -*/ -void NmHsWidget::updateMailRowsList(const int mailCount) + removeEmailRowsFromLayout removes every emailrow from the layout + /post none of the elements in mMailRows are in mRowLayout + */ +void NmHsWidget::removeEmailRowsFromLayout() { NM_FUNCTION; - - int neededRowsCount = mailCount; - //force size when static and expanded - if (mStaticWidget && mIsExpanded) - { - neededRowsCount = KMaxNumberOfMailsShown; - } - - while (mMailRows.count() != neededRowsCount) + foreach(NmHsWidgetEmailRow *row, mMailRows) { - //more mails to show than rows - if (mMailRows.count() < neededRowsCount) - { - NmHsWidgetEmailRow *row = new NmHsWidgetEmailRow(); - if( !row->loadDocML()){ - NM_ERROR(1,"NmHsWidget::updateMailRowsList row->loadDocML() fails"); - //if docml loading fails no point to proceed - //but memoryleak must be prevented - delete row; - row = NULL; - emit error(); - return; - } - connect(row, SIGNAL(mailViewerLaunchTriggered(const NmId&)) - ,mEngine, SLOT(launchMailAppMailViewer(const NmId&))); - connect( mDateObserver, SIGNAL(dateTimeChanged()) - ,row, SLOT(updateDateTime()) ); - mMailRows.append(row); - mRowLayout->addItem(row); - } - //too many rows - else if (mMailRows.count() > neededRowsCount) - { - mRowLayout->removeItem(mMailRows.last()); - delete mMailRows.takeLast(); - } - } - __ASSERT_ALWAYS( mMailRows.count() == neededRowsCount, User::Panic(_L("Invalid"), 500) ); - - //resize the widget to new layout size - setPreferredSize( mRowLayout->preferredSize() ); - - if (mStaticWidget) - { - this->updateMailRowsVisibility(mailCount); + mRowLayout->removeItem(row); } } /*! - Updates mail row visibilities in static widget - /param visibleCount defines how many items do have mail data - /post all row items having mail data are visible, other rows are hidden -*/ + Updates mail row visibilities in static widget + /param visibleCount defines how many items do have mail data + /post all row items having mail data are visible, other rows are hidden + */ void NmHsWidget::updateMailRowsVisibility(const int visibleCount) { NM_FUNCTION; - + // set visible as many rows as requested by visibleCount param bool isVisible; - for (int i=0; i < mMailRows.count(); i++) - { + + for (int i = 0; i < mMailRows.count(); i++) { isVisible = false; - if ((mIsExpanded) && (i < visibleCount)) - { + if ((mIsExpanded) && (i < visibleCount)) { isVisible = true; - } + } mMailRows.at(i)->setVisible(isVisible); - } + } } /*! - onEngineException (NmHsWidgetEmailEngineExceptionCode exc) - signals widget to be finalized - /param exc exception type -*/ + onEngineException (NmHsWidgetEmailEngineExceptionCode exc) + signals widget to be finalized + /param exc exception type + */ void NmHsWidget::onEngineException(const int& exc) - { +{ NM_FUNCTION; - switch (exc) - { + switch (exc) { case (NmEngineExcAccountDeleted): - emit finished(); //succesful ending - break; + emit finished(); //succesful ending + break; case (NmEngineExcFailure): - emit error(); //failure - break; - default: - break; - } + emit error(); //failure + break; + default: + break; } +} diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/src/nmhswidgetdatetimeobserver_p.cpp --- a/emailuis/nmhswidget/src/nmhswidgetdatetimeobserver_p.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/src/nmhswidgetdatetimeobserver_p.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -31,8 +31,12 @@ { NM_FUNCTION; TCallBack callback( LocaleChangeCallback, this ); - //TODO: Handle leave properly - TRAP_IGNORE(iLocaleNotifier = CEnvironmentChangeNotifier::NewL( CActive::EPriorityStandard, callback )); + + //CTC skipped as last else of macro QT_TRAP_THROWING cannot be tested (panics on purpose) +#pragma CTC SKIP + QT_TRAP_THROWING(iLocaleNotifier = CEnvironmentChangeNotifier::NewL( CActive::EPriorityStandard, callback )); +#pragma CTC ENDSKIP + iLocaleNotifier->Start(); } diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/src/nmhswidgetemailengine.cpp --- a/emailuis/nmhswidget/src/nmhswidgetemailengine.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/src/nmhswidgetemailengine.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -180,7 +180,7 @@ list.clear(); //Reset the parameter list to avoid side effects int i = 0; for (; i < mEnvelopeList.count() && i < maxEnvelopeAmount; i++) { - NmMessageEnvelope env(*mEnvelopeList[i]); + NmMessageEnvelope env(*mEnvelopeList.at(i)); list.append(env); } return i; @@ -408,17 +408,26 @@ { NM_FUNCTION; - XQApplicationManager appManager; - XQAiwRequest* request = appManager.create( - XQI_EMAIL_INBOX_VIEW, XQOP_EMAIL_INBOX_VIEW, - false); - - if (request) { - QList list; - list.append(QVariant(mMailboxId.id())); - - request->setArguments(list); - request->send(); + QT_TRY{ + XQApplicationManager appManager; + XQAiwRequest* request = appManager.create( + XQI_EMAIL_INBOX_VIEW, XQOP_EMAIL_INBOX_VIEW, + false); + + if (request) { + QList list; + list.append(QVariant(mMailboxId.id())); + + request->setSynchronous(true); + request->setArguments(list); + request->send(); + delete request; + } + } + QT_CATCH(...){ + // no actions taken. + // try-catch mechanism added to avoid crashing widget, in case XQAiwRequest + // creation raise exception. } } @@ -431,18 +440,27 @@ { NM_FUNCTION; - XQApplicationManager appManager; - XQAiwRequest* request = appManager.create( - XQI_EMAIL_MESSAGE_VIEW, XQOP_EMAIL_MESSAGE_VIEW, - false); - - if (request) { - QList list; - list.append(QVariant(mMailboxId.id())); - list.append(QVariant(mFolderId.id())); - list.append(QVariant(messageId.id())); - - request->setArguments(list); - request->send(); + QT_TRY{ + XQApplicationManager appManager; + XQAiwRequest* request = appManager.create( + XQI_EMAIL_MESSAGE_VIEW, XQOP_EMAIL_MESSAGE_VIEW, + false); + + if (request) { + QList list; + list.append(QVariant(mMailboxId.id())); + list.append(QVariant(mFolderId.id())); + list.append(QVariant(messageId.id())); + + request->setSynchronous(true); + request->setArguments(list); + request->send(); + delete request; + } + } + QT_CATCH(...){ + // no actions taken. + // try-catch mechanism added to avoid crashing widget, in case XQAiwRequest + // creation raise exception. } } diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/src/nmhswidgetemailrow.cpp --- a/emailuis/nmhswidget/src/nmhswidgetemailrow.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/src/nmhswidgetemailrow.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -19,10 +19,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "nmicons.h" #include "nmcommon.h" #include "nmhswidgetemailrow.h" @@ -36,7 +36,8 @@ mTimeLabel(0), mNewMailIcon(0), mSeparatorIcon(0), - mMessageId(0) + mMessageId(0), + mBackgroundLayoutItem(0) { NM_FUNCTION; } @@ -59,17 +60,31 @@ } +/* + Setup email row ui + Must be called after constructor. + /return true if loading succeeded, otherwise false. False indicates that object is unusable. + */ +bool NmHsWidgetEmailRow::setupUI() + { + NM_FUNCTION; + + if(!loadDocML() || !setupGraphics()){ + return false; + } + return true; + } + + + /*! - Loads layout data and child items from docml file - Must be called after constructor. + Loads layout data and child items from docml file /return true if loading succeeded, otherwise false. False indicates that object is unusable. */ bool NmHsWidgetEmailRow::loadDocML() { NM_FUNCTION; - - HbFrameDrawer* backgroundFrameDrawer = 0; - HbFrameItem* backgroundLayoutItem = 0; + QT_TRY{ // Use document loader to load the contents HbDocumentLoader loader; @@ -120,28 +135,57 @@ } //Verify all mStatusIcons for (int i = 0; i < mStatusIcons.length(); i++) { - if (!mStatusIcons[i]) { + if (!mStatusIcons.at(i)) { return false; } } + + return true; + } + QT_CATCH(...){ + return false; + } +} + +/* + Setup graphics that cannot be loaded from docml. + /return true if loading succeeded, otherwise false. False indicates that object is unusable. + */ +bool NmHsWidgetEmailRow::setupGraphics() + { + NM_FUNCTION; + HbFrameDrawer* newMailIconFrameDrawer = 0; + HbFrameItem* newMailIconFrameItem = 0; + HbFrameDrawer* backgroundFrameDrawer = 0; + QT_TRY{ //separator icon HbIcon separatorIcon("qtg_graf_divider_h_thin"); mSeparatorIcon->setIcon(separatorIcon); //new email icon - backgroundFrameDrawer = new HbFrameDrawer("qtg_fr_list_new_item", + newMailIconFrameDrawer = new HbFrameDrawer("qtg_fr_list_new_item", HbFrameDrawer::ThreePiecesVertical); - backgroundLayoutItem = new HbFrameItem(backgroundFrameDrawer); - mNewMailIcon->setBackgroundItem(backgroundLayoutItem); - + newMailIconFrameItem = new HbFrameItem(newMailIconFrameDrawer); + mNewMailIcon->setBackgroundItem(newMailIconFrameItem); + //hide all the icons first to avoid blinking hideIcons(); + //pressed background + backgroundFrameDrawer = new HbFrameDrawer("qtg_fr_hsitems_pressed", HbFrameDrawer::NinePieces); + mBackgroundLayoutItem = new HbFrameItem( backgroundFrameDrawer ); + setBackgroundItem( mBackgroundLayoutItem ); + mBackgroundLayoutItem->hide(); + return true; } QT_CATCH(...){ - if(!backgroundLayoutItem && backgroundFrameDrawer){ + if(!newMailIconFrameItem && newMailIconFrameDrawer){ + delete newMailIconFrameDrawer; + newMailIconFrameDrawer = NULL; + } + if(!mBackgroundLayoutItem && backgroundFrameDrawer){ delete backgroundFrameDrawer; backgroundFrameDrawer = NULL; } @@ -183,7 +227,7 @@ //set fonts color and size setFontsSize(mEnvelope.isRead()); - setFontsColor(false); + setHighlighedFontsColor(false); } /*! @@ -216,7 +260,7 @@ { NM_FUNCTION; for (int i = 0; i < mStatusIcons.count(); i++) { - mStatusIcons[i]->hide(); + mStatusIcons.at(i)->hide(); } mNewMailIcon->hide(); } @@ -262,8 +306,8 @@ // Here we show icons added to the iconList in the order they have been added. for (int count = 0; count < iconList.count(); count++) { - mStatusIcons[count]->setIcon(iconList[count]); - mStatusIcons[count]->show(); + mStatusIcons.at(count)->setIcon(iconList.at(count)); + mStatusIcons.at(count)->show(); } } @@ -298,10 +342,11 @@ /*! sets fonts color. + /param bool pressed indicates if row is pressed down or not */ -void NmHsWidgetEmailRow::setFontsColor( bool pressed ) +void NmHsWidgetEmailRow::setHighlighedFontsColor( bool pressed ) { - NM_FUNCTION;; + NM_FUNCTION; QColor newFontColor; if(pressed){ @@ -319,6 +364,21 @@ mTimeLabel->setTextColor(newFontColor); } +/*! + change background highlight + /param bool show if true then shown, false hide +*/ +void NmHsWidgetEmailRow::showHighlight( bool show ) + { + NM_FUNCTION; + + if(show){ + mBackgroundLayoutItem->show(); + } + else{ + mBackgroundLayoutItem->hide(); + } + } /*! mousePressEvent(QGraphicsSceneMouseEvent *event) @@ -327,7 +387,8 @@ { NM_FUNCTION; Q_UNUSED(event); - setFontsColor(true); + setHighlighedFontsColor(true); + showHighlight(true); } /*! @@ -337,7 +398,8 @@ { NM_FUNCTION; Q_UNUSED(event); - setFontsColor(false); + setHighlighedFontsColor(false); + showHighlight(false); emit mailViewerLaunchTriggered(mMessageId); } @@ -349,7 +411,7 @@ NM_FUNCTION; QEvent::Type eventType = event->type(); if( eventType == HbEvent::ThemeChanged ){ - setFontsColor(false); + setHighlighedFontsColor(false); return true; } return HbWidget::event(event); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/src/nmhswidgettitlerow.cpp --- a/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include "nmicons.h" #include "nmhswidgettitlerow.h" #include "nmhswidgetconsts.h" @@ -34,7 +36,8 @@ mUnreadCountLabel(0), mCollapseExpIconLabel(0), mAccountName(), - mUnreadCount(0) + mUnreadCount(0), + mBackgroundLayoutItem(0) { NM_FUNCTION; } @@ -44,9 +47,46 @@ */ NmHsWidgetTitleRow::~NmHsWidgetTitleRow() { + NM_FUNCTION; +} + +/*! + \fn QPainterPath NmHsWidgetTitleRow::shape() + + Called by home screen fw to check widget boundaries, needed to draw + outside widget boundingRect. + /return QPainterPath path describing actual boundaries of widget + including child items + */ +QPainterPath NmHsWidgetTitleRow::shape() const +{ NM_FUNCTION; + + QPainterPath path; + path.setFillRule(Qt::WindingFill); + + path.addRect(this->geometry()); + if (mMailboxIcon){ + path.addRect(mMailboxIcon->geometry()); + } + return path.simplified(); } +/* + Setup email row ui + Must be called after constructor. + /return true if loading succeeded, otherwise false. False indicates that object is unusable. + */ +bool NmHsWidgetTitleRow::setupUI() + { + NM_FUNCTION; + + if(!loadDocML() || !setupGraphics()){ + return false; + } + return true; + } + /*! Loads layout data and child items from docml file. Must be called after constructor. /return true if loading succeeded, otherwise false. False indicates that object is unusable @@ -92,13 +132,10 @@ NM_ERROR(1,"NmHsWidgetTitleRow::loadDocML Fail @ icons & labels"); return false; } - - //Expand collapse button + + //Expand collapse button connect(mCollapseExpIconLabel, SIGNAL(clicked()), this, SIGNAL(expandCollapseButtonPressed())); - - //set fonts color - setFontsColor(false); - + return true; } QT_CATCH(...){ @@ -106,6 +143,39 @@ } } +/* + Setup graphics that cannot be loaded from docml. + /return true if loading succeeded, otherwise false. False indicates that object is unusable. + */ +bool NmHsWidgetTitleRow::setupGraphics() + { + NM_FUNCTION; + + HbFrameDrawer* backgroundFrameDrawer = 0; + QT_TRY{ + //pressed background + backgroundFrameDrawer = new HbFrameDrawer("qtg_fr_hsitems_pressed", HbFrameDrawer::NinePieces); + mBackgroundLayoutItem = new HbFrameItem( backgroundFrameDrawer ); + setBackgroundItem( mBackgroundLayoutItem ); + mBackgroundLayoutItem->hide(); + + //set fonts color + setHighlighedFontsColor(false); + + return true; + } + QT_CATCH(...){ + if(!mBackgroundLayoutItem && backgroundFrameDrawer){ + delete backgroundFrameDrawer; + backgroundFrameDrawer = NULL; + } + + return false; + } + + } + + /*! Slot for updating account name, calls updateData to update ui. */ @@ -173,9 +243,9 @@ /*! sets fonts color. - param bool pressed indicates if row is pressed down or not + /param bool pressed indicates if row is pressed down or not */ -void NmHsWidgetTitleRow::setFontsColor( bool pressed ) +void NmHsWidgetTitleRow::setHighlighedFontsColor( bool pressed ) { NM_FUNCTION; QColor newFontColor; @@ -191,6 +261,21 @@ mUnreadCountLabel->setTextColor(newFontColor); } +/*! + change background pressed state + /param bool show if true then shown, false hide +*/ +void NmHsWidgetTitleRow::showHighlight( bool show ) + { + NM_FUNCTION;; + + if(show){ + mBackgroundLayoutItem->show(); + } + else{ + mBackgroundLayoutItem->hide(); + } + } /*! mousePressEvent(QGraphicsSceneMouseEvent *event) @@ -198,8 +283,14 @@ void NmHsWidgetTitleRow::mousePressEvent(QGraphicsSceneMouseEvent *event) { NM_FUNCTION; - Q_UNUSED(event); - setFontsColor(true); + + //to avoid opening email account mistakenly when tabbing expand/collapse button + //we dont handle events that are on the top, down or right side of the button + if(event->pos().x() < mUnreadCountLabel->geometry().right()) + { + setHighlighedFontsColor(true); + showHighlight(true); + } } /*! @@ -208,9 +299,15 @@ void NmHsWidgetTitleRow::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { NM_FUNCTION; - Q_UNUSED(event); - setFontsColor(false); - emit mailboxLaunchTriggered(); + + //to avoid opening email account mistakenly when tabbing expand/collapse button + //we dont handle events that are on the top, down or right side of the button + if(event->pos().x() < mUnreadCountLabel->geometry().right()) + { + setHighlighedFontsColor(false); + showHighlight(false); + emit mailboxLaunchTriggered(); + } } /* @@ -221,7 +318,7 @@ NM_FUNCTION; QEvent::Type eventType = event->type(); if( eventType == HbEvent::ThemeChanged ){ - setFontsColor(false); + setHighlighedFontsColor(false); return true; } return HbWidget::event(event); diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmhswidget/translations/mailwidget.ts --- a/emailuis/nmhswidget/translations/mailwidget.ts Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmhswidget/translations/mailwidget.ts Thu Jun 24 14:32:18 2010 +0300 @@ -2,14 +2,24 @@ + + Layout ID parent (no children). Same text than in Mail client when mailbox is empty. Informs user that she does not have mail in the Inbox. + (No messages) + + txt_mail_widget_info_no_messages + Mail widget_04, Mail widget_P04, Mail widget_L04 + info + Ma + False + - New mail count in parenthesis after the Mail box name which is the title of the widget. Max number shown 999. + Layout ID parent (No children). New mail count in parenthesis after the Mail box name which is the title of the widget. Min number 1 and max number shown 999. Number or brackets are not shown at all if mailbox do not have any new mail. Example in Mail widget_L08. (%L1) - qtl_list_tiny + txt_mail_widget_list_l1 Mail Widget List - Mail Widget + Ma False diff -r 780f926bc26c -r f83bd4ae1fe3 emailuis/nmsettingui/src/nmmailboxsettingsmanager.cpp --- a/emailuis/nmsettingui/src/nmmailboxsettingsmanager.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/emailuis/nmsettingui/src/nmmailboxsettingsmanager.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -152,7 +152,7 @@ pluginInstance->disconnect(SIGNAL(mailboxPropertyChanged(const NmId &, QVariant, QVariant))); pluginInstance->disconnect(SIGNAL(goOnline(const NmId &))); pluginInstance->disconnect(SIGNAL(goOffline(const NmId &))); - pluginInstance->disconnect(SIGNAL(aboutToClose())); + pluginInstance->disconnect(this, SIGNAL(aboutToClose()), pluginInstance, SLOT(aboutToClose())); connect(pluginInstance, SIGNAL(mailboxListChanged(const NmId &, NmSettings::MailboxEventType)), this, SIGNAL(mailboxListChanged(const NmId &, NmSettings::MailboxEventType))); diff -r 780f926bc26c -r f83bd4ae1fe3 inc/emailshutdownconst.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/emailshutdownconst.h Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,79 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Constant definitions for Email shutdown +* +*/ + +#ifndef EMAILSHUTDOWNCONST_H +#define EMAILSHUTDOWNCONST_H + +#include // TUid +#include "emailshutdownconst.hrh" // KEmailShutdownUidAsTInt + + +// Publish & Subscribe category for Email shutdown events +const TUid KEmailShutdownPsCategory = { KEmailShutdownUidAsTInt }; + +// Size of one item in platform API UID list (in Publish & Subscribe +// key EEmailPsKeyPlatformApiAppsToClose) +const TInt KEmailPlatformApiUidItemSize = sizeof( TInt32 ); + +// Publish & Subscribe keys used in shutdown process +enum TEmailShutdownPsKeys + { + // Publish & Subscribe key used in communication between Shutter + // application and installation initiators + EEmailPsKeyInstallationStatus = 1, + + // Publish & Subscribe keys for Email shutdown events + EEmailPsKeyShutdownClients, + EEmailPsKeyShutdownPlugins, + EEmailPsKeyShutdownMsgStore, + + // Publish & Subscribe keys to register 3rd party applications to be closed + EEmailPsKeyPlatformApiAppsToCloseLength, + EEmailPsKeyPlatformApiAppsToClose + }; + +// Publish & Subscribe values to be used with key EEmailPsKeyInstallationStatus +enum TEmailShutdownPsInstallationValues + { + // Value to be set by installation initiators when installation is starting + EEmailPsValueInstallationStarting = 1, + // Value to be set by Shutter when all services are shutdown + EEmailPsValueInstallationOkToStart, + // Value to be set by installation initiators when installation is started + // after EEmailPsValueInstallationOkToStart event received + EEmailPsValueInstallationStarted, + // Value to be set by Starter when installation has finished + EEmailPsValueInstallationFinished + }; + +// Executable name of the process that implements the shutdown functionality +_LIT( KEmailShutdownHandlerExe, "emailservermonitor.exe" ); + +// Command line arguments that can be given to shutdown handler process when +// starting it + +// KEmailShutdownHandlerArgOnlyShutter should be used when starting the process +// just before starting installation (if it wasn't already running) +_LIT( KEmailShutdownHandlerArgOnlyShutter, "OnlyShutter" ); + +// KEmailShutdownHandlerArgRestart should be given when restarting +// the process after installation +_LIT( KEmailShutdownHandlerArgRestart, "RestartAfterInstallation" ); + + +#endif // EMAILSHUTDOWNCONST_H diff -r 780f926bc26c -r f83bd4ae1fe3 inc/emailshutdownconst.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/emailshutdownconst.hrh Thu Jun 24 14:32:18 2010 +0300 @@ -0,0 +1,31 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Constant definitions for Cmail shutdown +* +*/ + +#ifndef EMAILSHUTDOWNCONST_HRH +#define EMAILSHUTDOWNCONST_HRH + + +// Publish & Subscribe category for Cmail shutdown events, needs to be the +// same as UID of the process that implements the shutdown functionality +#define KEmailShutdownUidAsTInt 0x20025FAD + +// Executable name of the process that implements the shutdown functionality +#define KEmailShutdownProcessExeName emailservermonitor.exe + + +#endif // EMAILSHUTDOWNCONST_HRH diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp --- a/ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -33,7 +33,7 @@ // #include "IpsSosAOSettingsHandler.h" -const TInt KIpsSetDataHeadersOnly = -2; +// removed // // from ipsplugin @@ -368,10 +368,16 @@ void CIpsSosAOImapAgent::CancelAllAndDisconnectL() { FUNC_LOG; + // if we are already idle state, do nothing, + // completing in idle state might cause unvanted events to ui + if (iState == EStateIdle) + { + return; + } + iDoNotDisconnect = EFalse; iState = EStateCompleted; iFoldersArray.Reset(); - if ( IsActive() ) { Cancel(); diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/ipssosaoplugin/src/IpsSosAOPopAgent.cpp --- a/ipsservices/ipssosaoplugin/src/IpsSosAOPopAgent.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/ipssosaoplugin/src/IpsSosAOPopAgent.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -302,6 +302,13 @@ void CIpsSosAOPopAgent::CancelAllAndDisconnectL() { FUNC_LOG; + // if we are already idle state, do nothing + // completing in idle state might cause unvanted events to ui + if (iState == EStateIdle) + { + return; + } + iDoNotDisconnect = EFalse; iState = EStateCompleted; if ( IsActive() ) diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/ipssosplugin/inc/ipsplgcommon.h --- a/ipsservices/ipssosplugin/inc/ipsplgcommon.h Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/ipssosplugin/inc/ipsplgcommon.h Thu Jun 24 14:32:18 2010 +0300 @@ -35,7 +35,11 @@ const TUid KIpsPlgPropertyCatUid = { IPS_PROPERTY_CAT_UID }; const TInt KIpsPlgMaxPhoneIdLength = 50; - +// +const TInt KIpsSetDataHeadersOnly = -2; +const TInt KIpsSetDataFullBodyAndAttas = -1; +const TInt KIpsSetDataFullBodyOnly = -3; +// const TInt KContinueInterval = 3000000; // 3 sec static _LIT_SECURITY_POLICY_PASS( KAllowAllPolicy ); diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/ipssosplugin/inc/ipsplgimap4connectop.h --- a/ipsservices/ipssosplugin/inc/ipsplgimap4connectop.h Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/ipssosplugin/inc/ipsplgimap4connectop.h Thu Jun 24 14:32:18 2010 +0300 @@ -91,6 +91,17 @@ * Returns operation type */ TIpsOpType IpsOpType() const; + + // moved from private to public and changed to static + /** + * + * @param aInfo is filled correctly in this function + * @param aImap4Settings info is filled partly based on settings + */ + static void ConstructImapPartialFetchInfo( + TImImap4GetPartialMailInfo& aInfo, + const CImImap4Settings& aImap4Settings ); + // // HandleImapConnectionEvent() not used any more @@ -156,15 +167,7 @@ */ void SignalSyncCompleted( TInt aError ); - // - /** - * - * @param aInfo is filled corretcly in this function - * @param aImap4Settings info is filled partly based on settings - */ - void ConstructImapPartialFetchInfo( - TImImap4GetPartialMailInfo& aInfo, - const CImImap4Settings& aImap4Settings ); + // moved to public /** * GetImapSettingsLC() diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp --- a/ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -19,11 +19,7 @@ #include "emailtrace.h" #include "ipsplgheaders.h" -// -const TInt KIpsSetDataHeadersOnly = -2; -const TInt KIpsSetDataFullBodyAndAttas = -1; -const TInt KIpsSetDataFullBodyOnly = -3; -// +// removed // KIpsPlgIpsConnPanic removed @@ -488,12 +484,14 @@ } else { + // include html in body aInfo.iTotalSizeLimit = sizeLimit*1024; aInfo.iAttachmentSizeLimit = 0; aInfo.iMaxEmailSize = sizeLimit*1024; aInfo.iBodyTextSizeLimit = sizeLimit*1024; aInfo.iPartialMailOptions = EBodyAlternativeText; aInfo.iGetMailBodyParts = EGetImap4EmailBodyAlternativeText; + // } } diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp --- a/ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -578,15 +578,14 @@ accounts->GetImapAccountL( aMailboxId.Id(), imapAcc ); accounts->LoadImapSettingsL( imapAcc, *settings ); TImImap4GetPartialMailInfo info; -// - info.iPartialMailOptions = ENoSizeLimits; - //CIpsSetDataApi::ConstructImapPartialFetchInfo( info, *settings ); +// Get TImImap4GetPartialMailInfo based on settings + CIpsPlgImap4ConnectOp::ConstructImapPartialFetchInfo( info, *settings ); CleanupStack::PopAndDestroy( 2, settings ); - /* + if ( info.iTotalSizeLimit == KIpsSetDataHeadersOnly ) { return; - }*/ + } // TPckgBuf package(info); diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp --- a/ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -408,15 +408,14 @@ TMsvEmailEntry tEntry( cEntry->Entry() ); TBool isModified = ChangeTEntryFlagsL( tEntry, aMessage ); - + // if ( isModified ) { -// Function called sync in Qmail cEntry->ChangeL( tEntry ); -// } CleanupStack::PopAndDestroy( cEntry ); + // } // --------------------------------------------------------------------------- @@ -1509,24 +1508,21 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // -void CIpsPlgMsgMapper::SetAttachmentFlagL( const TMsvEmailEntry& aEntry, - TBool aHasAttachment ) +void CIpsPlgMsgMapper::SetAttachmentFlagL( const TMsvEmailEntry& /*aEntry*/, + TBool /*aHasAttachment*/ ) { FUNC_LOG; - CMsvEntry* cEntry = iSession.GetEntryL( aEntry.Id() ); + // commented out, causing freeze in message list + /*CMsvEntry* cEntry = iSession.GetEntryL( aEntry.Id() ); CleanupStack::PushL( cEntry ); // Only text/calendar part included as attachment TMsvEmailEntry entryToBeChanged( aEntry ); entryToBeChanged.SetAttachment( aHasAttachment ); -// Function called sync in Qmail cEntry->ChangeL( entryToBeChanged ); - CleanupStack::PopAndDestroy( cEntry ); + CleanupStack::PopAndDestroy( cEntry );*/ // } -// - -// // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- void CIpsPlgMsgMapper::GetCharsetParameterL( diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/ipssosplugin/src/ipsplgpop3plugin.cpp --- a/ipsservices/ipssosplugin/src/ipsplgpop3plugin.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/ipssosplugin/src/ipsplgpop3plugin.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -19,6 +19,7 @@ #include "emailtrace.h" #include "ipsplgheaders.h" +// removed // --------------------------------------------------------------------------- // CIpsPlgPop3Plugin::CIpsPlgPop3Plugin @@ -164,12 +165,11 @@ TInt populationLimit( settings->PopulationLimit() ); CleanupStack::PopAndDestroy( 2, settings ); // >>> settings, accounts TBool forcePopulate( EFalse ); -// - /* +// back to use if( populationLimit != KIpsSetDataHeadersOnly ) { forcePopulate = ETrue; - }*/ + } // CIpsPlgBaseOperation* op = CIpsPlgPop3ConnectOp::NewL( diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/nmipssettings/inc/nmipssettingshelper.h --- a/ipsservices/nmipssettings/inc/nmipssettingshelper.h Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/nmipssettings/inc/nmipssettingshelper.h Thu Jun 24 14:32:18 2010 +0300 @@ -104,7 +104,6 @@ void incomingMailServerTextChange(const QString &text); void saveOutgoingMailServer(); void outgoingMailServerTextChange(const QString &text); - void handleModelDataChange(QModelIndex startIn, QModelIndex endIn); void incomingPortChange(int index); void incomingSecureConnectionItemChange(int index); void folderPathChange(int index); diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/nmipssettings/src/nmipssettingshelper.cpp --- a/ipsservices/nmipssettings/src/nmipssettingshelper.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/nmipssettings/src/nmipssettingshelper.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -312,9 +312,9 @@ // refreshPeriodModified method needs to be updated also. QStringList refreshMailItems; refreshMailItems << hbTrId("txt_mailips_setlabel_val_keep_uptodate") - << hbTrId("txt_mailips_setlabel_val_every_15_minutes") - << hbTrId("txt_mailips_setlabel_val_every_1_hour") - << hbTrId("txt_mailips_setlabel_val_every_4_hours"); + << HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_every_15_minutes")) + << HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_every_1_hour")) + << HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_every_4_hours")); formItemData->setContentWidgetData("items", refreshMailItems); mDataForm.addConnection( formItemData, SIGNAL(valueChanged(QPersistentModelIndex, QVariant)), @@ -816,37 +816,6 @@ mCurrentLineEditChanged = true; } -void NmIpsSettingsHelper::handleModelDataChange(QModelIndex startIn, QModelIndex endIn) -{ - Q_UNUSED(endIn); - HbDataFormModelItem *item = mDataFormModel.itemFromIndex(startIn); - - if(item == mContentItems.value(IpsServices::IncomingSecureSockets)) { - QVariant data = item->contentWidgetData("selected"); - incomingSecureConnectionItemChange(data.toInt()); - } - else if(item == mContentItems.value(IpsServices::IncomingPort)) { - QVariant data = item->contentWidgetData("selected"); - incomingPortChange(data.toInt()); - } - else if(item == mContentItems.value(IpsServices::OutgoingSecureSockets)) { - QVariant data = item->contentWidgetData("selected"); - outgoingSecureConnectionItemChange(data.toInt()); - } - else if(item == mContentItems.value(IpsServices::OutgoingPort)) { - QVariant data = item->contentWidgetData("selected"); - outgoingPortChange(data.toInt()); - } - else if(item == mContentItems.value(IpsServices::SMTPAuthentication)) { - QVariant data = item->contentWidgetData("selected"); - outgoingAuthenticationChange(data.toInt()); - } - else if(item == mContentItems.value(IpsServices::FolderPath)) { - QVariant data = item->contentWidgetData("selected"); - folderPathChange(data.toInt()); - } -} - /*! Saves the incoming port value into database if user has changed the value. If the user wish to define the port, a input dialog is shown. @@ -856,15 +825,15 @@ { int previousindex = getCorrectIncomingPortRadioButtonIndex(); - if (previousindex != index ) { - if (index == IpsServices::NmIpsSettingsDefault) { + if (index == IpsServices::NmIpsSettingsDefault) { + if (index != previousindex) { emit goOffline(mSettingsManager.mailboxId()); mEmitOnline = true; int port = mSettingsManager.determineDefaultIncomingPort(); - mSettingsManager.writeSetting(IpsServices::IncomingPort, port); - } else if (index == IpsServices::NmIpsSettingsUserDefined) { - showIncomingPortInputDialog(); - } + mSettingsManager.writeSetting(IpsServices::IncomingPort, port); + } + } else if (index == IpsServices::NmIpsSettingsUserDefined) { + showIncomingPortInputDialog(); } } @@ -1030,14 +999,14 @@ void NmIpsSettingsHelper::folderPathChange(int index) { int previousindex = getCorrectFolderPathRadioButtonIndex(); - - if (previousindex != index ) { - if (index == IpsServices::NmIpsSettingsDefault) { + + if (index == IpsServices::NmIpsSettingsDefault) { + if (index != previousindex ) { // Empty string sets the folder path to default. - mSettingsManager.writeSetting(IpsServices::FolderPath, ""); - } else if (index == IpsServices::NmIpsSettingsUserDefined) { - showFolderPathInputDialog(); + mSettingsManager.writeSetting(IpsServices::FolderPath, ""); } + } else if (index == IpsServices::NmIpsSettingsUserDefined) { + showFolderPathInputDialog(); } } @@ -1136,10 +1105,10 @@ void NmIpsSettingsHelper::refreshPeriodModified(QPersistentModelIndex, QVariant value) { QMap conversionTable; - conversionTable[hbTrId("txt_mailips_setlabel_val_keep_uptodate")] = 5; - conversionTable[hbTrId("txt_mailips_setlabel_val_every_15_minutes")] = 15; - conversionTable[hbTrId("txt_mailips_setlabel_val_every_1_hour")] = 60; - conversionTable[hbTrId("txt_mailips_setlabel_val_every_4_hours")] = 240; + conversionTable[HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_keep_uptodate"))] = 5; + conversionTable[HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_every_15_minutes"))] = 15; + conversionTable[HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_every_1_hour"))] = 60; + conversionTable[HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_every_4_hours"))] = 240; int selectedValue(conversionTable.value(value.toString())); QVariant previouslySelectedValue; @@ -1314,15 +1283,15 @@ { int previousindex = getCorrectOutgoingPortRadioButtonIndex(); - if (previousindex != index) { - if (index == IpsServices::NmIpsSettingsDefault) { + if (index == IpsServices::NmIpsSettingsDefault) { + if (index != previousindex) { emit goOffline(mSettingsManager.mailboxId()); mEmitOnline = true; int port = mSettingsManager.determineDefaultOutgoingPort(); - mSettingsManager.writeSetting(IpsServices::OutgoingPort, port); - } else if (index == IpsServices::NmIpsSettingsUserDefined) { - showOutgoingPortInputDialog(); + mSettingsManager.writeSetting(IpsServices::OutgoingPort, port); } + } else if (index == IpsServices::NmIpsSettingsUserDefined) { + showOutgoingPortInputDialog(); } } diff -r 780f926bc26c -r f83bd4ae1fe3 ipsservices/nmipssettings/src/nmipssettingsplugin.cpp --- a/ipsservices/nmipssettings/src/nmipssettingsplugin.cpp Fri Jun 11 16:42:02 2010 +0300 +++ b/ipsservices/nmipssettings/src/nmipssettingsplugin.cpp Thu Jun 24 14:32:18 2010 +0300 @@ -99,13 +99,6 @@ bool NmIpsSettingsPlugin::populateModel(HbDataFormModel &model, HbDataForm &form, const NmId &mailboxId) { - // Turns AlwaysOnline OFF - setAlwaysOnlineState(EServerAPIEmailTurnOff, mailboxId); - - // Store model and form pointers. - mModel = &model; - mForm = &form; - // populateModel is called each time when a new settings view is created and this // plugin is destructed only after the mail settings is exited, so // SettingsManager and SettingsHelper needs to be deleted. @@ -119,6 +112,13 @@ // This plugin is only used when the mailbox is a IMAP or POP3 account. // Settings manager object is valid if the mailboxId is IMAP or POP3 account. if (mSettingsManager) { + // Turns AlwaysOnline OFF + setAlwaysOnlineState(EServerAPIEmailTurnOff, mailboxId); + + // Store model and form pointers. + mModel = &model; + mForm = &form; + // Create settings helper. mSettingsHelper = new NmIpsSettingsHelper(*mSettingsManager, form, model); @@ -134,9 +134,6 @@ connect(mSettingsHelper, SIGNAL(createUserDefinedMode()), this, SLOT(createUserDefinedMode())); - - connect(mModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), - mSettingsHelper, SLOT(handleModelDataChange(QModelIndex, QModelIndex))); // Get the value if some ui items need to be hidden. QVariant data; @@ -452,6 +449,8 @@ mSettingsHelper->getCorrectIncomingSecureRadioButtonIndex(); incomingSecureConnectionItem->setContentWidgetData(QString("selected"), incomingSecureConnectionItemIndex); + mForm->addConnection(incomingSecureConnectionItem, SIGNAL(itemSelected(int)), + mSettingsHelper, SLOT(incomingSecureConnectionItemChange(int))); if (mHiddenItem) { incomingSecureConnectionItem->setEnabled(false); } @@ -468,6 +467,8 @@ incomingPortItem->setContentWidgetData(QString("items"), incomingPortItems); int incomingPortItemIndex = mSettingsHelper->getCorrectIncomingPortRadioButtonIndex(); incomingPortItem->setContentWidgetData(QString("selected"), incomingPortItemIndex); + mForm->addConnection(incomingPortItem, SIGNAL(itemSelected(int)), + mSettingsHelper, SLOT(incomingPortChange(int))); if (mHiddenItem) { incomingPortItem->setEnabled(false); } @@ -504,6 +505,8 @@ mSettingsHelper->getCorrectOutgoingSecureRadioButtonIndex(); outgoingSecureConnectionItem->setContentWidgetData(QString("selected"), outgoingSecureConnectionItemIndex); + mForm->addConnection(outgoingSecureConnectionItem, SIGNAL(itemSelected(int)), + mSettingsHelper, SLOT(outgoingSecureConnectionItemChange(int))); if (mHiddenItem) { outgoingSecureConnectionItem->setEnabled(false); } @@ -520,6 +523,8 @@ outgoingPortItem->setContentWidgetData(QString("items"), outgoingPortItems); int outgoingPortItemIndex = mSettingsHelper->getCorrectOutgoingPortRadioButtonIndex(); outgoingPortItem->setContentWidgetData(QString("selected"), outgoingPortItemIndex); + mForm->addConnection(outgoingPortItem, SIGNAL(itemSelected(int)), + mSettingsHelper, SLOT(outgoingPortChange(int))); if (mHiddenItem) { outgoingPortItem->setEnabled(false); } @@ -538,6 +543,8 @@ int outgoingAuthenticationIndex = mSettingsHelper->getCorrectOutgoingAuthenticationRadioButtonIndex(); outgoingAuthenticationItem->setContentWidgetData(QString("selected"), outgoingAuthenticationIndex); + mForm->addConnection(outgoingAuthenticationItem, SIGNAL(itemSelected(int)), + mSettingsHelper, SLOT(outgoingAuthenticationChange(int))); item.appendChild(outgoingAuthenticationItem); if (mHiddenItem) { outgoingAuthenticationItem->setEnabled(false); @@ -559,6 +566,8 @@ folderPathItem->setContentWidgetData(QString("items"), folderPathItems); int folderPathItemIndex = mSettingsHelper->getCorrectFolderPathRadioButtonIndex(); folderPathItem->setContentWidgetData(QString("selected"), folderPathItemIndex); + mForm->addConnection(folderPathItem, SIGNAL(itemSelected(int)), + mSettingsHelper, SLOT(folderPathChange(int))); item.appendChild(folderPathItem); } } diff -r 780f926bc26c -r f83bd4ae1fe3 nmail.pro --- a/nmail.pro Fri Jun 11 16:42:02 2010 +0300 +++ b/nmail.pro Thu Jun 24 14:32:18 2010 +0300 @@ -41,6 +41,7 @@ emailservices/emailcommon \ emailservices/emailframework \ emailservices/emailstore \ + emailservices/emailclientapi \ ipsservices \ emailuis/nmframeworkadapter \ emailservices/nmclientapi \