00001 // generated code -- do not edit 00002 00003 #include "ut_telephony_epoc.h" 00004 00005 void ClosureFunc_SignalStrength(bb_Blackboard *, enum bb_DataType, gpointer, int, gpointer arg); 00006 00007 void ClosureFunc_NetworkInfo(bb_Blackboard *, enum bb_DataType, gpointer, int, gpointer arg); 00008 00009 void ClosureFunc_NetworkRegistration(bb_Blackboard *, enum bb_DataType, gpointer, int, gpointer arg); 00010 00011 CGetterAo_FlightMode::CGetterAo_FlightMode(CTelephony &aTelephony, MGetterObs_FlightMode &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00012 { 00013 CActiveScheduler::Add(this); 00014 } 00015 00016 CGetterAo_FlightMode::~CGetterAo_FlightMode() 00017 { 00018 Cancel(); 00019 } 00020 00021 void CGetterAo_FlightMode::MakeRequest() 00022 { 00023 if ((!IsActive())) { 00024 iTelephony.GetFlightMode(iStatus, iDataDes); 00025 SetActive(); 00026 } 00027 } 00028 00029 void CGetterAo_FlightMode::RunL() 00030 { 00031 iInterface.GotData_FlightMode(iStatus.Int()); 00032 } 00033 00034 void CGetterAo_FlightMode::DoCancel() 00035 { 00036 iTelephony.CancelAsync(CTelephony::EGetFlightModeCancel); 00037 } 00038 00039 CNotifyAo_FlightMode::CNotifyAo_FlightMode(CTelephony &aTelephony, MNotifyObs_FlightMode &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00040 { 00041 CActiveScheduler::Add(this); 00042 } 00043 00044 CNotifyAo_FlightMode::~CNotifyAo_FlightMode() 00045 { 00046 Cancel(); 00047 } 00048 00049 void CNotifyAo_FlightMode::MakeRequest() 00050 { 00051 if ((!IsActive())) { 00052 iTelephony.NotifyChange(iStatus, CTelephony::EFlightModeChange, iDataDes); 00053 SetActive(); 00054 } 00055 } 00056 00057 void CNotifyAo_FlightMode::RunL() 00058 { 00059 iInterface.ChangedData_FlightMode(iStatus.Int()); 00060 } 00061 00062 void CNotifyAo_FlightMode::DoCancel() 00063 { 00064 iTelephony.CancelAsync(CTelephony::EFlightModeChangeCancel); 00065 } 00066 00067 CNotifyAo_CallStatus::CNotifyAo_CallStatus(CTelephony &aTelephony, MNotifyObs_CallStatus &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00068 { 00069 CActiveScheduler::Add(this); 00070 } 00071 00072 CNotifyAo_CallStatus::~CNotifyAo_CallStatus() 00073 { 00074 Cancel(); 00075 } 00076 00077 void CNotifyAo_CallStatus::MakeRequest() 00078 { 00079 if ((!IsActive())) { 00080 iTelephony.NotifyChange(iStatus, CTelephony::EVoiceLineStatusChange, iDataDes); 00081 SetActive(); 00082 } 00083 } 00084 00085 void CNotifyAo_CallStatus::RunL() 00086 { 00087 iInterface.ChangedData_CallStatus(iStatus.Int()); 00088 } 00089 00090 void CNotifyAo_CallStatus::DoCancel() 00091 { 00092 iTelephony.CancelAsync(CTelephony::EVoiceLineStatusChangeCancel); 00093 } 00094 00095 CGetterAo_BatteryInfo::CGetterAo_BatteryInfo(CTelephony &aTelephony, MGetterObs_BatteryInfo &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00096 { 00097 CActiveScheduler::Add(this); 00098 } 00099 00100 CGetterAo_BatteryInfo::~CGetterAo_BatteryInfo() 00101 { 00102 Cancel(); 00103 } 00104 00105 void CGetterAo_BatteryInfo::MakeRequest() 00106 { 00107 if ((!IsActive())) { 00108 iTelephony.GetBatteryInfo(iStatus, iDataDes); 00109 SetActive(); 00110 } 00111 } 00112 00113 void CGetterAo_BatteryInfo::RunL() 00114 { 00115 iInterface.GotData_BatteryInfo(iStatus.Int()); 00116 } 00117 00118 void CGetterAo_BatteryInfo::DoCancel() 00119 { 00120 iTelephony.CancelAsync(CTelephony::EGetBatteryInfoCancel); 00121 } 00122 00123 CNotifyAo_BatteryInfo::CNotifyAo_BatteryInfo(CTelephony &aTelephony, MNotifyObs_BatteryInfo &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00124 { 00125 CActiveScheduler::Add(this); 00126 } 00127 00128 CNotifyAo_BatteryInfo::~CNotifyAo_BatteryInfo() 00129 { 00130 Cancel(); 00131 } 00132 00133 void CNotifyAo_BatteryInfo::MakeRequest() 00134 { 00135 if ((!IsActive())) { 00136 iTelephony.NotifyChange(iStatus, CTelephony::EBatteryInfoChange, iDataDes); 00137 SetActive(); 00138 } 00139 } 00140 00141 void CNotifyAo_BatteryInfo::RunL() 00142 { 00143 iInterface.ChangedData_BatteryInfo(iStatus.Int()); 00144 } 00145 00146 void CNotifyAo_BatteryInfo::DoCancel() 00147 { 00148 iTelephony.CancelAsync(CTelephony::EBatteryInfoChangeCancel); 00149 } 00150 00151 CGetterAo_SignalStrength::CGetterAo_SignalStrength(CTelephony &aTelephony, MGetterObs_SignalStrength &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00152 { 00153 CActiveScheduler::Add(this); 00154 } 00155 00156 CGetterAo_SignalStrength::~CGetterAo_SignalStrength() 00157 { 00158 Cancel(); 00159 } 00160 00161 void CGetterAo_SignalStrength::MakeRequest() 00162 { 00163 if ((!IsActive())) { 00164 iTelephony.GetSignalStrength(iStatus, iDataDes); 00165 SetActive(); 00166 } 00167 } 00168 00169 void CGetterAo_SignalStrength::RunL() 00170 { 00171 iInterface.GotData_SignalStrength(iStatus.Int()); 00172 } 00173 00174 void CGetterAo_SignalStrength::DoCancel() 00175 { 00176 iTelephony.CancelAsync(CTelephony::EGetSignalStrengthCancel); 00177 } 00178 00179 CNotifyAo_SignalStrength::CNotifyAo_SignalStrength(CTelephony &aTelephony, MNotifyObs_SignalStrength &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00180 { 00181 CActiveScheduler::Add(this); 00182 } 00183 00184 CNotifyAo_SignalStrength::~CNotifyAo_SignalStrength() 00185 { 00186 Cancel(); 00187 } 00188 00189 void CNotifyAo_SignalStrength::MakeRequest() 00190 { 00191 if ((!IsActive())) { 00192 iTelephony.NotifyChange(iStatus, CTelephony::ESignalStrengthChange, iDataDes); 00193 SetActive(); 00194 } 00195 } 00196 00197 void CNotifyAo_SignalStrength::RunL() 00198 { 00199 iInterface.ChangedData_SignalStrength(iStatus.Int()); 00200 } 00201 00202 void CNotifyAo_SignalStrength::DoCancel() 00203 { 00204 iTelephony.CancelAsync(CTelephony::ESignalStrengthChangeCancel); 00205 } 00206 00207 CGetterAo_NetworkRegistration::CGetterAo_NetworkRegistration(CTelephony &aTelephony, MGetterObs_NetworkRegistration &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00208 { 00209 CActiveScheduler::Add(this); 00210 } 00211 00212 CGetterAo_NetworkRegistration::~CGetterAo_NetworkRegistration() 00213 { 00214 Cancel(); 00215 } 00216 00217 void CGetterAo_NetworkRegistration::MakeRequest() 00218 { 00219 if ((!IsActive())) { 00220 iTelephony.GetNetworkRegistrationStatus(iStatus, iDataDes); 00221 SetActive(); 00222 } 00223 } 00224 00225 void CGetterAo_NetworkRegistration::RunL() 00226 { 00227 iInterface.GotData_NetworkRegistration(iStatus.Int()); 00228 } 00229 00230 void CGetterAo_NetworkRegistration::DoCancel() 00231 { 00232 iTelephony.CancelAsync(CTelephony::EGetNetworkRegistrationStatusCancel); 00233 } 00234 00235 CNotifyAo_NetworkRegistration::CNotifyAo_NetworkRegistration(CTelephony &aTelephony, MNotifyObs_NetworkRegistration &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00236 { 00237 CActiveScheduler::Add(this); 00238 } 00239 00240 CNotifyAo_NetworkRegistration::~CNotifyAo_NetworkRegistration() 00241 { 00242 Cancel(); 00243 } 00244 00245 void CNotifyAo_NetworkRegistration::MakeRequest() 00246 { 00247 if ((!IsActive())) { 00248 iTelephony.NotifyChange(iStatus, CTelephony::ENetworkRegistrationStatusChange, iDataDes); 00249 SetActive(); 00250 } 00251 } 00252 00253 void CNotifyAo_NetworkRegistration::RunL() 00254 { 00255 iInterface.ChangedData_NetworkRegistration(iStatus.Int()); 00256 } 00257 00258 void CNotifyAo_NetworkRegistration::DoCancel() 00259 { 00260 iTelephony.CancelAsync(CTelephony::ENetworkRegistrationStatusChangeCancel); 00261 } 00262 00263 CGetterAo_NetworkInfo::CGetterAo_NetworkInfo(CTelephony &aTelephony, MGetterObs_NetworkInfo &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00264 { 00265 CActiveScheduler::Add(this); 00266 } 00267 00268 CGetterAo_NetworkInfo::~CGetterAo_NetworkInfo() 00269 { 00270 Cancel(); 00271 } 00272 00273 void CGetterAo_NetworkInfo::MakeRequest() 00274 { 00275 if ((!IsActive())) { 00276 iTelephony.GetCurrentNetworkInfo(iStatus, iDataDes); 00277 SetActive(); 00278 } 00279 } 00280 00281 void CGetterAo_NetworkInfo::RunL() 00282 { 00283 iInterface.GotData_NetworkInfo(iStatus.Int()); 00284 } 00285 00286 void CGetterAo_NetworkInfo::DoCancel() 00287 { 00288 iTelephony.CancelAsync(CTelephony::EGetCurrentNetworkInfoCancel); 00289 } 00290 00291 CNotifyAo_NetworkInfo::CNotifyAo_NetworkInfo(CTelephony &aTelephony, MNotifyObs_NetworkInfo &aInterface) : CActive(EPriorityStandard), iDataDes(iData), iTelephony(aTelephony), iInterface(aInterface) 00292 { 00293 CActiveScheduler::Add(this); 00294 } 00295 00296 CNotifyAo_NetworkInfo::~CNotifyAo_NetworkInfo() 00297 { 00298 Cancel(); 00299 } 00300 00301 void CNotifyAo_NetworkInfo::MakeRequest() 00302 { 00303 if ((!IsActive())) { 00304 iTelephony.NotifyChange(iStatus, CTelephony::ECurrentNetworkInfoChange, iDataDes); 00305 SetActive(); 00306 } 00307 } 00308 00309 void CNotifyAo_NetworkInfo::RunL() 00310 { 00311 iInterface.ChangedData_NetworkInfo(iStatus.Int()); 00312 } 00313 00314 void CNotifyAo_NetworkInfo::DoCancel() 00315 { 00316 iTelephony.CancelAsync(CTelephony::ECurrentNetworkInfoChangeCancel); 00317 } 00318 00319 CObserverAo_SignalStrength *CObserverAo_SignalStrength::NewLC(ac_AppContext *aAppContext, MObserverObs_SignalStrength &aInterface) 00320 { 00321 CObserverAo_SignalStrength *object = new (ELeave) CObserverAo_SignalStrength(aAppContext, aInterface); 00322 CleanupStack::PushL(object); 00323 object->ConstructL(); 00324 return object; 00325 } 00326 00327 CObserverAo_SignalStrength *CObserverAo_SignalStrength::NewL(ac_AppContext *aAppContext, MObserverObs_SignalStrength &aInterface) 00328 { 00329 CObserverAo_SignalStrength *object = NewLC(aAppContext, aInterface); 00330 CleanupStack::Pop(); 00331 return object; 00332 } 00333 00334 CObserverAo_SignalStrength::CObserverAo_SignalStrength(ac_AppContext *aAppContext, MObserverObs_SignalStrength &aInterface) : iAppContext(aAppContext), iInterface(aInterface) 00335 { 00336 } 00337 00338 CObserverAo_SignalStrength::~CObserverAo_SignalStrength() 00339 { 00340 BbUnregister(); 00341 (delete iRetryAo); 00342 (delete iNotifier); 00343 (delete iGetter); 00344 } 00345 00346 void CObserverAo_SignalStrength::ConstructL() 00347 { 00348 BbRegisterL(); 00349 (iRetryAo = CRetryAo::NewL((*this), 20, 60)); 00350 (iGetter = new (ELeave) CGetterAo_SignalStrength(ac_Telephony(iAppContext), (*this))); 00351 (iNotifier = new (ELeave) CNotifyAo_SignalStrength(ac_Telephony(iAppContext), (*this))); 00352 if ((!GetFlightMode())) { 00353 iGetter->MakeRequest(); 00354 } 00355 } 00356 00357 void CObserverAo_SignalStrength::BbRegisterL() 00358 { 00359 (iClosure.changed = ClosureFunc_SignalStrength); 00360 (iClosure.arg = this); 00361 if ((!bb_Blackboard_register(ac_get_Blackboard(iAppContext), bb_dt_flightmode, iClosure, NULL))) { 00362 User::LeaveNoMemory(); 00363 } 00364 } 00365 00366 void CObserverAo_SignalStrength::BbUnregister() 00367 { 00368 bb_Blackboard_unregister(ac_get_Blackboard(iAppContext), iClosure); 00369 } 00370 00371 void CObserverAo_SignalStrength::MakeRequest() 00372 { 00373 if (iGetterDone) { 00374 iNotifier->MakeRequest(); 00375 } else { 00376 iGetter->MakeRequest(); 00377 } 00378 } 00379 00380 void CObserverAo_SignalStrength::Cancel() 00381 { 00382 iNotifier->Cancel(); 00383 iGetter->Cancel(); 00384 iRetryAo->Cancel(); 00385 iRetryAo->ResetFailures(); 00386 (iGetterDone = EFalse); 00387 } 00388 00389 TBool CObserverAo_SignalStrength::GetFlightMode() const 00390 { 00391 return bb_Blackboard_board(ac_global_Blackboard)->flightmode; 00392 } 00393 00394 void CObserverAo_SignalStrength::HandleFlightModeChange() 00395 { 00396 if (GetFlightMode()) { 00397 Cancel(); 00398 iInterface.InFlightMode_SignalStrength(); 00399 } else { 00400 MakeRequest(); 00401 } 00402 } 00403 00404 void CObserverAo_SignalStrength::RetryTimerExpired(CRetryAo *, TInt aError) 00405 { 00406 if (aError) { 00407 er_log_symbian(er_FATAL, aError, "retry timer error in CObserverAo_SignalStrength"); 00408 } else { 00409 MakeRequest(); 00410 } 00411 } 00412 00413 void CObserverAo_SignalStrength::GotData_SignalStrength(TInt aError) 00414 { 00415 HandleData(aError, iGetter->Data()); 00416 if ((!aError)) { 00417 (iGetterDone = ETrue); 00418 } 00419 } 00420 00421 void CObserverAo_SignalStrength::ChangedData_SignalStrength(TInt aError) 00422 { 00423 HandleData(aError, iNotifier->Data()); 00424 } 00425 00426 void CObserverAo_SignalStrength::HandleData(TInt aError, TData_SignalStrength const &aData) 00427 { 00428 if (aError) { 00429 iInterface.ReportTransientError_SignalStrength(aError); 00430 if ((!iRetryAo->Retry())) { 00431 iInterface.RetriesExhausted_SignalStrength(); 00432 } 00433 } else { 00434 iRetryAo->ResetFailures(); 00435 iNotifier->MakeRequest(); 00436 iInterface.ObservedData_SignalStrength(aData); 00437 } 00438 } 00439 00440 void ClosureFunc_SignalStrength(bb_Blackboard *, enum bb_DataType, gpointer, int, gpointer arg) 00441 { 00442 (reinterpret_cast<CObserverAo_SignalStrength *>(arg))->HandleFlightModeChange(); 00443 } 00444 00445 CObserverAo_NetworkInfo *CObserverAo_NetworkInfo::NewLC(ac_AppContext *aAppContext, MObserverObs_NetworkInfo &aInterface) 00446 { 00447 CObserverAo_NetworkInfo *object = new (ELeave) CObserverAo_NetworkInfo(aAppContext, aInterface); 00448 CleanupStack::PushL(object); 00449 object->ConstructL(); 00450 return object; 00451 } 00452 00453 CObserverAo_NetworkInfo *CObserverAo_NetworkInfo::NewL(ac_AppContext *aAppContext, MObserverObs_NetworkInfo &aInterface) 00454 { 00455 CObserverAo_NetworkInfo *object = NewLC(aAppContext, aInterface); 00456 CleanupStack::Pop(); 00457 return object; 00458 } 00459 00460 CObserverAo_NetworkInfo::CObserverAo_NetworkInfo(ac_AppContext *aAppContext, MObserverObs_NetworkInfo &aInterface) : iAppContext(aAppContext), iInterface(aInterface) 00461 { 00462 } 00463 00464 CObserverAo_NetworkInfo::~CObserverAo_NetworkInfo() 00465 { 00466 BbUnregister(); 00467 (delete iRetryAo); 00468 (delete iNotifier); 00469 (delete iGetter); 00470 } 00471 00472 void CObserverAo_NetworkInfo::ConstructL() 00473 { 00474 BbRegisterL(); 00475 (iRetryAo = CRetryAo::NewL((*this), 20, 60)); 00476 (iGetter = new (ELeave) CGetterAo_NetworkInfo(ac_Telephony(iAppContext), (*this))); 00477 (iNotifier = new (ELeave) CNotifyAo_NetworkInfo(ac_Telephony(iAppContext), (*this))); 00478 if ((!GetFlightMode())) { 00479 iGetter->MakeRequest(); 00480 } 00481 } 00482 00483 void CObserverAo_NetworkInfo::BbRegisterL() 00484 { 00485 (iClosure.changed = ClosureFunc_NetworkInfo); 00486 (iClosure.arg = this); 00487 if ((!bb_Blackboard_register(ac_get_Blackboard(iAppContext), bb_dt_flightmode, iClosure, NULL))) { 00488 User::LeaveNoMemory(); 00489 } 00490 } 00491 00492 void CObserverAo_NetworkInfo::BbUnregister() 00493 { 00494 bb_Blackboard_unregister(ac_get_Blackboard(iAppContext), iClosure); 00495 } 00496 00497 void CObserverAo_NetworkInfo::MakeRequest() 00498 { 00499 if (iGetterDone) { 00500 iNotifier->MakeRequest(); 00501 } else { 00502 iGetter->MakeRequest(); 00503 } 00504 } 00505 00506 void CObserverAo_NetworkInfo::Cancel() 00507 { 00508 iNotifier->Cancel(); 00509 iGetter->Cancel(); 00510 iRetryAo->Cancel(); 00511 iRetryAo->ResetFailures(); 00512 (iGetterDone = EFalse); 00513 } 00514 00515 TBool CObserverAo_NetworkInfo::GetFlightMode() const 00516 { 00517 return bb_Blackboard_board(ac_global_Blackboard)->flightmode; 00518 } 00519 00520 void CObserverAo_NetworkInfo::HandleFlightModeChange() 00521 { 00522 if (GetFlightMode()) { 00523 Cancel(); 00524 iInterface.InFlightMode_NetworkInfo(); 00525 } else { 00526 MakeRequest(); 00527 } 00528 } 00529 00530 void CObserverAo_NetworkInfo::RetryTimerExpired(CRetryAo *, TInt aError) 00531 { 00532 if (aError) { 00533 er_log_symbian(er_FATAL, aError, "retry timer error in CObserverAo_NetworkInfo"); 00534 } else { 00535 MakeRequest(); 00536 } 00537 } 00538 00539 void CObserverAo_NetworkInfo::GotData_NetworkInfo(TInt aError) 00540 { 00541 HandleData(aError, iGetter->Data()); 00542 if ((!aError)) { 00543 (iGetterDone = ETrue); 00544 } 00545 } 00546 00547 void CObserverAo_NetworkInfo::ChangedData_NetworkInfo(TInt aError) 00548 { 00549 HandleData(aError, iNotifier->Data()); 00550 } 00551 00552 void CObserverAo_NetworkInfo::HandleData(TInt aError, TData_NetworkInfo const &aData) 00553 { 00554 if (aError) { 00555 iInterface.ReportTransientError_NetworkInfo(aError); 00556 if ((!iRetryAo->Retry())) { 00557 iInterface.RetriesExhausted_NetworkInfo(); 00558 } 00559 } else { 00560 iRetryAo->ResetFailures(); 00561 iNotifier->MakeRequest(); 00562 iInterface.ObservedData_NetworkInfo(aData); 00563 } 00564 } 00565 00566 void ClosureFunc_NetworkInfo(bb_Blackboard *, enum bb_DataType, gpointer, int, gpointer arg) 00567 { 00568 (reinterpret_cast<CObserverAo_NetworkInfo *>(arg))->HandleFlightModeChange(); 00569 } 00570 00571 CObserverAo_NetworkRegistration *CObserverAo_NetworkRegistration::NewLC(ac_AppContext *aAppContext, MObserverObs_NetworkRegistration &aInterface) 00572 { 00573 CObserverAo_NetworkRegistration *object = new (ELeave) CObserverAo_NetworkRegistration(aAppContext, aInterface); 00574 CleanupStack::PushL(object); 00575 object->ConstructL(); 00576 return object; 00577 } 00578 00579 CObserverAo_NetworkRegistration *CObserverAo_NetworkRegistration::NewL(ac_AppContext *aAppContext, MObserverObs_NetworkRegistration &aInterface) 00580 { 00581 CObserverAo_NetworkRegistration *object = NewLC(aAppContext, aInterface); 00582 CleanupStack::Pop(); 00583 return object; 00584 } 00585 00586 CObserverAo_NetworkRegistration::CObserverAo_NetworkRegistration(ac_AppContext *aAppContext, MObserverObs_NetworkRegistration &aInterface) : iAppContext(aAppContext), iInterface(aInterface) 00587 { 00588 } 00589 00590 CObserverAo_NetworkRegistration::~CObserverAo_NetworkRegistration() 00591 { 00592 BbUnregister(); 00593 (delete iNotifier); 00594 (delete iGetter); 00595 } 00596 00597 void CObserverAo_NetworkRegistration::ConstructL() 00598 { 00599 BbRegisterL(); 00600 (iGetter = new (ELeave) CGetterAo_NetworkRegistration(ac_Telephony(iAppContext), (*this))); 00601 (iNotifier = new (ELeave) CNotifyAo_NetworkRegistration(ac_Telephony(iAppContext), (*this))); 00602 if ((!GetFlightMode())) { 00603 iGetter->MakeRequest(); 00604 } 00605 } 00606 00607 void CObserverAo_NetworkRegistration::BbRegisterL() 00608 { 00609 (iClosure.changed = ClosureFunc_NetworkRegistration); 00610 (iClosure.arg = this); 00611 if ((!bb_Blackboard_register(ac_get_Blackboard(iAppContext), bb_dt_flightmode, iClosure, NULL))) { 00612 User::LeaveNoMemory(); 00613 } 00614 } 00615 00616 void CObserverAo_NetworkRegistration::BbUnregister() 00617 { 00618 bb_Blackboard_unregister(ac_get_Blackboard(iAppContext), iClosure); 00619 } 00620 00621 void CObserverAo_NetworkRegistration::MakeRequest() 00622 { 00623 if (iGetterDone) { 00624 iNotifier->MakeRequest(); 00625 } else { 00626 iGetter->MakeRequest(); 00627 } 00628 } 00629 00630 void CObserverAo_NetworkRegistration::Cancel() 00631 { 00632 iNotifier->Cancel(); 00633 iGetter->Cancel(); 00634 (iGetterDone = EFalse); 00635 } 00636 00637 TBool CObserverAo_NetworkRegistration::GetFlightMode() const 00638 { 00639 return bb_Blackboard_board(ac_global_Blackboard)->flightmode; 00640 } 00641 00642 void CObserverAo_NetworkRegistration::HandleFlightModeChange() 00643 { 00644 if (GetFlightMode()) { 00645 Cancel(); 00646 iInterface.InFlightMode_NetworkRegistration(); 00647 } else { 00648 MakeRequest(); 00649 } 00650 } 00651 00652 void CObserverAo_NetworkRegistration::GotData_NetworkRegistration(TInt aError) 00653 { 00654 HandleData(aError, iGetter->Data()); 00655 if ((!aError)) { 00656 (iGetterDone = ETrue); 00657 } 00658 } 00659 00660 void CObserverAo_NetworkRegistration::ChangedData_NetworkRegistration(TInt aError) 00661 { 00662 HandleData(aError, iNotifier->Data()); 00663 } 00664 00665 void CObserverAo_NetworkRegistration::HandleData(TInt aError, TData_NetworkRegistration const &aData) 00666 { 00667 if (aError) { 00668 iInterface.Failed_NetworkRegistration(aError); 00669 } else { 00670 iNotifier->MakeRequest(); 00671 iInterface.ObservedData_NetworkRegistration(aData); 00672 } 00673 } 00674 00675 void ClosureFunc_NetworkRegistration(bb_Blackboard *, enum bb_DataType, gpointer, int, gpointer arg) 00676 { 00677 (reinterpret_cast<CObserverAo_NetworkRegistration *>(arg))->HandleFlightModeChange(); 00678 }
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:57 2011 by Doxygen 1.6.1