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

This commit is contained in:
2019-06-22 20:37:09 +00:00
parent fb44b01c0f
commit 1f527d8e14
12 changed files with 110 additions and 42 deletions

View File

@@ -29,6 +29,11 @@ const uint PIIntrospection::sign = 0x0F1C2B3A;
PIIntrospection::RequiredInfo::RequiredInfo() {
types = itInfo;
}
PIIntrospection::ProcessInfo::ProcessInfo() {
processorsCount = 0;
}
@@ -91,6 +96,27 @@ PIByteArray & operator <<(PIByteArray & s, const std::unordered_map<uint, PIIntr
}
PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::RequiredInfo & v) {
PIChunkStream cs;
cs.add(1, v.types);
b << cs.data();
return b;
}
PIByteArray & operator >>(PIByteArray & b, PIIntrospection::RequiredInfo & v) {
PIByteArray csba; b >> csba;
PIChunkStream cs(csba);
while (!cs.atEnd()) {
switch (cs.read()) {
case 1: cs.get(v.types); break;
default: break;
}
}
return b;
}
PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::ProcessInfo & v) {
PIChunkStream cs;
cs.add(1, v.architecture).add(2, v.execCommand).add(3, v.execDateTime).add(4, v.hostname).add(5, v.OS_name)