+
+QDataStream &operator<<(QDataStream &out, const BufferInfo &bufferInfo)
+{
+ out << bufferInfo._bufferId << bufferInfo._netid << (qint16)bufferInfo._type << bufferInfo._groupId << bufferInfo._bufferName.toUtf8();
+ return out;
+}
+
+
+QDataStream &operator>>(QDataStream &in, BufferInfo &bufferInfo)
+{
+ QByteArray buffername;
+ qint16 bufferType;
+ in >> bufferInfo._bufferId >> bufferInfo._netid >> bufferType >> bufferInfo._groupId >> buffername;
+ bufferInfo._type = (BufferInfo::Type)bufferType;
+ bufferInfo._bufferName = QString::fromUtf8(buffername);
+ return in;
+}
+
+
+uint qHash(const BufferInfo &bufferid)
+{
+ return qHash(bufferid._bufferId);
+}