uifw/AknGlobalUI/akncustcmds/src/aknenableappskeyandglobalnotes.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2008 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 : Implementation of CAknEnableAppsKeyAndGlobalNotes class.
       
    15 *
       
    16 */
       
    17 #include <AknCapServerClient.h>
       
    18 #include <e32property.h>
       
    19 
       
    20 #include "aknenableappskeyandglobalnotes.h"
       
    21 
       
    22 // ======== MEMBER FUNCTIONS ========
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // CAknEnableAppsKeyAndGlobalNotes::NewL
       
    26 //
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 CAknEnableAppsKeyAndGlobalNotes* CAknEnableAppsKeyAndGlobalNotes::NewL()
       
    30 	{
       
    31 	CAknEnableAppsKeyAndGlobalNotes* self =
       
    32 	    new ( ELeave ) CAknEnableAppsKeyAndGlobalNotes;
       
    33 	return self;
       
    34 	}
       
    35 
       
    36 
       
    37 // ---------------------------------------------------------------------------
       
    38 // Destructor
       
    39 //
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 CAknEnableAppsKeyAndGlobalNotes::~CAknEnableAppsKeyAndGlobalNotes()
       
    43     {
       
    44     }
       
    45 
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 // CAknEnableAppsKeyAndGlobalNotes::Initialize
       
    49 //
       
    50 // ---------------------------------------------------------------------------
       
    51 //
       
    52 TInt CAknEnableAppsKeyAndGlobalNotes::Initialize(
       
    53     CSsmCustomCommandEnv* /*aCmdEnv*/ )
       
    54     {
       
    55     return KErrNone;
       
    56     }
       
    57 
       
    58 
       
    59 // ---------------------------------------------------------------------------
       
    60 // CAknEnableAppsKeyAndGlobalNotes::Execute
       
    61 //
       
    62 // ---------------------------------------------------------------------------
       
    63 //
       
    64 void CAknEnableAppsKeyAndGlobalNotes::Execute(
       
    65     const TDesC8& /*aParams*/,
       
    66     TRequestStatus& aRequest )
       
    67     {
       
    68     aRequest = KRequestPending;
       
    69 
       
    70     RAknUiServer aknSrv;
       
    71     TInt errorCode = aknSrv.Connect();
       
    72     if ( errorCode == KErrNone )
       
    73         {
       
    74         errorCode = aknSrv.EnableTaskList( ETrue );
       
    75         aknSrv.Close();
       
    76         }
       
    77 
       
    78     TRequestStatus* request = &aRequest;
       
    79     User::RequestComplete( request, errorCode );
       
    80     }
       
    81 
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // CAknEnableAppsKeyAndGlobalNotes::ExecuteCancel
       
    85 //
       
    86 // ---------------------------------------------------------------------------
       
    87 //
       
    88 void CAknEnableAppsKeyAndGlobalNotes::ExecuteCancel()
       
    89     {
       
    90     // Nothing to do.
       
    91     }
       
    92 
       
    93 
       
    94 // ---------------------------------------------------------------------------
       
    95 // CAknEnableAppsKeyAndGlobalNotes::Release
       
    96 //
       
    97 // ---------------------------------------------------------------------------
       
    98 //
       
    99 void CAknEnableAppsKeyAndGlobalNotes::Release()
       
   100     {
       
   101 	delete this;
       
   102     }
       
   103 
       
   104 
       
   105 // ---------------------------------------------------------------------------
       
   106 // CAknEnableAppsKeyAndGlobalNotes::Close
       
   107 //
       
   108 // ---------------------------------------------------------------------------
       
   109 //
       
   110 void CAknEnableAppsKeyAndGlobalNotes::Close()
       
   111     {
       
   112     // Nothing to do.
       
   113     }
       
   114 
       
   115 
       
   116 // ---------------------------------------------------------------------------
       
   117 // First phase constructor
       
   118 //
       
   119 // ---------------------------------------------------------------------------
       
   120 //
       
   121 CAknEnableAppsKeyAndGlobalNotes::CAknEnableAppsKeyAndGlobalNotes()
       
   122     {
       
   123     }
       
   124