forked from quickshell/quickshell
core/ipc: add ipc server/client
Currently can only kill a remote instance.
This commit is contained in:
parent
13b6eeaa22
commit
da043e092a
14 changed files with 710 additions and 120 deletions
31
src/core/instanceinfo.cpp
Normal file
31
src/core/instanceinfo.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include "instanceinfo.hpp"
|
||||
|
||||
#include <qdatastream.h>
|
||||
|
||||
QDataStream& operator<<(QDataStream& stream, const InstanceInfo& info) {
|
||||
stream << info.instanceId << info.configPath << info.shellId << info.launchTime;
|
||||
return stream;
|
||||
}
|
||||
|
||||
QDataStream& operator>>(QDataStream& stream, InstanceInfo& info) {
|
||||
stream >> info.instanceId >> info.configPath >> info.shellId >> info.launchTime;
|
||||
return stream;
|
||||
}
|
||||
|
||||
QDataStream& operator<<(QDataStream& stream, const RelaunchInfo& info) {
|
||||
stream << info.instance << info.noColor << info.sparseLogsOnly;
|
||||
return stream;
|
||||
}
|
||||
|
||||
QDataStream& operator>>(QDataStream& stream, RelaunchInfo& info) {
|
||||
stream >> info.instance >> info.noColor >> info.sparseLogsOnly;
|
||||
return stream;
|
||||
}
|
||||
|
||||
InstanceInfo InstanceInfo::CURRENT = {}; // NOLINT
|
||||
|
||||
namespace qs::crash {
|
||||
|
||||
CrashInfo CrashInfo::INSTANCE = {}; // NOLINT
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue