|
1 // Copyright (c) 2005-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 // Class implementation of CLbsPrivacyNotifier |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 @released |
|
22 */ |
|
23 |
|
24 #include "LbsPrivacyNotifier.h" |
|
25 #include "LbsPrivacyNotifierImpl.h" |
|
26 |
|
27 #include <e32std.h> |
|
28 #include <e32def.h> |
|
29 #include <e32base.h> |
|
30 |
|
31 /** |
|
32 Static constructor |
|
33 */ |
|
34 EXPORT_C CLbsPrivacyNotifier* CLbsPrivacyNotifier::NewL(TPrivacyDialogType aDlg) |
|
35 { |
|
36 CLbsPrivacyNotifier* self=new (ELeave) CLbsPrivacyNotifier; |
|
37 CleanupStack::PushL(self); |
|
38 self->ConstructL(aDlg); |
|
39 CleanupStack::Pop(); |
|
40 return self; |
|
41 } |
|
42 |
|
43 /** |
|
44 Static constructor |
|
45 */ |
|
46 EXPORT_C CLbsPrivacyNotifier* CLbsPrivacyNotifier::NewL(TPrivacyDialogType aDlg, TTimeIntervalMicroSeconds32 aTimeout) |
|
47 { |
|
48 CLbsPrivacyNotifier* self=new (ELeave) CLbsPrivacyNotifier; |
|
49 CleanupStack::PushL(self); |
|
50 self->ConstructL(aDlg, aTimeout); |
|
51 CleanupStack::Pop(); |
|
52 return self; |
|
53 } |
|
54 |
|
55 |
|
56 /** |
|
57 1st phase Constructor |
|
58 */ |
|
59 CLbsPrivacyNotifier::CLbsPrivacyNotifier() |
|
60 { |
|
61 } |
|
62 |
|
63 /** |
|
64 2nd phase Constructor |
|
65 */ |
|
66 void CLbsPrivacyNotifier::ConstructL(TPrivacyDialogType aDlg) |
|
67 { |
|
68 iBody = CLbsPrivacyNotifierImpl::NewL(aDlg); |
|
69 } |
|
70 |
|
71 /** |
|
72 2nd phase Constructor |
|
73 */ |
|
74 void CLbsPrivacyNotifier::ConstructL(TPrivacyDialogType aDlg, |
|
75 TTimeIntervalMicroSeconds32 aTimeout) |
|
76 { |
|
77 iBody = CLbsPrivacyNotifierImpl::NewL(aDlg, aTimeout); |
|
78 } |
|
79 |
|
80 /** |
|
81 Destructor |
|
82 */ |
|
83 EXPORT_C CLbsPrivacyNotifier::~CLbsPrivacyNotifier() |
|
84 { |
|
85 if (iBody) |
|
86 delete iBody; |
|
87 } |
|
88 |
|
89 /** |
|
90 Set the observer that will receive the result of the dialog. |
|
91 */ |
|
92 EXPORT_C void CLbsPrivacyNotifier::SetObserver(MLbsPrivacyNotifierObserver* aObserver) |
|
93 { |
|
94 ASSERT(iBody != NULL); |
|
95 iBody->SetObserver(aObserver); |
|
96 } |
|
97 |
|
98 /** |
|
99 Start the display of the dialog. |
|
100 */ |
|
101 EXPORT_C void CLbsPrivacyNotifier::DisplayL(TInt& aErr, const TLbsExternalRequestInfo& aRequestInfo) |
|
102 { |
|
103 ASSERT(iBody != NULL); |
|
104 iBody->DisplayL(aErr, aRequestInfo); |
|
105 } |
|
106 |
|
107 /** |
|
108 Cancel the outstanding dialog. |
|
109 */ |
|
110 EXPORT_C void CLbsPrivacyNotifier::Cancel() |
|
111 { |
|
112 ASSERT(iBody != NULL); |
|
113 //iBody->Cancel(); |
|
114 } |
|
115 |