9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Calendar async callback implementation |
14 * Description: Calendar async callback implementation |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 |
17 |
19 |
18 |
20 // INCLUDE FILES |
19 // INCLUDE FILES |
21 |
20 |
22 #include "calenasynccallback.h" |
21 #include "calenasynccallback.h" |
23 #include "calendarui_debug.h" |
22 #include "calendarui_debug.h" |
|
23 #include "OstTraceDefinitions.h" |
|
24 #ifdef OST_TRACE_COMPILER_IN_USE |
|
25 #include "calenasynccallbackTraces.h" |
|
26 #endif |
|
27 |
24 |
28 |
25 |
29 |
26 // --------------------------------------------------------------------------- |
30 // --------------------------------------------------------------------------- |
27 // CCalenAsyncCallBack::CCalenAsyncCallBack |
31 // CalenAsyncCallBack::CalenAsyncCallBack |
28 // C++ constructor |
32 // C++ constructor |
29 // (other items were commented in a header). |
33 // (other items were commented in a header). |
30 // --------------------------------------------------------------------------- |
34 // --------------------------------------------------------------------------- |
31 // |
35 // |
32 CCalenAsyncCallBack::CCalenAsyncCallBack(TCallBack& aCallBack, CActive::TPriority aPriority, |
36 CalenAsyncCallBack::CalenAsyncCallBack(TCallBack& aCallBack, CActive::TPriority aPriority, |
33 CCalenController& aController) |
37 CCalenController& aController) |
34 :CAsyncCallBack(aCallBack, aPriority), |
38 :CAsyncCallBack(aCallBack, aPriority), |
35 iController(aController) |
39 iController(aController) |
36 { |
40 { |
37 TRACE_ENTRY_POINT; |
41 OstTraceFunctionEntry0( CALENASYNCCALLBACK_CALENASYNCCALLBACK_ENTRY ); |
38 TRACE_EXIT_POINT; |
42 |
|
43 OstTraceFunctionExit0( CALENASYNCCALLBACK_CALENASYNCCALLBACK_EXIT ); |
39 } |
44 } |
40 |
45 |
41 // --------------------------------------------------------------------------- |
46 // --------------------------------------------------------------------------- |
42 // CCalenAsyncCallBack::NewL |
47 // CalenAsyncCallBack::NewL |
43 // First phase construction |
48 // First phase construction |
44 // (other items were commented in a header). |
49 // (other items were commented in a header). |
45 // --------------------------------------------------------------------------- |
50 // --------------------------------------------------------------------------- |
46 // |
51 // |
47 CCalenAsyncCallBack* CCalenAsyncCallBack::NewL(TCallBack& aCallBack, CActive::TPriority aPriority, |
52 CalenAsyncCallBack* CalenAsyncCallBack::NewL(TCallBack& aCallBack, CActive::TPriority aPriority, |
48 CCalenController& aController) |
53 CCalenController& aController) |
49 { |
54 { |
50 TRACE_ENTRY_POINT; |
55 OstTraceFunctionEntry0( CALENASYNCCALLBACK_NEWL_ENTRY ); |
51 |
56 |
52 CCalenAsyncCallBack* self = new( ELeave ) CCalenAsyncCallBack( aCallBack, aPriority , aController ); |
57 CalenAsyncCallBack* self = new( ELeave ) CalenAsyncCallBack( aCallBack, aPriority , aController ); |
53 |
58 |
54 TRACE_EXIT_POINT; |
59 OstTraceFunctionExit0( CALENASYNCCALLBACK_NEWL_EXIT ); |
55 return self; |
60 return self; |
56 } |
61 } |
57 // --------------------------------------------------------------------------- |
62 // --------------------------------------------------------------------------- |
58 // CCalenAsyncCallBack::~CCalenAsyncCallBack |
63 // CalenAsyncCallBack::~CalenAsyncCallBack |
59 // C++ Destructor |
64 // C++ Destructor |
60 // (other items were commented in a header). |
65 // (other items were commented in a header). |
61 // --------------------------------------------------------------------------- |
66 // --------------------------------------------------------------------------- |
62 // |
67 // |
63 CCalenAsyncCallBack::~CCalenAsyncCallBack() |
68 CalenAsyncCallBack::~CalenAsyncCallBack() |
64 { |
69 { |
65 TRACE_ENTRY_POINT; |
70 OstTraceFunctionEntry0( DUP1_CALENASYNCCALLBACK_CALENASYNCCALLBACK_ENTRY ); |
66 TRACE_EXIT_POINT; |
71 |
|
72 OstTraceFunctionExit0( DUP1_CALENASYNCCALLBACK_CALENASYNCCALLBACK_EXIT ); |
67 } |
73 } |
68 |
74 |
69 // --------------------------------------------------------------------------- |
75 // --------------------------------------------------------------------------- |
70 // CCalenAsyncCallBack::BaseConstructL |
76 // CalenAsyncCallBack::BaseConstructL |
71 // (other items were commented in a header). |
77 // (other items were commented in a header). |
72 // --------------------------------------------------------------------------- |
78 // --------------------------------------------------------------------------- |
73 // |
79 // |
74 void CCalenAsyncCallBack::BaseConstructL() |
80 void CalenAsyncCallBack::BaseConstructL() |
75 { |
81 { |
76 TRACE_ENTRY_POINT; |
82 OstTraceFunctionEntry0( CALENASYNCCALLBACK_BASECONSTRUCTL_ENTRY ); |
77 |
83 |
78 TRACE_EXIT_POINT; |
84 OstTraceFunctionExit0( CALENASYNCCALLBACK_BASECONSTRUCTL_EXIT ); |
79 } |
85 } |
80 |
86 |
81 // --------------------------------------------------------------------------- |
87 // --------------------------------------------------------------------------- |
82 // CCalenAsyncCallBack::RunL |
88 // CalenAsyncCallBack::RunL |
83 // Handle Completion |
89 // Handle Completion |
84 // (other items were commented in a header). |
90 // (other items were commented in a header). |
85 // --------------------------------------------------------------------------- |
91 // --------------------------------------------------------------------------- |
86 // |
92 // |
87 void CCalenAsyncCallBack::RunL() |
93 void CalenAsyncCallBack::RunL() |
88 { |
94 { |
89 TRACE_ENTRY_POINT; |
95 OstTraceFunctionEntry0( CALENASYNCCALLBACK_RUNL_ENTRY ); |
90 |
96 |
91 if(iCallBack.CallBack()) |
97 if(iCallBack.CallBack()) |
92 { |
98 { |
93 // callback only if any of the command handlers |
99 // callback only if any of the command handlers |
94 // request for continuing the executing command |
100 // request for continuing the executing command |
95 CallBack(); |
101 CallBack(); |
96 } |
102 } |
97 |
103 |
98 TRACE_EXIT_POINT; |
104 OstTraceFunctionExit0( CALENASYNCCALLBACK_RUNL_EXIT ); |
99 } |
105 } |
100 |
106 |
101 |
107 |