PIByteArray works on binary stream
This commit is contained in:
@@ -111,13 +111,19 @@ private:
|
||||
EVENT_HANDLER1(void, receive_finished, bool, ok);
|
||||
};
|
||||
|
||||
inline PIByteArray & operator <<(PIByteArray & s, const PIFileTransfer::PFTHeader & v) {s << v.raw_sig << v.step << v.session_id; return s;}
|
||||
inline PIByteArray & operator >>(PIByteArray & s, PIFileTransfer::PFTHeader & v) {s >> v.raw_sig >> v.step >> v.session_id; return s;}
|
||||
BINARY_STREAM_STORE (PIFileTransfer::PFTHeader) {s << v.raw_sig << v.step << v.session_id; return s;}
|
||||
BINARY_STREAM_RESTORE(PIFileTransfer::PFTHeader) {s >> v.raw_sig >> v.step >> v.session_id; return s;}
|
||||
|
||||
inline PIByteArray & operator <<(PIByteArray & s, const PIFileTransfer::PFTFileInfo & v) {s << v.dest_path << v.size << v.time_access << v.time_modification <<
|
||||
v.flags << v.id_user << v.id_group << v.perm_user.raw << v.perm_group.raw << v.perm_other.raw; return s;}
|
||||
inline PIByteArray & operator >>(PIByteArray & s, PIFileTransfer::PFTFileInfo & v) {s >> v.dest_path >> v.size >> v.time_access >> v.time_modification >>
|
||||
v.flags >> v.id_user >> v.id_group >> v.perm_user.raw >> v.perm_group.raw >> v.perm_other.raw; return s;}
|
||||
BINARY_STREAM_STORE (PIFileTransfer::PFTFileInfo) {
|
||||
s << v.dest_path << v.size << v.time_access << v.time_modification <<
|
||||
v.flags << v.id_user << v.id_group << v.perm_user.raw << v.perm_group.raw << v.perm_other.raw;
|
||||
return s;
|
||||
}
|
||||
BINARY_STREAM_RESTORE(PIFileTransfer::PFTFileInfo) {
|
||||
s >> v.dest_path >> v.size >> v.time_access >> v.time_modification >>
|
||||
v.flags >> v.id_user >> v.id_group >> v.perm_user.raw >> v.perm_group.raw >> v.perm_other.raw;
|
||||
return s;
|
||||
}
|
||||
|
||||
inline PICout operator <<(PICout s, const PIFileTransfer::PFTFileInfo & v) {
|
||||
s.setControl(0, true);
|
||||
|
||||
Reference in New Issue
Block a user