예제 #1
0
void CLocationEngine::CellTowerData(TBuf<4> aCountryCode, TBuf<8> aNetworkIdentity, TUint aLocationAreaCode, TUint aCellId) {
	if(aLocationAreaCode != 0 && aCellId != 0) {
		if(aLocationAreaCode != iLastCellTower.LocationAreaCode || aCellId != iLastCellTower.CellId) {
			iTimer->Stop();

			if(iEngineState == ELocationWaitForResources) {
				// Still waiting for previous cells secondary resources to complete
				// Send last cell to location server incomplete
				TimerExpired(0);
			}
			
			// Store latest cell tower data
			iLastCellTower.CellId = aCellId;
			iLastCellTower.LocationAreaCode = aLocationAreaCode;
			iLastCellTower.NetworkIdentity.Copy(aNetworkIdentity);
			iLastCellTower.CountryCode.Copy(aCountryCode);
			
			iEngineState = ELocationWaitForTimeout;
			TimerExpired(0);
		}
	}
	else if(iEngineState == ELocationIdle){
		iEngineState = ELocationWaitForTimeout;
		TimerExpired(0);
	}
}
void EngineStatePoolShowShot::Green(bool down)
{
#ifdef SHOW_VALID_SHOTS
  // Play on
  std::cout << "PLAY ON \n";
  TimerExpired();
#endif
}
void CCellTowerDataSimulation::StartL() {	
	TPtr8 pCellBuffer(iCellBuffer->Des());

	if(pCellBuffer.Length() > 0) {
		TimerExpired(0);
	}
	else {
		iObserver->CellTowerError(ECellTowerReadError);
	}
}
예제 #4
0
void IsuCalcLink::Initialize()
{
    Socket = new QTcpSocket;
    connect(Socket, SIGNAL(connected()), this, SLOT(Connected()));
    connect(Socket, SIGNAL(disconnected()), this, SLOT(Disconnected()));
    connect(Socket, SIGNAL(readyRead()), this, SLOT(ReadyRead()));
    connect(Socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(SocketError(QAbstractSocket::SocketError)));
    Timer = new QTimer;
    Timer->setSingleShot(true);
    connect(Timer, SIGNAL(timeout()), this, SLOT(TimerExpired()));
}
예제 #5
0
SceneInfo::SceneInfo(QObject *parent)
   : QObject(parent)
   , Transition(0)
   , NextScene(0)
   , PreviousScene(0)
   , Delay(0)
   , timer(new QTimer(0))
{
   timer->setSingleShot(true);
   connect(timer, SIGNAL(timeout()), this, SLOT(TimerExpired()));
}
void CBuddycloudListComponent::HandlePointerEventL(const TPointerEvent &aPointerEvent) {
	CCoeControl::HandlePointerEventL(aPointerEvent);
	
	if(aPointerEvent.iType == TPointerEvent::EButton1Up) {			
		if(iDraggingAllowed) {
			if(Abs(iDragVelocity) > 5.0) {
				TimerExpired(KDragTimerId);
			}
		}
		else {
			for(TInt i = 0; i < iListItems.Count(); i++) {
				if(iListItems[i].iRect.Contains(aPointerEvent.iPosition)) {
					// Provide feedback
					iTouchFeedback->InstantFeedback(ETouchFeedbackBasic);
					
					HandleItemSelection(iListItems[i].iId);			
					break;
				}
			}
		}
	}
	else if(aPointerEvent.iType == TPointerEvent::EButton1Down) {
		iDragTimer->Stop();
		iDragVelocity = 0.0;
		iDraggingAllowed = false;
		
		iStartDragPosition = aPointerEvent.iPosition.iY;
		iStartDragHandlePosition = iScrollbarHandlePosition;
		
		iLastDragTime.UniversalTime();
		iLastDragPosition = iStartDragPosition;
	}
	else if(aPointerEvent.iType == TPointerEvent::EDrag) {	
		if(!iDraggingAllowed && (aPointerEvent.iPosition.iY + 32 < iStartDragPosition || aPointerEvent.iPosition.iY - 32 > iStartDragPosition)) {
			iDraggingAllowed = true;			
			iSnapToItem = false;
		}
		
		if(iDraggingAllowed) {
			TTime aNow;			
			aNow.UniversalTime();
			
			iDragVelocity = TReal(TReal(iLastDragPosition - aPointerEvent.iPosition.iY) * (1000000.0 / TReal(aNow.MicroSecondsFrom(iLastDragTime).Int64()))) / 20.0;
			
			iLastDragTime.UniversalTime();
			iLastDragPosition = aPointerEvent.iPosition.iY;
			
			iScrollbarHandlePosition = iStartDragHandlePosition + (iStartDragPosition - aPointerEvent.iPosition.iY);
			
			CBuddycloudListComponent::RepositionItems(false);
			RenderScreen();
		}
	}
}
예제 #7
0
SceneInfo::SceneInfo(QString name, QList<int> list, QObject *parent)
   : QObject(parent)
   , SceneName(name)
   , Hotkeys(list)
   , Transition(0)
   , NextScene(0)
   , PreviousScene(0)
   , Delay(0)
   , timer(new QTimer(0))
{
   timer->setSingleShot(true);
   connect(timer, SIGNAL(timeout()), this, SLOT(TimerExpired()));
}
예제 #8
0
void CConfigServer::Close(
	CConfigSession* aConfigSession)
