np::TransferSuccess np::BufferComponent::addPackets( std::list<np::ResourcePacket*>* packets)
{
	TransferSuccess fResult = TYPE_CONFLICT;

	std::list<np::ResourcePacket*>::iterator i = packets->begin();
	while ( !packets->empty())
	{
		TransferSuccess result = appendPacket( packets->front());

		if ( result == PARTIAL)
		{
			return PARTIAL;
		}
		else if ( result == FULL)
		{
			packets->pop_front();

			fResult = FULL;
		}
		else
		{
			return TYPE_CONFLICT;
		}
	}

	return fResult;
}
void TextEditorRemoteNode::syntaxErrorsUpdated( QList<fugio::SyntaxError> pSyntaxErrors )
{
	Packet		P( PACKET_ERRORS );

	P.stream() << pSyntaxErrors;

	appendPacket( P );
}
void TextEditorRemoteNode::sendHighlighter( const QUuid &pUuid )
{
	Packet		P( PACKET_HIGHLIGHTER );

	P.stream() << pUuid;

	appendPacket( P );
}
void TextEditorRemoteNode::sendText( const QString &pText )
{
	Packet		P( PACKET_TEXT );

	P.stream() << pText;

	appendPacket( P );
}
Exemple #5
0
void LTWindow::stopRecording(bool autoStop)
{
    recording = false;
    ui->actionOpen->setEnabled(true);
    ui->actionRecord->setEnabled(true);
    ui->actionLT_files_data_base->setEnabled(true);
    ui->actionStop_recording->setEnabled(false);

    if (!autoStop)
        eventRecorder->stopRecording();

//    disconnect(streamReader, SIGNAL(packetParsed(Packet)), eventRecorder, SLOT(appendPacket(Packet)));
    disconnect(streamReader, SIGNAL(packetParsed(QPair<Packet, qint64>)), eventRecorder, SLOT(appendPacket(QPair<Packet, qint64>)));
}
Exemple #6
0
void LTWindow::startRecording(bool autoRecord)
{
    //if the current session is recorded while auto record has turned on we don't do anything
    if (autoRecord == true &&
        eventRecorder->isSessionRecorded() == true)
        return;

    recording = true;
    ui->actionStop_recording->setEnabled(true);
    ui->actionRecord->setEnabled(false);
    ui->actionLT_files_data_base->setEnabled(false);
//        ui->actionRecord->setIcon(QIcon(":/ui_icons/stop.png"));
    ui->actionOpen->setEnabled(false);
    eventRecorder->startRecording(delayWidget->getDelay());
//    connect(streamReader, SIGNAL(packetParsed(Packet)), eventRecorder, SLOT(appendPacket(Packet)));
    connect(streamReader, SIGNAL(packetParsed(QPair<Packet, qint64>)), eventRecorder, SLOT(appendPacket(QPair<Packet, qint64>)));

    if (!sessionTimer->isActive())
    {
        sessionTimer->start();
        driverTrackerWidget->startTimer();
    }
}