Remove unneeded stripping of Qt options.
[quassel.git] / src / common / signalproxy.h
index 1090547..b39e7ca 100644 (file)
@@ -67,8 +67,8 @@ public:
 
   void synchronize(SyncableObject *obj);
 
-  void setInitialized(SyncableObject *obj);
-  bool isInitialized(SyncableObject *obj) const;
+//   void setInitialized(SyncableObject *obj);
+//   bool isInitialized(SyncableObject *obj) const;
   void requestInit(SyncableObject *obj);
 
   void detachObject(QObject *obj);
@@ -81,13 +81,13 @@ public:
    *  so the corresponding function readDataFromDevice() can check if enough data is available
    *  at the device to reread the item.
    */
-  static void writeDataToDevice(QIODevice *dev, const QVariant &item);
+  static void writeDataToDevice(QIODevice *dev, const QVariant &item, bool compressed = false);
 
   //! Reads a data item from a device that has been written by writeDataToDevice().
   /** If not enough data bytes are available, the function returns false and the QVariant reference
    *  remains untouched.
    */
-  static bool readDataFromDevice(QIODevice *dev, quint32 &blockSize, QVariant &item);
+  static bool readDataFromDevice(QIODevice *dev, quint32 &blockSize, QVariant &item, bool compressed = false);
 
   static QString methodBaseName(const QMetaMethod &method);
 
@@ -160,10 +160,17 @@ private:
 
 public:
   void dumpSyncMap(SyncableObject *object);
+  inline int peerCount() const { return _peers.size(); }
   
 private:
   // Hash of used QIODevices
-  QHash<QIODevice*, quint32> _peerByteCount;
+  struct peerInfo {
+    quint32 byteCount;
+    bool usesCompression;
+    peerInfo() : byteCount(0), usesCompression(false) {};
+  };
+  //QHash<QIODevice*, peerInfo> _peerByteCount;
+  QHash<QIODevice*, peerInfo> _peers;
 
   // containg a list of argtypes for fast access
   QHash<const QMetaObject *, ClassInfo*> _classInfo;