connectivitymodules/SeCon/services/pcd/src/sconbrqueue.cpp
changeset 40 b63e67867dcd
parent 37 74081e1a0272
equal deleted inserted replaced
39:9905f7d46607 40:b63e67867dcd
     1 /*
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    22 #include "sconpcdconsts.h"
    22 #include "sconpcdconsts.h"
    23 #include "sconinstqueue.h"
    23 #include "sconinstqueue.h"
    24 #include "debug.h"
    24 #include "debug.h"
    25 
    25 
    26 // -----------------------------------------------------------------------------
    26 // -----------------------------------------------------------------------------
    27 // CSConBackupRestoreQueue::NewL( const TInt aMaxObjectSize )
    27 // CSConBackupRestoreQueue::NewL( RFs& aFs )
    28 // Two-phase constructor
    28 // Two-phase constructor
    29 // -----------------------------------------------------------------------------
    29 // -----------------------------------------------------------------------------
    30 //
    30 //
    31 CSConBackupRestoreQueue* CSConBackupRestoreQueue::NewL( const TInt aMaxObjectSize, RFs& aFs )
    31 CSConBackupRestoreQueue* CSConBackupRestoreQueue::NewL( RFs& aFs )
    32 	{
    32 	{
    33 	CSConBackupRestoreQueue* self = new (ELeave) CSConBackupRestoreQueue();
    33 	CSConBackupRestoreQueue* self = new (ELeave) CSConBackupRestoreQueue();
    34 	CleanupStack::PushL( self );
    34 	CleanupStack::PushL( self );
    35 	self->ConstructL( aMaxObjectSize, aFs );
    35 	self->ConstructL( aFs );
    36 	CleanupStack::Pop( self );
    36 	CleanupStack::Pop( self );
    37     return self;
    37     return self;
    38 	}
    38 	}
    39 	
    39 	
    40 // -----------------------------------------------------------------------------
    40 // -----------------------------------------------------------------------------
    43 // -----------------------------------------------------------------------------
    43 // -----------------------------------------------------------------------------
    44 //
    44 //
    45 CSConBackupRestoreQueue::CSConBackupRestoreQueue() : 
    45 CSConBackupRestoreQueue::CSConBackupRestoreQueue() : 
    46 					CActive( EPriorityStandard )
    46 					CActive( EPriorityStandard )
    47 	{
    47 	{
    48 	}
    48     CActiveScheduler::Add( this );
    49 	
    49 	}
    50 // -----------------------------------------------------------------------------
    50 	
    51 // CSConBackupRestoreQueue::ConstructL( const TInt aMaxObjectSize )
    51 // -----------------------------------------------------------------------------
       
    52 // CSConBackupRestoreQueue::ConstructL( RFs& aFs )
    52 // Initializes member data
    53 // Initializes member data
    53 // -----------------------------------------------------------------------------
    54 // -----------------------------------------------------------------------------
    54 //
    55 //
    55 void CSConBackupRestoreQueue::ConstructL( const TInt aMaxObjectSize, RFs& aFs )
    56 void CSConBackupRestoreQueue::ConstructL( RFs& aFs )
    56 	{
    57 	{
    57 	iBackupRestore = CSConBackupRestore::NewL( this, aMaxObjectSize, aFs );
    58 	iBackupRestore = CSConBackupRestore::NewL( this, aFs );
    58 	CActiveScheduler::Add( iBackupRestore );
       
    59 	User::LeaveIfError( iTimer.CreateLocal() );
    59 	User::LeaveIfError( iTimer.CreateLocal() );
    60 	}
    60 	}
    61 	
    61 	
    62 // -----------------------------------------------------------------------------
    62 // -----------------------------------------------------------------------------
    63 // CSConBackupRestoreQueue::~CSConBackupRestoreQueue()
    63 // CSConBackupRestoreQueue::~CSConBackupRestoreQueue()
   190 //		
   190 //		
   191 TSConMethodName CSConBackupRestoreQueue::GetTaskMethodL( TInt aTaskId )
   191 TSConMethodName CSConBackupRestoreQueue::GetTaskMethodL( TInt aTaskId )
   192 	{
   192 	{
   193 	TRACE_FUNC_ENTRY;
   193 	TRACE_FUNC_ENTRY;
   194 	CSConTask* task = NULL;
   194 	CSConTask* task = NULL;
   195 	CSConTaskQueue::GetTask( aTaskId, task );
   195 	User::LeaveIfError( CSConTaskQueue::GetTask( aTaskId, task ) );
   196 	LOGGER_WRITE_1( "CSConBackupRestoreQueue::GetTaskMethodL( TInt aTaskId ) : returned %d",
   196 	LOGGER_WRITE_1( "CSConBackupRestoreQueue::GetTaskMethodL( TInt aTaskId ) : returned %d",
   197         task->GetServiceId() );
   197         task->GetServiceId() );
   198 	return task->GetServiceId();
   198 	return task->GetServiceId();
   199 	}
   199 	}
   200 	
   200