59
|
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: Secui dialog notifier
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "secuidialognotifier.h" // CSecuiDialogNotifier
|
|
19 |
#include "secuidialogs.h" // CSecuiDialogs
|
|
20 |
#include "secuidialogstrace.h" // TRACE macro
|
|
21 |
|
|
22 |
|
|
23 |
// ======== MEMBER FUNCTIONS ========
|
|
24 |
|
|
25 |
// ---------------------------------------------------------------------------
|
|
26 |
// CSecuiDialogNotifier::~CSecuiDialogNotifier()
|
|
27 |
// ---------------------------------------------------------------------------
|
|
28 |
//
|
|
29 |
CSecuiDialogNotifier::~CSecuiDialogNotifier()
|
|
30 |
{
|
63
|
31 |
RDEBUG("0", 0);
|
59
|
32 |
Cancel();
|
|
33 |
}
|
|
34 |
|
|
35 |
// ---------------------------------------------------------------------------
|
|
36 |
// CSecuiDialogNotifier::NewL()
|
|
37 |
// ---------------------------------------------------------------------------
|
|
38 |
//
|
|
39 |
CSecuiDialogNotifier* CSecuiDialogNotifier::NewL()
|
|
40 |
{
|
63
|
41 |
RDEBUG("0", 0);
|
59
|
42 |
CSecuiDialogNotifier* self = new( ELeave ) CSecuiDialogNotifier;
|
|
43 |
CleanupStack::PushL( self );
|
|
44 |
self->ConstructL();
|
|
45 |
CleanupStack::Pop( self );
|
|
46 |
return self;
|
|
47 |
}
|
|
48 |
|
|
49 |
// ---------------------------------------------------------------------------
|
|
50 |
// CSecuiDialogNotifier::Release()
|
|
51 |
// ---------------------------------------------------------------------------
|
|
52 |
//
|
|
53 |
void CSecuiDialogNotifier::Release()
|
|
54 |
{
|
63
|
55 |
RDEBUG("0", 0);
|
59
|
56 |
delete this;
|
|
57 |
}
|
|
58 |
|
|
59 |
// ---------------------------------------------------------------------------
|
|
60 |
// CSecuiDialogNotifier::RegisterL()
|
|
61 |
// ---------------------------------------------------------------------------
|
|
62 |
//
|
|
63 |
CSecuiDialogNotifier::TNotifierInfo CSecuiDialogNotifier::RegisterL()
|
|
64 |
{
|
63
|
65 |
RDEBUG("0", 0);
|
59
|
66 |
return Info();
|
|
67 |
}
|
|
68 |
|
|
69 |
// ---------------------------------------------------------------------------
|
|
70 |
// CSecuiDialogNotifier::Info()
|
|
71 |
// ---------------------------------------------------------------------------
|
|
72 |
//
|
|
73 |
CSecuiDialogNotifier::TNotifierInfo CSecuiDialogNotifier::Info() const
|
|
74 |
{
|
63
|
75 |
RDEBUG("0", 0);
|
59
|
76 |
|
|
77 |
TNotifierInfo info;
|
|
78 |
static const TUid KUidSecuiDialogNotifier = { 0x10005988 };
|
|
79 |
info.iUid = KUidSecuiDialogNotifier;
|
|
80 |
const TUid KSecAuthChannel = {0x00000602};
|
|
81 |
info.iChannel = KSecAuthChannel;
|
|
82 |
info.iPriority = ENotifierPriorityAbsolute;
|
|
83 |
return info;
|
|
84 |
}
|
|
85 |
|
|
86 |
// ---------------------------------------------------------------------------
|
|
87 |
// CSecuiDialogNotifier::StartL()
|
|
88 |
// ---------------------------------------------------------------------------
|
|
89 |
//
|
|
90 |
void CSecuiDialogNotifier::StartL( const TDesC8& aBuffer, TInt aReplySlot,
|
|
91 |
const RMessagePtr2& aMessage )
|
|
92 |
{
|
63
|
93 |
RDEBUG("0", 0);
|
59
|
94 |
|
|
95 |
TRAPD( err, DoStartL( aBuffer, aReplySlot, aMessage ) );
|
63
|
96 |
RDEBUG("err", err);
|
59
|
97 |
if( err )
|
|
98 |
{
|
|
99 |
if( iSecuiDialogs && !iIsSecuiDialogsDeleted )
|
|
100 |
{
|
63
|
101 |
RDEBUG("0", 0);
|
59
|
102 |
delete iSecuiDialogs;
|
|
103 |
iSecuiDialogs = NULL;
|
|
104 |
}
|
|
105 |
if( !aMessage.IsNull() )
|
|
106 |
{
|
63
|
107 |
RDEBUG("0", 0);
|
59
|
108 |
aMessage.Complete( err );
|
|
109 |
}
|
|
110 |
}
|
|
111 |
|
63
|
112 |
RDEBUG("0x99", 0x99);
|
59
|
113 |
}
|
|
114 |
|
|
115 |
// ---------------------------------------------------------------------------
|
|
116 |
// CSecuiDialogNotifier::StartL()
|
|
117 |
// ---------------------------------------------------------------------------
|
|
118 |
//
|
|
119 |
TPtrC8 CSecuiDialogNotifier::StartL( const TDesC8& /*aBuffer*/ )
|
|
120 |
{
|
|
121 |
return KNullDesC8();
|
|
122 |
}
|
|
123 |
|
|
124 |
// ---------------------------------------------------------------------------
|
|
125 |
// CSecuiDialogNotifier::Cancel()
|
|
126 |
// ---------------------------------------------------------------------------
|
|
127 |
//
|
|
128 |
void CSecuiDialogNotifier::Cancel()
|
|
129 |
{
|
63
|
130 |
RDEBUG("0", 0);
|
59
|
131 |
if( iSecuiDialogs && !iIsSecuiDialogsDeleted )
|
|
132 |
{
|
63
|
133 |
RDEBUG("0", 0);
|
59
|
134 |
delete iSecuiDialogs;
|
|
135 |
iSecuiDialogs = NULL;
|
|
136 |
}
|
|
137 |
}
|
|
138 |
|
|
139 |
// ---------------------------------------------------------------------------
|
|
140 |
// CSecuiDialogNotifier::UpdateL()
|
|
141 |
// ---------------------------------------------------------------------------
|
|
142 |
//
|
|
143 |
TPtrC8 CSecuiDialogNotifier::UpdateL( const TDesC8& /*aBuffer*/ )
|
|
144 |
{
|
|
145 |
return KNullDesC8();
|
|
146 |
}
|
|
147 |
|
|
148 |
// ---------------------------------------------------------------------------
|
|
149 |
// CSecuiDialogNotifier::CSecuiDialogNotifier()
|
|
150 |
// ---------------------------------------------------------------------------
|
|
151 |
//
|
|
152 |
CSecuiDialogNotifier::CSecuiDialogNotifier()
|
|
153 |
{
|
63
|
154 |
RDEBUG("0", 0);
|
59
|
155 |
}
|
|
156 |
|
|
157 |
// ---------------------------------------------------------------------------
|
|
158 |
// CSecuiDialogNotifier::ConstructL()
|
|
159 |
// ---------------------------------------------------------------------------
|
|
160 |
//
|
|
161 |
void CSecuiDialogNotifier::ConstructL()
|
|
162 |
{
|
|
163 |
}
|
|
164 |
|
|
165 |
// ---------------------------------------------------------------------------
|
|
166 |
// CSecuiDialogNotifier::DoStartL()
|
|
167 |
// ---------------------------------------------------------------------------
|
|
168 |
//
|
|
169 |
void CSecuiDialogNotifier::DoStartL( const TDesC8& aBuffer, TInt aReplySlot,
|
|
170 |
const RMessagePtr2& aMessage )
|
|
171 |
{
|
63
|
172 |
RDEBUG("0", 0);
|
59
|
173 |
|
|
174 |
iSecuiDialogs = CSecuiDialogs::NewL( iIsSecuiDialogsDeleted );
|
|
175 |
iSecuiDialogs->StartLD( aBuffer, aReplySlot, aMessage );
|
|
176 |
}
|
|
177 |
|