mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-02-23 03:33:57 +11:00
io/ipchandler: add prop get
This commit is contained in:
parent
9417d6fa57
commit
4f2610dece
10 changed files with 262 additions and 31 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <qcontainerfwd.h>
|
||||
#include <qflags.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../ipc/ipc.hpp"
|
||||
|
||||
|
|
@ -9,12 +10,12 @@ namespace qs::io::ipc::comm {
|
|||
|
||||
struct QueryMetadataCommand {
|
||||
QString target;
|
||||
QString function;
|
||||
QString name;
|
||||
|
||||
void exec(qs::ipc::IpcServerConnection* conn) const;
|
||||
};
|
||||
|
||||
DEFINE_SIMPLE_DATASTREAM_OPS(QueryMetadataCommand, data.target, data.function);
|
||||
DEFINE_SIMPLE_DATASTREAM_OPS(QueryMetadataCommand, data.target, data.name);
|
||||
|
||||
struct StringCallCommand {
|
||||
QString target;
|
||||
|
|
@ -27,7 +28,7 @@ struct StringCallCommand {
|
|||
DEFINE_SIMPLE_DATASTREAM_OPS(StringCallCommand, data.target, data.function, data.arguments);
|
||||
|
||||
void handleMsg(qs::ipc::IpcServerConnection* conn);
|
||||
int queryMetadata(qs::ipc::IpcClient* client, const QString& target, const QString& function);
|
||||
int queryMetadata(qs::ipc::IpcClient* client, const QString& target, const QString& name);
|
||||
|
||||
int callFunction(
|
||||
qs::ipc::IpcClient* client,
|
||||
|
|
@ -36,4 +37,15 @@ int callFunction(
|
|||
const QVector<QString>& arguments
|
||||
);
|
||||
|
||||
struct StringPropReadCommand {
|
||||
QString target;
|
||||
QString property;
|
||||
|
||||
void exec(qs::ipc::IpcServerConnection* conn) const;
|
||||
};
|
||||
|
||||
DEFINE_SIMPLE_DATASTREAM_OPS(StringPropReadCommand, data.target, data.property);
|
||||
|
||||
int getProperty(qs::ipc::IpcClient* client, const QString& target, const QString& property);
|
||||
|
||||
} // namespace qs::io::ipc::comm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue