phonebookui/Phonebook/App/src/CPbkSettingsCmd.cpp
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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 *           Provides phonebook settings command object methods.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "CPbkSettingsCmd.h"
       
    22 
       
    23 #include <CPbkContactEngine.h>
       
    24 #include <CPbkSettingsDlg.h>
       
    25 
       
    26 #include <pbkdebug.h>
       
    27 
       
    28 // ================= MEMBER FUNCTIONS =======================
       
    29 
       
    30 // Default constructor
       
    31 CPbkSettingsCmd::CPbkSettingsCmd (CPbkContactEngine& aEngine,
       
    32         MObjectProvider& aParent)
       
    33         : iEngine(aEngine), iParent(aParent)
       
    34 	{
       
    35     PBK_DEBUG_PRINT
       
    36         (PBK_DEBUG_STRING("CPbkSettingsCmd::CPbkSettingsCmd(0x%x)"), this);
       
    37     }
       
    38 
       
    39 
       
    40 // Static constructor
       
    41 CPbkSettingsCmd* CPbkSettingsCmd::NewL (CPbkContactEngine& aEngine,
       
    42         MObjectProvider& aParent)
       
    43     {
       
    44     CPbkSettingsCmd* self = new(ELeave) CPbkSettingsCmd(aEngine, aParent);
       
    45     CleanupStack::PushL(self);
       
    46     CleanupStack::Pop(); // self
       
    47     return self;
       
    48     }
       
    49 
       
    50 // Destructor
       
    51 CPbkSettingsCmd::~CPbkSettingsCmd()
       
    52     {
       
    53     PBK_DEBUG_PRINT
       
    54         (PBK_DEBUG_STRING("CPbkSettingsCmd::~CPbkSettingsCmd(0x%x)"), this);
       
    55     }
       
    56 
       
    57 void CPbkSettingsCmd::ExecuteLD()
       
    58     {
       
    59     PBK_DEBUG_PRINT
       
    60         (PBK_DEBUG_STRING("CPbkSettingsCmd::ExecuteLD(0x%x)"), this);
       
    61     
       
    62 	CleanupStack::PushL(this);
       
    63 
       
    64     CPbkSettingsDlg* settings = CPbkSettingsDlg::NewL(iEngine);
       
    65 	settings->SetMopParent(&iParent);
       
    66 	settings->ExecuteLD();
       
    67 
       
    68 	// Destroy itself as promised
       
    69     CleanupStack::PopAndDestroy(); // this
       
    70     }
       
    71 
       
    72 //  End of File