diff --git a/client/port.cpp b/client/port.cpp index 1bbe616..50f1716 100644 --- a/client/port.cpp +++ b/client/port.cpp @@ -583,12 +583,12 @@ bool Port::openStreams(QString fileName, bool append, QString &error) connect(fmt, SIGNAL(progress(int)), &progress, SLOT(setValue(int))); connect(&progress, SIGNAL(canceled()), fmt, SLOT(cancel())); - fmt->openStreamsOffline(fileName, streams, error); - qDebug("after open offline"); + fmt->openAsync(fileName, streams, error); + qDebug("after open async"); while (!fmt->isFinished()) qApp->processEvents(); - qDebug("wait over for offline operation"); + qDebug("wait over for async operation"); if (!fmt->result()) goto _fail; @@ -676,12 +676,12 @@ bool Port::saveStreams(QString fileName, QString fileType, QString &error) qApp->processEvents(); } - fmt->saveStreamsOffline(streams, fileName, error); - qDebug("after save offline"); + fmt->saveAsync(streams, fileName, error); + qDebug("after save async"); while (!fmt->isFinished()) qApp->processEvents(); - qDebug("wait over for offline operation"); + qDebug("wait over for async operation"); ret = fmt->result(); goto _exit; diff --git a/common/ostmfileformat.cpp b/common/ostmfileformat.cpp index 7da2685..3cbd75c 100644 --- a/common/ostmfileformat.cpp +++ b/common/ostmfileformat.cpp @@ -27,7 +27,7 @@ OstmFileFormat::OstmFileFormat() // Do Nothing! } -bool OstmFileFormat::openStreams(const QString fileName, +bool OstmFileFormat::open(const QString fileName, OstProto::StreamConfigList &streams, QString &error) { OstProto::FileMeta meta; @@ -54,7 +54,7 @@ _fail: return false; } -bool OstmFileFormat::saveStreams(const OstProto::StreamConfigList streams, +bool OstmFileFormat::save(const OstProto::StreamConfigList streams, const QString fileName, QString &error) { OstProto::FileContent content; diff --git a/common/ostmfileformat.h b/common/ostmfileformat.h index 33332a8..f44ea74 100644 --- a/common/ostmfileformat.h +++ b/common/ostmfileformat.h @@ -29,9 +29,9 @@ class OstmFileFormat : public StreamFileFormat, public NativeFileFormat public: OstmFileFormat(); - virtual bool openStreams(const QString fileName, + virtual bool open(const QString fileName, OstProto::StreamConfigList &streams, QString &error); - virtual bool saveStreams(const OstProto::StreamConfigList streams, + virtual bool save(const OstProto::StreamConfigList streams, const QString fileName, QString &error); bool isMyFileFormat(const QString fileName); diff --git a/common/pcapfileformat.cpp b/common/pcapfileformat.cpp index e96b684..9f352dd 100644 --- a/common/pcapfileformat.cpp +++ b/common/pcapfileformat.cpp @@ -91,7 +91,7 @@ PcapFileFormat::~PcapFileFormat() delete importDialog_; } -bool PcapFileFormat::openStreams(const QString fileName, +bool PcapFileFormat::open(const QString fileName, OstProto::StreamConfigList &streams, QString &error) { bool isOk = false; @@ -325,7 +325,7 @@ bool PcapFileFormat::openStreams(const QString fileName, goto _diff_fail; } - if (!saveStreams(streams, importedPcapFile.fileName(), error)) + if (!save(streams, importedPcapFile.fileName(), error)) { error.append("Error saving imported streams as PCAP for diff"); goto _diff_fail; @@ -553,7 +553,7 @@ bool PcapFileFormat::readPacket(PcapPacketHeader &pktHdr, QByteArray &pktBuf) return true; } -bool PcapFileFormat::saveStreams(const OstProto::StreamConfigList streams, +bool PcapFileFormat::save(const OstProto::StreamConfigList streams, const QString fileName, QString &error) { bool isOk = false; diff --git a/common/pcapfileformat.h b/common/pcapfileformat.h index 64b03ac..cb0c461 100644 --- a/common/pcapfileformat.h +++ b/common/pcapfileformat.h @@ -47,9 +47,9 @@ public: PcapFileFormat(); ~PcapFileFormat(); - bool openStreams(const QString fileName, + bool open(const QString fileName, OstProto::StreamConfigList &streams, QString &error); - bool saveStreams(const OstProto::StreamConfigList streams, + bool save(const OstProto::StreamConfigList streams, const QString fileName, QString &error); virtual QDialog* openOptionsDialog(); diff --git a/common/pdmlfileformat.cpp b/common/pdmlfileformat.cpp index 7f0871b..f522a8c 100644 --- a/common/pdmlfileformat.cpp +++ b/common/pdmlfileformat.cpp @@ -35,7 +35,7 @@ PdmlFileFormat::~PdmlFileFormat() { } -bool PdmlFileFormat::openStreams(const QString fileName, +bool PdmlFileFormat::open(const QString fileName, OstProto::StreamConfigList &streams, QString &error) { bool isOk = false; @@ -75,7 +75,7 @@ _exit: return isOk; } -bool PdmlFileFormat::saveStreams(const OstProto::StreamConfigList streams, +bool PdmlFileFormat::save(const OstProto::StreamConfigList streams, const QString fileName, QString &error) { bool isOk = false; @@ -97,7 +97,7 @@ bool PdmlFileFormat::saveStreams(const OstProto::StreamConfigList streams, connect(fmt, SIGNAL(progress(int)), this, SIGNAL(progress(int))); emit status("Writing intermediate PCAP file..."); - isOk = fmt->saveStreams(streams, pcapFile.fileName(), error); + isOk = fmt->save(streams, pcapFile.fileName(), error); qDebug("generating PDML %s", fileName.toAscii().constData()); emit status("Converting PCAP to PDML..."); diff --git a/common/pdmlfileformat.h b/common/pdmlfileformat.h index 6621222..bc1d15b 100644 --- a/common/pdmlfileformat.h +++ b/common/pdmlfileformat.h @@ -27,9 +27,9 @@ public: PdmlFileFormat(); ~PdmlFileFormat(); - virtual bool openStreams(const QString fileName, + virtual bool open(const QString fileName, OstProto::StreamConfigList &streams, QString &error); - virtual bool saveStreams(const OstProto::StreamConfigList streams, + virtual bool save(const OstProto::StreamConfigList streams, const QString fileName, QString &error); bool isMyFileFormat(const QString fileName); diff --git a/common/pythonfileformat.cpp b/common/pythonfileformat.cpp index cec283b..d9e65ba 100644 --- a/common/pythonfileformat.cpp +++ b/common/pythonfileformat.cpp @@ -46,14 +46,14 @@ PythonFileFormat::~PythonFileFormat() // Nothing to do } -bool PythonFileFormat::openStreams(const QString /*fileName*/, +bool PythonFileFormat::open(const QString /*fileName*/, OstProto::StreamConfigList &/*streams*/, QString &/*error*/) { // NOT SUPPORTED! return false; } -bool PythonFileFormat::saveStreams(const OstProto::StreamConfigList streams, +bool PythonFileFormat::save(const OstProto::StreamConfigList streams, const QString fileName, QString &error) { QFile file(fileName); diff --git a/common/pythonfileformat.h b/common/pythonfileformat.h index f45f1d5..ee8e4bf 100644 --- a/common/pythonfileformat.h +++ b/common/pythonfileformat.h @@ -30,9 +30,9 @@ public: PythonFileFormat(); ~PythonFileFormat(); - virtual bool openStreams(const QString fileName, + virtual bool open(const QString fileName, OstProto::StreamConfigList &streams, QString &error); - virtual bool saveStreams(const OstProto::StreamConfigList streams, + virtual bool save(const OstProto::StreamConfigList streams, const QString fileName, QString &error); bool isMyFileFormat(const QString fileName); diff --git a/common/streamfileformat.cpp b/common/streamfileformat.cpp index a074aab..d00dda6 100644 --- a/common/streamfileformat.cpp +++ b/common/streamfileformat.cpp @@ -62,7 +62,7 @@ QStringList StreamFileFormat::supportedFileTypes(Operation op) return fileTypes; } -void StreamFileFormat::openStreamsOffline(const QString fileName, +void StreamFileFormat::openAsync(const QString fileName, OstProto::StreamConfigList &streams, QString &error) { fileName_ = fileName; @@ -74,7 +74,7 @@ void StreamFileFormat::openStreamsOffline(const QString fileName, start(); } -void StreamFileFormat::saveStreamsOffline( +void StreamFileFormat::saveAsync( const OstProto::StreamConfigList streams, const QString fileName, QString &error) { @@ -134,7 +134,7 @@ void StreamFileFormat::cancel() void StreamFileFormat::run() { if (op_ == kOpenFile) - result_ = openStreams(fileName_, *openStreams_, *error_); + result_ = open(fileName_, *openStreams_, *error_); else if (op_ == kSaveFile) - result_ = saveStreams(saveStreams_, fileName_, *error_); + result_ = save(saveStreams_, fileName_, *error_); } diff --git a/common/streamfileformat.h b/common/streamfileformat.h index d8662d5..474ab09 100644 --- a/common/streamfileformat.h +++ b/common/streamfileformat.h @@ -36,17 +36,17 @@ public: StreamFileFormat(); virtual ~StreamFileFormat(); - virtual bool openStreams(const QString fileName, + virtual bool open(const QString fileName, OstProto::StreamConfigList &streams, QString &error) = 0; - virtual bool saveStreams(const OstProto::StreamConfigList streams, + virtual bool save(const OstProto::StreamConfigList streams, const QString fileName, QString &error) = 0; virtual QDialog* openOptionsDialog(); virtual QDialog* saveOptionsDialog(); - void openStreamsOffline(const QString fileName, + void openAsync(const QString fileName, OstProto::StreamConfigList &streams, QString &error); - void saveStreamsOffline(const OstProto::StreamConfigList streams, + void saveAsync(const OstProto::StreamConfigList streams, const QString fileName, QString &error); bool result();