git-svn-id: svn://db.shs.com.ru/pip@526 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-07-15 17:52:29 +00:00
parent 69e067e0d2
commit bc65af3b9c
7 changed files with 42 additions and 35 deletions

View File

@@ -28,7 +28,7 @@
#define __PIFILETRANSFER_VERSION 2
class PIFileTransfer : public PIBaseTransfer
class PIFileTransfer: public PIBaseTransfer
{
PIOBJECT_SUBCLASS(PIFileTransfer, PIBaseTransfer)
public:
@@ -36,8 +36,9 @@ public:
~PIFileTransfer();
enum StepType {pft_None, pft_Description, pft_Data};
struct PFTFileInfo : public PIFile::FileInfo {
PFTFileInfo(const PIFile::FileInfo &fi = PIFile::FileInfo()) : PIFile::FileInfo(fi) {}
struct PFTFileInfo: public PIFile::FileInfo {
PFTFileInfo(const PIFile::FileInfo &fi = PIFile::FileInfo()): PIFile::FileInfo(fi) {}
PIString dest_path;
};
@@ -112,9 +113,9 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIFileTransfer::PFTHeade
inline PIByteArray & operator >>(PIByteArray & s, PIFileTransfer::PFTHeader & v) {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 <<
(int)v.flags << v.id_user << v.id_group << v.perm_user.raw << v.perm_group.raw << v.perm_other.raw; return s;}
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 >>
*(int*)(&(v.flags)) >> v.id_user >> v.id_group >> v.perm_user.raw >> v.perm_group.raw >> v.perm_other.raw; return s;}
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);