code format
This commit is contained in:
@@ -1,36 +1,35 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Introspection module - Base server structs
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
PIP - Platform Independent Primitives
|
||||
Introspection module - Base server structs
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PIINTROSPECTION_SERVER_P_H
|
||||
#define PIINTROSPECTION_SERVER_P_H
|
||||
|
||||
#include "pichunkstream.h"
|
||||
#include "piintrospection_containers.h"
|
||||
#include "piintrospection_containers_p.h"
|
||||
#include "piintrospection_threads.h"
|
||||
#include "piintrospection_threads_p.h"
|
||||
#include "pichunkstream.h"
|
||||
#include "pisystemmonitor.h"
|
||||
|
||||
|
||||
class PIP_EXPORT PIIntrospection {
|
||||
public:
|
||||
|
||||
enum InfoTypes {
|
||||
itInfo = 0x01,
|
||||
itProcStat = 0x02,
|
||||
@@ -89,7 +88,6 @@ public:
|
||||
|
||||
static PIByteArray packObjects();
|
||||
static void unpackObjects(PIByteArray & ba, PIVector<PIIntrospection::ObjectInfo> & objects);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -100,7 +98,8 @@ BINARY_STREAM_WRITE(PIIntrospection::RequiredInfo) {
|
||||
return s;
|
||||
}
|
||||
BINARY_STREAM_READ(PIIntrospection::RequiredInfo) {
|
||||
PIByteArray csba; s >> csba;
|
||||
PIByteArray csba;
|
||||
s >> csba;
|
||||
PIChunkStream cs(csba);
|
||||
while (!cs.atEnd()) {
|
||||
switch (cs.read()) {
|
||||
@@ -113,13 +112,21 @@ BINARY_STREAM_READ(PIIntrospection::RequiredInfo) {
|
||||
|
||||
BINARY_STREAM_WRITE(PIIntrospection::ProcessInfo) {
|
||||
PIChunkStream cs;
|
||||
cs.add(1, v.architecture).add(2, v.execCommand).add(3, v.execDateTime).add(4, v.hostname).add(5, v.OS_name)
|
||||
.add(6, v.OS_version).add(7, v.processorsCount).add(8, v.user).add(9, v.build_options);
|
||||
cs.add(1, v.architecture)
|
||||
.add(2, v.execCommand)
|
||||
.add(3, v.execDateTime)
|
||||
.add(4, v.hostname)
|
||||
.add(5, v.OS_name)
|
||||
.add(6, v.OS_version)
|
||||
.add(7, v.processorsCount)
|
||||
.add(8, v.user)
|
||||
.add(9, v.build_options);
|
||||
s << cs.data();
|
||||
return s;
|
||||
}
|
||||
BINARY_STREAM_READ(PIIntrospection::ProcessInfo) {
|
||||
PIByteArray csba; s >> csba;
|
||||
PIByteArray csba;
|
||||
s >> csba;
|
||||
PIChunkStream cs(csba);
|
||||
while (!cs.atEnd()) {
|
||||
switch (cs.read()) {
|
||||
@@ -145,7 +152,8 @@ BINARY_STREAM_WRITE(PIIntrospection::ObjectInfo) {
|
||||
return s;
|
||||
}
|
||||
BINARY_STREAM_READ(PIIntrospection::ObjectInfo) {
|
||||
PIByteArray csba; s >> csba;
|
||||
PIByteArray csba;
|
||||
s >> csba;
|
||||
PIChunkStream cs(csba);
|
||||
while (!cs.atEnd()) {
|
||||
switch (cs.read()) {
|
||||
|
||||
Reference in New Issue
Block a user