Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
control.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2#ifndef SYMBIAN_EMULATOR_CONTROL_H_
3#define SYMBIAN_EMULATOR_CONTROL_H_
4
5#include <memory>
6
7#include <absl/base/nullability.h>
8
9#include "absl/status/statusor.h"
10
11namespace eka2l1::desktop {
12struct emulator;
13}
14
15namespace symbian::emulator {
16
17// Owns callbacks on EKA2L1's existing Qt and kernel event loops. There are no
18// new worker threads, schedulers, Python callbacks or Python reference holders.
20 public:
22 ControlServer(const ControlServer&) = delete;
24
25 // Empty socket_path disables control. Enabled sockets require an existing
26 // private directory, and only expose emulator capture, bounded input and
27 // status.
28 static absl::StatusOr<std::unique_ptr<ControlServer>> Start(
29 eka2l1::desktop::emulator* absl_nullable state,
30 const char* absl_nullable socket_path);
31
32 // Called on the Qt loop before stopping EKA2L1's workers/kernel. Detaches
33 // callbacks and saves the final status beside the socket, without overwrites.
34 absl::Status Stop();
35
36 private:
37 struct Impl;
38 explicit ControlServer(std::unique_ptr<Impl> impl);
39 std::unique_ptr<Impl> impl_;
40};
41
42} // namespace symbian::emulator
43#endif // SYMBIAN_EMULATOR_CONTROL_H_
Definition control.h:19
ControlServer(const ControlServer &)=delete
absl::Status Stop()
Definition control.cc:403
static absl::StatusOr< std::unique_ptr< ControlServer > > Start(eka2l1::desktop::emulator *absl_nullable state, const char *absl_nullable socket_path)
Definition control.cc:407
ControlServer & operator=(const ControlServer &)=delete
Definition control.h:11
Definition control.cc:36