wvuing/wvcommandutils/Src/CCAAppSettCommand.cpp
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     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:  Command to get the Settings Interface for getting/setting tonefilename etc
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //  INCLUDE FILES
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <eikdef.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "MCAUiSettingsDialogCmdCB.h"
       
    26 #include "CCACommandSettingSapExtCmd.h"
       
    27 
       
    28 #include "MCASettingsCommand.h"
       
    29 #include "CCAAppSettCommand.h"
       
    30 
       
    31 
       
    32 // ============================ MEMBER FUNCTIONS ===============================
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // Destructor
       
    36 // -----------------------------------------------------------------------------
       
    37 //
       
    38 CCAAppSettCommand::~CCAAppSettCommand()
       
    39     {
       
    40     delete iSapExtension;
       
    41     }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // C++ constructor
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 CCAAppSettCommand::CCAAppSettCommand( MCAProcessManager& aProcessManager,
       
    48                                       MCAUiSettingsDialogCmdCB& aUiSettingsCB )
       
    49         : iProcessManager( aProcessManager ),
       
    50         iAppSetting( aUiSettingsCB )
       
    51     {
       
    52 
       
    53     }
       
    54 
       
    55 
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // CCAAppSettCommand::NewL
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 CCAAppSettCommand* CCAAppSettCommand::NewL( MCAProcessManager& aProcessManager,
       
    62                                             MCAUiSettingsDialogCmdCB& aUiSettingsCB )
       
    63     {
       
    64 
       
    65     CCAAppSettCommand* self = CCAAppSettCommand::NewLC( aProcessManager,
       
    66                                                         aUiSettingsCB );
       
    67     CleanupStack::Pop( self );
       
    68     return self;
       
    69 
       
    70     }
       
    71 
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // CCAAppSettCommand::NewLC
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 CCAAppSettCommand* CCAAppSettCommand::NewLC( MCAProcessManager& aProcessManager,
       
    78                                              MCAUiSettingsDialogCmdCB& aUiSettingsCB )
       
    79     {
       
    80 
       
    81     CCAAppSettCommand* self = new( ELeave ) CCAAppSettCommand( aProcessManager,
       
    82                                                                aUiSettingsCB );
       
    83     CleanupStack::PushL( self );
       
    84     return self;
       
    85 
       
    86     }
       
    87 
       
    88 // -----------------------------------------------------------------------------
       
    89 // CCAAppSettCommand::SetObserver
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 void CCAAppSettCommand::SetObserver( MCACommandObserver& aObserver )
       
    93     {
       
    94     iCommandObserver = &aObserver;
       
    95     }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // CCAAppSettCommand::Completed
       
    99 // -----------------------------------------------------------------------------
       
   100 //
       
   101 void CCAAppSettCommand::CompletedL( TInt aError )
       
   102     {
       
   103     if ( iCommandObserver )
       
   104         {
       
   105         iCommandObserver->CommandCompletedL( aError );
       
   106         }
       
   107     }
       
   108 
       
   109 // -----------------------------------------------------------------------------
       
   110 // CCAAppSettCommand::CancelCommand
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 void CCAAppSettCommand::CancelCommand()
       
   114     {
       
   115 
       
   116     }
       
   117 
       
   118 // -----------------------------------------------------------------------------
       
   119 // CCAAppSettCommand::CancelCommand
       
   120 // -----------------------------------------------------------------------------
       
   121 //
       
   122 void CCAAppSettCommand::ExecuteCommandL()
       
   123     {
       
   124     MCAUiSettingsDialogCmdCB::TSettingsDialogParams params;
       
   125     iAppSetting.GetParameters( params );
       
   126     iSapExtension = CCACommandSettingSapExtCmd::NewL(
       
   127                         iProcessManager.GetSettingsInterface(),
       
   128                         params.iPreserveSessionIdInExit,
       
   129                         params.iSap );
       
   130     }
       
   131 
       
   132 // -----------------------------------------------------------------------------
       
   133 // CCAAppSettCommand::IsAsynchronous
       
   134 // -----------------------------------------------------------------------------
       
   135 //
       
   136 TBool CCAAppSettCommand::IsAsynchronous()
       
   137     {
       
   138     return ETrue;
       
   139     }
       
   140 
       
   141 
       
   142 // -----------------------------------------------------------------------------
       
   143 // CCAAppSettCommand::GetAppSettingsSAPExt
       
   144 // -----------------------------------------------------------------------------
       
   145 //
       
   146 MCASettingSapExt* CCAAppSettCommand::GetAppSettingsSAPExt()
       
   147     {
       
   148     return iSapExtension;
       
   149     }
       
   150 
       
   151 //END FILE
       
   152 
       
   153 
       
   154 
       
   155