ImagePrint/ImagePrintEngine/DeviceProtocols/dpof/src/cconfirmationquery.cpp
branchRCL_3
changeset 28 d59c248c9d36
parent 0 d11fb78c4374
equal deleted inserted replaced
27:159fc2f68139 28:d59c248c9d36
       
     1 /*
       
     2 * Copyright (c) 2004-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:  
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #include <avkon.hrh>
       
    20 
       
    21 #include "clog.h"
       
    22 #include "cconfirmationquery.h"
       
    23 
       
    24 CConfirmationQuery::CConfirmationQuery( MConfirmationNotify& aNotify ) : CActive( CActive::EPriorityStandard),
       
    25 iNotify (aNotify)
       
    26 		{
       
    27 		CActiveScheduler::Add( this );
       
    28 		}
       
    29 
       
    30 CConfirmationQuery::~CConfirmationQuery()
       
    31 	{
       
    32 	Cancel();
       
    33 	}
       
    34 
       
    35 // ============================ MEMBER FUNCTIONS ==============================
       
    36 
       
    37 // ----------------------------------------------------------------------------
       
    38 // CConfirmationQuery::NewL()
       
    39 // Symbian two-phased constructor.
       
    40 // ----------------------------------------------------------------------------
       
    41 //
       
    42 CConfirmationQuery* CConfirmationQuery::NewL( MConfirmationNotify& aNotify )  
       
    43 	{
       
    44 	CConfirmationQuery* self = CConfirmationQuery::NewLC( aNotify );
       
    45 	CleanupStack::Pop( self );
       
    46 	return self;
       
    47 	}
       
    48 
       
    49 // ----------------------------------------------------------------------------
       
    50 // CConfirmationQuery::NewLC()
       
    51 // Symbian two-phased constructor.
       
    52 // ----------------------------------------------------------------------------
       
    53 //
       
    54 CConfirmationQuery* CConfirmationQuery::NewLC( MConfirmationNotify& aNotify )
       
    55 	{
       
    56 	CConfirmationQuery* self;
       
    57 	self = new ( ELeave ) CConfirmationQuery( aNotify );
       
    58 	CleanupStack::PushL( self );
       
    59 	self->ConstructL();
       
    60 	return self;
       
    61 	}
       
    62 
       
    63 // ----------------------------------------------------------------------------
       
    64 // CConfirmationQuery::ConstructL()
       
    65 // Perform second phase construction of this object.
       
    66 // ----------------------------------------------------------------------------
       
    67 //
       
    68 void CConfirmationQuery::ConstructL()
       
    69 	{
       
    70 
       
    71 	}
       
    72 
       
    73 void CConfirmationQuery::StartWaitingAnswer( )
       
    74 	{	
       
    75 	// Start active object and set iStatus = KRequestPending
       
    76 	SetActive();
       
    77 	}
       
    78 
       
    79 void CConfirmationQuery::RunL()
       
    80 	{
       
    81 	LOG1("[CConfirmationQuery::RunL]\t iStatus: %d", iStatus.Int());	
       
    82 	if (iStatus == KErrNone || iStatus == KErrCancel || iStatus == EAknSoftkeyYes || iStatus == EAknSoftkeyNo )
       
    83 		{		
       
    84 		iNotify.ConfirmationQueryCompleteL(iStatus.Int());		
       
    85 		}	
       
    86 	LOG("[CConfirmationQueryCConfirmationQuery::RunL]\t out");
       
    87 	}
       
    88 
       
    89 void CConfirmationQuery::RunError()
       
    90 	{
       
    91 
       
    92 	}
       
    93 
       
    94 void CConfirmationQuery::DoCancel()
       
    95 	{
       
    96 
       
    97 	}
       
    98 
       
    99 // End of file