48
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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: Base class for CSecurityDialog operations
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "securitydialogoperation.h" // CSecurityDialogOperation
|
|
19 |
#include "securitydialogoperationobserver.h" // MSecurityDialogOperationObserver
|
|
20 |
#include "securitydialogstrace.h" // TRACE macro
|
|
21 |
|
|
22 |
|
|
23 |
// ======== MEMBER FUNCTIONS ========
|
|
24 |
|
|
25 |
// ---------------------------------------------------------------------------
|
|
26 |
// CSecurityDialogOperation::CSecurityDialogOperation()
|
|
27 |
// ---------------------------------------------------------------------------
|
|
28 |
//
|
|
29 |
CSecurityDialogOperation::CSecurityDialogOperation(
|
|
30 |
MSecurityDialogOperationObserver& aObserver, const RMessage2& aMessage,
|
|
31 |
TInt aReplySlot ) : CActive( CActive::EPriorityStandard ), iObserver( aObserver ),
|
|
32 |
iMessage( aMessage ), iReplySlot( aReplySlot )
|
|
33 |
{
|
|
34 |
TRACE( "CSecurityDialogOperation::CSecurityDialogOperation, iMessage 0x%08x",
|
|
35 |
iMessage.Handle() );
|
|
36 |
CActiveScheduler::Add( this );
|
|
37 |
}
|
|
38 |
|
|
39 |
// ---------------------------------------------------------------------------
|
|
40 |
// CSecurityDialogOperation::~CSecurityDialogOperation()
|
|
41 |
// ---------------------------------------------------------------------------
|
|
42 |
//
|
|
43 |
CSecurityDialogOperation::~CSecurityDialogOperation()
|
|
44 |
{
|
|
45 |
TRACE( "CSecurityDialogOperation::~CSecurityDialogOperation, begin" );
|
|
46 |
Cancel();
|
|
47 |
TRACE( "CSecurityDialogOperation::~CSecurityDialogOperation, end" );
|
|
48 |
}
|
|
49 |
|
|
50 |
// ---------------------------------------------------------------------------
|
|
51 |
// CSecurityDialogOperation::RunError()
|
|
52 |
// ---------------------------------------------------------------------------
|
|
53 |
//
|
|
54 |
TInt CSecurityDialogOperation::RunError( TInt aError )
|
|
55 |
{
|
|
56 |
TRACE( "CSecurityDialogOperation::RunError, aError=%d", aError );
|
|
57 |
if( !iMessage.IsNull() )
|
|
58 |
{
|
|
59 |
TRACE( "CSecurityDialogOperation::RunError, completing message 0x%08x",
|
|
60 |
iMessage.Handle() );
|
|
61 |
iMessage.Complete( aError );
|
|
62 |
}
|
|
63 |
return KErrNone;
|
|
64 |
}
|
|
65 |
|