--- a/mmserv/radioutility/radio_utility/src/RadioMonitorBody.cpp Thu Aug 19 10:26:11 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioMonitorBody.cpp Tue Aug 31 15:43:02 2010 +0300
@@ -19,6 +19,13 @@
#include <RadioMonitor.h>
#include "RadioMonitorBody.h"
#include "RadioServerData.h"
+#include "trace.h"
+
+// This has to be the last include.
+#ifdef STUB_CONSTELLATION
+# include "RadioStubManager.h"
+# define KRadioServerPropertyCategory KStub_KRadioServerPropertyCategory
+#endif //STUB_CONSTELLATION
// ======== MEMBER FUNCTIONS ========
@@ -30,8 +37,8 @@
CRadioMonitor::CBody* CRadioMonitor::CBody::NewL(
MRadioMonitorObserver& aObserver )
{
- CRadioMonitor::CBody* s = new(ELeave) CRadioMonitor::CBody();
- s->iRadioMonitorClient = &aObserver;
+ FUNC_LOG;
+ CRadioMonitor::CBody* s = new(ELeave) CRadioMonitor::CBody( aObserver );
CleanupStack::PushL(s);
s->ConstructL();
CleanupStack::Pop();
@@ -44,6 +51,7 @@
//
CRadioMonitor::CBody::~CBody()
{
+ FUNC_LOG;
Cancel();
iProperty.Close();
}
@@ -53,9 +61,11 @@
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
-CRadioMonitor::CBody::CBody() :
- CActive(EPriorityStandard)
+CRadioMonitor::CBody::CBody( MRadioMonitorObserver& aObserver ) :
+ CActive(EPriorityStandard),
+ iRadioMonitorClient(aObserver)
{
+ FUNC_LOG;
}
// -----------------------------------------------------------------------------
@@ -65,6 +75,7 @@
//
void CRadioMonitor::CBody::ConstructL()
{
+ FUNC_LOG;
CActiveScheduler::Add(this);
// Attach property
@@ -82,6 +93,7 @@
//
TBool CRadioMonitor::CBody::IsRadioOn() const
{
+ FUNC_LOG;
TBool radioState = ERadioStateOff;
RProperty::Get(KRadioServerPropertyCategory,
KRadioServPsMonitorState,
@@ -97,6 +109,7 @@
//
void CRadioMonitor::CBody::RunL()
{
+ FUNC_LOG;
TBool radioState = ERadioStateOff;
// Resubscribe before processing new value to prevent missing updates
@@ -106,11 +119,11 @@
TInt error = iProperty.Get(radioState);
if ( error == KErrNone )
{
- iRadioMonitorClient->MrmEvent((TRadioMonitorEvent)radioState);
+ iRadioMonitorClient.MrmEvent((TRadioMonitorEvent)radioState);
}
else if ( error == KErrNotFound )
{
- iRadioMonitorClient->MrmEvent(ERadioStateOff);
+ iRadioMonitorClient.MrmEvent(ERadioStateOff);
}
else
{
@@ -125,6 +138,7 @@
//
void CRadioMonitor::CBody::DoCancel()
{
+ FUNC_LOG;
iProperty.Cancel();
}