phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherplugin.cpp
equal
deleted
inserted
replaced
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include "ccappcommlauncherheaders.h" |
19 #include "ccappcommlauncherheaders.h" |
20 #include <phonebook2ece.mbg> |
20 #include <phonebook2ece.mbg> |
21 #include "ccappcommlaunchersetdefault.h" |
|
22 |
21 |
23 |
22 |
24 #include <mccappengine.h> |
23 #include <mccappengine.h> |
25 |
24 |
26 // Consts |
25 // Consts |
73 } |
72 } |
74 |
73 |
75 delete iMenuHandler; |
74 delete iMenuHandler; |
76 |
75 |
77 delete iContactHandler; |
76 delete iContactHandler; |
78 delete iSetDefault; |
|
79 delete iContactorService; |
77 delete iContactorService; |
80 |
78 |
81 if ( iWaitFinish && iWaitFinish->IsStarted() ) |
|
82 { |
|
83 iWaitFinish->AsyncStop(); |
|
84 } |
|
85 delete iWaitFinish; |
|
86 |
79 |
87 delete iAiwRequestTimer; |
80 delete iAiwRequestTimer; |
88 |
81 |
89 CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::~CCCAppCommLauncherPlugin()")); |
82 CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::~CCCAppCommLauncherPlugin()")); |
90 } |
83 } |
105 // |
98 // |
106 void CCCAppCommLauncherPlugin::ConstructL() |
99 void CCCAppCommLauncherPlugin::ConstructL() |
107 { |
100 { |
108 CCA_DP(KCommLauncherLogFile, CCA_L("ConstructL()")); |
101 CCA_DP(KCommLauncherLogFile, CCA_L("ConstructL()")); |
109 // ConstructL should be as light as possible. |
102 // ConstructL should be as light as possible. |
110 iWaitFinish = new (ELeave) CActiveSchedulerWait(); |
|
111 iSetDefault = CCCAppCommLauncherLSetDefault::NewL(*this); |
|
112 } |
103 } |
113 |
104 |
114 // --------------------------------------------------------------------------- |
105 // --------------------------------------------------------------------------- |
115 // CCCAppCommLauncherPlugin::PreparePluginViewL |
106 // CCCAppCommLauncherPlugin::PreparePluginViewL |
116 // --------------------------------------------------------------------------- |
107 // --------------------------------------------------------------------------- |
132 |
123 |
133 PrepareViewResourcesL(); |
124 PrepareViewResourcesL(); |
134 InitialisePreferredCommMethods(); |
125 InitialisePreferredCommMethods(); |
135 |
126 |
136 BaseConstructL( R_COMMLAUNCHER_VIEW ); |
127 BaseConstructL( R_COMMLAUNCHER_VIEW ); |
137 |
128 |
138 // Set default for Voice call and Message |
|
139 // Not auto setting default for now |
|
140 // iSetDefault->ExecuteAssignDefaultL(); |
|
141 // iWaitFinish->Start(); |
|
142 |
129 |
143 CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::PreparePluginViewL()")); |
130 CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::PreparePluginViewL()")); |
144 } |
131 } |
145 |
132 |
146 // --------------------------------------------------------------------------- |
133 // --------------------------------------------------------------------------- |
396 { |
383 { |
397 return iContactorService; |
384 return iContactorService; |
398 } |
385 } |
399 |
386 |
400 // --------------------------------------------------------------------------- |
387 // --------------------------------------------------------------------------- |
401 // CCCAppCommLauncherPlugin::DefaultSettingComplete |
|
402 // --------------------------------------------------------------------------- |
|
403 // |
|
404 void CCCAppCommLauncherPlugin::DefaultSettingComplete() |
|
405 { |
|
406 if ( iWaitFinish && iWaitFinish->IsStarted() ) |
|
407 { |
|
408 iWaitFinish->AsyncStop(); |
|
409 } |
|
410 } |
|
411 |
|
412 // --------------------------------------------------------------------------- |
|
413 // CCCAppCommLauncherPlugin::StartTimerL |
388 // CCCAppCommLauncherPlugin::StartTimerL |
414 // --------------------------------------------------------------------------- |
389 // --------------------------------------------------------------------------- |
415 // |
390 // |
416 void CCCAppCommLauncherPlugin::StartTimerL() |
391 void CCCAppCommLauncherPlugin::StartTimerL() |
417 { |
392 { |
447 // CCCAppCommLauncherPlugin::IsTopContactL |
422 // CCCAppCommLauncherPlugin::IsTopContactL |
448 // --------------------------------------------------------------------------- |
423 // --------------------------------------------------------------------------- |
449 // |
424 // |
450 TBool CCCAppCommLauncherPlugin::IsTopContactL() |
425 TBool CCCAppCommLauncherPlugin::IsTopContactL() |
451 { |
426 { |
452 return EFalse;//todo |
427 return iContactHandler->IsTopContact(); |
453 } |
428 } |
454 |
429 |
455 // --------------------------------------------------------------------------- |
430 // --------------------------------------------------------------------------- |
456 // CCCAppCommLauncherPlugin::IsContactL |
431 // CCCAppCommLauncherPlugin::IsContactL |
457 // --------------------------------------------------------------------------- |
432 // --------------------------------------------------------------------------- |