|
1 /* |
|
2 * Copyright (c) 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: Calendar async callback implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include "calenasynccallback.h" |
|
23 #include "calendarui_debug.h" |
|
24 |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // CCalenAsyncCallBack::CCalenAsyncCallBack |
|
28 // C++ constructor |
|
29 // (other items were commented in a header). |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 CCalenAsyncCallBack::CCalenAsyncCallBack(TCallBack& aCallBack, CActive::TPriority aPriority, |
|
33 CCalenController& aController) |
|
34 :CAsyncCallBack(aCallBack, aPriority), |
|
35 iController(aController) |
|
36 { |
|
37 TRACE_ENTRY_POINT; |
|
38 TRACE_EXIT_POINT; |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // CCalenAsyncCallBack::NewL |
|
43 // First phase construction |
|
44 // (other items were commented in a header). |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 CCalenAsyncCallBack* CCalenAsyncCallBack::NewL(TCallBack& aCallBack, CActive::TPriority aPriority, |
|
48 CCalenController& aController) |
|
49 { |
|
50 TRACE_ENTRY_POINT; |
|
51 |
|
52 CCalenAsyncCallBack* self = new( ELeave ) CCalenAsyncCallBack( aCallBack, aPriority , aController ); |
|
53 |
|
54 TRACE_EXIT_POINT; |
|
55 return self; |
|
56 } |
|
57 // --------------------------------------------------------------------------- |
|
58 // CCalenAsyncCallBack::~CCalenAsyncCallBack |
|
59 // C++ Destructor |
|
60 // (other items were commented in a header). |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 CCalenAsyncCallBack::~CCalenAsyncCallBack() |
|
64 { |
|
65 TRACE_ENTRY_POINT; |
|
66 TRACE_EXIT_POINT; |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // CCalenAsyncCallBack::BaseConstructL |
|
71 // (other items were commented in a header). |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 void CCalenAsyncCallBack::BaseConstructL() |
|
75 { |
|
76 TRACE_ENTRY_POINT; |
|
77 |
|
78 TRACE_EXIT_POINT; |
|
79 } |
|
80 |
|
81 // --------------------------------------------------------------------------- |
|
82 // CCalenAsyncCallBack::RunL |
|
83 // Handle Completion |
|
84 // (other items were commented in a header). |
|
85 // --------------------------------------------------------------------------- |
|
86 // |
|
87 void CCalenAsyncCallBack::RunL() |
|
88 { |
|
89 TRACE_ENTRY_POINT; |
|
90 |
|
91 if(iCallBack.CallBack()) |
|
92 { |
|
93 // callback only if any of the command handlers |
|
94 // request for continuing the executing command |
|
95 CallBack(); |
|
96 } |
|
97 |
|
98 TRACE_EXIT_POINT; |
|
99 } |
|
100 |
|
101 |