git-svn-id: svn://db.shs.com.ru/pip@804 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user