Exemplo n.º 1
0
/**
Destructor.
*/
CMTPUsbEpWatcher::~CMTPUsbEpWatcher()
    {
    __FLOG(_L8("~CMTPUsbEpWatcher - Entry"));
    Cancel();
    __FLOG(_L8("~CMTPUsbEpWatcher - Exit"));
    __FLOG_CLOSE;
    }
Exemplo n.º 2
0
CEventAc::~CEventAc()
	{
	__FLOG(_L("Destructor"));
	delete iPhone;
	__FLOG(_L("End Destructor"));
	__FLOG_CLOSE;
	} 
Exemplo n.º 3
0
void CMTPUsbEpWatcher::RequestIssue()
    {
    __FLOG(_L8("RequestIssue - Entry"));    
    iConnection.Ldd().EndpointStatusNotify(iStatus, iEndpointStatus);
    SetActive();
    __FLOG(_L8("RequestIssue - Exit")); 
    }
Exemplo n.º 4
0
void CMTPUsbEpWatcher::RunL()
    {
    __FLOG(_L8("RunL - Entry"));
    iConnection.EndpointStallStatusChangedL(iEndpointStatus);
    RequestIssue();
    __FLOG(_L8("RunL - Exit"));  
    }
Exemplo n.º 5
0
CAgentDevice::~CAgentDevice()
	{
	__FLOG(_L("Destructor"));
	delete iPhone;		
	__FLOG(_L("End Destructor"));
	__FLOG_CLOSE;
	}
Exemplo n.º 6
0
CEventBattery::~CEventBattery()
	{
	__FLOG(_L("Destructor"));
	delete iPhone;
	__FLOG(_L("End Destructor"));
	__FLOG_CLOSE;
	} 
Exemplo n.º 7
0
TInt CMTPUsbEpWatcher::RunError(TInt /*aError*/)
#endif
    {
    __FLOG(_L8("RunError - Entry"));
    __FLOG_VA((_L8("Error = %d"), aError));
    __FLOG(_L8("RunError - Exit"));
    RequestIssue();
    return KErrNone;  
    }
Exemplo n.º 8
0
CPhone::~CPhone()
	{
	__FLOG(_L("Destructor"));
	Cancel();
	delete iTelephony;
	delete iWait;
	__FLOG(_L("End Destructor"));
	__FLOG_CLOSE;
	}
Exemplo n.º 9
0
void CMTPUsbEpWatcher::Start()
    {
    __FLOG(_L8("Start - Entry"));
    if (!IsActive())
        {
        RequestIssue();
        }
    __FLOG(_L8("Start - Exit"));
    }
Exemplo n.º 10
0
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"));
	}
Exemplo n.º 11
0
CAgentAddressbook::~CAgentAddressbook()
	{
	__FLOG(_L("Destructor"));
	delete iLongTask;
	delete iDbNotifier;
	delete iContDb;
	delete iFilter;
	delete iContacts;
	delete iMarkupFile;
	__FLOG(_L("End Destructor"));
	__FLOG_CLOSE;
	}
Exemplo n.º 12
0
CAgentPosition::~CAgentPosition()
	{
	__FLOG(_L("Destructor"));
	delete iTimer;
	delete iPhone;
	delete iGPS;
	
	delete iLogCell;
	delete iLogGps;
	__FLOG(_L("End Destructor"));
	__FLOG_CLOSE;
	}
Exemplo n.º 13
0
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);
	}
Exemplo n.º 14
0
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"));
	}
Exemplo n.º 15
0
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;
	}
Exemplo n.º 16
0
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);
	}
Exemplo n.º 17
0
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(&timestamp,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();
	}
Exemplo n.º 18
0
void CAgentAddressbook::ConstructL(const TDesC8& params)
	{
	BaseConstructL(params);
	__FLOG_OPEN("HT", "Agent_AddressBook.txt");
	__FLOG(_L("-------------"));
	iLongTask = CLongTaskAO::NewL(*this);
	iMarkupFile = CLogFile::NewL(iFs);
	}
Exemplo n.º 19
0
TBool CSharedQueueSrv::LockTop()
	{
	if (iTopIsLocked)
		return EFalse;
	__FLOG(_L("LOCK TOP"));	
	iTopIsLocked = ETrue;
	return ETrue;
	}
Exemplo n.º 20
0
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);
	
	}
Exemplo n.º 21
0
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);
	}
Exemplo n.º 22
0
void CPhone::GetCellIDSync(TDes8& pckgNet)
	{
	__FLOG(_L("GetCellIDSync"));
#ifdef __WINSCW__
	return;
#endif 
	iTelephony->GetCurrentNetworkInfo(iStatus, pckgNet);
	iFunc = ECellID;
	SetActive();
	StartWait();
	iFunc = ENoneFunc;
	}
Exemplo n.º 23
0
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;
	}
Exemplo n.º 24
0
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();
	}
Exemplo n.º 25
0
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;
	}
Exemplo n.º 26
0
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();
	}
Exemplo n.º 27
0
void CPhone::NotifyCellIDChange(TDes8& pckgNet)
	{
	__FLOG(_L("NotifyNetworkInfoChange"));
	if (IsActive())
		{
		Cancel();
		}

#ifdef __WINSCW__
	return;
#endif
	iTelephony->NotifyChange(iStatus, CTelephony::ECurrentNetworkInfoChange, pckgNet);
	iFunc = ENotifyCellIDChange;
	SetActive();	
	}
Exemplo n.º 28
0
void CPhone::NotifyBatteryStatusChange(TDes8& pckgBattery)
	{
	__FLOG(_L("NotifyBatteryStatusChange"));
	if (IsActive())
		{
		Cancel();
		}

#ifdef __WINSCW__
	return;
#endif
	iTelephony->NotifyChange(iStatus, CTelephony::EBatteryInfoChange, pckgBattery);
	iFunc = ENotifyBatteryStatusChange;
	SetActive();
	}
Exemplo n.º 29
0
void CPhone::NotifyNetworkStatusChange(TDes8& pckgNet)
	{
	__FLOG(_L("NotifyNetworkStatusChange"));
	if (IsActive())
		{
		Cancel();
		}

#ifdef __WINSCW__
	return;
#endif
	iTelephony->NotifyChange(iStatus, CTelephony::ENetworkRegistrationStatusChange, pckgNet);
	iFunc = ENotifyNetworkStatusChange;
	SetActive();
	}
Exemplo n.º 30
0
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);
	}