/* PIP - Platform Independent Primitives Introspection module - Base server structs Copyright (C) 2019 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef PIINTROSPECTION_SERVER_P_H #define PIINTROSPECTION_SERVER_P_H #include "piintrospection_containers.h" #include "piintrospection_containers_p.h" #include "piintrospection_threads.h" #include "piintrospection_threads_p.h" #include "pitime.h" class PIIntrospection { public: struct ProcessInfo { ProcessInfo(); PIString execCommand, hostname, user, OS_name, OS_version, architecture; PIDateTime execDateTime; int processorsCount; PIStringList build_options; }; struct ObjectInfo { ObjectInfo(); PIString classname, name; PIStringList parents; PIMap properties; int queued_events; }; static const uint sign; static ProcessInfo getInfo(); static PIVector getObjects(); static PIByteArray packInfo(); static void unpackInfo(PIByteArray & ba, ProcessInfo & info); static PIByteArray packContainers(); static void unpackContainers(PIByteArray & ba, PIMap & data, PIMap & typenames); static PIByteArray packThreads(); static void unpackThreads(PIByteArray & ba, PIVector & threads); static PIByteArray packObjects(); static void unpackObjects(PIByteArray & ba, PIVector & objects); }; PIByteArray & operator <<(PIByteArray & s, const std::unordered_map & v); PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::ProcessInfo & v); PIByteArray & operator >>(PIByteArray & b, PIIntrospection::ProcessInfo & v); PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::ObjectInfo & v); PIByteArray & operator >>(PIByteArray & b, PIIntrospection::ObjectInfo & v); #endif // PIINTROSPECTION_SERVER_P_H