-rw-r--r-- | libopie2/opienet/opcap.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index 72a78de..4ff8495 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h @@ -136,5 +136,4 @@ class OPacket : public QObject - private: - QString dumpStructure() const; + private: QString _dumpStructure( QObjectList* ) const; @@ -695,2 +694,14 @@ class OPacketCapturer : public QObject const QMap<QString,int>& statistics() const; + /** + * Enable or disable the auto-delete option. + * If auto-delete is enabled, then the packet capturer will delete a packet right + * after it has been emit'ted. This is the default, which is useful if the packet + * capturer has the only reference to the packets. If you pass the packet for adding + * into a collection or do processing after the SLOT, the auto delete must be disabled. + */ + void setAutoDelete( bool enable ); + /** + * @returns the auto-delete value. + */ + bool autoDelete() const; @@ -713,2 +724,3 @@ class OPacketCapturer : public QObject QMap<QString, int> _stats; // statistics; + bool _autodelete; // if we auto delete packets after emit class Private; // Private Forward declaration |