sysstatemgmt/systemstarter/amastartsrc/loadamastart.cpp
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "amastart.h"
       
    17 #include "loadamastart.h"
       
    18 
       
    19 /**
       
    20 Creates an instance of CLoadAmaStart class.
       
    21 
       
    22 @return An instance of CLoadAmaStart.
       
    23 */
       
    24 EXPORT_C CLoadAmaStart* CLoadAmaStart::CreateL()
       
    25 	{
       
    26 	CLoadAmaStart* self = new (ELeave) CLoadAmaStart();
       
    27 	CleanupStack::PushL(self);
       
    28 	self->ConstructL();
       
    29 	CleanupStack::Pop(self);
       
    30 	return self;
       
    31 	
       
    32 	}
       
    33 
       
    34 /**
       
    35 Constructs the object. 
       
    36 */
       
    37 void CLoadAmaStart::ConstructL()
       
    38 	{
       
    39 	iAmaStart = CAmaStart::NewL();
       
    40 	}
       
    41 
       
    42 /**
       
    43 Default constructor.
       
    44 */
       
    45 CLoadAmaStart::CLoadAmaStart()
       
    46 	{
       
    47 	}
       
    48 /**
       
    49 Launch AMAs (after market application) from a DSC (Synchronous).
       
    50 Returns when processing of the DSC is complete. 
       
    51 
       
    52 @param aDscId Id of the DSC containing AMAs to be started.
       
    53 @see CAmaStart
       
    54 */
       
    55 void CLoadAmaStart::StartL(const TUid aDscId)
       
    56 	{
       
    57 	iAmaStart->StartL(aDscId);
       
    58 	}
       
    59 
       
    60 /**
       
    61 Launch AMAs (after market application) from a DSC.(Asynchronous)
       
    62 Returns immediately. The supplied TRequestStatus object is used to signal completion. 
       
    63 When the request is completed.
       
    64 
       
    65 @param aDscId Id of the DSC containing AMAs to be started.
       
    66 @param aRequestStatus Status object to signal completion.
       
    67 @see CAmaStart
       
    68 */
       
    69 void CLoadAmaStart::Start(const TUid aDscId, TRequestStatus& aRequestStatus)
       
    70 	{
       
    71 	iAmaStart->Start(aDscId, aRequestStatus);
       
    72 	}
       
    73 
       
    74 /**
       
    75 Cancel's a pending asynchronous Start request.
       
    76 If there is no request pending, calling this method has no effect.
       
    77 @see CAmaStart
       
    78 */
       
    79 void CLoadAmaStart::StartCancel()
       
    80 	{
       
    81 	iAmaStart->CancelStart();
       
    82 	}
       
    83 
       
    84 /**
       
    85 Destructor
       
    86 */
       
    87 CLoadAmaStart::~CLoadAmaStart()
       
    88 	{
       
    89 	if(iAmaStart)
       
    90 		{
       
    91 		iAmaStart->CancelStart();
       
    92 		}
       
    93 	delete iAmaStart;
       
    94 	}