systemswuis/touchscreencalib/tscstartupextensionplugin/src/tscstartupextensionplugin.cpp
branchRCL_3
changeset 13 90fe62538f66
parent 12 3fec62e6e7fc
child 14 5f281e37a2f5
equal deleted inserted replaced
12:3fec62e6e7fc 13:90fe62538f66
     1 /*
       
     2 * Copyright (c) 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:  Implementation of CTSCStartupExtensionPlugIn class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "tscstartupextensionplugin.h"
       
    20 #include "tscstartupextensionplugindef.h"
       
    21 #include "TSCPlugInPubSubObserver.h"
       
    22 
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // Constructor
       
    27 //
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CTSCStartupExtensionPlugIn* CTSCStartupExtensionPlugIn::NewL(
       
    31     TAny* aConstructionParameters )
       
    32     {
       
    33     CTSCStartupExtensionPlugIn* self =
       
    34         new( ELeave ) CTSCStartupExtensionPlugIn( aConstructionParameters );
       
    35     CleanupStack::PushL( self );
       
    36     self->ConstructL();
       
    37     CleanupStack::Pop( self );
       
    38     return self;
       
    39     }
       
    40 
       
    41 
       
    42 // ---------------------------------------------------------------------------
       
    43 // Destructor
       
    44 //
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 CTSCStartupExtensionPlugIn::~CTSCStartupExtensionPlugIn()
       
    48     {
       
    49     TRACES("CTSCStartupExtensionPlugIn::~CTSCStartupExtensionPlugIn()");
       
    50     if (iTSCPlugInPubSubObserver)
       
    51         {
       
    52         delete iTSCPlugInPubSubObserver;
       
    53         }
       
    54     TRACES("CTSCStartupExtensionPlugIn::~CTSCStartupExtensionPlugIn()");
       
    55     }
       
    56 
       
    57 
       
    58 // ---------------------------------------------------------------------------
       
    59 // First phase constructor
       
    60 //
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 CTSCStartupExtensionPlugIn::CTSCStartupExtensionPlugIn(
       
    64     TAny* aConstructionParameters )
       
    65   : CSystemStartupExtension( aConstructionParameters ),
       
    66     iRequestSent(EFalse)
       
    67     {
       
    68     }
       
    69 
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // CTSCStartupExtensionPlugIn::ConstructL
       
    73 //
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 void CTSCStartupExtensionPlugIn::ConstructL()
       
    77     {
       
    78     TRACES("CTSCStartupExtensionPlugIn::ConstructL()");
       
    79     iTSCPlugInPubSubObserver = CTSCPlugInPubSubObserver::NewL( this );
       
    80     TRACES("CTSCStartupExtensionPlugIn::ConstructL(): End");
       
    81     }
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // CTSCStartupExtensionPlugIn::ExecuteL
       
    85 //
       
    86 // ---------------------------------------------------------------------------
       
    87 //
       
    88 void CTSCStartupExtensionPlugIn::ExecuteL(
       
    89     TRequestStatus& aStatus,
       
    90     const TDesC& /*aParams*/ )
       
    91     {
       
    92     TRACES("CTSCStartupExtensionPlugIn::ExecuteL()");    
       
    93     aStatus = KRequestPending;
       
    94     iStatus = &aStatus;
       
    95     TRACES("CTSCStartupExtensionPlugIn::ExecuteL(): End");
       
    96     }
       
    97 
       
    98 // ---------------------------------------------------------------------------
       
    99 // CTSCStartupExtensionPlugIn::Cancel
       
   100 //
       
   101 // ---------------------------------------------------------------------------
       
   102 //
       
   103 void CTSCStartupExtensionPlugIn::Cancel()
       
   104     {
       
   105     // Nothing to do.
       
   106     }
       
   107 
       
   108 // ---------------------------------------------------------------------------
       
   109 // CTSCStartupExtensionPlugIn::CalibrationDone
       
   110 //
       
   111 // ---------------------------------------------------------------------------
       
   112 //
       
   113 void CTSCStartupExtensionPlugIn::CalibrationDone()
       
   114     {
       
   115     TRACES("CTSCStartupExtensionPlugIn::CalibrationDone()");
       
   116     if (!iRequestSent)
       
   117         {
       
   118         TRACES("CTSCStartupExtensionPlugIn::CalibrationDone(): Send complete request");
       
   119         TInt errorCode = KErrNone;    
       
   120         User::RequestComplete( iStatus, errorCode );
       
   121         iRequestSent = ETrue;
       
   122         }
       
   123     TRACES("CTSCStartupExtensionPlugIn::CalibrationDone(): End");
       
   124     }