mmsengine/inc/mmsattachmentwaiter.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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 *     Attachment Waiter for MMS Client MTM and UI.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __MMSATTACHMENTWAITER_H__
       
    22 #define __MMSATTACHMENTWAITER_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CMsvStore;
       
    29 class MMsvAttachmentManager;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  CMmsAttachmentWaiter
       
    35 *
       
    36 * @lib mmsgenutils.lib
       
    37 * since 3.2
       
    38 */
       
    39 NONSHARABLE_CLASS( CMmsAttachmentWaiter ) : public CActive
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42 
       
    43         /**
       
    44         * Two-phased constructor.
       
    45         */
       
    46         IMPORT_C static CMmsAttachmentWaiter* NewL();
       
    47         
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         virtual ~CMmsAttachmentWaiter();
       
    52     
       
    53     public: // New functions
       
    54 
       
    55         /**
       
    56         * Start waiting for asychronous attachment handling functions to complete.
       
    57         * @param aStatus caller's request statut to complete when done
       
    58         * @param aStore pointer to store associated with the entry the attachment belongs to
       
    59         *    When the operation completes, the waiter commits the store and deletes the pointer
       
    60         * @param aAttachmentManager reference to the attachment manager handling the entry
       
    61         */
       
    62         IMPORT_C void StartWaitingL( TRequestStatus& aStatus, CMsvStore* aStore, MMsvAttachmentManager* aAttachmentManager );
       
    63     
       
    64 private:
       
    65     CMmsAttachmentWaiter();
       
    66     
       
    67     void Reset();
       
    68     
       
    69     // from CActive
       
    70     void RunL();
       
    71     void DoCancel();
       
    72     TInt RunError(TInt aError);
       
    73     
       
    74 private:
       
    75     TRequestStatus* iReportStatus;
       
    76     CMsvStore* iStore;
       
    77     MMsvAttachmentManager* iAttachmentManager;
       
    78     };
       
    79 
       
    80 #endif // __MMSATTACHMENTWAITER_H__