Beispiel #1
0
void CodaSignalHandler::handleAppExited(const Coda::CodaEvent &event)
{
    const Coda::CodaProcessExitedEvent &pEvent = static_cast<const Coda::CodaProcessExitedEvent &>(event);
    QString id = pEvent.idString();
    if (!id.compare(d->appID, Qt::CaseInsensitive)) {
        d->codaDevice->sendDebugSessionControlSessionEndCommand(Coda::CodaCallback(this, &CodaSignalHandler::handleDebugSessionControlEnd));
        d->action = static_cast<CodaAction>(d->action & ~ActionRun);
        handleActions();
    }
}
Beispiel #2
0
void CodaSignalHandler::handleSymbianInstall(const Coda::CodaCommandResult &result)
{
    if (result.type == Coda::CodaCommandResult::SuccessReply) {
        reportMessage(tr("Installation has finished."));
        d->action = static_cast<CodaAction>(d->action & ~ActionInstall);
        handleActions();
    } else {
        reportError(tr("Installation failed: %1").arg(result.errorString()));
    }
}
Beispiel #3
0
void Module::processEventQueue() {
	if (!isRunning())
		return;

	replaceModule();

	if (!isRunning())
		return;

	handleEvents();
	handleActions();
}
Beispiel #4
0
void CodaSignalHandler::handleConnected(const Coda::CodaEvent &event)
{
    if (d->connected)
        return;

    const Coda::CodaLocatorHelloEvent &hEvent = static_cast<const Coda::CodaLocatorHelloEvent &>(event);
    QStringList services = hEvent.services();
    if (services.contains("DebugSessionControl")) {
        d->debugSessionControl = true;
    }
    d->connected = true;
    handleActions();
}
Beispiel #5
0
void CodaSignalHandler::handleFileSystemClose(const Coda::CodaCommandResult &result)
{
    if (result.type == Coda::CodaCommandResult::SuccessReply) {
        reportMessage(tr("File closed."));
        if (d->action & ActionCopy) {
            d->action = static_cast<CodaAction>(d->action & ~ActionCopy);
        } else if (d->action & ActionDownload) {
            d->action = static_cast<CodaAction>(d->action & ~ActionDownload);
        }
        handleActions();
    } else {
        reportError(tr("Failed to close the remote file: %1").arg(result.toString()));
    }
}
Beispiel #6
0
void Module::processEventQueue() {
	if (!isRunning())
		return;

	replaceModule();
	enterArea();

	if (!isRunning())
		return;

	handleEvents();
	handleActions();

	_ingameGUI->updatePartyMember(0, *_pc);
}
Beispiel #7
0
void Module::unloadModule() {
	runScript(kScriptExit, this, _pc);
	handleActions();

	_delayedActions.clear();

	TwoDAReg.clear();

	clearVariables();
	clearScripts();

	_tag.clear();

	_ifo.unload();

	ResMan.undo(_resModule);

	_newModule.clear();
	_hasModule = false;
}
Beispiel #8
0
void Module::run() {
	enter();
	_running = true;

	EventMan.enableKeyRepeat();

	_ingameGUI->show();

	try {

		EventMan.flushEvents();

		while (!EventMan.quitRequested() && !_exit && !_newArea.empty()) {
			replaceModule();
			enterArea();
			if (_exit)
				break;

			handleEvents();
			handleActions();

			_ingameGUI->updatePartyMember(0, *_pc);

			if (!EventMan.quitRequested() && !_exit && !_newArea.empty())
				EventMan.delay(10);
		}

	} catch (Common::Exception &e) {
		_running = false;

		e.add("Failed running module \"%s\"", _ifo.getName().getString().c_str());
		throw e;
	}

	_ingameGUI->stopConversation();
	_ingameGUI->hide();

	EventMan.enableKeyRepeat(0);

	_running = false;
}
Beispiel #9
0
void Module::unloadModule() {
	runScript(kScriptExit, this, _pc);
	handleActions();

	_eventQueue.clear();
	_delayedActions.clear();

	TwoDAReg.clear();

	clearVariables();
	clearScripts();

	_tag.clear();

	_ifo.unload();

	deindexResources(_resModule);

	_newModule.clear();
	_hasModule = false;
}