email/imap4mtm/imapmailstore/inc/cqueueentrybase.h
changeset 31 ebfee66fde93
parent 0 72b543305e3a
equal deleted inserted replaced
30:6a20128ce557 31:ebfee66fde93
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CQUEUEENTRYBASE_H__
       
    17 #define __CQUEUEENTRYBASE_H__
       
    18 
       
    19 #include "cimapmailstore.h"
       
    20 
       
    21 /**
       
    22 Abstract base class derived from CActive that is implemented by storage requests wrapper classed.
       
    23 @internalComponent
       
    24 @prototype
       
    25 */
       
    26 class CQueueEntryBase:	public CActive
       
    27 	{
       
    28 public:
       
    29 	//the different types of requests
       
    30 	enum TQueueEntryType
       
    31 	{
       
    32 	EIMHeader=0,
       
    33 	EIMMimeHeader,
       
    34 	EBody8,
       
    35 	EBody16,
       
    36 	EAttachment,
       
    37 	EPlainTextBody
       
    38 	};
       
    39 public:
       
    40 	virtual ~CQueueEntryBase();
       
    41 	TMsvId GetId() const;
       
    42 	TQueueEntryType GetEntryType() const;
       
    43 	MMailStoreObserver& GetObserver();
       
    44 	void StoreComplete(TInt aErrorCode);
       
    45 	virtual void CancelRequest();
       
    46 protected:
       
    47 	CQueueEntryBase(TMsvId aId,TQueueEntryType aQueueEntryType,CImapMailStore& aParent,CMsvServerEntry& aServerEntry,MMailStoreObserver& aObserver);
       
    48 	void BaseConstructL();
       
    49 	void CompleteSelf();
       
    50 	virtual void DoCancel();
       
    51 	virtual TInt RunError(TInt aError);
       
    52 protected:
       
    53 	TMsvId iId;
       
    54 	MMailStoreObserver& iObserver;	
       
    55 	TQueueEntryType iQueueEntryType;
       
    56 	CImapMailStore& iParent;
       
    57 	CMsvServerEntry& iServerEntry;
       
    58 	};
       
    59 
       
    60 #endif //__CQUEUEENTRYBASE_H__