/**
 * Reference counting for the server. When there 
 * are no sessions open then we shutdown, unless 
 * the only one open is oursleves, then we still 
 * shutdown.
 *
 * @internalComponent
 *
 * @param aConfigSession The session to close.
 */
	{
	__FLOG_STATIC(KConfigLoggingTag1(), KConfigLoggingTag2(),_L("CConfigServer::Close Start"));
	
	iSessionIter.SetToFirst();

   	TInt count = 0;
   	while (iSessionIter++ != NULL)
   		count++;

	// if we have one session then it is the current one
	// and ok to shutdown...as this function is called
	// before the session is destroyed...
	if ((!iSessionIter) || (1 == count))
		{
		iSessionIter.SetToFirst();
		if (iSessionIter == aConfigSession)
			{
			// wait for 10 seconds before shutting down completely...
			// in case anyone wants to connect
			if (!iTimer)
				{
				TRAPD(ret, iTimer = CExpireTimer::NewL());
				if (ret!=KErrNone)
					{
					// OOM so why not just shut down to free some
					// seeing as that's the process that's been set
					// in motion anyway...
					TimerExpired();
					return;
					}
				}
			iTimer->After(KOneSecond * 10, *this);
			}
		}

	__FLOG_STATIC(KConfigLoggingTag1(), KConfigLoggingTag2(),_L("CConfigServer::Close End"));
	}
예제 #9
0
void CLocationEngine::TriggerEngine() {
	if(iCellEnabled && iEngineState == ELocationIdle) {
#ifndef __WINSCW__
		iLastCellTower.CellId = 0;
		iLastCellTower.LocationAreaCode = 0;
	
		iCellTowerDataHandler->StartL();
#else
		iCellTowerSimulator->StartL();
#endif
	}
	else if(iEngineState > ELocationShutdown) {
		iEngineState = ELocationWaitForTimeout;
		TimerExpired(0);
	}
}
예제 #10
0
/*
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
*/
void CGif_Reader::ConstructL(const TDesC& aFileName)
{
	CActiveScheduler::Add(this);
	iImageDecoder = CImageDecoder::FileNewL(CCoeEnv::Static()->FsSession(),aFileName,KtxTypeImageGif_8);
	iCurrCount = iImageDecoder->FrameCount();
	
	if(iCurrCount > 0)
	{
		iFrame = new(ELeave)CFbsBitmap();
		iFrame->Create(iImageDecoder->FrameInfo(0).iOverallSizeInPixels,iImageDecoder->FrameInfo(0).iFrameDisplayMode);
				
		iBitmapDevice = CFbsBitmapDevice::NewL(iFrame);
		User::LeaveIfError(iBitmapDevice->CreateContext(iGraphicsContext));
		
		TimerExpired();
	}
}
예제 #11
0
void
BMediaEventLooper::DispatchEvent(const media_timed_event *event,
								 bigtime_t lateness,
								 bool realTimeEvent)
{
	PRINT(6, "CALLED BMediaEventLooper::DispatchEvent()\n");

	HandleEvent(event, lateness, realTimeEvent);

	switch (event->type) {
		case BTimedEventQueue::B_START:
			SetRunState(B_STARTED);
			break;

		case BTimedEventQueue::B_STOP:
			SetRunState(B_STOPPED);
			break;

		case BTimedEventQueue::B_SEEK:
			/* nothing */
			break;

		case BTimedEventQueue::B_WARP:
			/* nothing */
			break;

		case BTimedEventQueue::B_TIMER:
			TimerExpired(event->event_time, event->data);
			break;

		default:
			break;
	}

	_DispatchCleanUp(event);
}
예제 #12
0
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMgAppUi::HandleCommandL(TInt aCommand)
    {
    switch (aCommand)
    {
    case EVisitDrJukka:
    	{
			OpenMobileWEBSiteL(this);
    	}
    	break;
    case EAbout:
		{
            HBufC* Abbout(NULL);
            
            if(KAppIsTrial)
                Abbout = KtxAboutText2().AllocLC();
            else
                Abbout = KtxAboutText1().AllocLC();
            
			TPtr Pointter(Abbout->Des());
		
		    CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter); 
		    dlg->PrepareLC(R_AVKON_MESSAGE_QUERY_DIALOG);
		    dlg->QueryHeading()->SetTextL(KtxtApplicationName());
		    
		    TCallBack callback1(OpenMobileWEBSiteL);
		    dlg->SetLink(callback1);
		    dlg->SetLinkTextL(KMobileJukkaLink);

		    dlg->RunLD();
			
			CleanupStack::PopAndDestroy(Abbout);
		}
    	break;
    case EClose2:
    	if(iTimeOutTimer)
    	{
    		iTimeOutTimer->Cancel();
    		TimerExpired();
    	}
    	break;
    case EClose:
    case EAknSoftkeyExit:
    case EEikCmdExit:
    	if(iMainContainer)
		{
			TRAPD(Errr,iMainContainer->SaveValuesL());
		
			RemoveFromStack(iMainContainer);
			// will close the DB...	  
			delete iMainContainer;
			iMainContainer = NULL;
		}
		TRAPD(Errr,DoExitChecksNowL());
    	Exit();
        break;
    case EQuickExit:     
        Exit();
        break;        
    default:
    	if(iMainContainer)
    		iMainContainer->HandleViewCommandL(aCommand);
        break;
        }
    }
예제 #13
0
void CLocationEngine::CellTowerError(TCellTowerError /*aError*/) {
	if(iEngineState == ELocationIdle) {
		iEngineState = ELocationWaitForTimeout;
		TimerExpired(0);
	}
}
예제 #14
0
TimerLibSW::TimerLibSW(Workspace *w, ScriptProcessor *ide, QJSEngine *engine) : m_workspace(w), m_ide(ide), m_se(engine)
{
   m_timer = new QTimer(this);
   connect(m_timer, SIGNAL(timeout()), this, SIGNAL(TimerExpired()));
}