mobilemessaging/mmsui/mtmsrc/CMmsMtmDeliveryDialogLauncher.cpp
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2005-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: CMmsMtmDeliveryDialogLauncher implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 
       
    23 #include <mmsmsventry.h>
       
    24 #include <mmsclient.h>
       
    25 #include "CMmsMtmDeliveryDialogLauncher.h"
       
    26 #include "MmsMtmDeliveryPopup.h"
       
    27 #include "CMsgDeliveryItem.h"
       
    28 #include "MMSMTMLogData.h"
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 // MACROS
       
    33 
       
    34 // LOCAL CONSTANTS AND MACROS
       
    35 
       
    36 // MODULE DATA STRUCTURES
       
    37 
       
    38 // LOCAL FUNCTION PROTOTYPES
       
    39 
       
    40 // ==================== LOCAL FUNCTIONS ====================
       
    41 
       
    42 
       
    43 // ================= MEMBER FUNCTIONS =======================
       
    44 
       
    45 
       
    46 
       
    47 
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // CMmsMtmDeliveryDialogLauncher::CMmsMtmDeliveryDialogLauncher
       
    51 // C++ default constructor can NOT contain any code, that
       
    52 // might leave.
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 CMmsMtmDeliveryDialogLauncher::CMmsMtmDeliveryDialogLauncher() :
       
    56     iLogData( NULL ),
       
    57     iDialog( NULL )
       
    58     {
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // CMmsMtmDeliveryDialogLauncher::NewL
       
    63 // Two-phased constructor.
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 EXPORT_C CMmsMtmDeliveryDialogLauncher* CMmsMtmDeliveryDialogLauncher::NewL(TMmsMsvEntry aEntry, CMmsClientMtm* aMmsClient)
       
    67     {
       
    68     CMmsMtmDeliveryDialogLauncher* self = new ( ELeave ) CMmsMtmDeliveryDialogLauncher( );
       
    69     
       
    70     CleanupStack::PushL( self );
       
    71     self->ConstructL(aEntry, aMmsClient);
       
    72     CleanupStack::Pop( self ); //self
       
    73 
       
    74     return self;
       
    75     }
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // CMmsMtmDeliveryDialogLauncher::ConstructL
       
    79 // Symbian 2nd phase constructor can leave.
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 void CMmsMtmDeliveryDialogLauncher::ConstructL(TMmsMsvEntry aEntry, CMmsClientMtm* aMmsClient)
       
    83     {
       
    84     iEntry = aEntry;
       
    85     iMmsClient = aMmsClient;
       
    86     iDialog = CMsgInfoDeliveryStatusPopup::NewL();
       
    87     }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CMmsMtmDeliveryDialogLauncher::~CMmsMtmDeliveryDialogLauncher
       
    91 // Destructor
       
    92 // -----------------------------------------------------------------------------
       
    93 // 
       
    94 CMmsMtmDeliveryDialogLauncher::~CMmsMtmDeliveryDialogLauncher()
       
    95     {
       
    96     if (iLogData)
       
    97         {
       
    98         delete iLogData;
       
    99         }
       
   100     if (iDialog)
       
   101         {
       
   102         delete iDialog;
       
   103         }
       
   104     }
       
   105 
       
   106 // -----------------------------------------------------------------------------
       
   107 // CMmsMtmDeliveryDialogLauncher::SetDataArray
       
   108 // "Callback" method, which the CMmsLogData calls after retrieving the data.
       
   109 // Derived from the MMmsMtmDeliveryDataContainer
       
   110 // -----------------------------------------------------------------------------
       
   111 // 
       
   112 void CMmsMtmDeliveryDialogLauncher::SetDataArrayL(CArrayPtrFlat< CMsgDeliveryItem >* aDataArray )
       
   113     {
       
   114     iDialog->SetDataArray(aDataArray);
       
   115     /*TInt answer = */iDialog->ExecuteL(); // Commented answer out as it's not used
       
   116     }
       
   117 	
       
   118 // -----------------------------------------------------------------------------
       
   119 // CMmsMtmDeliveryDialogLauncher::StartDialogL
       
   120 // Exported method, used to start the CMmsMTMLogData active object
       
   121 // -----------------------------------------------------------------------------
       
   122 // 
       
   123 EXPORT_C TBool CMmsMtmDeliveryDialogLauncher::StartDialogL()
       
   124     {
       
   125     TBool success(EFalse);
       
   126 
       
   127     iLogData = CMmsMTMLogData::NewL(this, iEntry);
       
   128     success = iLogData->DeliveryDataL(iMmsClient);
       
   129 
       
   130     return success;
       
   131     }
       
   132 //  End of File