email/imum/Mtms/Inc/Imap4FetchAttachmentOp.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *       Fetch attachments
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __IMAP4FETCHATTACHMENTOP_H__
       
    20 #define __IMAP4FETCHATTACHMENTOP_H__
       
    21 
       
    22 #include <imapset.h>
       
    23 #include <imapcmds.h>
       
    24 #include "IMAPPRGR.H"
       
    25 #include "ImumOnlineOperation.h"
       
    26 #include "Imap4ConnectedOp.h"
       
    27 #include "Imap4MtmUi.hrh" // KImpuIMAPFolderNameLength
       
    28 
       
    29 
       
    30 /**
       
    31 * Fetch attachments after checking there is enough memory and disk space to
       
    32 * fetch the first attachment in the selection.
       
    33 * Uses the KIMAP4MTMPopulate function Id directly.
       
    34 */
       
    35 class CImap4FetchAttachmentOp : public CImap4ConnectedOp
       
    36     {
       
    37     public:
       
    38         /**
       
    39         *
       
    40         */
       
    41         static CImap4FetchAttachmentOp* NewL(
       
    42             CImumInternalApi& aMailboxApi,
       
    43             TRequestStatus& aStatus,
       
    44             MMsvProgressReporter& aReporter,
       
    45             TMsvId aService,
       
    46             const CMsvEntrySelection& aSel);
       
    47 
       
    48         /**
       
    49         *
       
    50         */
       
    51         virtual ~CImap4FetchAttachmentOp();
       
    52 
       
    53         /**
       
    54         *
       
    55         */
       
    56         virtual const TDesC8& ProgressL();
       
    57 
       
    58     protected:
       
    59         /**
       
    60         * Do the fetch
       
    61         */
       
    62         virtual void DoConnectedOpL();
       
    63 
       
    64         /**
       
    65         *
       
    66         */
       
    67         virtual const TDesC8& ConnectedOpErrorProgressL(TInt aError);
       
    68 
       
    69     private:
       
    70 
       
    71         /**
       
    72         *
       
    73         */
       
    74         CImap4FetchAttachmentOp(
       
    75             CImumInternalApi& aMailboxApi,
       
    76             TRequestStatus& aStatus,
       
    77             MMsvProgressReporter& aReporter,
       
    78             TMsvId aService);
       
    79 
       
    80         /**
       
    81         *
       
    82         */
       
    83         void ConstructL(const CMsvEntrySelection& aSel);
       
    84 
       
    85     private:
       
    86         CMsvEntrySelection* iSelection;
       
    87         TImap4UiProgressBuf iUiProgress;
       
    88     };
       
    89 
       
    90 
       
    91 #endif