diff -r ecc8def7944a -r 2dc6caa42ec3 emailuis/nmailui/inc/nmattachmentmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailuis/nmailui/inc/nmattachmentmanager.h Fri May 14 15:41:10 2010 +0300 @@ -0,0 +1,62 @@ +/* +* 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 NMATTACHMENTMANAGER_H_ +#define NMATTACHMENTMANAGER_H_ + +#include +#include + +#include + +class NmUiEngine; +class NmOperation; +class NmAttachmentFetchObserver; + +class NmAttachmentManager : public QObject +{ + Q_OBJECT +public: + NmAttachmentManager(NmUiEngine &uiEngine); + virtual ~NmAttachmentManager(); + void fetchAttachment( + const NmId &mailboxId, + const NmId &folderId, + const NmId &messageId, + const NmId &messagePartId); + bool isFetching() const; + NmId partIdUnderFetch() const; + int progressValue() const; + void setObserver(NmAttachmentFetchObserver *observer); + void clearObserver(); + void cancelFetch(); + +private slots: + void changeProgress(int value); + void attachmentFetchCompleted(int result); + +private: + NmUiEngine &mUiEngine; + QPointer mFetchOperation; // Not owned + NmAttachmentFetchObserver *mFetchObserver; // Not owned + NmId mAttaId; + int mProgressValue; + bool mIsFetching; +}; + + +#endif /* NMATTACHMENTMANAGER_H_ */