diff options
author | Andreas Kling <kling@serenityos.org> | 2023-04-24 10:36:53 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-25 14:48:40 +0200 |
commit | 3de8dd921ed3715db5e40f9c0ceb34811d89aaa6 (patch) | |
tree | cc95902ccb4d011561bae102f67a35e58cf9f073 /Userland/Services | |
parent | c756e021a7d89d02d2dccab20a1f53244d80bb9e (diff) | |
download | serenity-3de8dd921ed3715db5e40f9c0ceb34811d89aaa6.zip |
Userland: Remove serialize-to-JSON functions only used for Inspector
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/SystemServer/Service.cpp | 50 | ||||
-rw-r--r-- | Userland/Services/SystemServer/Service.h | 3 |
2 files changed, 0 insertions, 53 deletions
diff --git a/Userland/Services/SystemServer/Service.cpp b/Userland/Services/SystemServer/Service.cpp index 9928e44207..eda136ce1f 100644 --- a/Userland/Services/SystemServer/Service.cpp +++ b/Userland/Services/SystemServer/Service.cpp @@ -346,56 +346,6 @@ ErrorOr<NonnullRefPtr<Service>> Service::try_create(Core::ConfigFile const& conf return service; } -void Service::save_to(JsonObject& json) -{ - Core::Object::save_to(json); - - json.set("executable_path", m_executable_path); - - // FIXME: This crashes Inspector. - /* - JsonArray extra_args; - for (String& arg : m_extra_arguments) - extra_args.append(arg); - json.set("extra_arguments", move(extra_args)); - - JsonArray system_modes; - for (String& mode : m_system_modes) - system_modes.append(mode); - json.set("system_modes", system_modes); - - JsonArray environment; - for (String& env : m_environment) - system_modes.append(env); - json.set("environment", environment); - - JsonArray sockets; - for (SocketDescriptor &socket : m_sockets) { - JsonObject socket_obj; - socket_obj.set("path", socket.path); - socket_obj.set("permissions", socket.permissions); - sockets.append(socket); - } - json.set("sockets", sockets); - */ - - json.set("stdio_file_path", m_stdio_file_path); - json.set("priority", m_priority); - json.set("keep_alive", m_keep_alive); - json.set("lazy", m_lazy); - json.set("user", m_user); - json.set("multi_instance", m_multi_instance); - json.set("accept_socket_connections", m_accept_socket_connections); - - if (m_pid > 0) - json.set("pid", m_pid); - else - json.set("pid", nullptr); - - json.set("restart_attempts", m_restart_attempts); - json.set("working_directory", m_working_directory); -} - bool Service::is_enabled() const { extern DeprecatedString g_system_mode; diff --git a/Userland/Services/SystemServer/Service.h b/Userland/Services/SystemServer/Service.h index f2a85b46ed..f0aa9067cc 100644 --- a/Userland/Services/SystemServer/Service.h +++ b/Userland/Services/SystemServer/Service.h @@ -26,9 +26,6 @@ public: static Service* find_by_pid(pid_t); - // FIXME: Port to Core::Property - void save_to(JsonObject&); - private: Service(Core::ConfigFile const&, StringView name); |