From bc1315e38da2d4a0e2da51c1178518318ee69cae Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Tue, 10 Nov 2026 20:16:01 -0800 Subject: [PATCH 01/15] sandbox: name the services a mod calls and answer them from fixtures A mod's manifest now lists the services it calls with CallService, by name only, each needed or optional. Before a mod starts, the sandbox logs which provider answers each named service, refuses to start the mod when a needed service has none, naming it, and starts it without an optional one. modlock play's sandbox answers a named service from a fixture in the mod's project: services/.json, an object of replies by method, each sent as its JSON. Signed-off-by: Christian Stewart --- README.md | 22 ++ cmd/modlock/play.go | 17 +- sandbox/build.go | 3 + sandbox/config.go | 4 + sandbox/sandbox.go | 10 + sandbox/services.go | 106 +++++++ sandbox/services_test.go | 171 +++++++++++ src/wasm/manifest.pb.cc | 617 ++++++++++++++++++++++++++++++++------- src/wasm/manifest.pb.go | 341 ++++++++++++++++++++++ src/wasm/manifest.pb.h | 502 +++++++++++++++++++++++++++---- src/wasm/manifest.pb.ts | 70 +++++ src/wasm/manifest.proto | 16 + 12 files changed, 1704 insertions(+), 175 deletions(-) create mode 100644 sandbox/services.go create mode 100644 sandbox/services_test.go diff --git a/README.md b/README.md index 17306ea9..786fb67a 100644 --- a/README.md +++ b/README.md @@ -1484,6 +1484,27 @@ The game draws interfaces with the renderer in [`panorama/`](panorama): `serve(service, handler)` answers the host's calls to one the mod serves. See [How mods reach the game](#how-mods-reach-the-game) for the protocol. +Name each service the mod calls in `mod.json`; a service is needed unless it +is marked optional. A host refuses to start a mod whose needed service it +cannot provide, naming it, and starts one without an optional service, whose +calls then fail: + +```json +"services": [ + { "name": "example.drills.v1" }, + { "name": "example.ghosts.v1", "optional": true } +] +``` + +The sandbox answers a named service from a fixture in the project: +`services/.json`, an object whose keys are the service's methods and +whose values are their replies, sent as JSON. Before the mod starts, the +sandbox logs which provider answers each named service: a fixture or nobody. + +```json +{ "read": { "key": "slide" }, "save": true } +``` + ### Files A mod keeps text files, such as its configuration or areas a player drew in @@ -1554,6 +1575,7 @@ Every project has a `mod.json` at its root: | `settings` | | [Choices](#settings) each player makes about the mod. | | `metrics` | | [Totals](#metrics) the mod keeps for each player. | | `boards` | | [Rankings](#boards) the mod reports scores to. | +| `services` | | [Services](#services) the mod calls, each needed or optional. | ### Map diff --git a/cmd/modlock/play.go b/cmd/modlock/play.go index b29b2217..5d66c624 100644 --- a/cmd/modlock/play.go +++ b/cmd/modlock/play.go @@ -180,10 +180,25 @@ func startSession(c *cli.Context, out *printer, mods []string, logPath string) ( host, err := session.FindHost(ctx, Version) return filepath.Dir(host), err }, - Events: events, + Events: events, + Fixtures: projectFixtures, }), nil } +// projectFixtures is the service fixture directory of the project whose build +// is at path, or empty for a built mod outside a project. +func projectFixtures(path string) string { + // A project's build sits in its build directory. + if filepath.Base(path) != project.BuildDir { + return "" + } + dir := filepath.Dir(path) + if _, err := os.Stat(filepath.Join(dir, project.ManifestFile)); err != nil { + return "" + } + return filepath.Join(dir, sandbox.FixtureDir) +} + // startServer starts a local server with mods on mapName, writing its console // to logPath and passing the host's events to events. func startServer(c *cli.Context, out *printer, events func(*control.HostEvent), mods []string, mapName, logPath string) (*session.Session, error) { diff --git a/sandbox/build.go b/sandbox/build.go index e416ed92..b941d901 100644 --- a/sandbox/build.go +++ b/sandbox/build.go @@ -22,6 +22,9 @@ type Build struct { Entry []byte // Data holds the files the mod ships in its data/ directory. Data fs.FS + // fixtures answer the services the manifest names that have a fixture, + // by service name. + fixtures map[string]*fixture } // ReadBuild reads the built mod in dist through its manifest. diff --git a/sandbox/config.go b/sandbox/config.go index 0b74e40d..89e2508c 100644 --- a/sandbox/config.go +++ b/sandbox/config.go @@ -30,4 +30,8 @@ type Config struct { // so a later session loads the interpreters and an unchanged mod without // compiling them, or empty to compile each module once per session. Compiled string + // Fixtures returns the directory of service fixtures for the built mod at + // path, or empty when it has none; see FixtureDir. Nil gives no mod + // fixtures. + Fixtures func(path string) string } diff --git a/sandbox/sandbox.go b/sandbox/sandbox.go index 4f0cfedc..53e6dc49 100644 --- a/sandbox/sandbox.go +++ b/sandbox/sandbox.go @@ -241,6 +241,13 @@ func (s *Sandbox) load(ctx context.Context, path string) { return } + // Name the provider of each service it calls; a needed one missing + // refuses the mod before it starts. + if err := s.provide(path, build); err != nil { + fail(err) + return + } + // Load its module and start it in the world. mod, wants, err := s.start(ctx, name, build) if err != nil { @@ -460,6 +467,9 @@ func (s *Sandbox) answer(build *Build, call *wasm.Call) *wasm.Reply { if request.GetService() == scoresService { return s.scores(manifest, request) } + if provider := build.fixtures[request.GetService()]; provider != nil { + return provider.answer(request) + } return &wasm.Reply{Error: "this host provides no service " + request.GetService()} } diff --git a/sandbox/services.go b/sandbox/services.go new file mode 100644 index 00000000..2767640a --- /dev/null +++ b/sandbox/services.go @@ -0,0 +1,106 @@ +package sandbox + +import ( + "bytes" + "encoding/json" + "os" + "path/filepath" + + "github.com/paralin/modlock/src/wasm" + "github.com/pkg/errors" +) + +// FixtureDir is the directory of a mod project that holds its service +// fixtures: one file per service, .json, an object whose keys are the +// service's methods and whose values are each method's reply, sent as that +// JSON's bytes. +const FixtureDir = "services" + +// fixture answers one service from a fixture file. +type fixture struct { + // path is the fixture file. + path string + // replies are the replies by method. + replies map[string]json.RawMessage +} + +// provide finds the provider of each service build's manifest names, logs +// which answers each, and keeps the fixtures on build. It fails, naming the +// service, when a service the mod needs has no provider. +func (s *Sandbox) provide(path string, build *Build) error { + // Find the mod's fixtures, if its build has a project. + mod := build.Manifest.GetSlug() + var dir string + if s.config.Fixtures != nil { + dir = s.config.Fixtures(path) + } + + // Name each service's provider: the sandbox itself, a fixture or nobody. + var missing error + for _, service := range build.Manifest.GetServices() { + name := service.GetName() + provider, err := s.provider(dir, name) + switch { + case err != nil: + return err + case provider == nil && name == scoresService: + s.log(mod, "service "+name+": the sandbox") + case provider != nil: + s.log(mod, "service "+name+": fixture "+provider.path) + if build.fixtures == nil { + build.fixtures = map[string]*fixture{} + } + build.fixtures[name] = provider + case service.GetOptional(): + s.log(mod, "service "+name+": nobody (optional)") + default: + s.log(mod, "service "+name+": nobody") + if missing == nil { + missing = errors.Errorf("the mod needs service %s, which nobody provides here; add %s", name, filepath.Join(FixtureDir, name+".json")) + } + } + } + return missing +} + +// provider reads the fixture of service name in dir, or is nil when dir holds +// none. +func (s *Sandbox) provider(dir, name string) (*fixture, error) { + // A service without a fixture file has no fixture; a name that is not one + // file name never reads outside dir. + if dir == "" || name == "" || name == "." || name == ".." || filepath.Base(name) != name { + return nil, nil + } + path := filepath.Join(dir, name+".json") + data, err := os.ReadFile(path) + if errors.Is(err, os.ErrNotExist) { + return nil, nil + } + if err != nil { + return nil, errors.Wrap(err, "read the fixture of service "+name) + } + + // Read its replies by method. + replies := map[string]json.RawMessage{} + if err := json.Unmarshal(data, &replies); err != nil { + return nil, errors.Wrapf(err, "parse %s, an object of replies by method", path) + } + return &fixture{path: path, replies: replies}, nil +} + +// answer replies to call from the fixture, or fails for a method it lacks. +func (f *fixture) answer(call *wasm.ServiceCall) *wasm.Reply { + // Find the method's reply. + reply, ok := f.replies[call.GetMethod()] + if !ok { + return &wasm.Reply{Error: "the fixture " + f.path + " has no method " + call.GetMethod()} + } + + // Send it as compact JSON. + var compact bytes.Buffer + if err := json.Compact(&compact, reply); err != nil { + return &wasm.Reply{Error: err.Error()} + } + response, _ := (&wasm.ServiceReply{Payload: compact.Bytes()}).MarshalVT() + return &wasm.Reply{Response: response} +} diff --git a/sandbox/services_test.go b/sandbox/services_test.go new file mode 100644 index 00000000..9a7ba93a --- /dev/null +++ b/sandbox/services_test.go @@ -0,0 +1,171 @@ +package sandbox + +import ( + "context" + "os" + "os/exec" + "path/filepath" + "slices" + "strings" + "sync" + "testing" + + "github.com/paralin/modlock/src/host_app/control" + "github.com/paralin/modlock/src/wasm" +) + +// TestServiceFixture answers a service the manifest names from the fixture +// in the mod's project, reply by method, and fails a method the fixture lacks +// and a service the manifest does not name. +func TestServiceFixture(t *testing.T) { + // Write one fixture and name its service. + dir := t.TempDir() + fixture := `{"read": {"key": "slide", "steps": [1, 2]}, "save": true}` + if err := os.WriteFile(filepath.Join(dir, "example.drills.v1.json"), []byte(fixture), 0o644); err != nil { + t.Fatal(err) + } + var logged []string + s := &Sandbox{config: Config{ + Fixtures: func(string) string { return dir }, + Events: func(event *control.HostEvent) { logged = append(logged, event.GetLog().GetText()) }, + }} + build := &Build{Manifest: &wasm.Manifest{Slug: "trial", Services: []*wasm.Service{{Name: "example.drills.v1"}}}} + if err := s.provide("build", build); err != nil { + t.Fatal(err) + } + if want := "service example.drills.v1: fixture " + filepath.Join(dir, "example.drills.v1.json"); !slices.Equal(logged, []string{want}) { + t.Fatalf("logged %q, want %q", logged, want) + } + serve := func(service, method string) *wasm.Reply { + request, _ := (&wasm.ServiceCall{Service: service, Method: method, Payload: []byte(`{"key":"slide"}`)}).MarshalVT() + return s.answer(build, &wasm.Call{Method: "CallService", Request: request}) + } + + // Answer each method with its reply as compact JSON. + for method, want := range map[string]string{"read": `{"key":"slide","steps":[1,2]}`, "save": `true`} { + reply := serve("example.drills.v1", method) + answer := &wasm.ServiceReply{} + if reply.GetError() != "" || answer.UnmarshalVT(reply.GetResponse()) != nil || string(answer.GetPayload()) != want { + t.Fatalf("%s answered %q (error %q), want %s", method, answer.GetPayload(), reply.GetError(), want) + } + } + + // Fail a method the fixture lacks, and a service the manifest does not name. + if reply := serve("example.drills.v1", "list"); !strings.Contains(reply.GetError(), "has no method list") { + t.Fatalf("a missing method answered %v", reply) + } + if reply, want := serve("example.other.v1", "read"), "this host provides no service example.other.v1"; reply.GetError() != want { + t.Fatalf("error %q, want %q", reply.GetError(), want) + } +} + +// TestServiceProviders starts mods in a project's build that name services: +// the sandbox names each service's provider before the mod starts, starts a +// mod whose optional service nobody provides, and refuses to start one whose +// needed service nobody provides, naming it. +func TestServiceProviders(t *testing.T) { + // Build the mod once. + module := filepath.Join(t.TempDir(), "mod.wasm") + cmd := exec.Command("go", "build", "-buildmode=c-shared", "-o", module, "../check/testdata/hello") + cmd.Env = append(os.Environ(), "GOOS=wasip1", "GOARCH=wasm") + if out, err := cmd.CombinedOutput(); err != nil { + t.Fatalf("build the mod: %v\n%s", err, out) + } + wasmBytes, err := os.ReadFile(module) + if err != nil { + t.Fatal(err) + } + + // Each case's mod names services, one of which has a fixture. + cases := []struct { + name string + services string + want []string + }{{ + name: "optional missing", + services: `[{"name": "example.drills.v1"}, {"name": "example.ghosts.v1", "optional": true}]`, + want: []string{ + modLog("service example.drills.v1: fixture %s"), + modLog("service example.ghosts.v1: nobody (optional)"), + (&control.HostEvent{Body: &control.HostEvent_Started{Started: &control.ModStarted{Mod: "hello"}}}).String(), + }, + }, { + name: "needed missing", + services: `[{"name": "example.drills.v1"}, {"name": "example.ghosts.v1"}]`, + want: []string{ + modLog("service example.drills.v1: fixture %s"), + modLog("service example.ghosts.v1: nobody"), + (&control.HostEvent{Body: &control.HostEvent_Failed{Failed: &control.ModFailed{ + Mod: "hello", + Error: "the mod needs service example.ghosts.v1, which nobody provides here; add services/example.ghosts.v1.json", + }}}).String(), + }, + }} + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + // Lay out a project with its build and one fixture. + project := t.TempDir() + build := filepath.Join(project, "build") + fixtures := filepath.Join(project, FixtureDir) + for _, dir := range []string{build, fixtures} { + if err := os.MkdirAll(dir, 0o755); err != nil { + t.Fatal(err) + } + } + manifest := `{"slug": "hello", "version": "0.1.0", "runtime": "RUNTIME_WASM", "entry": "mod.wasm", "services": ` + c.services + `}` + fixture := filepath.Join(fixtures, "example.drills.v1.json") + for path, data := range map[string]string{ + filepath.Join(build, "mod.json"): manifest, + filepath.Join(build, "mod.wasm"): string(wasmBytes), + fixture: `{"read": null}`, + } { + if err := os.WriteFile(path, []byte(data), 0o644); err != nil { + t.Fatal(err) + } + } + + // Run the session to its end, keeping the mod's events. + var mu sync.Mutex + var events []string + joined := make(chan struct{}) + box := Start(context.Background(), Config{ + Mods: []string{build}, + Fixtures: func(path string) string { + if path != build { + t.Errorf("fixtures asked for %s, want %s", path, build) + } + return fixtures + }, + Events: func(event *control.HostEvent) { + mu.Lock() + defer mu.Unlock() + switch { + case event.GetJoined() != nil: + close(joined) + case event.GetReady() == nil: + events = append(events, event.String()) + } + }, + }) + <-joined + box.Stop() + if err := box.Wait(); err != nil { + t.Fatal(err) + } + + // The providers come first, then the start or the refusal. + want := slices.Clone(c.want) + for i := range want { + want[i] = strings.ReplaceAll(want[i], "%s", fixture) + } + if !slices.Equal(events, want) { + t.Fatalf("got events\n%q\nwant\n%q", events, want) + } + }) + } +} + +// modLog is the host event of one sandbox line about the hello mod. +func modLog(text string) string { + return (&control.HostEvent{Body: &control.HostEvent_Log{Log: &control.ModLog{Mod: "hello", Text: text}}}).String() +} diff --git a/src/wasm/manifest.pb.cc b/src/wasm/manifest.pb.cc index ee5e9bb8..5df20c39 100644 --- a/src/wasm/manifest.pb.cc +++ b/src/wasm/manifest.pb.cc @@ -29,6 +29,34 @@ namespace _fl = ::google::protobuf::internal::field_layout; namespace modlock { namespace wasm { +inline constexpr Service::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + optional_{false} {} + +template +PROTOBUF_CONSTEXPR Service::Service(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(Service_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ServiceDefaultTypeInternal { + PROTOBUF_CONSTEXPR ServiceDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ServiceDefaultTypeInternal() {} + union { + Service _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MODLOCK_API + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceDefaultTypeInternal _Service_default_instance_; + inline constexpr Movement::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, @@ -147,6 +175,7 @@ inline constexpr Manifest::Impl_::Impl_( settings_{}, metrics_{}, boards_{}, + services_{}, slug_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), @@ -200,7 +229,7 @@ const ::uint32_t protodesc_cold) = { 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::modlock::wasm::Manifest, _impl_._has_bits_), - 17, // hasbit index offset + 18, // hasbit index offset PROTOBUF_FIELD_OFFSET(::modlock::wasm::Manifest, _impl_.slug_), PROTOBUF_FIELD_OFFSET(::modlock::wasm::Manifest, _impl_.name_), PROTOBUF_FIELD_OFFSET(::modlock::wasm::Manifest, _impl_.version_), @@ -215,20 +244,29 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::modlock::wasm::Manifest, _impl_.free_for_all_), PROTOBUF_FIELD_OFFSET(::modlock::wasm::Manifest, _impl_.content_addon_), PROTOBUF_FIELD_OFFSET(::modlock::wasm::Manifest, _impl_.boards_), - 4, + PROTOBUF_FIELD_OFFSET(::modlock::wasm::Manifest, _impl_.services_), 5, 6, - 11, - 12, 7, + 12, + 13, 8, - 10, + 9, + 11, 0, 1, 2, - 13, - 9, + 14, + 10, 3, + 4, + 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::wasm::Service, _impl_._has_bits_), + 5, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::wasm::Service, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::modlock::wasm::Service, _impl_.optional_), + 0, + 1, 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::modlock::wasm::Movement, _impl_._has_bits_), 5, // hasbit index offset @@ -275,14 +313,16 @@ const ::uint32_t static const ::_pbi::MigrationSchema schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, sizeof(::modlock::wasm::Manifest)}, - {31, sizeof(::modlock::wasm::Movement)}, - {38, sizeof(::modlock::wasm::Definition_PropertiesEntry_DoNotUse)}, - {45, sizeof(::modlock::wasm::Definition_FieldsEntry_DoNotUse)}, - {52, sizeof(::modlock::wasm::Definition_CopyFieldsEntry_DoNotUse)}, - {59, sizeof(::modlock::wasm::Definition)}, + {33, sizeof(::modlock::wasm::Service)}, + {40, sizeof(::modlock::wasm::Movement)}, + {47, sizeof(::modlock::wasm::Definition_PropertiesEntry_DoNotUse)}, + {54, sizeof(::modlock::wasm::Definition_FieldsEntry_DoNotUse)}, + {61, sizeof(::modlock::wasm::Definition_CopyFieldsEntry_DoNotUse)}, + {68, sizeof(::modlock::wasm::Definition)}, }; static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::modlock::wasm::_Manifest_default_instance_._instance, + &::modlock::wasm::_Service_default_instance_._instance, &::modlock::wasm::_Movement_default_instance_._instance, &::modlock::wasm::_Definition_PropertiesEntry_DoNotUse_default_instance_._instance, &::modlock::wasm::_Definition_FieldsEntry_DoNotUse_default_instance_._instance, @@ -297,7 +337,7 @@ const char descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwa "proto\0327github.com/paralin/modlock/src/wa" "sm/scores/scores.proto\032;github.com/paral" "in/modlock/src/wasm/settings/settings.pr" - "oto\"\305\005\n\010Manifest\022\014\n\004slug\030\001 \001(\t\022\014\n\004name\030\002" + "oto\"\356\005\n\010Manifest\022\014\n\004slug\030\001 \001(\t\022\014\n\004name\030\002" " \001(\t\022\017\n\007version\030\003 \001(\t\0221\n\010language\030\004 \001(\0162" "\037.modlock.wasm.Manifest.Language\022/\n\007runt" "ime\030\005 \001(\0162\036.modlock.wasm.Manifest.Runtim" @@ -308,31 +348,33 @@ const char descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwa ".Setting\022-\n\007metrics\030\013 \003(\0132\034.modlock.wasm" ".metrics.Metric\022\024\n\014free_for_all\030\014 \001(\010\022\025\n" "\rcontent_addon\030\r \001(\t\022*\n\006boards\030\016 \003(\0132\032.m" - "odlock.wasm.scores.Board\"k\n\007Runtime\022\023\n\017R" - "UNTIME_UNKNOWN\020\000\022\020\n\014RUNTIME_WASM\020\001\022\023\n\017RU" - "NTIME_QUICKJS\020\002\022\020\n\014RUNTIME_LUAU\020\003\022\022\n\016RUN" - "TIME_PYTHON\020\004\"\213\001\n\010Language\022\024\n\020LANGUAGE_U" - "NKNOWN\020\000\022\017\n\013LANGUAGE_GO\020\001\022\027\n\023LANGUAGE_TY" - "PESCRIPT\020\002\022\027\n\023LANGUAGE_JAVASCRIPT\020\003\022\021\n\rL" - "ANGUAGE_LUAU\020\004\022\023\n\017LANGUAGE_PYTHON\020\005\"\222\001\n\010" - "Movement\022+\n\005model\030\001 \001(\0162\034.modlock.wasm.M" - "ovement.Model\022\r\n\005scale\030\002 \001(\002\"/\n\005Model\022\020\n" - "\014MODEL_NATIVE\020\000\022\024\n\020MODEL_QUAKEWORLD\020\001J\004\010" - "\003\020\004R\023unpredicted_buttons\"\352\003\n\nDefinition\022" - "+\n\004file\030\001 \001(\0162\035.modlock.wasm.Definition." - "File\022\r\n\005entry\030\002 \001(\t\022<\n\nproperties\030\003 \003(\0132" - "(.modlock.wasm.Definition.PropertiesEntr" - "y\0224\n\006fields\030\004 \003(\0132$.modlock.wasm.Definit" - "ion.FieldsEntry\022=\n\013copy_fields\030\005 \003(\0132(.m" - "odlock.wasm.Definition.CopyFieldsEntry\0321" - "\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - "\002 \001(\002:\0028\001\032-\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - "\005value\030\002 \001(\002:\0028\001\0321\n\017CopyFieldsEntry\022\013\n\003k" - "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"X\n\004File\022\022\n\016F" - "ILE_ABILITIES\020\000\022\017\n\013FILE_HEROES\020\001\022\027\n\023FILE" - "_BOT_DIFFICULTY\020\002\022\022\n\016FILE_NPC_UNITS\020\003B*Z" - "(github.com/paralin/modlock/src/wasm;was" - "mb\006proto3" + "odlock.wasm.scores.Board\022\'\n\010services\030\017 \003" + "(\0132\025.modlock.wasm.Service\"k\n\007Runtime\022\023\n\017" + "RUNTIME_UNKNOWN\020\000\022\020\n\014RUNTIME_WASM\020\001\022\023\n\017R" + "UNTIME_QUICKJS\020\002\022\020\n\014RUNTIME_LUAU\020\003\022\022\n\016RU" + "NTIME_PYTHON\020\004\"\213\001\n\010Language\022\024\n\020LANGUAGE_" + "UNKNOWN\020\000\022\017\n\013LANGUAGE_GO\020\001\022\027\n\023LANGUAGE_T" + "YPESCRIPT\020\002\022\027\n\023LANGUAGE_JAVASCRIPT\020\003\022\021\n\r" + "LANGUAGE_LUAU\020\004\022\023\n\017LANGUAGE_PYTHON\020\005\")\n\007" + "Service\022\014\n\004name\030\001 \001(\t\022\020\n\010optional\030\002 \001(\010\"" + "\222\001\n\010Movement\022+\n\005model\030\001 \001(\0162\034.modlock.wa" + "sm.Movement.Model\022\r\n\005scale\030\002 \001(\002\"/\n\005Mode" + "l\022\020\n\014MODEL_NATIVE\020\000\022\024\n\020MODEL_QUAKEWORLD\020" + "\001J\004\010\003\020\004R\023unpredicted_buttons\"\352\003\n\nDefinit" + "ion\022+\n\004file\030\001 \001(\0162\035.modlock.wasm.Definit" + "ion.File\022\r\n\005entry\030\002 \001(\t\022<\n\nproperties\030\003 " + "\003(\0132(.modlock.wasm.Definition.Properties" + "Entry\0224\n\006fields\030\004 \003(\0132$.modlock.wasm.Def" + "inition.FieldsEntry\022=\n\013copy_fields\030\005 \003(\013" + "2(.modlock.wasm.Definition.CopyFieldsEnt" + "ry\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + "lue\030\002 \001(\002:\0028\001\032-\n\013FieldsEntry\022\013\n\003key\030\001 \001(" + "\t\022\r\n\005value\030\002 \001(\002:\0028\001\0321\n\017CopyFieldsEntry\022" + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"X\n\004File\022" + "\022\n\016FILE_ABILITIES\020\000\022\017\n\013FILE_HEROES\020\001\022\027\n\023" + "FILE_BOT_DIFFICULTY\020\002\022\022\n\016FILE_NPC_UNITS\020" + "\003B*Z(github.com/paralin/modlock/src/wasm" + ";wasmb\006proto3" }; static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fmanifest_2eproto_deps[3] = { @@ -344,13 +386,13 @@ static ::absl::once_flag descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fmanifest_2eproto = { false, false, - 1649, + 1733, descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fmanifest_2eproto, "github.com/paralin/modlock/src/wasm/manifest.proto", &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fmanifest_2eproto_once, descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fmanifest_2eproto_deps, 3, - 6, + 7, schemas, file_default_instances, TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fmanifest_2eproto::offsets, @@ -430,6 +472,7 @@ PROTOBUF_NDEBUG_INLINE Manifest::Impl_::Impl_( settings_{visibility, arena, from.settings_}, metrics_{visibility, arena, from.metrics_}, boards_{visibility, arena, from.boards_}, + services_{visibility, arena, from.services_}, slug_(arena, from.slug_), name_(arena, from.name_), version_(arena, from.version_), @@ -451,7 +494,7 @@ Manifest::Manifest( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.movement_ = (CheckHasBit(cached_has_bits, 0x00000400U)) + _impl_.movement_ = (CheckHasBit(cached_has_bits, 0x00000800U)) ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.movement_) : nullptr; ::memcpy(reinterpret_cast(&_impl_) + @@ -472,6 +515,7 @@ PROTOBUF_NDEBUG_INLINE Manifest::Impl_::Impl_( settings_{visibility, arena}, metrics_{visibility, arena}, boards_{visibility, arena}, + services_{visibility, arena}, slug_(arena), name_(arena), version_(arena), @@ -532,6 +576,10 @@ constexpr auto Manifest::InternalNewImpl_() { decltype(Manifest::_impl_.boards_):: InternalGetArenaOffset( ::google::protobuf::Message::internal_visibility()), + PROTOBUF_FIELD_OFFSET(Manifest, _impl_.services_) + + decltype(Manifest::_impl_.services_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), }); if (arena_bits.has_value()) { return ::google::protobuf::internal::MessageCreator::CopyInit( @@ -576,17 +624,17 @@ Manifest::GetClassData() const { return Manifest_class_data_.base(); } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<4, 14, 5, 74, 2> +const ::_pbi::TcParseTable<4, 15, 6, 74, 2> Manifest::_table_ = { { PROTOBUF_FIELD_OFFSET(Manifest, _impl_._has_bits_), 0, // no _extensions_ - 14, 120, // max_field_number, fast_idx_mask + 15, 120, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294950912, // skipmap + 4294934528, // skipmap offsetof(decltype(_table_), field_entries), - 14, // num_field_entries - 5, // num_aux_entries + 15, // num_field_entries + 6, // num_aux_entries offsetof(decltype(_table_), aux_entries), Manifest_class_data_.base(), nullptr, // post_loop_handler @@ -598,35 +646,35 @@ Manifest::_table_ = { {::_pbi::TcParser::MiniParse, {}}, // string slug = 1; {::_pbi::TcParser::FastUS1, - {10, 4, 0, + {10, 5, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.slug_)}}, // string name = 2; {::_pbi::TcParser::FastUS1, - {18, 5, 0, + {18, 6, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.name_)}}, // string version = 3; {::_pbi::TcParser::FastUS1, - {26, 6, 0, + {26, 7, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.version_)}}, // .modlock.wasm.Manifest.Language language = 4; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Manifest, _impl_.language_), 11>(), - {32, 11, 0, + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Manifest, _impl_.language_), 12>(), + {32, 12, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.language_)}}, // .modlock.wasm.Manifest.Runtime runtime = 5; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Manifest, _impl_.runtime_), 12>(), - {40, 12, 0, + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Manifest, _impl_.runtime_), 13>(), + {40, 13, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.runtime_)}}, // string entry = 6; {::_pbi::TcParser::FastUS1, - {50, 7, 0, + {50, 8, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.entry_)}}, // string map = 7; {::_pbi::TcParser::FastUS1, - {58, 8, 0, + {58, 9, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.map_)}}, // .modlock.wasm.Movement movement = 8; {::_pbi::TcParser::FastMtS1, - {66, 10, 0, + {66, 11, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.movement_)}}, // repeated .modlock.wasm.Definition definitions = 9; {::_pbi::TcParser::FastMtR1, @@ -641,37 +689,40 @@ Manifest::_table_ = { {90, 2, 3, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.metrics_)}}, // bool free_for_all = 12; - {::_pbi::TcParser::SingularVarintNoZag1(), - {96, 13, 0, + {::_pbi::TcParser::SingularVarintNoZag1(), + {96, 14, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.free_for_all_)}}, // string content_addon = 13; {::_pbi::TcParser::FastUS1, - {106, 9, 0, + {106, 10, 0, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.content_addon_)}}, // repeated .modlock.wasm.scores.Board boards = 14; {::_pbi::TcParser::FastMtR1, {114, 3, 4, PROTOBUF_FIELD_OFFSET(Manifest, _impl_.boards_)}}, - {::_pbi::TcParser::MiniParse, {}}, + // repeated .modlock.wasm.Service services = 15; + {::_pbi::TcParser::FastMtR1, + {122, 4, 5, + PROTOBUF_FIELD_OFFSET(Manifest, _impl_.services_)}}, }}, {{ 65535, 65535 }}, {{ // string slug = 1; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.slug_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.slug_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string name = 2; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.name_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.name_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string version = 3; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.version_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.version_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // .modlock.wasm.Manifest.Language language = 4; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.language_), _Internal::kHasBitsOffset + 11, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.language_), _Internal::kHasBitsOffset + 12, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, // .modlock.wasm.Manifest.Runtime runtime = 5; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.runtime_), _Internal::kHasBitsOffset + 12, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.runtime_), _Internal::kHasBitsOffset + 13, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, // string entry = 6; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.entry_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.entry_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string map = 7; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.map_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.map_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // .modlock.wasm.Movement movement = 8; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.movement_), _Internal::kHasBitsOffset + 10, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.movement_), _Internal::kHasBitsOffset + 11, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // repeated .modlock.wasm.Definition definitions = 9; {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.definitions_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, // repeated .modlock.wasm.settings.Setting settings = 10; @@ -679,11 +730,13 @@ Manifest::_table_ = { // repeated .modlock.wasm.metrics.Metric metrics = 11; {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.metrics_), _Internal::kHasBitsOffset + 2, 3, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, // bool free_for_all = 12; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.free_for_all_), _Internal::kHasBitsOffset + 13, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.free_for_all_), _Internal::kHasBitsOffset + 14, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string content_addon = 13; - {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.content_addon_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.content_addon_), _Internal::kHasBitsOffset + 10, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // repeated .modlock.wasm.scores.Board boards = 14; {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.boards_), _Internal::kHasBitsOffset + 3, 4, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .modlock.wasm.Service services = 15; + {PROTOBUF_FIELD_OFFSET(Manifest, _impl_.services_), _Internal::kHasBitsOffset + 4, 5, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ {::_pbi::TcParser::GetTable<::modlock::wasm::Movement>()}, @@ -691,6 +744,7 @@ Manifest::_table_ = { {::_pbi::TcParser::GetTable<::modlock::wasm::settings::Setting>()}, {::_pbi::TcParser::GetTable<::modlock::wasm::metrics::Metric>()}, {::_pbi::TcParser::GetTable<::modlock::wasm::scores::Board>()}, + {::_pbi::TcParser::GetTable<::modlock::wasm::Service>()}, }}, {{ "\25\4\4\7\0\0\5\3\0\0\0\0\0\15\0\0" @@ -724,32 +778,35 @@ PROTOBUF_NOINLINE void Manifest::Clear() { if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { _impl_.boards_.Clear(); } - if (CheckHasBit(cached_has_bits, 0x00000010U)) { - _impl_.slug_.ClearNonDefaultToEmpty(); + if (CheckHasBitForRepeated(cached_has_bits, 0x00000010U)) { + _impl_.services_.Clear(); } if (CheckHasBit(cached_has_bits, 0x00000020U)) { - _impl_.name_.ClearNonDefaultToEmpty(); + _impl_.slug_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000040U)) { - _impl_.version_.ClearNonDefaultToEmpty(); + _impl_.name_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000080U)) { - _impl_.entry_.ClearNonDefaultToEmpty(); + _impl_.version_.ClearNonDefaultToEmpty(); } } - if (BatchCheckHasBit(cached_has_bits, 0x00000700U)) { + if (BatchCheckHasBit(cached_has_bits, 0x00000f00U)) { if (CheckHasBit(cached_has_bits, 0x00000100U)) { - _impl_.map_.ClearNonDefaultToEmpty(); + _impl_.entry_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000200U)) { - _impl_.content_addon_.ClearNonDefaultToEmpty(); + _impl_.map_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000400U)) { + _impl_.content_addon_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000800U)) { ABSL_DCHECK(_impl_.movement_ != nullptr); _impl_.movement_->Clear(); } } - if (BatchCheckHasBit(cached_has_bits, 0x00003800U)) { + if (BatchCheckHasBit(cached_has_bits, 0x00007000U)) { ::memset(&_impl_.language_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.free_for_all_) - reinterpret_cast(&_impl_.language_)) + sizeof(_impl_.free_for_all_)); @@ -778,7 +835,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[0]; // string slug = 1; - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (!this_._internal_slug().empty()) { const ::std::string& _s = this_._internal_slug(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -788,7 +845,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // string name = 2; - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (!this_._internal_name().empty()) { const ::std::string& _s = this_._internal_name(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -798,7 +855,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // string version = 3; - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (!this_._internal_version().empty()) { const ::std::string& _s = this_._internal_version(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -808,7 +865,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // .modlock.wasm.Manifest.Language language = 4; - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (this_._internal_language() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( @@ -817,7 +874,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // .modlock.wasm.Manifest.Runtime runtime = 5; - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (this_._internal_runtime() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( @@ -826,7 +883,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // string entry = 6; - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (!this_._internal_entry().empty()) { const ::std::string& _s = this_._internal_entry(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -836,7 +893,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // string map = 7; - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (!this_._internal_map().empty()) { const ::std::string& _s = this_._internal_map(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -846,7 +903,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // .modlock.wasm.Movement movement = 8; - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 8, *this_._impl_.movement_, this_._impl_.movement_->GetCachedSize(), target, stream); @@ -892,7 +949,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // bool free_for_all = 12; - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (this_._internal_free_for_all() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -901,7 +958,7 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } // string content_addon = 13; - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (!this_._internal_content_addon().empty()) { const ::std::string& _s = this_._internal_content_addon(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -923,6 +980,19 @@ ::uint8_t* PROTOBUF_NONNULL Manifest::_InternalSerialize( } } + // repeated .modlock.wasm.Service services = 15; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000010U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_services_size()); + i < n; i++) { + const auto& repfield = this_._internal_services().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, repfield, repfield.GetCachedSize(), + target, stream); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -977,71 +1047,78 @@ ::size_t Manifest::ByteSizeLong() const { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } } + // repeated .modlock.wasm.Service services = 15; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000010U)) { + total_size += 1UL * this_._internal_services_size(); + for (const auto& msg : this_._internal_services()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } // string slug = 1; - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (!this_._internal_slug().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_slug()); } } // string name = 2; - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (!this_._internal_name().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_name()); } } // string version = 3; - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (!this_._internal_version().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_version()); } } + } + if (BatchCheckHasBit(cached_has_bits, 0x00007f00U)) { // string entry = 6; - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (!this_._internal_entry().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_entry()); } } - } - if (BatchCheckHasBit(cached_has_bits, 0x00003f00U)) { // string map = 7; - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (!this_._internal_map().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_map()); } } // string content_addon = 13; - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (!this_._internal_content_addon().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_content_addon()); } } // .modlock.wasm.Movement movement = 8; - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.movement_); } // .modlock.wasm.Manifest.Language language = 4; - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (this_._internal_language() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this_._internal_language()); } } // .modlock.wasm.Manifest.Runtime runtime = 5; - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (this_._internal_runtime() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this_._internal_runtime()); } } // bool free_for_all = 12; - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (this_._internal_free_for_all() != 0) { total_size += 2; } @@ -1087,7 +1164,12 @@ void Manifest::MergeImpl(::google::protobuf::MessageLite& to_msg, ::google::protobuf::MessageLite::internal_visibility(), arena, from._internal_boards()); } - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000010U)) { + _this->_internal_mutable_services()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_services()); + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (!from._internal_slug().empty()) { _this->_internal_set_slug(from._internal_slug()); } else { @@ -1096,7 +1178,7 @@ void Manifest::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (!from._internal_name().empty()) { _this->_internal_set_name(from._internal_name()); } else { @@ -1105,7 +1187,7 @@ void Manifest::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (!from._internal_version().empty()) { _this->_internal_set_version(from._internal_version()); } else { @@ -1114,7 +1196,9 @@ void Manifest::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0x00007f00U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (!from._internal_entry().empty()) { _this->_internal_set_entry(from._internal_entry()); } else { @@ -1123,9 +1207,7 @@ void Manifest::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - } - if (BatchCheckHasBit(cached_has_bits, 0x00003f00U)) { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (!from._internal_map().empty()) { _this->_internal_set_map(from._internal_map()); } else { @@ -1134,7 +1216,7 @@ void Manifest::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (!from._internal_content_addon().empty()) { _this->_internal_set_content_addon(from._internal_content_addon()); } else { @@ -1143,7 +1225,7 @@ void Manifest::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { ABSL_DCHECK(from._impl_.movement_ != nullptr); if (_this->_impl_.movement_ == nullptr) { _this->_impl_.movement_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.movement_); @@ -1151,17 +1233,17 @@ void Manifest::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.movement_->MergeFrom(*from._impl_.movement_); } } - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (from._internal_language() != 0) { _this->_impl_.language_ = from._impl_.language_; } } - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (from._internal_runtime() != 0) { _this->_impl_.runtime_ = from._impl_.runtime_; } } - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (from._internal_free_for_all() != 0) { _this->_impl_.free_for_all_ = from._impl_.free_for_all_; } @@ -1190,6 +1272,7 @@ void Manifest::InternalSwap(Manifest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) _impl_.settings_.InternalSwap(&other->_impl_.settings_); _impl_.metrics_.InternalSwap(&other->_impl_.metrics_); _impl_.boards_.InternalSwap(&other->_impl_.boards_); + _impl_.services_.InternalSwap(&other->_impl_.services_); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.slug_, &other->_impl_.slug_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.version_, &other->_impl_.version_, arena); @@ -1209,6 +1292,314 @@ ::google::protobuf::Metadata Manifest::GetMetadata() const { } // =================================================================== +class Service::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Service, _impl_._has_bits_); +}; + +Service::Service(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, Service_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.wasm.Service) +} +PROTOBUF_NDEBUG_INLINE Service::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::modlock::wasm::Service& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + name_(arena, from.name_) {} + +Service::Service( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const Service& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, Service_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + Service* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.optional_ = from._impl_.optional_; + + // @@protoc_insertion_point(copy_constructor:modlock.wasm.Service) +} +PROTOBUF_NDEBUG_INLINE Service::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + name_(arena) {} + +inline void Service::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.optional_ = {}; +} +Service::~Service() { + // @@protoc_insertion_point(destructor:modlock.wasm.Service) + SharedDtor(*this); +} +inline void Service::SharedDtor(MessageLite& self) { + Service& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL Service::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) Service(arena); +} +constexpr auto Service::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Service), + alignof(Service)); +} +constexpr auto Service::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_Service_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &Service::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &Service::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &Service::ByteSizeLong, + &Service::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(Service, _impl_._cached_size_), + false, + }, + &Service::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fmanifest_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull Service_class_data_ = + Service::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +Service::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&Service_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(Service_class_data_.tc_table); + return Service_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 33, 2> +Service::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Service, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + Service_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::wasm::Service>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bool optional = 2; + {::_pbi::TcParser::SingularVarintNoZag1(), + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(Service, _impl_.optional_)}}, + // string name = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(Service, _impl_.name_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string name = 1; + {PROTOBUF_FIELD_OFFSET(Service, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bool optional = 2; + {PROTOBUF_FIELD_OFFSET(Service, _impl_.optional_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + }}, + // no aux_entries + {{ + "\24\4\0\0\0\0\0\0" + "modlock.wasm.Service" + "name" + }}, +}; +PROTOBUF_NOINLINE void Service::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.wasm.Service) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + _impl_.optional_ = false; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL Service::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const Service& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL Service::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const Service& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.wasm.Service) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string name = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_name().empty()) { + const ::std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.wasm.Service.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // bool optional = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_optional() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_optional(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.wasm.Service) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t Service::ByteSizeLong(const MessageLite& base) { + const Service& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t Service::ByteSizeLong() const { + const Service& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.wasm.Service) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // string name = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + } + // bool optional = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_optional() != 0) { + total_size += 2; + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void Service::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.wasm.Service) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } else { + if (_this->_impl_.name_.IsDefault()) { + _this->_internal_set_name(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_optional() != 0) { + _this->_impl_.optional_ = from._impl_.optional_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void Service::CopyFrom(const Service& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.wasm.Service) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Service::InternalSwap(Service* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + swap(_impl_.optional_, other->_impl_.optional_); +} + +::google::protobuf::Metadata Service::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + class Movement::_Internal { public: using HasBits = diff --git a/src/wasm/manifest.pb.go b/src/wasm/manifest.pb.go index f3dbe34b..616dc07f 100644 --- a/src/wasm/manifest.pb.go +++ b/src/wasm/manifest.pb.go @@ -251,6 +251,11 @@ type Manifest struct { // Boards are the rankings the mod reports scores to through the host's // scores service. Boards []*scores.Board `protobuf:"bytes,14,rep,name=boards,proto3" json:"boards,omitempty"` + // Services are the services the mod calls with CallService, by name only; + // the host learns no methods. A host refuses to start a mod when a service + // it needs has no provider, and starts it without an optional one, whose + // calls then fail. + Services []*Service `protobuf:"bytes,15,rep,name=services,proto3" json:"services,omitempty"` } func (x *Manifest) Reset() { @@ -357,6 +362,43 @@ func (x *Manifest) GetBoards() []*scores.Board { return nil } +func (x *Manifest) GetServices() []*Service { + if x != nil { + return x.Services + } + return nil +} + +// Service names one service a mod calls. +type Service struct { + unknownFields []byte + // Name is the service's name as CallService names it, such as + // "example.drills.v1". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional marks a service the mod runs without. Unset, the mod needs it. + Optional bool `protobuf:"varint,2,opt,name=optional,proto3" json:"optional,omitempty"` +} + +func (x *Service) Reset() { + *x = Service{} +} + +func (*Service) ProtoMessage() {} + +func (x *Service) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Service) GetOptional() bool { + if x != nil { + return x.Optional + } + return false +} + // Movement selects the movement model heroes walk and jump with. type Movement struct { unknownFields []byte @@ -546,6 +588,7 @@ func (m *Manifest) CloneVT() *Manifest { r.Settings = protobuf_go_lite.CloneVTSlice(m.Settings) r.Metrics = protobuf_go_lite.CloneVTSlice(m.Metrics) r.Boards = protobuf_go_lite.CloneVTSlice(m.Boards) + r.Services = protobuf_go_lite.CloneVTSlice(m.Services) if len(m.unknownFields) > 0 { r.unknownFields = slices.Clone(m.unknownFields) } @@ -556,6 +599,23 @@ func (m *Manifest) CloneMessageVT() protobuf_go_lite.CloneMessage { return m.CloneVT() } +func (m *Service) CloneVT() *Service { + if m == nil { + return (*Service)(nil) + } + r := new(Service) + r.Name = m.Name + r.Optional = m.Optional + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *Service) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + func (m *Movement) CloneVT() *Movement { if m == nil { return (*Movement)(nil) @@ -641,6 +701,9 @@ func (this *Manifest) EqualVT(that *Manifest) bool { if !protobuf_go_lite.EqualVTSliceImplicit(this.Boards, that.Boards, func() *scores.Board { return &scores.Board{} }) { return false } + if !protobuf_go_lite.EqualVTSliceImplicit(this.Services, that.Services, func() *Service { return &Service{} }) { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -652,6 +715,29 @@ func (this *Manifest) EqualMessageVT(thatMsg any) bool { return this.EqualVT(that) } +func (this *Service) EqualVT(that *Service) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Name != that.Name { + return false + } + if this.Optional != that.Optional { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Service) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*Service) + if !ok { + return false + } + return this.EqualVT(that) +} + func (this *Movement) EqualVT(that *Movement) bool { if this == that { return true @@ -889,6 +975,17 @@ func (x *Manifest) MarshalProtoJSON(s *json.MarshalState) { } s.WriteArrayEnd() } + if len(x.Services) > 0 || s.HasField("services") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("services") + s.WriteArrayStart() + var wroteElement bool + for _, element := range x.Services { + s.WriteMoreIf(&wroteElement) + element.MarshalProtoJSON(s.WithField("services")) + } + s.WriteArrayEnd() + } s.WriteObjectEnd() } @@ -1012,6 +1109,24 @@ func (x *Manifest) UnmarshalProtoJSON(s *json.UnmarshalState) { } x.Boards = append(x.Boards, v) }) + case "services": + s.AddField("services") + if s.ReadNil() { + x.Services = nil + return + } + s.ReadArray(func() { + if s.ReadNil() { + x.Services = append(x.Services, nil) + return + } + v := &Service{} + v.UnmarshalProtoJSON(s.WithField("services", false)) + if s.Err() != nil { + return + } + x.Services = append(x.Services, v) + }) } }) } @@ -1021,6 +1136,56 @@ func (x *Manifest) UnmarshalJSON(b []byte) error { return json.DefaultUnmarshalerConfig.Unmarshal(b, x) } +// MarshalProtoJSON marshals the Service message to JSON. +func (x *Service) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Name != "" || s.HasField("name") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("name") + s.WriteString(x.Name) + } + if x.Optional || s.HasField("optional") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("optional") + s.WriteBool(x.Optional) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the Service to JSON. +func (x *Service) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the Service message from JSON. +func (x *Service) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "name": + s.AddField("name") + x.Name = s.ReadString() + case "optional": + s.AddField("optional") + x.Optional = s.ReadBool() + } + }) +} + +// UnmarshalJSON unmarshals the Service from JSON. +func (x *Service) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + // MarshalProtoJSON marshals the Movement_Model to JSON. func (x Movement_Model) MarshalProtoJSON(s *json.MarshalState) { s.WriteEnum(int32(x), Movement_Model_name) @@ -1449,6 +1614,18 @@ func (m *Manifest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m.unknownFields != nil { i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) } + if len(m.Services) > 0 { + for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Services[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x7a + } + } if len(m.Boards) > 0 { for iNdEx := len(m.Boards) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Boards[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) @@ -1555,6 +1732,48 @@ func (m *Manifest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Service) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Service) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if m.Optional { + i = protobuf_go_lite.EncodeBool(dAtA, i, m.Optional) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Name) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Movement) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -1719,6 +1938,22 @@ func (m *Manifest) SizeVT() (n int) { l = e.SizeVT() n += protobuf_go_lite.SizeMessage(1, l) } + for _, e := range m.Services { + l = e.SizeVT() + n += protobuf_go_lite.SizeMessage(1, l) + } + n += len(m.unknownFields) + return n +} + +func (m *Service) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Name) + n += protobuf_go_lite.SizeBoolNonZero(1, m.Optional) n += len(m.unknownFields) return n } @@ -1864,6 +2099,18 @@ func (x *Manifest) MarshalProtoText() string { } protobuf_go_lite.TextWriteListEnd(&sb) } + if len(x.Services) > 0 { + protobuf_go_lite.TextWriteListStart(&sb, initialLen, "services") + for i, v := range x.Services { + protobuf_go_lite.TextWriteListSeparator(&sb, i) + if v == nil { + protobuf_go_lite.TextWriteTextMarshaler(&sb, &Service{}) + } else { + protobuf_go_lite.TextWriteTextMarshaler(&sb, v) + } + } + protobuf_go_lite.TextWriteListEnd(&sb) + } return protobuf_go_lite.TextFinishMessage(&sb) } @@ -1871,6 +2118,24 @@ func (x *Manifest) String() string { return x.MarshalProtoText() } +func (x *Service) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "Service") + if x.Name != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "name") + protobuf_go_lite.TextWriteString(&sb, x.Name) + } + if x.Optional != false { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "optional") + protobuf_go_lite.TextWriteBool(&sb, x.Optional) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *Service) String() string { + return x.MarshalProtoText() +} + func (x Movement_Model) MarshalProtoText() string { return x.String() } @@ -2181,6 +2446,82 @@ func (m *Manifest) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + msgStart, postIndex, err := protobuf_go_lite.DecodeLengthDelimited(dAtA, iNdEx) + if err != nil { + return err + } + m.Services = append(m.Services, &Service{}) + if err := m.Services[len(m.Services)-1].UnmarshalVT(dAtA[msgStart:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *Service) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Service: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Name = v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v bool + v, iNdEx, err = protobuf_go_lite.DecodeVarintBool(dAtA, iNdEx) + if err != nil { + return err + } + m.Optional = bool(v) default: iNdEx = preIndex skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) diff --git a/src/wasm/manifest.pb.h b/src/wasm/manifest.pb.h index e2761943..7cad57b8 100644 --- a/src/wasm/manifest.pb.h +++ b/src/wasm/manifest.pb.h @@ -96,6 +96,10 @@ class Movement; struct MovementDefaultTypeInternal; MODLOCK_API extern MovementDefaultTypeInternal _Movement_default_instance_; MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull Movement_class_data_; +class Service; +struct ServiceDefaultTypeInternal; +MODLOCK_API extern ServiceDefaultTypeInternal _Service_default_instance_; +MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull Service_class_data_; } // namespace wasm } // namespace modlock namespace google { @@ -276,6 +280,213 @@ inline bool Definition_File_Parse( // ------------------------------------------------------------------- +class MODLOCK_API Service final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.wasm.Service) */ { + public: + inline Service() : Service(nullptr) {} + ~Service() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Service* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Service)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR Service(::google::protobuf::internal::ConstantInitialized); + + inline Service(const Service& from) : Service(nullptr, from) {} + inline Service(Service&& from) noexcept + : Service(nullptr, ::std::move(from)) {} + inline Service& operator=(const Service& from) { + CopyFrom(from); + return *this; + } + inline Service& operator=(Service&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Service& default_instance() { + return *reinterpret_cast( + &_Service_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(Service& a, Service& b) { a.Swap(&b); } + inline void Swap(Service* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Service* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Service* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Service& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Service& from) { Service::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(Service* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.wasm.Service"; } + + explicit Service(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + Service(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Service& from); + Service( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Service&& from) noexcept + : Service(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kOptionalFieldNumber = 2, + }; + // string name = 1; + void clear_name() ; + const ::std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_name(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); + void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_name() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); + + public: + // bool optional = 2; + void clear_optional() ; + bool optional() const; + void set_optional(bool value); + + private: + bool _internal_optional() const; + void _internal_set_optional(bool value); + + public: + // @@protoc_insertion_point(class_scope:modlock.wasm.Service) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 0, 33, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const Service& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr name_; + bool optional_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fmanifest_2eproto; +}; + +MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull Service_class_data_; +// ------------------------------------------------------------------- + class MODLOCK_API Movement final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:modlock.wasm.Movement) */ { public: @@ -331,7 +542,7 @@ class MODLOCK_API Movement final : public ::google::protobuf::Message return *reinterpret_cast( &_Movement_default_instance_); } - static constexpr int kIndexInFileMessages = 1; + static constexpr int kIndexInFileMessages = 2; friend void swap(Movement& a, Movement& b) { a.Swap(&b); } inline void Swap(Movement* PROTOBUF_NONNULL other) { if (other == this) return; @@ -670,7 +881,7 @@ class MODLOCK_API Definition final : public ::google::protobuf::Message return *reinterpret_cast( &_Definition_default_instance_); } - static constexpr int kIndexInFileMessages = 5; + static constexpr int kIndexInFileMessages = 6; friend void swap(Definition& a, Definition& b) { a.Swap(&b); } inline void Swap(Definition* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1097,6 +1308,7 @@ class MODLOCK_API Manifest final : public ::google::protobuf::Message kSettingsFieldNumber = 10, kMetricsFieldNumber = 11, kBoardsFieldNumber = 14, + kServicesFieldNumber = 15, kSlugFieldNumber = 1, kNameFieldNumber = 2, kVersionFieldNumber = 3, @@ -1176,6 +1388,23 @@ class MODLOCK_API Manifest final : public ::google::protobuf::Message const ::modlock::wasm::scores::Board& boards(int index) const; ::modlock::wasm::scores::Board* PROTOBUF_NONNULL add_boards(); const ::google::protobuf::RepeatedPtrField<::modlock::wasm::scores::Board>& boards() const; + // repeated .modlock.wasm.Service services = 15; + int services_size() const; + private: + int _internal_services_size() const; + + public: + void clear_services() ; + ::modlock::wasm::Service* PROTOBUF_NONNULL mutable_services(int index); + ::google::protobuf::RepeatedPtrField<::modlock::wasm::Service>* PROTOBUF_NONNULL mutable_services(); + + private: + const ::google::protobuf::RepeatedPtrField<::modlock::wasm::Service>& _internal_services() const; + ::google::protobuf::RepeatedPtrField<::modlock::wasm::Service>* PROTOBUF_NONNULL _internal_mutable_services(); + public: + const ::modlock::wasm::Service& services(int index) const; + ::modlock::wasm::Service* PROTOBUF_NONNULL add_services(); + const ::google::protobuf::RepeatedPtrField<::modlock::wasm::Service>& services() const; // string slug = 1; void clear_slug() ; const ::std::string& slug() const; @@ -1315,8 +1544,8 @@ class MODLOCK_API Manifest final : public ::google::protobuf::Message private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<4, 14, - 5, 74, + static const ::google::protobuf::internal::TcParseTable<4, 15, + 6, 74, 2> _table_; @@ -1341,6 +1570,7 @@ class MODLOCK_API Manifest final : public ::google::protobuf::Message ::google::protobuf::RepeatedPtrField< ::modlock::wasm::settings::Setting > settings_; ::google::protobuf::RepeatedPtrField< ::modlock::wasm::metrics::Metric > metrics_; ::google::protobuf::RepeatedPtrField< ::modlock::wasm::scores::Board > boards_; + ::google::protobuf::RepeatedPtrField< ::modlock::wasm::Service > services_; ::google::protobuf::internal::ArenaStringPtr slug_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr version_; @@ -1380,7 +1610,7 @@ inline void Manifest::clear_slug() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.slug_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000010U); + 0x00000020U); } inline const ::std::string& Manifest::slug() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1390,13 +1620,13 @@ inline const ::std::string& Manifest::slug() const template PROTOBUF_ALWAYS_INLINE void Manifest::set_slug(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000010U); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); _impl_.slug_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.slug) } inline ::std::string* PROTOBUF_NONNULL Manifest::mutable_slug() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000010U); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); ::std::string* _s = _internal_mutable_slug(); // @@protoc_insertion_point(field_mutable:modlock.wasm.Manifest.slug) return _s; @@ -1416,10 +1646,10 @@ inline ::std::string* PROTOBUF_NONNULL Manifest::_internal_mutable_slug() { inline ::std::string* PROTOBUF_NULLABLE Manifest::release_slug() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:modlock.wasm.Manifest.slug) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000010U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000020U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); auto* released = _impl_.slug_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.slug_.Set("", GetArena()); @@ -1429,9 +1659,9 @@ inline ::std::string* PROTOBUF_NULLABLE Manifest::release_slug() { inline void Manifest::set_allocated_slug(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000010U); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); } _impl_.slug_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.slug_.IsDefault()) { @@ -1445,7 +1675,7 @@ inline void Manifest::clear_name() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.name_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000020U); + 0x00000040U); } inline const ::std::string& Manifest::name() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1455,13 +1685,13 @@ inline const ::std::string& Manifest::name() const template PROTOBUF_ALWAYS_INLINE void Manifest::set_name(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000020U); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); _impl_.name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.name) } inline ::std::string* PROTOBUF_NONNULL Manifest::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000020U); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); ::std::string* _s = _internal_mutable_name(); // @@protoc_insertion_point(field_mutable:modlock.wasm.Manifest.name) return _s; @@ -1481,10 +1711,10 @@ inline ::std::string* PROTOBUF_NONNULL Manifest::_internal_mutable_name() { inline ::std::string* PROTOBUF_NULLABLE Manifest::release_name() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:modlock.wasm.Manifest.name) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000020U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000040U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ClearHasBit(_impl_._has_bits_[0], 0x00000040U); auto* released = _impl_.name_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.name_.Set("", GetArena()); @@ -1494,9 +1724,9 @@ inline ::std::string* PROTOBUF_NULLABLE Manifest::release_name() { inline void Manifest::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000020U); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ClearHasBit(_impl_._has_bits_[0], 0x00000040U); } _impl_.name_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { @@ -1510,7 +1740,7 @@ inline void Manifest::clear_version() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.version_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000040U); + 0x00000080U); } inline const ::std::string& Manifest::version() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1520,13 +1750,13 @@ inline const ::std::string& Manifest::version() const template PROTOBUF_ALWAYS_INLINE void Manifest::set_version(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000040U); + SetHasBit(_impl_._has_bits_[0], 0x00000080U); _impl_.version_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.version) } inline ::std::string* PROTOBUF_NONNULL Manifest::mutable_version() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000040U); + SetHasBit(_impl_._has_bits_[0], 0x00000080U); ::std::string* _s = _internal_mutable_version(); // @@protoc_insertion_point(field_mutable:modlock.wasm.Manifest.version) return _s; @@ -1546,10 +1776,10 @@ inline ::std::string* PROTOBUF_NONNULL Manifest::_internal_mutable_version() { inline ::std::string* PROTOBUF_NULLABLE Manifest::release_version() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:modlock.wasm.Manifest.version) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000040U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000080U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ClearHasBit(_impl_._has_bits_[0], 0x00000080U); auto* released = _impl_.version_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.version_.Set("", GetArena()); @@ -1559,9 +1789,9 @@ inline ::std::string* PROTOBUF_NULLABLE Manifest::release_version() { inline void Manifest::set_allocated_version(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000040U); + SetHasBit(_impl_._has_bits_[0], 0x00000080U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ClearHasBit(_impl_._has_bits_[0], 0x00000080U); } _impl_.version_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.version_.IsDefault()) { @@ -1575,7 +1805,7 @@ inline void Manifest::clear_language() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.language_ = 0; ClearHasBit(_impl_._has_bits_[0], - 0x00000800U); + 0x00001000U); } inline ::modlock::wasm::Manifest_Language Manifest::language() const { // @@protoc_insertion_point(field_get:modlock.wasm.Manifest.language) @@ -1583,7 +1813,7 @@ inline ::modlock::wasm::Manifest_Language Manifest::language() const { } inline void Manifest::set_language(::modlock::wasm::Manifest_Language value) { _internal_set_language(value); - SetHasBit(_impl_._has_bits_[0], 0x00000800U); + SetHasBit(_impl_._has_bits_[0], 0x00001000U); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.language) } inline ::modlock::wasm::Manifest_Language Manifest::_internal_language() const { @@ -1600,7 +1830,7 @@ inline void Manifest::clear_runtime() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.runtime_ = 0; ClearHasBit(_impl_._has_bits_[0], - 0x00001000U); + 0x00002000U); } inline ::modlock::wasm::Manifest_Runtime Manifest::runtime() const { // @@protoc_insertion_point(field_get:modlock.wasm.Manifest.runtime) @@ -1608,7 +1838,7 @@ inline ::modlock::wasm::Manifest_Runtime Manifest::runtime() const { } inline void Manifest::set_runtime(::modlock::wasm::Manifest_Runtime value) { _internal_set_runtime(value); - SetHasBit(_impl_._has_bits_[0], 0x00001000U); + SetHasBit(_impl_._has_bits_[0], 0x00002000U); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.runtime) } inline ::modlock::wasm::Manifest_Runtime Manifest::_internal_runtime() const { @@ -1625,7 +1855,7 @@ inline void Manifest::clear_entry() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.entry_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000080U); + 0x00000100U); } inline const ::std::string& Manifest::entry() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1635,13 +1865,13 @@ inline const ::std::string& Manifest::entry() const template PROTOBUF_ALWAYS_INLINE void Manifest::set_entry(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000080U); + SetHasBit(_impl_._has_bits_[0], 0x00000100U); _impl_.entry_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.entry) } inline ::std::string* PROTOBUF_NONNULL Manifest::mutable_entry() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000080U); + SetHasBit(_impl_._has_bits_[0], 0x00000100U); ::std::string* _s = _internal_mutable_entry(); // @@protoc_insertion_point(field_mutable:modlock.wasm.Manifest.entry) return _s; @@ -1661,10 +1891,10 @@ inline ::std::string* PROTOBUF_NONNULL Manifest::_internal_mutable_entry() { inline ::std::string* PROTOBUF_NULLABLE Manifest::release_entry() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:modlock.wasm.Manifest.entry) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000080U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000100U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000080U); + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); auto* released = _impl_.entry_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.entry_.Set("", GetArena()); @@ -1674,9 +1904,9 @@ inline ::std::string* PROTOBUF_NULLABLE Manifest::release_entry() { inline void Manifest::set_allocated_entry(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000080U); + SetHasBit(_impl_._has_bits_[0], 0x00000100U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000080U); + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); } _impl_.entry_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.entry_.IsDefault()) { @@ -1690,7 +1920,7 @@ inline void Manifest::clear_map() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.map_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000100U); + 0x00000200U); } inline const ::std::string& Manifest::map() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1700,13 +1930,13 @@ inline const ::std::string& Manifest::map() const template PROTOBUF_ALWAYS_INLINE void Manifest::set_map(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000100U); + SetHasBit(_impl_._has_bits_[0], 0x00000200U); _impl_.map_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.map) } inline ::std::string* PROTOBUF_NONNULL Manifest::mutable_map() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000100U); + SetHasBit(_impl_._has_bits_[0], 0x00000200U); ::std::string* _s = _internal_mutable_map(); // @@protoc_insertion_point(field_mutable:modlock.wasm.Manifest.map) return _s; @@ -1726,10 +1956,10 @@ inline ::std::string* PROTOBUF_NONNULL Manifest::_internal_mutable_map() { inline ::std::string* PROTOBUF_NULLABLE Manifest::release_map() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:modlock.wasm.Manifest.map) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000100U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000200U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); auto* released = _impl_.map_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.map_.Set("", GetArena()); @@ -1739,9 +1969,9 @@ inline ::std::string* PROTOBUF_NULLABLE Manifest::release_map() { inline void Manifest::set_allocated_map(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000100U); + SetHasBit(_impl_._has_bits_[0], 0x00000200U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); } _impl_.map_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.map_.IsDefault()) { @@ -1752,7 +1982,7 @@ inline void Manifest::set_allocated_map(::std::string* PROTOBUF_NULLABLE value) // .modlock.wasm.Movement movement = 8; inline bool Manifest::has_movement() const { - bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000400U); + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000800U); PROTOBUF_ASSUME(!value || _impl_.movement_ != nullptr); return value; } @@ -1760,7 +1990,7 @@ inline void Manifest::clear_movement() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.movement_ != nullptr) _impl_.movement_->Clear(); ClearHasBit(_impl_._has_bits_[0], - 0x00000400U); + 0x00000800U); } inline const ::modlock::wasm::Movement& Manifest::_internal_movement() const { ::google::protobuf::internal::TSanRead(&_impl_); @@ -1779,16 +2009,16 @@ inline void Manifest::unsafe_arena_set_allocated_movement( } _impl_.movement_ = reinterpret_cast<::modlock::wasm::Movement*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000400U); + SetHasBit(_impl_._has_bits_[0], 0x00000800U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.wasm.Manifest.movement) } inline ::modlock::wasm::Movement* PROTOBUF_NULLABLE Manifest::release_movement() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); ::modlock::wasm::Movement* released = _impl_.movement_; _impl_.movement_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -1808,7 +2038,7 @@ inline ::modlock::wasm::Movement* PROTOBUF_NULLABLE Manifest::unsafe_arena_relea ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:modlock.wasm.Manifest.movement) - ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); ::modlock::wasm::Movement* temp = _impl_.movement_; _impl_.movement_ = nullptr; return temp; @@ -1823,7 +2053,7 @@ inline ::modlock::wasm::Movement* PROTOBUF_NONNULL Manifest::_internal_mutable_m } inline ::modlock::wasm::Movement* PROTOBUF_NONNULL Manifest::mutable_movement() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000400U); + SetHasBit(_impl_._has_bits_[0], 0x00000800U); ::modlock::wasm::Movement* _msg = _internal_mutable_movement(); // @@protoc_insertion_point(field_mutable:modlock.wasm.Manifest.movement) return _msg; @@ -1840,9 +2070,9 @@ inline void Manifest::set_allocated_movement(::modlock::wasm::Movement* PROTOBUF if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[0], 0x00000400U); + SetHasBit(_impl_._has_bits_[0], 0x00000800U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); } _impl_.movement_ = reinterpret_cast<::modlock::wasm::Movement*>(value); @@ -2010,7 +2240,7 @@ inline void Manifest::clear_free_for_all() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.free_for_all_ = false; ClearHasBit(_impl_._has_bits_[0], - 0x00002000U); + 0x00004000U); } inline bool Manifest::free_for_all() const { // @@protoc_insertion_point(field_get:modlock.wasm.Manifest.free_for_all) @@ -2018,7 +2248,7 @@ inline bool Manifest::free_for_all() const { } inline void Manifest::set_free_for_all(bool value) { _internal_set_free_for_all(value); - SetHasBit(_impl_._has_bits_[0], 0x00002000U); + SetHasBit(_impl_._has_bits_[0], 0x00004000U); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.free_for_all) } inline bool Manifest::_internal_free_for_all() const { @@ -2035,7 +2265,7 @@ inline void Manifest::clear_content_addon() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.content_addon_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000200U); + 0x00000400U); } inline const ::std::string& Manifest::content_addon() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -2045,13 +2275,13 @@ inline const ::std::string& Manifest::content_addon() const template PROTOBUF_ALWAYS_INLINE void Manifest::set_content_addon(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000200U); + SetHasBit(_impl_._has_bits_[0], 0x00000400U); _impl_.content_addon_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:modlock.wasm.Manifest.content_addon) } inline ::std::string* PROTOBUF_NONNULL Manifest::mutable_content_addon() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000200U); + SetHasBit(_impl_._has_bits_[0], 0x00000400U); ::std::string* _s = _internal_mutable_content_addon(); // @@protoc_insertion_point(field_mutable:modlock.wasm.Manifest.content_addon) return _s; @@ -2071,10 +2301,10 @@ inline ::std::string* PROTOBUF_NONNULL Manifest::_internal_mutable_content_addon inline ::std::string* PROTOBUF_NULLABLE Manifest::release_content_addon() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:modlock.wasm.Manifest.content_addon) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000200U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000400U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); auto* released = _impl_.content_addon_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.content_addon_.Set("", GetArena()); @@ -2084,9 +2314,9 @@ inline ::std::string* PROTOBUF_NULLABLE Manifest::release_content_addon() { inline void Manifest::set_allocated_content_addon(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000200U); + SetHasBit(_impl_._has_bits_[0], 0x00000400U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); } _impl_.content_addon_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.content_addon_.IsDefault()) { @@ -2145,6 +2375,156 @@ Manifest::_internal_mutable_boards() { return &_impl_.boards_; } +// repeated .modlock.wasm.Service services = 15; +inline int Manifest::_internal_services_size() const { + return _internal_services().size(); +} +inline int Manifest::services_size() const { + return _internal_services_size(); +} +inline void Manifest::clear_services() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.services_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::modlock::wasm::Service* PROTOBUF_NONNULL Manifest::mutable_services(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:modlock.wasm.Manifest.services) + return _internal_mutable_services()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::modlock::wasm::Service>* PROTOBUF_NONNULL Manifest::mutable_services() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_mutable_list:modlock.wasm.Manifest.services) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_services(); +} +inline const ::modlock::wasm::Service& Manifest::services(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.Manifest.services) + return _internal_services().Get(index); +} +inline ::modlock::wasm::Service* PROTOBUF_NONNULL Manifest::add_services() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::modlock::wasm::Service* _add = + _internal_mutable_services()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_add:modlock.wasm.Manifest.services) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::modlock::wasm::Service>& Manifest::services() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:modlock.wasm.Manifest.services) + return _internal_services(); +} +inline const ::google::protobuf::RepeatedPtrField<::modlock::wasm::Service>& +Manifest::_internal_services() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.services_; +} +inline ::google::protobuf::RepeatedPtrField<::modlock::wasm::Service>* PROTOBUF_NONNULL +Manifest::_internal_mutable_services() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.services_; +} + +// ------------------------------------------------------------------- + +// Service + +// string name = 1; +inline void Service::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& Service::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.Service.name) + return _internal_name(); +} +template +PROTOBUF_ALWAYS_INLINE void Service::set_name(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.Service.name) +} +inline ::std::string* PROTOBUF_NONNULL Service::mutable_name() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.Service.name) + return _s; +} +inline const ::std::string& Service::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void Service::_internal_set_name(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL Service::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.name_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE Service::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.wasm.Service.name) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); + } + return released; +} +inline void Service::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.Service.name) +} + +// bool optional = 2; +inline void Service::clear_optional() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.optional_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline bool Service::optional() const { + // @@protoc_insertion_point(field_get:modlock.wasm.Service.optional) + return _internal_optional(); +} +inline void Service::set_optional(bool value) { + _internal_set_optional(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:modlock.wasm.Service.optional) +} +inline bool Service::_internal_optional() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.optional_; +} +inline void Service::_internal_set_optional(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.optional_ = value; +} + // ------------------------------------------------------------------- // Movement diff --git a/src/wasm/manifest.pb.ts b/src/wasm/manifest.pb.ts index b0f7e82e..3f0401bc 100644 --- a/src/wasm/manifest.pb.ts +++ b/src/wasm/manifest.pb.ts @@ -91,6 +91,13 @@ export interface Manifest { * scores service. */ boards?: Board[] + /** + * Services are the services the mod calls with CallService, by name only; + * the host learns no methods. A host refuses to start a mod when a service + * it needs has no provider, and starts it without an optional one, whose + * calls then fail. + */ + services?: Service[] } export const Manifest: MessageType = @@ -111,6 +118,7 @@ export const Manifest: MessageType = [12, 'free_for_all', 8], [13, 'content_addon', 9], [14, 'boards', 11, 1, Board.codec], + [15, 'services', 11, 1, Service.codec], ], { decode: (r: BinaryReader, end: number, m: Manifest): Manifest => { @@ -162,6 +170,9 @@ export const Manifest: MessageType = case 14: ;(m.boards ??= []).push(Board.decode(r, r.delimited(), {})) break + case 15: + ;(m.services ??= []).push(Service.decode(r, r.delimited(), {})) + break default: r.skip(t) } @@ -225,6 +236,10 @@ export const Manifest: MessageType = const a = m.boards if (a != null) for (const e of a) Board.writeField(w, 14, e) } + { + const a = m.services + if (a != null) for (const e of a) Service.writeField(w, 15, e) + } }, }, ) @@ -321,6 +336,61 @@ export const Manifest_Language_Enum = /* @__PURE__ */ createEnumType( ], ) +/** + * Service names one service a mod calls. + * + * @generated from message modlock.wasm.Service + */ +export interface Service { + /** + * Name is the service's name as CallService names it, such as + * "example.drills.v1". + */ + name?: string + /** + * Optional marks a service the mod runs without. Unset, the mod needs it. + */ + optional?: boolean +} + +export const Service: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.wasm.Service', + () => [ + [1, 'name', 9], + [2, 'optional', 8], + ], + { + decode: (r: BinaryReader, end: number, m: Service): Service => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.name = r.string() + break + case 2: + m.optional = r.bool() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: Service, w: Writer): void => { + { + const v = m.name + if (v) w.uint32(10).string(v) + } + { + const v = m.optional + if (v) w.uint32(16).bool(v) + } + }, + }, + ) + /** * Movement selects the movement model heroes walk and jump with. * diff --git a/src/wasm/manifest.proto b/src/wasm/manifest.proto index 3dce77b6..5ce6e542 100644 --- a/src/wasm/manifest.proto +++ b/src/wasm/manifest.proto @@ -106,6 +106,22 @@ message Manifest { // Boards are the rankings the mod reports scores to through the host's // scores service. repeated modlock.wasm.scores.Board boards = 14; + + // Services are the services the mod calls with CallService, by name only; + // the host learns no methods. A host refuses to start a mod when a service + // it needs has no provider, and starts it without an optional one, whose + // calls then fail. + repeated Service services = 15; +} + +// Service names one service a mod calls. +message Service { + // Name is the service's name as CallService names it, such as + // "example.drills.v1". + string name = 1; + + // Optional marks a service the mod runs without. Unset, the mod needs it. + bool optional = 2; } // Movement selects the movement model heroes walk and jump with. From 8371bd9eeb9ba5ee5adf2452154b81fde37d34b2 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Tue, 10 Nov 2026 23:44:05 -0800 Subject: [PATCH 02/15] wasm: answer a service call in a later frame StartServiceCall returns a call number at once, and a ServiceReplied event ends the call in a later frame: with the reply, the service's refusal, a timeout of at most 30 seconds, or unavailable when nobody provides the service, which is then never asked. The host drops a mod's waiting calls when it stops or reloads, so a late reply reaches nothing. A host provides such a service with WasmHost::ProvideLater. A service from Provide answers a started call in the next frame, and the sandbox answers its scores and fixtures the same way, so a mod cannot tell which provider it has. The Go, TypeScript, Python and Luau libraries gain callServiceLater with a done callback. Signed-off-by: Christian Stewart --- CMakeLists.txt | 1 + README.md | 11 + include/modlock/wasm_host.h | 21 + js/src/host.gen.ts | 59 ++ js/src/index.ts | 62 ++ js/test/service-later.test.ts | 90 ++ luau/library.luau | 40 + luau/modlock/init.luau | 99 ++ mod/host.gen.go | 44 + mod/mod.go | 54 +- python/library.py | 38 + python/modlock/__init__.py | 107 ++ sandbox/metrics_test.go | 4 +- sandbox/sandbox.go | 32 +- sandbox/service_test.go | 2 +- sandbox/services.go | 84 ++ sandbox/services_test.go | 42 +- sandbox/settings_test.go | 8 +- src/wasm/host_service.gen.h | 26 + src/wasm/service_calls.cc | 93 ++ src/wasm/service_calls.h | 76 ++ src/wasm/wasm.pb.cc | 1743 ++++++++++++++++++++++++++----- src/wasm/wasm.pb.go | 1042 +++++++++++++++++- src/wasm/wasm.pb.h | 1447 ++++++++++++++++++++++--- src/wasm/wasm.pb.ts | 250 +++++ src/wasm/wasm.proto | 65 ++ src/wasm/wasm_host.cc | 8 + src/wasm/wasm_plugin.cc | 14 +- src/wasm/wasm_plugin.h | 18 + src/wasm/wasm_plugin_calls.cc | 45 +- src/wasm/wasm_plugin_events.cc | 10 + tests/wasm/extension-go/main.go | 28 +- tests/wasm_host_test.cc | 77 ++ 33 files changed, 5252 insertions(+), 488 deletions(-) create mode 100644 js/test/service-later.test.ts create mode 100644 src/wasm/service_calls.cc create mode 100644 src/wasm/service_calls.h diff --git a/CMakeLists.txt b/CMakeLists.txt index e0c66245..6567a055 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -201,6 +201,7 @@ add_library(modlock_sdk SHARED ${CMAKE_CURRENT_BINARY_DIR}/src/wasm/hero_builds_data.cc src/wasm/game_match.cc src/wasm/call_profile.cc + src/wasm/service_calls.cc src/wasm/console_lines.cc src/wasm/game_services.cc src/wasm/game_services_input.cc diff --git a/README.md b/README.md index 786fb67a..a6ccda34 100644 --- a/README.md +++ b/README.md @@ -1501,6 +1501,17 @@ The sandbox answers a named service from a fixture in the project: whose values are their replies, sent as JSON. Before the mod starts, the sandbox logs which provider answers each named service: a fixture or nobody. +A service may answer in a later frame, as one that asks a server across the +network does. `callServiceLater(service, method, payload, done)` returns at +once, and `done(reply, error, failure)` runs once in a later frame: with the +reply, or with the service's refusal, a timeout or `unavailable` when nobody +provides the service, which is then never asked. The host waits at most 30 +seconds, or the call's own shorter timeout, and drops the calls a mod still +waits for when it stops or reloads. A service that answers at once, a +fixture among them, answers a started call the same way in the next frame, so +a mod cannot tell which provider it has. A host provides a service that +answers later with `WasmHost::ProvideLater`. + ```json { "read": { "key": "slide" }, "save": true } ``` diff --git a/include/modlock/wasm_host.h b/include/modlock/wasm_host.h index 0fee4c92..f72dd22c 100644 --- a/include/modlock/wasm_host.h +++ b/include/modlock/wasm_host.h @@ -87,6 +87,19 @@ class MODLOCK_API WasmHostObserver { using WasmExtension = std::function( std::string_view mod, std::string_view method, std::string_view payload)>; +// WasmReply ends one started call to a service the host provides: with the +// answer, or an error the mod receives as the service's refusal. It may run +// on any thread, at most once; once the call timed out or the mod stopped, +// it does nothing. +using WasmReply = std::function answer)>; + +// WasmLateExtension takes mods' started calls to one service the host +// provides, answered in a later frame. It receives the calling mod's name, +// the method, the payload and the reply that ends the call, which it may +// keep and run later. Modlock times the call out after at most 30 seconds. +using WasmLateExtension = std::function; + // WasmHost runs WebAssembly mods. Each mod runs in its own sandbox and reaches // the game only through the host requests in src/wasm/wasm.proto. An // event that runs past half a second finishes; the host warns the players in @@ -153,6 +166,14 @@ class MODLOCK_API WasmHost { // service's earlier extension. An empty extension withdraws the service. void Provide(std::string service, WasmExtension extension); + // ProvideLater takes mods' started calls to service with extension, which + // answers each through its reply, replacing the service's earlier late + // extension. An empty extension withdraws it. A mod's started call to a + // service with only an extension from Provide is answered by that + // extension in the next frame; a CallService to a service with only a late + // extension is refused. + void ProvideLater(std::string service, WasmLateExtension extension); + // KeepSettings keeps players' settings in settings, which must stay valid // until the host is destroyed or keeps them elsewhere. A null settings // returns to the host's own, which last until it is destroyed. diff --git a/js/src/host.gen.ts b/js/src/host.gen.ts index fe6e2860..25160642 100644 --- a/js/src/host.gen.ts +++ b/js/src/host.gen.ts @@ -503,6 +503,21 @@ const cameraParamValues: Record = { horizontalOffset: 4, } +/** ServiceFailure says why a service call ended without an answer. */ +export type ServiceFailure = + | 'none' + | 'refused' + | 'timeout' + | 'unavailable' + +/** serviceFailureNames decodes each ServiceFailure; an unknown value has no name. */ +const serviceFailureNames: Partial> = { + 0: 'none', + 1: 'refused', + 2: 'timeout', + 3: 'unavailable', +} + /** Ability is one ability a hero owns. */ export interface Ability { /** name is the ability's name, such as citadel_ability_hornet_snipe. */ @@ -2521,6 +2536,28 @@ export interface ServiceReply { payload: Uint8Array } +/** ServiceRepliedEvent ends one started service call. */ +export interface ServiceRepliedEvent { + /** call is the number StartServiceCall returned. */ + readonly call: bigint + /** payload is the answer, when failure is none. */ + readonly payload: Uint8Array + /** failure says why the call ended without an answer. */ + readonly failure?: ServiceFailure + /** error describes the failure. */ + readonly error: string +} + +/** fromServiceRepliedEvent decodes a ServiceRepliedEvent. */ +function fromServiceRepliedEvent(message: wasmPb.ServiceRepliedEvent): ServiceRepliedEvent { + return { + call: message.call ?? 0n, + payload: message.payload ?? new Uint8Array(), + failure: serviceFailureNames[message.failure ?? 0], + error: message.error ?? '', + } +} + /** PrecacheOptions names what the next world loads ahead of use. */ export interface PrecacheOptions { /** heroes are hero names, such as hero_wraith. */ @@ -3547,6 +3584,23 @@ export function callService(service: string, method: string, payload: Uint8Array return response.payload ?? new Uint8Array() } +/** + * startServiceCall calls method of a service the host provides and + * returns at once with a number; the answer arrives in a later frame as a + * ServiceReplied event carrying that number. Every call ends once: with + * the reply, the service's refusal, a timeout or no provider at all. A + * service nobody provides is never asked. The host waits at most 30 + * seconds, or the call's shorter timeout, and drops the mod's waiting + * calls when the mod stops or reloads. A service that answers at once + * answers this way too, in the next frame. + */ +export function startServiceCall(service: string, method: string, payload: Uint8Array, timeoutMilliseconds: number): bigint | undefined { + const reply = call('StartServiceCall', wasmPb.StartServiceCallRequest.toBinary({ service, method, payload, timeoutMilliseconds })) + if (reply === undefined) return undefined + const response = wasmPb.ServiceCallStarted.fromBinary(reply) + return response.call ?? 0n +} + /** * createEntity creates any entity the server knows by its designer name, * such as npc_trooper_boss or prop_dynamic, with spawn key values and fields @@ -3804,6 +3858,8 @@ export interface ModHandlers { uiInput(event: UiInputEvent): void /** serve calls a service the mod serves from the host. */ serve(event: ServiceCall): ServiceReply + /** serviceReplied ends one StartServiceCall, in a frame after the call. */ + serviceReplied(event: ServiceRepliedEvent): void /** * damage offers one hit before the game applies it, while the mod asked * for damage. The mod's answer may block the hit or change its amount. @@ -3896,6 +3952,9 @@ export function serveMod(handlers: ModHandlers, bytes: Uint8Array): Uint8Array { return reply() case 'Serve': return reply(wasmPb.ServiceReply.toBinary(handlers.serve(fromServiceCall(wasmPb.ServiceCall.fromBinary(input))))) + case 'ServiceReplied': + handlers.serviceReplied(fromServiceRepliedEvent(wasmPb.ServiceRepliedEvent.fromBinary(input))) + return reply() case 'Damage': return reply(combatPb.DamageResult.toBinary(handlers.damage(fromDamageEvent(combatPb.DamageEvent.fromBinary(input))))) case 'Damaged': diff --git a/js/src/index.ts b/js/src/index.ts index 8757d1dc..5f0bcdbf 100644 --- a/js/src/index.ts +++ b/js/src/index.ts @@ -31,6 +31,8 @@ import { type PlayerJoinedEvent, type PlayerLeftEvent, serveMod, + type ServiceFailure, + startServiceCall, } from './host.gen.js' import { serveEvents } from './host.js' import { keepPlayers } from './players.js' @@ -224,6 +226,47 @@ export function serve(service: string, handler: Service): void { services.set(service, { handler }) } +/** + * ServiceDone ends one callServiceLater: with the reply, or without one and + * with the error and the failure that says why. + */ +export type ServiceDone = ( + reply: Uint8Array | undefined, + error?: string, + failure?: ServiceFailure, +) => void + +/** + * callServiceLater calls method of a service the host provides and returns at + * once; done runs in a later frame with the answer, or with an error when + * the service refused, the call waited past timeoutMilliseconds or nobody + * provides the service. Zero waits the host's longest, 30 seconds. done runs + * once while the mod runs; calls still waiting when the mod stops end with + * it. + */ +export function callServiceLater( + service: string, + method: string, + payload: Uint8Array, + done: ServiceDone, + timeoutMilliseconds = 0, +): void { + // A call the host refuses to start ends in the next frame as well, so done + // never runs before this returns. + const call = startServiceCall(service, method, payload, timeoutMilliseconds) + if (call === undefined) { + after(0, () => + done( + undefined, + `the host did not start the call to ${service}`, + 'unavailable', + ), + ) + return + } + waiting.set(call, done) +} + /** * command calls handler when a player types /name in chat or their client * sends the console command name to the server. The handler runs with the @@ -402,6 +445,9 @@ const commands = new Map< /** services maps each service the mod serves to its handler. */ const services = new Map() +/** waiting maps each started service call's number to the function its end runs. */ +const waiting = new Map() + // Each list runs in registration order. const starts: ((args: readonly string[]) => void)[] = [] const frames: ((frame: FrameEvent) => void)[] = [] @@ -498,6 +544,22 @@ const handlers: ModHandlers = { return { payload: registered.handler(event.method, event.payload) } }, + serviceReplied(event) { + // Each call ends once; a number the mod no longer waits for is ignored. + const done = waiting.get(event.call) + if (!done) { + return + } + waiting.delete(event.call) + + // A failure ends the call without a reply. + if (event.failure && event.failure !== 'none') { + done(undefined, event.error, event.failure) + return + } + done(event.payload) + }, + // scriptc types an unannotated method that returns literals of different // shapes by those literals rather than by ModHandlers, and the call throws. damage(event): DamageResult { diff --git a/js/test/service-later.test.ts b/js/test/service-later.test.ts new file mode 100644 index 00000000..3b6daf46 --- /dev/null +++ b/js/test/service-later.test.ts @@ -0,0 +1,90 @@ +import { expect, test } from 'bun:test' + +import { + Call, + Reply, + ServiceCallStarted, + ServiceFailure, + ServiceRepliedEvent, + StartServiceCallRequest, +} from '../../src/wasm/wasm.pb.js' +import { bind, deliver as dispatch } from '../src/host.js' +import { callServiceLater } from '../src/index.js' + +/** started holds the calls the mod started, in order. */ +const started: { service: string; method: string; timeout: number }[] = [] + +// The host numbers each started call from one. +bind((bytes) => { + const sent = Call.fromBinary(bytes) + if (sent.method !== 'StartServiceCall') { + return Reply.toBinary({}) + } + const request = StartServiceCallRequest.fromBinary( + sent.request ?? new Uint8Array(), + ) + started.push({ + service: request.service ?? '', + method: request.method ?? '', + timeout: request.timeoutMilliseconds ?? 0, + }) + const call = BigInt(started.length) + return Reply.toBinary({ response: ServiceCallStarted.toBinary({ call }) }) +}) + +/** replied delivers one ServiceReplied event as the host does. */ +function replied( + event: Parameters[0], +): void { + const reply = Reply.fromBinary( + dispatch( + Call.toBinary({ + method: 'ServiceReplied', + request: ServiceRepliedEvent.toBinary(event), + }), + ), + ) + expect(reply.error ?? '').toBe('') +} + +test('a started call ends once, through the event carrying its number', () => { + // Start an answered call and a refused one. + const ended: string[] = [] + callServiceLater( + 'example.drills.v1', + 'Drill', + new Uint8Array([1]), + (reply, error, failure) => { + ended.push( + error + ? `${failure}: ${error}` + : `reply ${Array.from(reply ?? []).join(',')}`, + ) + }, + ) + callServiceLater( + 'example.drills.v1', + 'Drill', + new Uint8Array(), + (reply, error, failure) => + ended.push(error ? `${failure}: ${error}` : 'reply'), + 500, + ) + expect(started).toEqual([ + { service: 'example.drills.v1', method: 'Drill', timeout: 0 }, + { service: 'example.drills.v1', method: 'Drill', timeout: 500 }, + ]) + expect(ended).toEqual([]) + + // Each ends with its own event, and a repeated or unknown number does + // nothing. + replied({ + call: 2n, + failure: ServiceFailure.TIMEOUT, + error: 'too slow', + }) + replied({ call: 1n, payload: new Uint8Array([7, 8]) }) + replied({ call: 1n, payload: new Uint8Array([9]) }) + replied({ call: 99n, payload: new Uint8Array([9]) }) + expect(ended).toEqual(['timeout: too slow', 'reply 7,8']) +}) diff --git a/luau/library.luau b/luau/library.luau index b41a2c8b..be422c52 100644 --- a/luau/library.luau +++ b/luau/library.luau @@ -103,6 +103,14 @@ local commands: { [string]: (player: Player, args: string) -> () } = {} -- services maps each service the mod serves to its handler. local services: { [string]: Service } = {} +-- ServiceDone ends one callServiceLater: with the reply and no error, or with +-- no reply, the error and the failure that says why. +export type ServiceDone = (reply: string?, error: string?, failure: ServiceFailure) -> () + +-- waiting maps each started service call's number to the function its end +-- runs. +local waiting: { [number]: ServiceDone } = {} + -- starts to settingChanges hold each event's handlers, which run in -- registration order. local starts: { (args: { string }) -> () } = {} @@ -143,6 +151,25 @@ function modlock.serve(service: string, handler: Service) services[service] = handler end +-- callServiceLater calls method of a service the host provides and returns +-- at once; done runs in a later frame with the answer, or with an error when +-- the service refused, the call waited past timeout seconds or nobody +-- provides the service. Zero or nil waits the host's longest, 30 seconds. +-- done runs once while the mod runs; calls still waiting when the mod stops +-- end with it. +function modlock.callServiceLater(service: string, method: string, payload: string, done: ServiceDone, timeout: number?) + -- A call the host refuses to start ends in the next frame as well, so + -- done never runs before this returns. + local call = modlock.startServiceCall(service, method, payload, math.floor((timeout or 0) * 1000)) + if call == nil then + modlock.after(0, function() + done(nil, "the host did not start the call to " .. service, "unavailable") + end) + return + end + waiting[call] = done +end + -- command calls handler when a player types /name in chat or their client -- sends the console command name to the server. The handler runs with the -- next server frame, before the frame handlers, and receives the text after @@ -485,6 +512,19 @@ local handlers: ModHandlers = { end end, + serviceReplied = function(event) + local done = waiting[event.call] + if done == nil then + return + end + waiting[event.call] = nil + if event.failure ~= nil and event.failure ~= "none" then + done(nil, event.error, event.failure) + return + end + done(event.payload, nil, "none") + end, + npcsRestored = function(event) for _, handler in npcsRestoreds do handler(if event.error ~= "" then event.error else nil) diff --git a/luau/modlock/init.luau b/luau/modlock/init.luau index 8cdc6225..d46c9c50 100644 --- a/luau/modlock/init.luau +++ b/luau/modlock/init.luau @@ -448,6 +448,19 @@ local CameraParam: { [any]: any } = { horizontalOffset = 4, } +-- ServiceFailure says why a service call ended without an answer. +export type ServiceFailure = "none" | "refused" | "timeout" | "unavailable" +local ServiceFailure: { [any]: any } = { + [0] = "none", + none = 0, + [1] = "refused", + refused = 1, + [2] = "timeout", + timeout = 2, + [3] = "unavailable", + unavailable = 3, +} + -- Ability is one ability a hero owns. export type Ability = { -- name is the ability's name, such as citadel_ability_hornet_snipe. @@ -1540,6 +1553,18 @@ export type ServiceReply = { payload: string, } +-- ServiceRepliedEvent ends one started service call. +export type ServiceRepliedEvent = { + -- call is the number StartServiceCall returned. + call: number, + -- payload is the answer, when failure is none. + payload: string, + -- failure says why the call ended without an answer. + failure: ServiceFailure?, + -- error describes the failure. + error: string, +} + -- PrecacheOptions names what the next world loads ahead of use. export type PrecacheOptions = { -- heroes are hero names, such as hero_wraith. @@ -3323,6 +3348,21 @@ schema.ServiceCall = { schema.ServiceReply = { { number = 1, name = "payload", kind = "bytes" }, } +schema.StartServiceCallRequest = { + { number = 1, name = "service", kind = "string" }, + { number = 2, name = "method", kind = "string" }, + { number = 3, name = "payload", kind = "bytes" }, + { number = 4, name = "timeoutMilliseconds", kind = "uint32" }, +} +schema.ServiceCallStarted = { + { number = 1, name = "call", kind = "uint64" }, +} +schema.ServiceRepliedEvent = { + { number = 1, name = "call", kind = "uint64" }, + { number = 2, name = "payload", kind = "bytes" }, + { number = 3, name = "failure", kind = "enum", enum = ServiceFailure }, + { number = 4, name = "error", kind = "string" }, +} schema.LogRequest = { { number = 1, name = "message", kind = "string" }, } @@ -3639,6 +3679,22 @@ function modlock.callService(service: string, method: string, payload: string): return response.payload end +-- startServiceCall calls method of a service the host provides and +-- returns at once with a number; the answer arrives in a later frame as a +-- ServiceReplied event carrying that number. Every call ends once: with +-- the reply, the service's refusal, a timeout or no provider at all. A +-- service nobody provides is never asked. The host waits at most 30 +-- seconds, or the call's shorter timeout, and drops the mod's waiting +-- calls when the mod stops or reloads. A service that answers at once +-- answers this way too, in the next frame. +function modlock.startServiceCall(service: string, method: string, payload: string, timeoutMilliseconds: number): number? + local response = call("StartServiceCall", "StartServiceCallRequest", { service = service, method = method, payload = payload, timeoutMilliseconds = timeoutMilliseconds }, "ServiceCallStarted") + if response == nil then + return nil + end + return response.call +end + -- createEntity creates any entity the server knows by its designer name, -- such as npc_trooper_boss or prop_dynamic, with spawn key values and fields -- written before it spawns. The world removes it when the world ends; @@ -3863,6 +3919,8 @@ export type ModHandlers = { uiInput: (event: UiInputEvent) -> (), -- serve calls a service the mod serves from the host. serve: (event: ServiceCall) -> ServiceReply, + -- serviceReplied ends one StartServiceCall, in a frame after the call. + serviceReplied: (event: ServiceRepliedEvent) -> (), -- damage offers one hit before the game applies it, while the mod asked -- for damage. The mod's answer may block the hit or change its amount. damage: (event: DamageEvent) -> DamageResult, @@ -3915,6 +3973,7 @@ local events: { [string]: { request: string, response: string, handler: string } UiPress = { request = "UiPressEvent", response = "Empty", handler = "uiPress" }, UiInput = { request = "UiInputEvent", response = "Empty", handler = "uiInput" }, Serve = { request = "ServiceCall", response = "ServiceReply", handler = "serve" }, + ServiceReplied = { request = "ServiceRepliedEvent", response = "Empty", handler = "serviceReplied" }, Damage = { request = "DamageEvent", response = "DamageResult", handler = "damage" }, Damaged = { request = "DamagedEvent", response = "Empty", handler = "damaged" }, Input = { request = "InputEvent", response = "Empty", handler = "input" }, @@ -4055,6 +4114,14 @@ local commands: { [string]: (player: Player, args: string) -> () } = {} -- services maps each service the mod serves to its handler. local services: { [string]: Service } = {} +-- ServiceDone ends one callServiceLater: with the reply and no error, or with +-- no reply, the error and the failure that says why. +export type ServiceDone = (reply: string?, error: string?, failure: ServiceFailure) -> () + +-- waiting maps each started service call's number to the function its end +-- runs. +local waiting: { [number]: ServiceDone } = {} + -- starts to settingChanges hold each event's handlers, which run in -- registration order. local starts: { (args: { string }) -> () } = {} @@ -4095,6 +4162,25 @@ function modlock.serve(service: string, handler: Service) services[service] = handler end +-- callServiceLater calls method of a service the host provides and returns +-- at once; done runs in a later frame with the answer, or with an error when +-- the service refused, the call waited past timeout seconds or nobody +-- provides the service. Zero or nil waits the host's longest, 30 seconds. +-- done runs once while the mod runs; calls still waiting when the mod stops +-- end with it. +function modlock.callServiceLater(service: string, method: string, payload: string, done: ServiceDone, timeout: number?) + -- A call the host refuses to start ends in the next frame as well, so + -- done never runs before this returns. + local call = modlock.startServiceCall(service, method, payload, math.floor((timeout or 0) * 1000)) + if call == nil then + modlock.after(0, function() + done(nil, "the host did not start the call to " .. service, "unavailable") + end) + return + end + waiting[call] = done +end + -- command calls handler when a player types /name in chat or their client -- sends the console command name to the server. The handler runs with the -- next server frame, before the frame handlers, and receives the text after @@ -4437,6 +4523,19 @@ local handlers: ModHandlers = { end end, + serviceReplied = function(event) + local done = waiting[event.call] + if done == nil then + return + end + waiting[event.call] = nil + if event.failure ~= nil and event.failure ~= "none" then + done(nil, event.error, event.failure) + return + end + done(event.payload, nil, "none") + end, + npcsRestored = function(event) for _, handler in npcsRestoreds do handler(if event.error ~= "" then event.error else nil) diff --git a/mod/host.gen.go b/mod/host.gen.go index 56b7c7d2..10a24315 100644 --- a/mod/host.gen.go +++ b/mod/host.gen.go @@ -313,6 +313,22 @@ const ( CameraParamHorizontalOffset = playerspb.CameraParam_CAMERA_PARAM_HORIZONTAL_OFFSET ) +// ServiceFailure says why a service call ended without an answer. +type ServiceFailure = wasmpb.ServiceFailure + +// The values of ServiceFailure. +const ( + // ServiceFailureNone is an answered call. + ServiceFailureNone = wasmpb.ServiceFailure_SERVICE_FAILURE_NONE + // ServiceFailureRefused is a call the service answered with an error. + ServiceFailureRefused = wasmpb.ServiceFailure_SERVICE_FAILURE_REFUSED + // ServiceFailureTimeout is a call that waited out its timeout. + ServiceFailureTimeout = wasmpb.ServiceFailure_SERVICE_FAILURE_TIMEOUT + // ServiceFailureUnavailable is a call to a service nobody provides + // here, or one more than the host keeps waiting for a mod. + ServiceFailureUnavailable = wasmpb.ServiceFailure_SERVICE_FAILURE_UNAVAILABLE +) + // Ability is one ability a hero owns. type Ability = abilitiespb.Ability @@ -563,6 +579,9 @@ type ServiceCall = wasmpb.ServiceCall // ServiceReply is a service's answer. type ServiceReply = wasmpb.ServiceReply +// ServiceRepliedEvent ends one started service call. +type ServiceRepliedEvent = wasmpb.ServiceRepliedEvent + // PrecacheOptions names what the next world loads ahead of use. type PrecacheOptions = wasmpb.PrecacheOptions @@ -1451,6 +1470,23 @@ func CallService(service, method string, payload []byte) ([]byte, error) { return response.GetPayload(), nil } +// StartServiceCall calls method of a service the host provides and +// returns at once with a number; the answer arrives in a later frame as a +// ServiceReplied event carrying that number. Every call ends once: with +// the reply, the service's refusal, a timeout or no provider at all. A +// service nobody provides is never asked. The host waits at most 30 +// seconds, or the call's shorter timeout, and drops the mod's waiting +// calls when the mod stops or reloads. A service that answers at once +// answers this way too, in the next frame. +func StartServiceCall(service, method string, payload []byte, timeoutMilliseconds uint32) (uint64, error) { + request := &wasmpb.StartServiceCallRequest{Service: service, Method: method, Payload: payload, TimeoutMilliseconds: timeoutMilliseconds} + response := &wasmpb.ServiceCallStarted{} + if err := invoke("StartServiceCall", request, response); err != nil { + return 0, err + } + return response.GetCall(), nil +} + // CreateEntity creates any entity the server knows by its designer name, // such as npc_trooper_boss or prop_dynamic, with spawn key values and fields // written before it spawns. The world removes it when the world ends; @@ -1782,6 +1818,8 @@ type modHandlers interface { UiInput(event *UiInputEvent) error // Serve calls a service the mod serves from the host. Serve(event *ServiceCall) (*ServiceReply, error) + // ServiceReplied ends one StartServiceCall, in a frame after the call. + ServiceReplied(event *ServiceRepliedEvent) error // Damage offers one hit before the game applies it, while the mod asked // for damage. The mod's answer may block the hit or change its amount. Damage(event *DamageEvent) (*DamageResult, error) @@ -1875,6 +1913,12 @@ func serveMod(handlers modHandlers, call *wasmpb.Call) *wasmpb.Reply { return &wasmpb.Reply{Error: err.Error()} } return answer(handlers.Serve(event)) + case "ServiceReplied": + event := &ServiceRepliedEvent{} + if err := event.UnmarshalVT(call.GetRequest()); err != nil { + return &wasmpb.Reply{Error: err.Error()} + } + return answer(nil, handlers.ServiceReplied(event)) case "Damage": event := &DamageEvent{} if err := event.UnmarshalVT(call.GetRequest()); err != nil { diff --git a/mod/mod.go b/mod/mod.go index 27a79b5f..12dcd7ef 100644 --- a/mod/mod.go +++ b/mod/mod.go @@ -26,6 +26,7 @@ import ( "errors" "slices" "strings" + "time" "github.com/paralin/modlock/src/wasm" "github.com/paralin/modlock/src/wasm/players" @@ -44,6 +45,9 @@ type handlers struct { commands map[string]func(Player, string) // services maps each service the mod serves to its handler. services map[string]Service + // waiting maps each started service call's number to the function its + // end runs. + waiting map[uint64]func(reply []byte, err error) starts []func(args []string) frames []func(*FrameEvent) @@ -69,7 +73,11 @@ type handlers struct { } // registered is the mod's single set of handlers. -var registered = &handlers{commands: map[string]func(Player, string){}, services: map[string]Service{}} +var registered = &handlers{ + commands: map[string]func(Player, string){}, + services: map[string]Service{}, + waiting: map[uint64]func(reply []byte, err error){}, +} // Command calls handler when a player types /name in chat. The handler runs // with the next server frame, before the frame handlers, and receives the @@ -85,6 +93,35 @@ func Serve(service string, handler Service) { registered.services[service] = handler } +// ServiceError ends a started service call without an answer: Failure says +// why and Message describes it. +type ServiceError struct { + Failure ServiceFailure + Message string +} + +// Error returns the failure's description. +func (e *ServiceError) Error() string { + return e.Message +} + +// CallServiceLater calls method of a service the host provides and returns +// at once; done runs in a later frame with the answer, or with a +// *ServiceError when the service refused, the call waited past timeout or +// nobody provides the service. A zero timeout waits the host's longest, 30 +// seconds. done runs exactly once while the mod runs; calls still waiting +// when the mod stops end with it. +func CallServiceLater(service, method string, payload []byte, timeout time.Duration, done func(reply []byte, err error)) { + // A call the host refuses to start ends in the next frame as well, so + // done never runs before this returns. + call, err := StartServiceCall(service, method, payload, uint32(timeout.Milliseconds())) + if err != nil { + After(0, func() { done(nil, &ServiceError{Failure: ServiceFailureUnavailable, Message: err.Error()}) }) + return + } + registered.waiting[call] = done +} + // OnStart calls handler once when the server starts the mod, with the // arguments that follow -- on the modlock-host command line. func OnStart(handler func(args []string)) { @@ -317,6 +354,21 @@ func (h *handlers) NpcsRestored(event *NpcsRestoredEvent) error { return nil } +// ServiceReplied ends one started service call. +func (h *handlers) ServiceReplied(event *ServiceRepliedEvent) error { + done, ok := h.waiting[event.GetCall()] + if !ok { + return nil + } + delete(h.waiting, event.GetCall()) + if event.GetFailure() != ServiceFailureNone { + done(nil, &ServiceError{Failure: event.GetFailure(), Message: event.GetError()}) + return nil + } + done(event.GetPayload(), nil) + return nil +} + // Launch runs the launch handlers. func (h *handlers) Launch(event *LaunchEvent) error { for _, handler := range h.launches { diff --git a/python/library.py b/python/library.py index 6f31e888..34b9905e 100644 --- a/python/library.py +++ b/python/library.py @@ -208,6 +208,33 @@ def __init__(self, delay: float, run: Callable[[], float | None]) -> None: _entries: list[_Entry] = [] +# ServiceDone ends one call_service_later: with the reply and no error, or +# with no reply, the error and the failure that says why. +type ServiceDone = Callable[[bytes | None, str | None, ServiceFailure], object] + +# _waiting maps each started service call's number to the function its end +# runs. +_waiting: dict[int, ServiceDone] = {} + + +def call_service_later( + service: str, method: str, payload: bytes, done: ServiceDone, timeout: float = 0.0 +) -> None: + """call_service_later calls method of a service the host provides and + returns at once; done runs in a later frame with the answer, or with an + error when the service refused, the call waited past timeout seconds or + nobody provides the service. Zero waits the host's longest, 30 seconds. + done runs once while the mod runs; calls still waiting when the mod stops + end with it.""" + # A call the host refuses to start ends in the next frame as well, so done + # never runs before this returns. + call = start_service_call(service, method, payload, int(timeout * 1000)) + if call is None: + after(0, lambda: done(None, "the host did not start the call to " + service, "unavailable")) + return + _waiting[call] = done + + def _schedule(delay: float, run: Callable[[], float | None]) -> Timer: entry = _Entry(delay, run) _entries.append(entry) @@ -482,6 +509,16 @@ def _npcs_restored(event: NpcsRestoredEvent) -> None: handler(event.error or None) +def _service_replied(event: ServiceRepliedEvent) -> None: + done = _waiting.pop(event.call, None) + if done is None: + return + if event.failure not in (None, "none"): + done(None, event.error, event.failure) + return + done(event.payload, None, "none") + + def _launch(event: LaunchEvent) -> None: for handler in _launches: handler(event) @@ -528,6 +565,7 @@ def _player_left(event: PlayerLeftEvent) -> None: "ui_press": _ui_press, "ui_input": _ui_input, "serve": _serve, + "service_replied": _service_replied, "damage": _damage, "damaged": _damaged, "input": _input, diff --git a/python/modlock/__init__.py b/python/modlock/__init__.py index 4f42ed0f..22898865 100644 --- a/python/modlock/__init__.py +++ b/python/modlock/__init__.py @@ -613,6 +613,20 @@ def _with(options: Any, name: str, value: Any) -> dict[str, Any]: } +# ServiceFailure says why a service call ended without an answer. +type ServiceFailure = Literal["none", "refused", "timeout", "unavailable"] +_ServiceFailure: dict[Any, Any] = { + 0: "none", + "none": 0, + 1: "refused", + "refused": 1, + 2: "timeout", + "timeout": 2, + 3: "unavailable", + "unavailable": 3, +} + + @dataclasses.dataclass(slots=True, kw_only=True) class Ability: """Ability is one ability a hero owns.""" @@ -1882,6 +1896,20 @@ class ServiceReply: payload: bytes = b"" +@dataclasses.dataclass(slots=True, kw_only=True) +class ServiceRepliedEvent: + """ServiceRepliedEvent ends one started service call.""" + + # call is the number StartServiceCall returned. + call: int = 0 + # payload is the answer, when failure is none. + payload: bytes = b"" + # failure says why the call ended without an answer. + failure: ServiceFailure | None = None + # error describes the failure. + error: str = "" + + @dataclasses.dataclass(slots=True, kw_only=True) class PrecacheOptions: """PrecacheOptions names what the next world loads ahead of use.""" @@ -3889,6 +3917,30 @@ def remove(self) -> bool: wire.Field(1, "payload", "bytes"), ], ), + "StartServiceCallRequest": ( + None, + [ + wire.Field(1, "service", "string"), + wire.Field(2, "method", "string"), + wire.Field(3, "payload", "bytes"), + wire.Field(4, "timeout_milliseconds", "uint32"), + ], + ), + "ServiceCallStarted": ( + None, + [ + wire.Field(1, "call", "uint64"), + ], + ), + "ServiceRepliedEvent": ( + ServiceRepliedEvent, + [ + wire.Field(1, "call", "uint64"), + wire.Field(2, "payload", "bytes"), + wire.Field(3, "failure", "enum", enum=_ServiceFailure), + wire.Field(4, "error", "string"), + ], + ), "LogRequest": ( None, [ @@ -4227,6 +4279,22 @@ def call_service(service: str, method: str, payload: bytes) -> bytes | None: return response["payload"] +def start_service_call(service: str, method: str, payload: bytes, timeout_milliseconds: int) -> int | None: + """start_service_call calls method of a service the host provides and + returns at once with a number; the answer arrives in a later frame as a + ServiceReplied event carrying that number. Every call ends once: with + the reply, the service's refusal, a timeout or no provider at all. A + service nobody provides is never asked. The host waits at most 30 + seconds, or the call's shorter timeout, and drops the mod's waiting + calls when the mod stops or reloads. A service that answers at once + answers this way too, in the next frame. + """ + response = _call("StartServiceCall", "StartServiceCallRequest", {"service": service, "method": method, "payload": payload, "timeout_milliseconds": timeout_milliseconds}, "ServiceCallStarted") + if response is None: + return None + return response["call"] + + def create_entity(options: EntityOptions) -> int | None: """create_entity creates any entity the server knows by its designer name, such as npc_trooper_boss or prop_dynamic, with spawn key values and fields @@ -4450,6 +4518,7 @@ def watch_projectiles(options: ProjectileOptions) -> bool: "UiPress": ("UiPressEvent", "Empty", "ui_press"), "UiInput": ("UiInputEvent", "Empty", "ui_input"), "Serve": ("ServiceCall", "ServiceReply", "serve"), + "ServiceReplied": ("ServiceRepliedEvent", "Empty", "service_replied"), "Damage": ("DamageEvent", "DamageResult", "damage"), "Damaged": ("DamagedEvent", "Empty", "damaged"), "Input": ("InputEvent", "Empty", "input"), @@ -4691,6 +4760,33 @@ def __init__(self, delay: float, run: Callable[[], float | None]) -> None: _entries: list[_Entry] = [] +# ServiceDone ends one call_service_later: with the reply and no error, or +# with no reply, the error and the failure that says why. +type ServiceDone = Callable[[bytes | None, str | None, ServiceFailure], object] + +# _waiting maps each started service call's number to the function its end +# runs. +_waiting: dict[int, ServiceDone] = {} + + +def call_service_later( + service: str, method: str, payload: bytes, done: ServiceDone, timeout: float = 0.0 +) -> None: + """call_service_later calls method of a service the host provides and + returns at once; done runs in a later frame with the answer, or with an + error when the service refused, the call waited past timeout seconds or + nobody provides the service. Zero waits the host's longest, 30 seconds. + done runs once while the mod runs; calls still waiting when the mod stops + end with it.""" + # A call the host refuses to start ends in the next frame as well, so done + # never runs before this returns. + call = start_service_call(service, method, payload, int(timeout * 1000)) + if call is None: + after(0, lambda: done(None, "the host did not start the call to " + service, "unavailable")) + return + _waiting[call] = done + + def _schedule(delay: float, run: Callable[[], float | None]) -> Timer: entry = _Entry(delay, run) _entries.append(entry) @@ -4965,6 +5061,16 @@ def _npcs_restored(event: NpcsRestoredEvent) -> None: handler(event.error or None) +def _service_replied(event: ServiceRepliedEvent) -> None: + done = _waiting.pop(event.call, None) + if done is None: + return + if event.failure not in (None, "none"): + done(None, event.error, event.failure) + return + done(event.payload, None, "none") + + def _launch(event: LaunchEvent) -> None: for handler in _launches: handler(event) @@ -5011,6 +5117,7 @@ def _player_left(event: PlayerLeftEvent) -> None: "ui_press": _ui_press, "ui_input": _ui_input, "serve": _serve, + "service_replied": _service_replied, "damage": _damage, "damaged": _damaged, "input": _input, diff --git a/sandbox/metrics_test.go b/sandbox/metrics_test.go index 2ba5abf0..8a3d8821 100644 --- a/sandbox/metrics_test.go +++ b/sandbox/metrics_test.go @@ -23,7 +23,7 @@ func TestMetrics(t *testing.T) { }}} add := func(name, label string) { request, _ := (&metricspb.AddMetricRequest{Name: name, Label: &label}).MarshalVT() - s.answer(&Build{Manifest: manifest}, &wasm.Call{Method: "AddMetric", Request: request}) + s.answer(&Build{Manifest: manifest}, &serviceCalls{}, &wasm.Call{Method: "AddMetric", Request: request}) } // Count the declared label and refuse an undeclared label and metric. @@ -46,7 +46,7 @@ func TestHandoff(t *testing.T) { build := &Build{Manifest: &wasm.Manifest{Slug: "hud"}} call := func(method string, request interface{ MarshalVT() ([]byte, error) }) string { data, _ := request.MarshalVT() - reply := s.answer(build, &wasm.Call{Method: method, Request: data}) + reply := s.answer(build, &serviceCalls{}, &wasm.Call{Method: method, Request: data}) response := &wasm.HandedOffResponse{} if err := response.UnmarshalVT(reply.GetResponse()); err != nil { t.Fatal(err) diff --git a/sandbox/sandbox.go b/sandbox/sandbox.go index 53e6dc49..152a52bd 100644 --- a/sandbox/sandbox.go +++ b/sandbox/sandbox.go @@ -89,6 +89,9 @@ type running struct { mod *Mod // wants lists the events the mod consumes. wants *wasm.StartResult + // calls holds the instance's started service calls until a frame ends + // them. + calls *serviceCalls } // Start starts the mods in a new sandbox. A mod that fails to load reports @@ -249,29 +252,31 @@ func (s *Sandbox) load(ctx context.Context, path string) { } // Load its module and start it in the world. - mod, wants, err := s.start(ctx, name, build) + calls := &serviceCalls{} + mod, wants, err := s.start(ctx, name, build, calls) if err != nil { fail(err) return } - // Replace the running mod of the same name, or add it. + // Replace the running mod of the same name, or add it; the calls the + // old instance started end with it. for _, old := range s.mods { if old.name == name { if old.mod != nil { _ = old.mod.Close(ctx) } - old.mod, old.wants = mod, wants + old.mod, old.wants, old.calls = mod, wants, calls s.event(&control.HostEvent{Body: &control.HostEvent_Started{Started: &control.ModStarted{Mod: name, Reloaded: true}}}) return } } - s.mods = append(s.mods, &running{name: name, mod: mod, wants: wants}) + s.mods = append(s.mods, &running{name: name, mod: mod, wants: wants, calls: calls}) s.event(&control.HostEvent{Body: &control.HostEvent_Started{Started: &control.ModStarted{Mod: name}}}) } // start loads build's module, starts it and gives it the world. -func (s *Sandbox) start(ctx context.Context, name string, build *Build) (*Mod, *wasm.StartResult, error) { +func (s *Sandbox) start(ctx context.Context, name string, build *Build, calls *serviceCalls) (*Mod, *wasm.StartResult, error) { // Choose the module: the mod's own, or the interpreter for its source. module, source, err := s.module(ctx, build) if err != nil { @@ -280,7 +285,7 @@ func (s *Sandbox) start(ctx context.Context, name string, build *Build) (*Mod, * // Load it with the sandbox answering its host calls. mod, err := Load(ctx, module, Options{ - Calls: func(call *wasm.Call) *wasm.Reply { return s.answer(build, call) }, + Calls: func(call *wasm.Call) *wasm.Reply { return s.answer(build, calls, call) }, Output: &lines{write: func(line string) { s.log(name, line) }}, Cache: s.cache, }) @@ -354,10 +359,12 @@ func (s *Sandbox) command(ctx context.Context, line string) bool { return false } -// frame gives one frame to each mod that consumes frames. +// frame ends each mod's started service calls, then gives one frame to each +// mod that consumes frames. func (s *Sandbox) frame(ctx context.Context, elapsed time.Duration) { s.tick++ for _, mod := range s.mods { + s.endCalls(ctx, mod) if mod.wants.GetFrames() { s.deliver(ctx, mod, "Frame", &wasm.FrameEvent{Tick: s.tick, TimeSeconds: elapsed.Seconds()}, nil) } @@ -399,7 +406,7 @@ func (s *Sandbox) deliver(ctx context.Context, mod *running, method string, requ // stand-in player, keeps the player's settings, refuses service calls as a // host without extensions does, and answers the rest empty, as for a player // without a hero. -func (s *Sandbox) answer(build *Build, call *wasm.Call) *wasm.Reply { +func (s *Sandbox) answer(build *Build, calls *serviceCalls, call *wasm.Call) *wasm.Reply { // Decode the requests the sandbox reports. manifest := build.Manifest mod := manifest.GetSlug() @@ -464,13 +471,12 @@ func (s *Sandbox) answer(build *Build, call *wasm.Call) *wasm.Reply { case "CallService": request := &wasm.ServiceCall{} _ = request.UnmarshalVT(call.GetRequest()) - if request.GetService() == scoresService { - return s.scores(manifest, request) - } - if provider := build.fixtures[request.GetService()]; provider != nil { - return provider.answer(request) + if reply := s.callService(build, request); reply != nil { + return reply } return &wasm.Reply{Error: "this host provides no service " + request.GetService()} + case "StartServiceCall": + return s.startServiceCall(build, calls, call) } return &wasm.Reply{} diff --git a/sandbox/service_test.go b/sandbox/service_test.go index 1423a231..f97dc9e9 100644 --- a/sandbox/service_test.go +++ b/sandbox/service_test.go @@ -24,7 +24,7 @@ func TestCallService(t *testing.T) { serve := func(service, method string, payload interface{ MarshalVT() ([]byte, error) }) *wasm.Reply { data, _ := payload.MarshalVT() request, _ := (&wasm.ServiceCall{Service: service, Method: method, Payload: data}).MarshalVT() - return s.answer(build, &wasm.Call{Method: "CallService", Request: request}) + return s.answer(build, &serviceCalls{}, &wasm.Call{Method: "CallService", Request: request}) } // Refuse a service the sandbox lacks. diff --git a/sandbox/services.go b/sandbox/services.go index 2767640a..3586f481 100644 --- a/sandbox/services.go +++ b/sandbox/services.go @@ -2,9 +2,11 @@ package sandbox import ( "bytes" + "context" "encoding/json" "os" "path/filepath" + "strconv" "github.com/paralin/modlock/src/wasm" "github.com/pkg/errors" @@ -104,3 +106,85 @@ func (f *fixture) answer(call *wasm.ServiceCall) *wasm.Reply { response, _ := (&wasm.ServiceReply{Payload: compact.Bytes()}).MarshalVT() return &wasm.Reply{Response: response} } + +// maxServiceCalls bounds the calls a mod starts between frames, as the host +// does. +const maxServiceCalls = 256 + +// serviceCalls holds one mod instance's started service calls. Every +// provider here answers at once, so each call ends in the next frame. +type serviceCalls struct { + // next is the number of the last call started. + next uint64 + // ended holds the ends the next frame delivers, in call order. + ended []*wasm.ServiceRepliedEvent +} + +// callService answers request from the provider of its service: the +// sandbox's scores or the mod's fixture. It is nil when nobody provides the +// service. +func (s *Sandbox) callService(build *Build, request *wasm.ServiceCall) *wasm.Reply { + if request.GetService() == scoresService { + return s.scores(build.Manifest, request) + } + if provider := build.fixtures[request.GetService()]; provider != nil { + return provider.answer(request) + } + return nil +} + +// startServiceCall numbers a StartServiceCall from the mod build describes +// and keeps its end for the next frame. The provider answers through the +// same path as a CallService, so a mod cannot tell a fixture from another +// provider; a service nobody provides is never asked. +func (s *Sandbox) startServiceCall(build *Build, calls *serviceCalls, call *wasm.Call) *wasm.Reply { + // Decode the call, refusing one past the bound. + request := &wasm.StartServiceCallRequest{} + if err := request.UnmarshalVT(call.GetRequest()); err != nil { + return &wasm.Reply{Error: "the StartServiceCall request is malformed"} + } + if len(calls.ended) >= maxServiceCalls { + return &wasm.Reply{Error: "the mod already holds " + strconv.Itoa(maxServiceCalls) + " service calls"} + } + calls.next++ + event := &wasm.ServiceRepliedEvent{Call: calls.next} + + // Ask the provider now, and keep the answer, its refusal or the absence + // of a provider. + reply := s.callService(build, &wasm.ServiceCall{ + Service: request.GetService(), + Method: request.GetMethod(), + Payload: request.GetPayload(), + }) + switch { + case reply == nil: + event.Failure = wasm.ServiceFailure_SERVICE_FAILURE_UNAVAILABLE + event.Error = "this host provides no service " + request.GetService() + case reply.GetError() != "": + event.Failure = wasm.ServiceFailure_SERVICE_FAILURE_REFUSED + event.Error = reply.GetError() + default: + answer := &wasm.ServiceReply{} + _ = answer.UnmarshalVT(reply.GetResponse()) + event.Payload = answer.GetPayload() + } + calls.ended = append(calls.ended, event) + + // Return the call's number. + started, _ := (&wasm.ServiceCallStarted{Call: calls.next}).MarshalVT() + return &wasm.Reply{Response: started} +} + +// endCalls delivers the ends of mod's started service calls. +func (s *Sandbox) endCalls(ctx context.Context, mod *running) { + if mod.calls == nil || len(mod.calls.ended) == 0 { + return + } + ended := mod.calls.ended + mod.calls.ended = nil + for _, event := range ended { + if !s.deliver(ctx, mod, "ServiceReplied", event, nil) { + return + } + } +} diff --git a/sandbox/services_test.go b/sandbox/services_test.go index 9a7ba93a..8bf67d70 100644 --- a/sandbox/services_test.go +++ b/sandbox/services_test.go @@ -38,7 +38,7 @@ func TestServiceFixture(t *testing.T) { } serve := func(service, method string) *wasm.Reply { request, _ := (&wasm.ServiceCall{Service: service, Method: method, Payload: []byte(`{"key":"slide"}`)}).MarshalVT() - return s.answer(build, &wasm.Call{Method: "CallService", Request: request}) + return s.answer(build, &serviceCalls{}, &wasm.Call{Method: "CallService", Request: request}) } // Answer each method with its reply as compact JSON. @@ -59,6 +59,46 @@ func TestServiceFixture(t *testing.T) { } } +// TestStartedServiceCall answers a started call from the same fixture a +// CallService reads, and keeps each end for the next frame: the answer, the +// fixture's refusal, and a service nobody provides, which is never asked. +func TestStartedServiceCall(t *testing.T) { + // Write one fixture and name its service. + dir := t.TempDir() + if err := os.WriteFile(filepath.Join(dir, "example.drills.v1.json"), []byte(`{"read": {"key": "slide"}}`), 0o644); err != nil { + t.Fatal(err) + } + s := &Sandbox{config: Config{Fixtures: func(string) string { return dir }, Events: func(*control.HostEvent) {}}} + build := &Build{Manifest: &wasm.Manifest{Slug: "trial", Services: []*wasm.Service{{Name: "example.drills.v1"}}}} + if err := s.provide("build", build); err != nil { + t.Fatal(err) + } + calls := &serviceCalls{} + start := func(service, method string) uint64 { + request, _ := (&wasm.StartServiceCallRequest{Service: service, Method: method}).MarshalVT() + reply := s.answer(build, calls, &wasm.Call{Method: "StartServiceCall", Request: request}) + started := &wasm.ServiceCallStarted{} + if reply.GetError() != "" || started.UnmarshalVT(reply.GetResponse()) != nil { + t.Fatalf("start %s.%s: %v", service, method, reply) + } + return started.GetCall() + } + + // Each call has its own number and ends in order. + numbers := []uint64{start("example.drills.v1", "read"), start("example.drills.v1", "list"), start("example.other.v1", "read")} + if !slices.Equal(numbers, []uint64{1, 2, 3}) { + t.Fatalf("numbers %v", numbers) + } + want := []*wasm.ServiceRepliedEvent{ + {Call: 1, Payload: []byte(`{"key":"slide"}`)}, + {Call: 2, Failure: wasm.ServiceFailure_SERVICE_FAILURE_REFUSED, Error: "the fixture " + filepath.Join(dir, "example.drills.v1.json") + " has no method list"}, + {Call: 3, Failure: wasm.ServiceFailure_SERVICE_FAILURE_UNAVAILABLE, Error: "this host provides no service example.other.v1"}, + } + if !slices.EqualFunc(calls.ended, want, (*wasm.ServiceRepliedEvent).EqualVT) { + t.Fatalf("ended %v, want %v", calls.ended, want) + } +} + // TestServiceProviders starts mods in a project's build that name services: // the sandbox names each service's provider before the mod starts, starts a // mod whose optional service nobody provides, and refuses to start one whose diff --git a/sandbox/settings_test.go b/sandbox/settings_test.go index 91e1de45..05ae9088 100644 --- a/sandbox/settings_test.go +++ b/sandbox/settings_test.go @@ -36,14 +36,14 @@ func TestKept(t *testing.T) { read := func(s *Sandbox) string { request, _ := (&settingspb.PlayerSettingRequest{Key: "layout"}).MarshalVT() response := &settingspb.SettingResponse{} - if err := response.UnmarshalVT(s.answer(build, &wasm.Call{Method: "PlayerSetting", Request: request}).GetResponse()); err != nil { + if err := response.UnmarshalVT(s.answer(build, &serviceCalls{}, &wasm.Call{Method: "PlayerSetting", Request: request}).GetResponse()); err != nil { t.Fatal(err) } return response.GetValue() } set := func(s *Sandbox, value string) { request, _ := (&settingspb.SetPlayerSettingRequest{Key: "layout", Value: value}).MarshalVT() - s.answer(build, &wasm.Call{Method: "SetPlayerSetting", Request: request}) + s.answer(build, &serviceCalls{}, &wasm.Call{Method: "SetPlayerSetting", Request: request}) } // Start at the default, keep the accepted value and refuse the other. @@ -60,7 +60,7 @@ func TestKept(t *testing.T) { // Read the shipped file, then the written one in the next session. readFile := func(s *Sandbox, name string) (*wasm.ReadFileResponse, string) { request, _ := (&wasm.ReadFileRequest{Path: name}).MarshalVT() - reply := s.answer(build, &wasm.Call{Method: "ReadFile", Request: request}) + reply := s.answer(build, &serviceCalls{}, &wasm.Call{Method: "ReadFile", Request: request}) response := &wasm.ReadFileResponse{} if err := response.UnmarshalVT(reply.GetResponse()); err != nil { t.Fatal(err) @@ -69,7 +69,7 @@ func TestKept(t *testing.T) { } writeFile := func(s *Sandbox, name, text string) string { request, _ := (&wasm.WriteFileRequest{Path: name, Text: text}).MarshalVT() - return s.answer(build, &wasm.Call{Method: "WriteFile", Request: request}).GetError() + return s.answer(build, &serviceCalls{}, &wasm.Call{Method: "WriteFile", Request: request}).GetError() } if got, _ := readFile(first, "maps/areas.yaml"); got.GetText() != "shipped" { t.Fatalf("read %q, want the shipped file", got.GetText()) diff --git a/src/wasm/host_service.gen.h b/src/wasm/host_service.gen.h index da264f9b..ef1ecf6c 100644 --- a/src/wasm/host_service.gen.h +++ b/src/wasm/host_service.gen.h @@ -752,6 +752,19 @@ class HostService { return std::unexpected("this host does not support CallService"); } + // StartServiceCall calls method of a service the host provides and + // returns at once with a number; the answer arrives in a later frame as a + // ServiceReplied event carrying that number. Every call ends once: with + // the reply, the service's refusal, a timeout or no provider at all. A + // service nobody provides is never asked. The host waits at most 30 + // seconds, or the call's shorter timeout, and drops the mod's waiting + // calls when the mod stops or reloads. A service that answers at once + // answers this way too, in the next frame. + virtual std::expected StartServiceCall( + const StartServiceCallRequest& /*request*/) { + return std::unexpected("this host does not support StartServiceCall"); + } + // CreateEntity creates any entity the server knows by its designer name, // such as npc_trooper_boss or prop_dynamic, with spawn key values and fields // written before it spawns. The world removes it when the world ends; @@ -1690,6 +1703,14 @@ class HostService { } return detail::Answer(host.CallService(request)); }}, + {"StartServiceCall", + [](HostService& host, const std::string& bytes) { + StartServiceCallRequest request; + if (!request.ParseFromString(bytes)) { + return detail::Fail("the StartServiceCall request is malformed"); + } + return detail::Answer(host.StartServiceCall(request)); + }}, {"CreateEntity", [](HostService& host, const std::string& bytes) { entities::EntityOptions request; @@ -2015,6 +2036,11 @@ class ModClient { return Send("Serve", event); } + // ServiceReplied ends one StartServiceCall, in a frame after the call. + std::expected ServiceReplied(const ServiceRepliedEvent& event) { + return Send("ServiceReplied", event); + } + // Damage offers one hit before the game applies it, while the mod asked // for damage. The mod's answer may block the hit or change its amount. std::expected Damage(const combat::DamageEvent& event) { diff --git a/src/wasm/service_calls.cc b/src/wasm/service_calls.cc new file mode 100644 index 00000000..a77ae5fd --- /dev/null +++ b/src/wasm/service_calls.cc @@ -0,0 +1,93 @@ +//go:build deps_only + +#include "wasm/service_calls.h" + +#include + +namespace modlock::wasm { + +ServiceCalls::ServiceCalls() : shared_(std::make_shared()) {} + +std::expected ServiceCalls::Start( + std::chrono::milliseconds timeout) { + // Bound the wait, and the calls a mod holds between frames. + if (timeout <= std::chrono::milliseconds::zero() || timeout > kMaxTimeout) { + timeout = kMaxTimeout; + } + const auto call = next_; + { + std::lock_guard held(shared_->lock); + if (shared_->calls.size() >= kMaxCalls) { + return std::unexpected("the mod already holds " + std::to_string(kMaxCalls) + + " service calls"); + } + shared_->calls.emplace(call, Call{.deadline = std::chrono::steady_clock::now() + timeout}); + } + ++next_; + + // The reply reaches the calls only while this instance holds them, and + // ends the call once. + std::weak_ptr reached = shared_; + WasmReply reply = [reached, call](std::expected answer) { + auto shared = reached.lock(); + if (!shared) { + return; + } + ServiceRepliedEvent event; + event.set_call(call); + if (answer) { + event.set_payload(std::move(*answer)); + } else { + event.set_failure(SERVICE_FAILURE_REFUSED); + event.set_error(std::move(answer.error())); + } + End(*shared, call, std::move(event)); + }; + return Started{.call = call, .reply = std::move(reply)}; +} + +void ServiceCalls::Fail(uint64_t call, ServiceFailure failure, std::string error) { + ServiceRepliedEvent event; + event.set_call(call); + event.set_failure(failure); + event.set_error(std::move(error)); + End(*shared_, call, std::move(event)); +} + +std::vector ServiceCalls::Take(std::chrono::steady_clock::time_point now) { + // Collect the ended calls and those past their deadline, in call order. + std::vector ended; + std::lock_guard held(shared_->lock); + for (auto it = shared_->calls.begin(); it != shared_->calls.end();) { + if (it->second.ended) { + ended.push_back(std::move(*it->second.ended)); + } else if (now >= it->second.deadline) { + ServiceRepliedEvent event; + event.set_call(it->first); + event.set_failure(SERVICE_FAILURE_TIMEOUT); + event.set_error("the service did not answer in time"); + ended.push_back(std::move(event)); + } else { + ++it; + continue; + } + it = shared_->calls.erase(it); + } + return ended; +} + +void ServiceCalls::Drop() { + // A fresh table leaves the replies still out holding nothing they reach. + shared_ = std::make_shared(); +} + +void ServiceCalls::End(Shared& shared, uint64_t call, ServiceRepliedEvent event) { + std::lock_guard held(shared.lock); + auto found = shared.calls.find(call); + if (found == shared.calls.end() || found->second.ended) { + return; + } + found->second.ended = std::move(event); +} + +} // namespace modlock::wasm diff --git a/src/wasm/service_calls.h b/src/wasm/service_calls.h new file mode 100644 index 00000000..ba61f527 --- /dev/null +++ b/src/wasm/service_calls.h @@ -0,0 +1,76 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "modlock/wasm_host.h" +#include "src/wasm/wasm.pb.h" + +namespace modlock::wasm { + +// ServiceCalls holds one mod's started service calls until each ends: with +// the provider's answer or refusal, a timeout, or no provider. The host's +// frame thread starts and takes calls; a provider may answer from any +// thread, once. Dropping the calls ends the instance's waits without an +// event, and an answer to a dropped call does nothing. +class ServiceCalls { + public: + // kMaxTimeout bounds how long a call waits, and kMaxCalls how many calls a + // mod holds between frames, ended or waiting. + static constexpr std::chrono::milliseconds kMaxTimeout{30'000}; + static constexpr size_t kMaxCalls = 256; + + // Started numbers one call and gives the provider the reply that ends it. + struct Started { + uint64_t call = 0; + WasmReply reply; + }; + + ServiceCalls(); + + // Start numbers a call that waits timeout, at most kMaxTimeout, or zero + // for kMaxTimeout. It refuses a call past kMaxCalls. + [[nodiscard]] std::expected Start(std::chrono::milliseconds timeout); + + // Fail ends call at once with failure and error, as when nobody provides + // its service. + void Fail(uint64_t call, ServiceFailure failure, std::string error); + + // Take returns the calls that ended by now, oldest first, and forgets + // them. + [[nodiscard]] std::vector Take(std::chrono::steady_clock::time_point now); + + // Drop forgets every call, so the answers still to come do nothing. + void Drop(); + + private: + // Call is one started call: its deadline and, once it ended, its event. + struct Call { + std::chrono::steady_clock::time_point deadline; + std::optional ended; + }; + + // Shared is what the replies reach: the calls by number, under a lock, + // since a provider may answer from another thread. + struct Shared { + mutable std::mutex lock; + std::map calls; + }; + + // End records event as call's ending, unless it already ended or was + // forgotten. + static void End(Shared& shared, uint64_t call, ServiceRepliedEvent event); + + std::shared_ptr shared_; + uint64_t next_ = 1; +}; + +} // namespace modlock::wasm diff --git a/src/wasm/wasm.pb.cc b/src/wasm/wasm.pb.cc index dd577b22..2ae1dd62 100644 --- a/src/wasm/wasm.pb.cc +++ b/src/wasm/wasm.pb.cc @@ -56,6 +56,40 @@ struct WorldEventDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MODLOCK_API PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WorldEventDefaultTypeInternal _WorldEvent_default_instance_; +inline constexpr StartServiceCallRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + service_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + method_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + payload_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + timeout_milliseconds_{0u} {} + +template +PROTOBUF_CONSTEXPR StartServiceCallRequest::StartServiceCallRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(StartServiceCallRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct StartServiceCallRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR StartServiceCallRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~StartServiceCallRequestDefaultTypeInternal() {} + union { + StartServiceCallRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MODLOCK_API + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StartServiceCallRequestDefaultTypeInternal _StartServiceCallRequest_default_instance_; + inline constexpr StartResult::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, @@ -141,6 +175,63 @@ struct ServiceReplyDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MODLOCK_API PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceReplyDefaultTypeInternal _ServiceReply_default_instance_; +inline constexpr ServiceRepliedEvent::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + payload_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + call_{::uint64_t{0u}}, + failure_{static_cast< ::modlock::wasm::ServiceFailure >(0)} {} + +template +PROTOBUF_CONSTEXPR ServiceRepliedEvent::ServiceRepliedEvent(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(ServiceRepliedEvent_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ServiceRepliedEventDefaultTypeInternal { + PROTOBUF_CONSTEXPR ServiceRepliedEventDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ServiceRepliedEventDefaultTypeInternal() {} + union { + ServiceRepliedEvent _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MODLOCK_API + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceRepliedEventDefaultTypeInternal _ServiceRepliedEvent_default_instance_; + +inline constexpr ServiceCallStarted::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + call_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR ServiceCallStarted::ServiceCallStarted(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(ServiceCallStarted_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ServiceCallStartedDefaultTypeInternal { + PROTOBUF_CONSTEXPR ServiceCallStartedDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ServiceCallStartedDefaultTypeInternal() {} + union { + ServiceCallStarted _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MODLOCK_API + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceCallStartedDefaultTypeInternal _ServiceCallStarted_default_instance_; + inline constexpr ServiceCall::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, @@ -445,8 +536,8 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MODLOCK_API PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameEventDefaultTypeInternal _FrameEvent_default_instance_; } // namespace wasm } // namespace modlock -static constexpr const ::_pb::EnumDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE - file_level_enum_descriptors_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto = nullptr; +static const ::_pb::EnumDescriptor* PROTOBUF_NONNULL + file_level_enum_descriptors_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto[1]; static constexpr const ::_pb::ServiceDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE file_level_service_descriptors_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto = nullptr; const ::uint32_t @@ -543,6 +634,33 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::modlock::wasm::ServiceReply, _impl_.payload_), 0, 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::wasm::StartServiceCallRequest, _impl_._has_bits_), + 7, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::wasm::StartServiceCallRequest, _impl_.service_), + PROTOBUF_FIELD_OFFSET(::modlock::wasm::StartServiceCallRequest, _impl_.method_), + PROTOBUF_FIELD_OFFSET(::modlock::wasm::StartServiceCallRequest, _impl_.payload_), + PROTOBUF_FIELD_OFFSET(::modlock::wasm::StartServiceCallRequest, _impl_.timeout_milliseconds_), + 0, + 1, + 2, + 3, + 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ServiceCallStarted, _impl_._has_bits_), + 4, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ServiceCallStarted, _impl_.call_), + 0, + 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ServiceRepliedEvent, _impl_._has_bits_), + 7, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ServiceRepliedEvent, _impl_.call_), + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ServiceRepliedEvent, _impl_.payload_), + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ServiceRepliedEvent, _impl_.failure_), + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ServiceRepliedEvent, _impl_.error_), + 2, + 0, + 3, + 1, + 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::modlock::wasm::LogRequest, _impl_._has_bits_), 4, // hasbit index offset PROTOBUF_FIELD_OFFSET(::modlock::wasm::LogRequest, _impl_.message_), @@ -575,9 +693,12 @@ static const ::_pbi::MigrationSchema {71, sizeof(::modlock::wasm::WorldEvent)}, {76, sizeof(::modlock::wasm::ServiceCall)}, {85, sizeof(::modlock::wasm::ServiceReply)}, - {90, sizeof(::modlock::wasm::LogRequest)}, - {95, sizeof(::modlock::wasm::ServerCommandRequest)}, - {100, sizeof(::modlock::wasm::PrecacheOptions)}, + {90, sizeof(::modlock::wasm::StartServiceCallRequest)}, + {101, sizeof(::modlock::wasm::ServiceCallStarted)}, + {106, sizeof(::modlock::wasm::ServiceRepliedEvent)}, + {117, sizeof(::modlock::wasm::LogRequest)}, + {122, sizeof(::modlock::wasm::ServerCommandRequest)}, + {127, sizeof(::modlock::wasm::PrecacheOptions)}, }; static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::modlock::wasm::_Call_default_instance_._instance, @@ -592,6 +713,9 @@ static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::modlock::wasm::_WorldEvent_default_instance_._instance, &::modlock::wasm::_ServiceCall_default_instance_._instance, &::modlock::wasm::_ServiceReply_default_instance_._instance, + &::modlock::wasm::_StartServiceCallRequest_default_instance_._instance, + &::modlock::wasm::_ServiceCallStarted_default_instance_._instance, + &::modlock::wasm::_ServiceRepliedEvent_default_instance_._instance, &::modlock::wasm::_LogRequest_default_instance_._instance, &::modlock::wasm::_ServerCommandRequest_default_instance_._instance, &::modlock::wasm::_PrecacheOptions_default_instance_._instance, @@ -639,284 +763,298 @@ const char descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwa "d\030\001 \001(\010\"\031\n\nWorldEvent\022\013\n\003map\030\001 \001(\t\"\?\n\013Se" "rviceCall\022\017\n\007service\030\001 \001(\t\022\016\n\006method\030\002 \001" "(\t\022\017\n\007payload\030\003 \001(\014\"\037\n\014ServiceReply\022\017\n\007p" - "ayload\030\001 \001(\014\"\035\n\nLogRequest\022\017\n\007message\030\001 " - "\001(\t\"\'\n\024ServerCommandRequest\022\017\n\007command\030\001" - " \001(\t\"4\n\017PrecacheOptions\022\016\n\006heroes\030\001 \003(\t\022" - "\021\n\tresources\030\002 \003(\t2\307J\n\004Host\0224\n\003Log\022\030.mod" - "lock.wasm.LogRequest\032\023.modlock.wasm.Empt" - "y\022H\n\rServerCommand\022\".modlock.wasm.Server" - "CommandRequest\032\023.modlock.wasm.Empty\022>\n\004C" - "hat\022!.modlock.wasm.effects.ChatRequest\032\023" - ".modlock.wasm.Empty\022J\n\nCenterText\022\'.modl" - "ock.wasm.effects.CenterTextRequest\032\023.mod" - "lock.wasm.Empty\022F\n\010Announce\022%.modlock.wa" - "sm.effects.AnnounceRequest\032\023.modlock.was" - "m.Empty\022>\n\010Precache\022\035.modlock.wasm.Preca" - "cheOptions\032\023.modlock.wasm.Empty\022E\n\007Playe" - "rs\022\023.modlock.wasm.Empty\032%.modlock.wasm.p" - "layers.PlayersResponse\022O\n\004Pawn\022#.modlock" - ".wasm.players.PlayerRequest\032\".modlock.wa" - "sm.players.PawnResponse\022d\n\rPlayerSetting" - "\022+.modlock.wasm.settings.PlayerSettingRe" - "quest\032&.modlock.wasm.settings.SettingRes" - "ponse\022W\n\020SetPlayerSetting\022..modlock.wasm" - ".settings.SetPlayerSettingRequest\032\023.modl" - "ock.wasm.Empty\022H\n\tAddMetric\022&.modlock.wa" - "sm.metrics.AddMetricRequest\032\023.modlock.wa" - "sm.Empty\022I\n\010ReadFile\022\035.modlock.wasm.Read" - "FileRequest\032\036.modlock.wasm.ReadFileRespo" - "nse\022@\n\tWriteFile\022\036.modlock.wasm.WriteFil" - "eRequest\032\023.modlock.wasm.Empty\022L\n\nHoldRel" - "oad\022).modlock.wasm.abilities.HoldReloadR" - "equest\032\023.modlock.wasm.Empty\022<\n\007Handoff\022\034" - ".modlock.wasm.HandoffRequest\032\023.modlock.w" - "asm.Empty\022A\n\tHandedOff\022\023.modlock.wasm.Em" - "pty\032\037.modlock.wasm.HandedOffResponse\022H\n\r" - "PlayerHandoff\022\".modlock.wasm.HandoffPlay" - "erRequest\032\023.modlock.wasm.Empty\022W\n\017Player" - "HandedOff\022#.modlock.wasm.players.PlayerR" - "equest\032\037.modlock.wasm.HandedOffResponse\022" - "Y\n\nSelectHero\022\'.modlock.wasm.players.Sel" - "ectHeroRequest\032\".modlock.wasm.players.He" - "roResponse\022D\n\010Spectate\022#.modlock.wasm.pl" - "ayers.PlayerRequest\032\023.modlock.wasm.Empty" - "\022@\n\005Watch\022\".modlock.wasm.players.WatchRe" - "quest\032\023.modlock.wasm.Empty\022J\n\nFreeCamera" - "\022\'.modlock.wasm.players.FreeCameraReques" - "t\032\023.modlock.wasm.Empty\022F\n\nMoveCamera\022#.m" - "odlock.wasm.players.CameraOptions\032\023.modl" - "ock.wasm.Empty\022L\n\013ClearCamera\022(.modlock." - "wasm.players.ClearCameraRequest\032\023.modloc" - "k.wasm.Empty\022C\n\007Unwatch\022#.modlock.wasm.p" - "layers.PlayerRequest\032\023.modlock.wasm.Empt" - "y\022C\n\007Respawn\022#.modlock.wasm.players.Play" - "erRequest\032\023.modlock.wasm.Empty\022J\n\nChange" - "Team\022\'.modlock.wasm.players.ChangeTeamRe" - "quest\032\023.modlock.wasm.Empty\022F\n\nClearItems" - "\022#.modlock.wasm.players.PlayerRequest\032\023." - "modlock.wasm.Empty\022B\n\006Freeze\022#.modlock.w" - "asm.players.FreezeRequest\032\023.modlock.wasm" - ".Empty\022J\n\016RestoreStamina\022#.modlock.wasm." - "players.PlayerRequest\032\023.modlock.wasm.Emp" - "ty\022J\n\nSetStamina\022\'.modlock.wasm.players." - "SetStaminaRequest\032\023.modlock.wasm.Empty\022T" - "\n\016RefreshAbility\022-.modlock.wasm.abilitie" - "s.RefreshAbilityRequest\032\023.modlock.wasm.E" - "mpty\022[\n\tAbilities\022#.modlock.wasm.players" - ".PlayerRequest\032).modlock.wasm.abilities." - "AbilitiesResponse\022I\n\nSetAbility\022&.modloc" - "k.wasm.abilities.AbilityOptions\032\023.modloc" - "k.wasm.Empty\022H\n\010GiveItem\022\'.modlock.wasm." - "abilities.GiveItemRequest\032\023.modlock.wasm" - ".Empty\022F\n\007BuyItem\022&.modlock.wasm.abiliti" - "es.BuyItemRequest\032\023.modlock.wasm.Empty\022P" - "\n\014TrainAbility\022+.modlock.wasm.abilities." - "TrainAbilityRequest\032\023.modlock.wasm.Empty" - "\022`\n\tHeroBuild\022(.modlock.wasm.abilities.H" - "eroBuildRequest\032).modlock.wasm.abilities" - ".HeroBuildResponse\022T\n\016ReplaceAbility\022-.m" - "odlock.wasm.abilities.ReplaceAbilityRequ" - "est\032\023.modlock.wasm.Empty\022P\n\014HoldModifier" - "\022+.modlock.wasm.abilities.HoldModifierRe" - "quest\032\023.modlock.wasm.Empty\022P\n\014GiveModifi" - "er\022+.modlock.wasm.abilities.GiveModifier" - "Request\032\023.modlock.wasm.Empty\022G\n\010Teleport" - "\022&.modlock.wasm.movement.TeleportRequest" - "\032\023.modlock.wasm.Empty\022E\n\007Zipline\022%.modlo" - "ck.wasm.movement.ZiplineRequest\032\023.modloc" - "k.wasm.Empty\022K\n\nMovePlayer\022(.modlock.was" - "m.movement.MovePlayerRequest\032\023.modlock.w" - "asm.Empty\022A\n\005Steer\022#.modlock.wasm.moveme" - "nt.SteerRequest\032\023.modlock.wasm.Empty\022A\n\005" - "Drive\022#.modlock.wasm.movement.DriveReque" - "st\032\023.modlock.wasm.Empty\022L\n\013AdjustSouls\022(" - ".modlock.wasm.players.AdjustSoulsRequest" - "\032\023.modlock.wasm.Empty\022\\\n\023AdjustAbilityPo" - "ints\0220.modlock.wasm.players.AdjustAbilit" - "yPointsRequest\032\023.modlock.wasm.Empty\022P\n\rS" - "tartingSouls\022*.modlock.wasm.players.Star" - "tingSoulsRequest\032\023.modlock.wasm.Empty\022H\n" - "\tResetHero\022&.modlock.wasm.players.ResetH" - "eroRequest\032\023.modlock.wasm.Empty\022>\n\004Heal\022" - "!.modlock.wasm.players.HealRequest\032\023.mod" - "lock.wasm.Empty\022@\n\005Sound\022\".modlock.wasm." - "effects.SoundRequest\032\023.modlock.wasm.Empt" - "y\022L\n\013RestoreHero\022(.modlock.wasm.players." - "RestoreHeroRequest\032\023.modlock.wasm.Empty\022" - "N\n\014ScreenEffect\022).modlock.wasm.effects.S" - "creenEffectRequest\032\023.modlock.wasm.Empty\022" - "X\n\021ClearScreenEffect\022..modlock.wasm.effe" - "cts.ClearScreenEffectRequest\032\023.modlock.w" - "asm.Empty\022V\n\tReadField\022%.modlock.wasm.fi" - "elds.ReadFieldRequest\032\".modlock.wasm.fie" - "lds.FieldResponse\022f\n\021ReadModifierField\022-" - ".modlock.wasm.fields.ReadModifierFieldRe" - "quest\032\".modlock.wasm.fields.FieldRespons" - "e\022I\n\nWriteField\022&.modlock.wasm.fields.Wr" - "iteFieldRequest\032\023.modlock.wasm.Empty\022^\n\r" - "ReadFieldList\022%.modlock.wasm.fields.Read" - "FieldRequest\032&.modlock.wasm.fields.Field" - "ListResponse\022Q\n\016WriteFieldList\022*.modlock" - ".wasm.fields.WriteFieldListRequest\032\023.mod" - "lock.wasm.Empty\022_\n\013EntityClass\022$.modlock" - ".wasm.entities.EntityRequest\032*.modlock.w" - "asm.entities.EntityClassResponse\022]\n\nEnti" - "tyName\022$.modlock.wasm.entities.EntityReq" - "uest\032).modlock.wasm.entities.EntityNameR" - "esponse\022e\n\016EntityPosition\022$.modlock.wasm" - ".entities.EntityRequest\032-.modlock.wasm.e" - "ntities.EntityPositionResponse\022e\n\rModifi" - "erState\022,.modlock.wasm.abilities.Modifie" - "rStateRequest\032&.modlock.wasm.abilities.A" - "ctiveResponse\022Z\n\021HoldModifierState\0220.mod" - "lock.wasm.abilities.HoldModifierStateReq" - "uest\032\023.modlock.wasm.Empty\022H\n\rSetFreeForA" - "ll\022\".modlock.wasm.SetFreeForAllRequest\032\023" - ".modlock.wasm.Empty\022J\n\016SetTeamSeating\022#." - "modlock.wasm.SetTeamSeatingRequest\032\023.mod" - "lock.wasm.Empty\022W\n\013CreateModel\022\".modlock" - ".wasm.objects.ModelOptions\032$.modlock.was" - "m.objects.ObjectResponse\022U\n\nCreateText\022!" - ".modlock.wasm.objects.TextOptions\032$.modl" - "ock.wasm.objects.ObjectResponse\022]\n\016Creat" - "eParticle\022%.modlock.wasm.objects.Particl" - "eOptions\032$.modlock.wasm.objects.ObjectRe" - "sponse\022S\n\tCreateFog\022 .modlock.wasm.objec" - "ts.FogOptions\032$.modlock.wasm.objects.Obj" - "ectResponse\022J\n\nMoveObject\022\'.modlock.wasm" - ".objects.MoveObjectRequest\032\023.modlock.was" - "m.Empty\022D\n\007SetText\022$.modlock.wasm.object" - "s.SetTextRequest\032\023.modlock.wasm.Empty\022T\n" - "\017SetObjectHidden\022,.modlock.wasm.objects." - "SetObjectHiddenRequest\032\023.modlock.wasm.Em" - "pty\022V\n\020ShowObjectOnlyTo\022-.modlock.wasm.o" - "bjects.ShowObjectOnlyToRequest\032\023.modlock" - ".wasm.Empty\022K\n\017ShowObjectToAll\022#.modlock" - ".wasm.objects.ObjectRequest\032\023.modlock.wa" - "sm.Empty\022H\n\014RemoveObject\022#.modlock.wasm." - "objects.ObjectRequest\032\023.modlock.wasm.Emp" - "ty\022Z\n\014ObjectEntity\022#.modlock.wasm.object" - "s.ObjectRequest\032%.modlock.wasm.entities." - "EntityResponse\022M\n\006AddBot\022 .modlock.wasm." - "players.BotOptions\032!.modlock.wasm.player" - "s.BotResponse\022E\n\tRemoveBot\022#.modlock.was" - "m.players.PlayerRequest\032\023.modlock.wasm.E" - "mpty\022=\n\nBlockInput\022\032.modlock.wasm.InputR" - "equest\032\023.modlock.wasm.Empty\022I\n\020BlockPlay" - "erInput\022 .modlock.wasm.PlayerInputReques" - "t\032\023.modlock.wasm.Empty\022>\n\005Press\022 .modloc" - "k.wasm.PlayerInputRequest\032\023.modlock.wasm" - ".Empty\022=\n\nWatchInput\022\032.modlock.wasm.Inpu" - "tRequest\032\023.modlock.wasm.Empty\022B\n\nRemapIn" - "put\022\037.modlock.wasm.RemapInputRequest\032\023.m" - "odlock.wasm.Empty\0225\n\002Ui\022\032.modlock.wasm.u" - "i.UiRequest\032\023.modlock.wasm.Empty\022D\n\013Call" - "Service\022\031.modlock.wasm.ServiceCall\032\032.mod" - "lock.wasm.ServiceReply\022[\n\014CreateEntity\022$" - ".modlock.wasm.entities.EntityOptions\032%.m" - "odlock.wasm.entities.EntityResponse\022Z\n\tF" - "ireInput\022\'.modlock.wasm.entities.FireInp" - "utRequest\032$.modlock.wasm.entities.AliveR" - "esponse\022Z\n\014RemoveEntity\022$.modlock.wasm.e" - "ntities.EntityRequest\032$.modlock.wasm.ent" - "ities.AliveResponse\022W\n\020ShowEntityOnlyTo\022" - "..modlock.wasm.entities.ShowEntityOnlyTo" - "Request\032\023.modlock.wasm.Empty\022L\n\017ShowEnti" - "tyToAll\022$.modlock.wasm.entities.EntityRe" - "quest\032\023.modlock.wasm.Empty\022I\n\010SpawnNpc\022\035" - ".modlock.wasm.npcs.NpcOptions\032\036.modlock." - "wasm.npcs.NpcResponse\022M\n\007ReadNpc\022\035.modlo" - "ck.wasm.npcs.NpcRequest\032#.modlock.wasm.n" - "pcs.NpcStateResponse\022R\n\007MoveNpc\022!.modloc" - "k.wasm.npcs.MoveNpcRequest\032$.modlock.was" - "m.entities.AliveResponse\022\\\n\014SetNpcHealth" - "\022&.modlock.wasm.npcs.SetNpcHealthRequest" - "\032$.modlock.wasm.entities.AliveResponse\022P" - "\n\tRemoveNpc\022\035.modlock.wasm.npcs.NpcReque" + "ayload\030\001 \001(\014\"i\n\027StartServiceCallRequest\022" + "\017\n\007service\030\001 \001(\t\022\016\n\006method\030\002 \001(\t\022\017\n\007payl" + "oad\030\003 \001(\014\022\034\n\024timeout_milliseconds\030\004 \001(\r\"" + "\"\n\022ServiceCallStarted\022\014\n\004call\030\001 \001(\004\"r\n\023S" + "erviceRepliedEvent\022\014\n\004call\030\001 \001(\004\022\017\n\007payl" + "oad\030\002 \001(\014\022-\n\007failure\030\003 \001(\0162\034.modlock.was" + "m.ServiceFailure\022\r\n\005error\030\004 \001(\t\"\035\n\nLogRe" + "quest\022\017\n\007message\030\001 \001(\t\"\'\n\024ServerCommandR" + "equest\022\017\n\007command\030\001 \001(\t\"4\n\017PrecacheOptio" + "ns\022\016\n\006heroes\030\001 \003(\t\022\021\n\tresources\030\002 \003(\t*\205\001" + "\n\016ServiceFailure\022\030\n\024SERVICE_FAILURE_NONE" + "\020\000\022\033\n\027SERVICE_FAILURE_REFUSED\020\001\022\033\n\027SERVI" + "CE_FAILURE_TIMEOUT\020\002\022\037\n\033SERVICE_FAILURE_" + "UNAVAILABLE\020\0032\244K\n\004Host\0224\n\003Log\022\030.modlock." + "wasm.LogRequest\032\023.modlock.wasm.Empty\022H\n\r" + "ServerCommand\022\".modlock.wasm.ServerComma" + "ndRequest\032\023.modlock.wasm.Empty\022>\n\004Chat\022!" + ".modlock.wasm.effects.ChatRequest\032\023.modl" + "ock.wasm.Empty\022J\n\nCenterText\022\'.modlock.w" + "asm.effects.CenterTextRequest\032\023.modlock." + "wasm.Empty\022F\n\010Announce\022%.modlock.wasm.ef" + "fects.AnnounceRequest\032\023.modlock.wasm.Emp" + "ty\022>\n\010Precache\022\035.modlock.wasm.PrecacheOp" + "tions\032\023.modlock.wasm.Empty\022E\n\007Players\022\023." + "modlock.wasm.Empty\032%.modlock.wasm.player" + "s.PlayersResponse\022O\n\004Pawn\022#.modlock.wasm" + ".players.PlayerRequest\032\".modlock.wasm.pl" + "ayers.PawnResponse\022d\n\rPlayerSetting\022+.mo" + "dlock.wasm.settings.PlayerSettingRequest" + "\032&.modlock.wasm.settings.SettingResponse" + "\022W\n\020SetPlayerSetting\022..modlock.wasm.sett" + "ings.SetPlayerSettingRequest\032\023.modlock.w" + "asm.Empty\022H\n\tAddMetric\022&.modlock.wasm.me" + "trics.AddMetricRequest\032\023.modlock.wasm.Em" + "pty\022I\n\010ReadFile\022\035.modlock.wasm.ReadFileR" + "equest\032\036.modlock.wasm.ReadFileResponse\022@" + "\n\tWriteFile\022\036.modlock.wasm.WriteFileRequ" + "est\032\023.modlock.wasm.Empty\022L\n\nHoldReload\022)" + ".modlock.wasm.abilities.HoldReloadReques" + "t\032\023.modlock.wasm.Empty\022<\n\007Handoff\022\034.modl" + "ock.wasm.HandoffRequest\032\023.modlock.wasm.E" + "mpty\022A\n\tHandedOff\022\023.modlock.wasm.Empty\032\037" + ".modlock.wasm.HandedOffResponse\022H\n\rPlaye" + "rHandoff\022\".modlock.wasm.HandoffPlayerReq" + "uest\032\023.modlock.wasm.Empty\022W\n\017PlayerHande" + "dOff\022#.modlock.wasm.players.PlayerReques" + "t\032\037.modlock.wasm.HandedOffResponse\022Y\n\nSe" + "lectHero\022\'.modlock.wasm.players.SelectHe" + "roRequest\032\".modlock.wasm.players.HeroRes" + "ponse\022D\n\010Spectate\022#.modlock.wasm.players" + ".PlayerRequest\032\023.modlock.wasm.Empty\022@\n\005W" + "atch\022\".modlock.wasm.players.WatchRequest" + "\032\023.modlock.wasm.Empty\022J\n\nFreeCamera\022\'.mo" + "dlock.wasm.players.FreeCameraRequest\032\023.m" + "odlock.wasm.Empty\022F\n\nMoveCamera\022#.modloc" + "k.wasm.players.CameraOptions\032\023.modlock.w" + "asm.Empty\022L\n\013ClearCamera\022(.modlock.wasm." + "players.ClearCameraRequest\032\023.modlock.was" + "m.Empty\022C\n\007Unwatch\022#.modlock.wasm.player" + "s.PlayerRequest\032\023.modlock.wasm.Empty\022C\n\007" + "Respawn\022#.modlock.wasm.players.PlayerReq" + "uest\032\023.modlock.wasm.Empty\022J\n\nChangeTeam\022" + "\'.modlock.wasm.players.ChangeTeamRequest" + "\032\023.modlock.wasm.Empty\022F\n\nClearItems\022#.mo" + "dlock.wasm.players.PlayerRequest\032\023.modlo" + "ck.wasm.Empty\022B\n\006Freeze\022#.modlock.wasm.p" + "layers.FreezeRequest\032\023.modlock.wasm.Empt" + "y\022J\n\016RestoreStamina\022#.modlock.wasm.playe" + "rs.PlayerRequest\032\023.modlock.wasm.Empty\022J\n" + "\nSetStamina\022\'.modlock.wasm.players.SetSt" + "aminaRequest\032\023.modlock.wasm.Empty\022T\n\016Ref" + "reshAbility\022-.modlock.wasm.abilities.Ref" + "reshAbilityRequest\032\023.modlock.wasm.Empty\022" + "[\n\tAbilities\022#.modlock.wasm.players.Play" + "erRequest\032).modlock.wasm.abilities.Abili" + "tiesResponse\022I\n\nSetAbility\022&.modlock.was" + "m.abilities.AbilityOptions\032\023.modlock.was" + "m.Empty\022H\n\010GiveItem\022\'.modlock.wasm.abili" + "ties.GiveItemRequest\032\023.modlock.wasm.Empt" + "y\022F\n\007BuyItem\022&.modlock.wasm.abilities.Bu" + "yItemRequest\032\023.modlock.wasm.Empty\022P\n\014Tra" + "inAbility\022+.modlock.wasm.abilities.Train" + "AbilityRequest\032\023.modlock.wasm.Empty\022`\n\tH" + "eroBuild\022(.modlock.wasm.abilities.HeroBu" + "ildRequest\032).modlock.wasm.abilities.Hero" + "BuildResponse\022T\n\016ReplaceAbility\022-.modloc" + "k.wasm.abilities.ReplaceAbilityRequest\032\023" + ".modlock.wasm.Empty\022P\n\014HoldModifier\022+.mo" + "dlock.wasm.abilities.HoldModifierRequest" + "\032\023.modlock.wasm.Empty\022P\n\014GiveModifier\022+." + "modlock.wasm.abilities.GiveModifierReque" + "st\032\023.modlock.wasm.Empty\022G\n\010Teleport\022&.mo" + "dlock.wasm.movement.TeleportRequest\032\023.mo" + "dlock.wasm.Empty\022E\n\007Zipline\022%.modlock.wa" + "sm.movement.ZiplineRequest\032\023.modlock.was" + "m.Empty\022K\n\nMovePlayer\022(.modlock.wasm.mov" + "ement.MovePlayerRequest\032\023.modlock.wasm.E" + "mpty\022A\n\005Steer\022#.modlock.wasm.movement.St" + "eerRequest\032\023.modlock.wasm.Empty\022A\n\005Drive" + "\022#.modlock.wasm.movement.DriveRequest\032\023." + "modlock.wasm.Empty\022L\n\013AdjustSouls\022(.modl" + "ock.wasm.players.AdjustSoulsRequest\032\023.mo" + "dlock.wasm.Empty\022\\\n\023AdjustAbilityPoints\022" + "0.modlock.wasm.players.AdjustAbilityPoin" + "tsRequest\032\023.modlock.wasm.Empty\022P\n\rStarti" + "ngSouls\022*.modlock.wasm.players.StartingS" + "oulsRequest\032\023.modlock.wasm.Empty\022H\n\tRese" + "tHero\022&.modlock.wasm.players.ResetHeroRe" + "quest\032\023.modlock.wasm.Empty\022>\n\004Heal\022!.mod" + "lock.wasm.players.HealRequest\032\023.modlock." + "wasm.Empty\022@\n\005Sound\022\".modlock.wasm.effec" + "ts.SoundRequest\032\023.modlock.wasm.Empty\022L\n\013" + "RestoreHero\022(.modlock.wasm.players.Resto" + "reHeroRequest\032\023.modlock.wasm.Empty\022N\n\014Sc" + "reenEffect\022).modlock.wasm.effects.Screen" + "EffectRequest\032\023.modlock.wasm.Empty\022X\n\021Cl" + "earScreenEffect\022..modlock.wasm.effects.C" + "learScreenEffectRequest\032\023.modlock.wasm.E" + "mpty\022V\n\tReadField\022%.modlock.wasm.fields." + "ReadFieldRequest\032\".modlock.wasm.fields.F" + "ieldResponse\022f\n\021ReadModifierField\022-.modl" + "ock.wasm.fields.ReadModifierFieldRequest" + "\032\".modlock.wasm.fields.FieldResponse\022I\n\n" + "WriteField\022&.modlock.wasm.fields.WriteFi" + "eldRequest\032\023.modlock.wasm.Empty\022^\n\rReadF" + "ieldList\022%.modlock.wasm.fields.ReadField" + "Request\032&.modlock.wasm.fields.FieldListR" + "esponse\022Q\n\016WriteFieldList\022*.modlock.wasm" + ".fields.WriteFieldListRequest\032\023.modlock." + "wasm.Empty\022_\n\013EntityClass\022$.modlock.wasm" + ".entities.EntityRequest\032*.modlock.wasm.e" + "ntities.EntityClassResponse\022]\n\nEntityNam" + "e\022$.modlock.wasm.entities.EntityRequest\032" + ").modlock.wasm.entities.EntityNameRespon" + "se\022e\n\016EntityPosition\022$.modlock.wasm.enti" + "ties.EntityRequest\032-.modlock.wasm.entiti" + "es.EntityPositionResponse\022e\n\rModifierSta" + "te\022,.modlock.wasm.abilities.ModifierStat" + "eRequest\032&.modlock.wasm.abilities.Active" + "Response\022Z\n\021HoldModifierState\0220.modlock." + "wasm.abilities.HoldModifierStateRequest\032" + "\023.modlock.wasm.Empty\022H\n\rSetFreeForAll\022\"." + "modlock.wasm.SetFreeForAllRequest\032\023.modl" + "ock.wasm.Empty\022J\n\016SetTeamSeating\022#.modlo" + "ck.wasm.SetTeamSeatingRequest\032\023.modlock." + "wasm.Empty\022W\n\013CreateModel\022\".modlock.wasm" + ".objects.ModelOptions\032$.modlock.wasm.obj" + "ects.ObjectResponse\022U\n\nCreateText\022!.modl" + "ock.wasm.objects.TextOptions\032$.modlock.w" + "asm.objects.ObjectResponse\022]\n\016CreatePart" + "icle\022%.modlock.wasm.objects.ParticleOpti" + "ons\032$.modlock.wasm.objects.ObjectRespons" + "e\022S\n\tCreateFog\022 .modlock.wasm.objects.Fo" + "gOptions\032$.modlock.wasm.objects.ObjectRe" + "sponse\022J\n\nMoveObject\022\'.modlock.wasm.obje" + "cts.MoveObjectRequest\032\023.modlock.wasm.Emp" + "ty\022D\n\007SetText\022$.modlock.wasm.objects.Set" + "TextRequest\032\023.modlock.wasm.Empty\022T\n\017SetO" + "bjectHidden\022,.modlock.wasm.objects.SetOb" + "jectHiddenRequest\032\023.modlock.wasm.Empty\022V" + "\n\020ShowObjectOnlyTo\022-.modlock.wasm.object" + "s.ShowObjectOnlyToRequest\032\023.modlock.wasm" + ".Empty\022K\n\017ShowObjectToAll\022#.modlock.wasm" + ".objects.ObjectRequest\032\023.modlock.wasm.Em" + "pty\022H\n\014RemoveObject\022#.modlock.wasm.objec" + "ts.ObjectRequest\032\023.modlock.wasm.Empty\022Z\n" + "\014ObjectEntity\022#.modlock.wasm.objects.Obj" + "ectRequest\032%.modlock.wasm.entities.Entit" + "yResponse\022M\n\006AddBot\022 .modlock.wasm.playe" + "rs.BotOptions\032!.modlock.wasm.players.Bot" + "Response\022E\n\tRemoveBot\022#.modlock.wasm.pla" + "yers.PlayerRequest\032\023.modlock.wasm.Empty\022" + "=\n\nBlockInput\022\032.modlock.wasm.InputReques" + "t\032\023.modlock.wasm.Empty\022I\n\020BlockPlayerInp" + "ut\022 .modlock.wasm.PlayerInputRequest\032\023.m" + "odlock.wasm.Empty\022>\n\005Press\022 .modlock.was" + "m.PlayerInputRequest\032\023.modlock.wasm.Empt" + "y\022=\n\nWatchInput\022\032.modlock.wasm.InputRequ" + "est\032\023.modlock.wasm.Empty\022B\n\nRemapInput\022\037" + ".modlock.wasm.RemapInputRequest\032\023.modloc" + "k.wasm.Empty\0225\n\002Ui\022\032.modlock.wasm.ui.UiR" + "equest\032\023.modlock.wasm.Empty\022D\n\013CallServi" + "ce\022\031.modlock.wasm.ServiceCall\032\032.modlock." + "wasm.ServiceReply\022[\n\020StartServiceCall\022%." + "modlock.wasm.StartServiceCallRequest\032 .m" + "odlock.wasm.ServiceCallStarted\022[\n\014Create" + "Entity\022$.modlock.wasm.entities.EntityOpt" + "ions\032%.modlock.wasm.entities.EntityRespo" + "nse\022Z\n\tFireInput\022\'.modlock.wasm.entities" + ".FireInputRequest\032$.modlock.wasm.entitie" + "s.AliveResponse\022Z\n\014RemoveEntity\022$.modloc" + "k.wasm.entities.EntityRequest\032$.modlock." + "wasm.entities.AliveResponse\022W\n\020ShowEntit" + "yOnlyTo\022..modlock.wasm.entities.ShowEnti" + "tyOnlyToRequest\032\023.modlock.wasm.Empty\022L\n\017" + "ShowEntityToAll\022$.modlock.wasm.entities." + "EntityRequest\032\023.modlock.wasm.Empty\022I\n\010Sp" + "awnNpc\022\035.modlock.wasm.npcs.NpcOptions\032\036." + "modlock.wasm.npcs.NpcResponse\022M\n\007ReadNpc" + "\022\035.modlock.wasm.npcs.NpcRequest\032#.modloc" + "k.wasm.npcs.NpcStateResponse\022R\n\007MoveNpc\022" + "!.modlock.wasm.npcs.MoveNpcRequest\032$.mod" + "lock.wasm.entities.AliveResponse\022\\\n\014SetN" + "pcHealth\022&.modlock.wasm.npcs.SetNpcHealt" + "hRequest\032$.modlock.wasm.entities.AliveRe" + "sponse\022P\n\tRemoveNpc\022\035.modlock.wasm.npcs." + "NpcRequest\032$.modlock.wasm.entities.Alive" + "Response\022a\n\014CreatePickup\022*.modlock.wasm." + "entities.CreatePickupRequest\032%.modlock.w" + "asm.entities.PickupResponse\022[\n\rPickupPre" + "sent\022$.modlock.wasm.entities.PickupReque" "st\032$.modlock.wasm.entities.AliveResponse" - "\022a\n\014CreatePickup\022*.modlock.wasm.entities" - ".CreatePickupRequest\032%.modlock.wasm.enti" - "ties.PickupResponse\022[\n\rPickupPresent\022$.m" - "odlock.wasm.entities.PickupRequest\032$.mod" - "lock.wasm.entities.AliveResponse\022Z\n\014Remo" - "vePickup\022$.modlock.wasm.entities.PickupR" - "equest\032$.modlock.wasm.entities.AliveResp" - "onse\022c\n\014FindEntities\022*.modlock.wasm.enti" - "ties.FindEntitiesRequest\032\'.modlock.wasm." - "entities.EntitiesResponse\022o\n\022FindEntitie" - "sByName\0220.modlock.wasm.entities.FindEnti" - "tiesByNameRequest\032\'.modlock.wasm.entitie" - "s.EntitiesResponse\022d\n\016RemoveEntities\022,.m" - "odlock.wasm.entities.RemoveEntitiesReque" - "st\032$.modlock.wasm.entities.CountResponse" - "\0224\n\010ClearMap\022\023.modlock.wasm.Empty\032\023.modl" - "ock.wasm.Empty\022>\n\006Damage\022\037.modlock.wasm." - "combat.HitOptions\032\023.modlock.wasm.Empty\022C" - "\n\nKillEntity\022 .modlock.wasm.combat.KillO" - "ptions\032\023.modlock.wasm.Empty\022N\n\005Trace\022!.m" - "odlock.wasm.combat.TraceOptions\032\".modloc" - "k.wasm.combat.TraceResponse\022I\n\013RestoreNp" - "cs\022%.modlock.wasm.npcs.RestoreNpcsReques" - "t\032\023.modlock.wasm.Empty\0228\n\005Pause\022\032.modloc" - "k.wasm.PauseRequest\032\023.modlock.wasm.Empty" - "\022C\n\nMatchClock\022\023.modlock.wasm.Empty\032 .mo" - "dlock.wasm.MatchClockResponse\022J\n\016HoldMat" - "chClock\022#.modlock.wasm.HoldMatchClockReq" - "uest\032\023.modlock.wasm.Empty\0227\n\004Rift\022\023.modl" - "ock.wasm.Empty\032\032.modlock.wasm.RiftRespon" - "se\022@\n\tStartRift\022\036.modlock.wasm.StartRift" - "Request\032\023.modlock.wasm.Empty\022K\n\nMoveEnti" - "ty\022(.modlock.wasm.entities.MoveEntityReq" - "uest\032\023.modlock.wasm.Empty\022K\n\nPushEntity\022" - "(.modlock.wasm.entities.PushEntityReques" - "t\032\023.modlock.wasm.Empty\022H\n\tEmitSound\022&.mo" - "dlock.wasm.effects.EmitSoundRequest\032\023.mo" - "dlock.wasm.Empty\022@\n\004Kill\022#.modlock.wasm." - "players.PlayerRequest\032\023.modlock.wasm.Emp" - "ty\022M\n\013SetVelocity\022).modlock.wasm.movemen" - "t.SetVelocityRequest\032\023.modlock.wasm.Empt" - "y\022M\n\007Buttons\022#.modlock.wasm.players.Play" - "erRequest\032\035.modlock.wasm.ButtonsResponse" - "\022Q\n\rWatchMovement\022+.modlock.wasm.movemen" - "t.WatchMovementRequest\032\023.modlock.wasm.Em" - "pty\022O\n\020WatchProjectiles\022&.modlock.wasm.c" - "ombat.ProjectileOptions\032\023.modlock.wasm.E" - "mpty2\310\n\n\003Mod\022<\n\005Start\022\030.modlock.wasm.Sta" - "rtEvent\032\031.modlock.wasm.StartResult\0226\n\005Fr" - "ame\022\030.modlock.wasm.FrameEvent\032\023.modlock." - "wasm.Empty\022B\n\007Command\022\032.modlock.wasm.Com" - "mandEvent\032\033.modlock.wasm.CommandResult\0224" - "\n\004Chat\022\027.modlock.wasm.ChatEvent\032\023.modloc" - "k.wasm.Empty\0226\n\005World\022\030.modlock.wasm.Wor" - "ldEvent\032\023.modlock.wasm.Empty\022=\n\007UiPress\022" - "\035.modlock.wasm.ui.UiPressEvent\032\023.modlock" - ".wasm.Empty\022=\n\007UiInput\022\035.modlock.wasm.ui" - ".UiInputEvent\032\023.modlock.wasm.Empty\022>\n\005Se" - "rve\022\031.modlock.wasm.ServiceCall\032\032.modlock" - ".wasm.ServiceReply\022M\n\006Damage\022 .modlock.w" - "asm.combat.DamageEvent\032!.modlock.wasm.co" - "mbat.DamageResult\022A\n\007Damaged\022!.modlock.w" - "asm.combat.DamagedEvent\032\023.modlock.wasm.E" - "mpty\0226\n\005Input\022\030.modlock.wasm.InputEvent\032" - "\023.modlock.wasm.Empty\022D\n\010Restored\022#.modlo" - "ck.wasm.players.RestoredEvent\032\023.modlock." - "wasm.Empty\022I\n\014NpcsRestored\022$.modlock.was" - "m.npcs.NpcsRestoredEvent\032\023.modlock.wasm." - "Empty\022\?\n\006Launch\022 .modlock.wasm.combat.La" - "unchEvent\032\023.modlock.wasm.Empty\022\?\n\006Impact" - "\022 .modlock.wasm.combat.ImpactEvent\032\023.mod" - "lock.wasm.Empty\022A\n\006Landed\022\".modlock.wasm" - ".movement.LandedEvent\032\023.modlock.wasm.Emp" - "ty\022Q\n\016SettingChanged\022*.modlock.wasm.sett" - "ings.SettingChangedEvent\032\023.modlock.wasm." - "Empty\022L\n\014PlayerJoined\022\'.modlock.wasm.pla" - "yers.PlayerJoinedEvent\032\023.modlock.wasm.Em" - "pty\022H\n\nPlayerLeft\022%.modlock.wasm.players" - ".PlayerLeftEvent\032\023.modlock.wasm.Empty\022P\n" - "\016PlayersChanged\022).modlock.wasm.players.P" - "layersChangedEvent\032\023.modlock.wasm.EmptyB" - "*Z(github.com/paralin/modlock/src/wasm;w" - "asmb\006proto3" + "\022Z\n\014RemovePickup\022$.modlock.wasm.entities" + ".PickupRequest\032$.modlock.wasm.entities.A" + "liveResponse\022c\n\014FindEntities\022*.modlock.w" + "asm.entities.FindEntitiesRequest\032\'.modlo" + "ck.wasm.entities.EntitiesResponse\022o\n\022Fin" + "dEntitiesByName\0220.modlock.wasm.entities." + "FindEntitiesByNameRequest\032\'.modlock.wasm" + ".entities.EntitiesResponse\022d\n\016RemoveEnti" + "ties\022,.modlock.wasm.entities.RemoveEntit" + "iesRequest\032$.modlock.wasm.entities.Count" + "Response\0224\n\010ClearMap\022\023.modlock.wasm.Empt" + "y\032\023.modlock.wasm.Empty\022>\n\006Damage\022\037.modlo" + "ck.wasm.combat.HitOptions\032\023.modlock.wasm" + ".Empty\022C\n\nKillEntity\022 .modlock.wasm.comb" + "at.KillOptions\032\023.modlock.wasm.Empty\022N\n\005T" + "race\022!.modlock.wasm.combat.TraceOptions\032" + "\".modlock.wasm.combat.TraceResponse\022I\n\013R" + "estoreNpcs\022%.modlock.wasm.npcs.RestoreNp" + "csRequest\032\023.modlock.wasm.Empty\0228\n\005Pause\022" + "\032.modlock.wasm.PauseRequest\032\023.modlock.wa" + "sm.Empty\022C\n\nMatchClock\022\023.modlock.wasm.Em" + "pty\032 .modlock.wasm.MatchClockResponse\022J\n" + "\016HoldMatchClock\022#.modlock.wasm.HoldMatch" + "ClockRequest\032\023.modlock.wasm.Empty\0227\n\004Rif" + "t\022\023.modlock.wasm.Empty\032\032.modlock.wasm.Ri" + "ftResponse\022@\n\tStartRift\022\036.modlock.wasm.S" + "tartRiftRequest\032\023.modlock.wasm.Empty\022K\n\n" + "MoveEntity\022(.modlock.wasm.entities.MoveE" + "ntityRequest\032\023.modlock.wasm.Empty\022K\n\nPus" + "hEntity\022(.modlock.wasm.entities.PushEnti" + "tyRequest\032\023.modlock.wasm.Empty\022H\n\tEmitSo" + "und\022&.modlock.wasm.effects.EmitSoundRequ" + "est\032\023.modlock.wasm.Empty\022@\n\004Kill\022#.modlo" + "ck.wasm.players.PlayerRequest\032\023.modlock." + "wasm.Empty\022M\n\013SetVelocity\022).modlock.wasm" + ".movement.SetVelocityRequest\032\023.modlock.w" + "asm.Empty\022M\n\007Buttons\022#.modlock.wasm.play" + "ers.PlayerRequest\032\035.modlock.wasm.Buttons" + "Response\022Q\n\rWatchMovement\022+.modlock.wasm" + ".movement.WatchMovementRequest\032\023.modlock" + ".wasm.Empty\022O\n\020WatchProjectiles\022&.modloc" + "k.wasm.combat.ProjectileOptions\032\023.modloc" + "k.wasm.Empty2\222\013\n\003Mod\022<\n\005Start\022\030.modlock." + "wasm.StartEvent\032\031.modlock.wasm.StartResu" + "lt\0226\n\005Frame\022\030.modlock.wasm.FrameEvent\032\023." + "modlock.wasm.Empty\022B\n\007Command\022\032.modlock." + "wasm.CommandEvent\032\033.modlock.wasm.Command" + "Result\0224\n\004Chat\022\027.modlock.wasm.ChatEvent\032" + "\023.modlock.wasm.Empty\0226\n\005World\022\030.modlock." + "wasm.WorldEvent\032\023.modlock.wasm.Empty\022=\n\007" + "UiPress\022\035.modlock.wasm.ui.UiPressEvent\032\023" + ".modlock.wasm.Empty\022=\n\007UiInput\022\035.modlock" + ".wasm.ui.UiInputEvent\032\023.modlock.wasm.Emp" + "ty\022>\n\005Serve\022\031.modlock.wasm.ServiceCall\032\032" + ".modlock.wasm.ServiceReply\022H\n\016ServiceRep" + "lied\022!.modlock.wasm.ServiceRepliedEvent\032" + "\023.modlock.wasm.Empty\022M\n\006Damage\022 .modlock" + ".wasm.combat.DamageEvent\032!.modlock.wasm." + "combat.DamageResult\022A\n\007Damaged\022!.modlock" + ".wasm.combat.DamagedEvent\032\023.modlock.wasm" + ".Empty\0226\n\005Input\022\030.modlock.wasm.InputEven" + "t\032\023.modlock.wasm.Empty\022D\n\010Restored\022#.mod" + "lock.wasm.players.RestoredEvent\032\023.modloc" + "k.wasm.Empty\022I\n\014NpcsRestored\022$.modlock.w" + "asm.npcs.NpcsRestoredEvent\032\023.modlock.was" + "m.Empty\022\?\n\006Launch\022 .modlock.wasm.combat." + "LaunchEvent\032\023.modlock.wasm.Empty\022\?\n\006Impa" + "ct\022 .modlock.wasm.combat.ImpactEvent\032\023.m" + "odlock.wasm.Empty\022A\n\006Landed\022\".modlock.wa" + "sm.movement.LandedEvent\032\023.modlock.wasm.E" + "mpty\022Q\n\016SettingChanged\022*.modlock.wasm.se" + "ttings.SettingChangedEvent\032\023.modlock.was" + "m.Empty\022L\n\014PlayerJoined\022\'.modlock.wasm.p" + "layers.PlayerJoinedEvent\032\023.modlock.wasm." + "Empty\022H\n\nPlayerLeft\022%.modlock.wasm.playe" + "rs.PlayerLeftEvent\032\023.modlock.wasm.Empty\022" + "P\n\016PlayersChanged\022).modlock.wasm.players" + ".PlayersChangedEvent\032\023.modlock.wasm.Empt" + "yB*Z(github.com/paralin/modlock/src/wasm" + ";wasmb\006proto3" }; static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto_deps[16] = { @@ -941,13 +1079,13 @@ static ::absl::once_flag descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto = { false, false, - 12731, + 13293, descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto, "github.com/paralin/modlock/src/wasm/wasm.proto", &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto_once, descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto_deps, 16, - 15, + 18, schemas, file_default_instances, TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto::offsets, @@ -956,6 +1094,12 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_github_2ecom_2 }; namespace modlock { namespace wasm { +const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL ServiceFailure_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto); + return file_level_enum_descriptors_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto[0]; +} +PROTOBUF_CONSTINIT const uint32_t ServiceFailure_internal_data_[] = { + 262144u, 0u, }; // =================================================================== class Call::_Internal { @@ -4680,6 +4824,1037 @@ ::google::protobuf::Metadata ServiceReply::GetMetadata() const { } // =================================================================== +class StartServiceCallRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_._has_bits_); +}; + +StartServiceCallRequest::StartServiceCallRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, StartServiceCallRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.wasm.StartServiceCallRequest) +} +PROTOBUF_NDEBUG_INLINE StartServiceCallRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::modlock::wasm::StartServiceCallRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + service_(arena, from.service_), + method_(arena, from.method_), + payload_(arena, from.payload_) {} + +StartServiceCallRequest::StartServiceCallRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const StartServiceCallRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, StartServiceCallRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + StartServiceCallRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.timeout_milliseconds_ = from._impl_.timeout_milliseconds_; + + // @@protoc_insertion_point(copy_constructor:modlock.wasm.StartServiceCallRequest) +} +PROTOBUF_NDEBUG_INLINE StartServiceCallRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + service_(arena), + method_(arena), + payload_(arena) {} + +inline void StartServiceCallRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.timeout_milliseconds_ = {}; +} +StartServiceCallRequest::~StartServiceCallRequest() { + // @@protoc_insertion_point(destructor:modlock.wasm.StartServiceCallRequest) + SharedDtor(*this); +} +inline void StartServiceCallRequest::SharedDtor(MessageLite& self) { + StartServiceCallRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.service_.Destroy(); + this_._impl_.method_.Destroy(); + this_._impl_.payload_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL StartServiceCallRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) StartServiceCallRequest(arena); +} +constexpr auto StartServiceCallRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(StartServiceCallRequest), + alignof(StartServiceCallRequest)); +} +constexpr auto StartServiceCallRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_StartServiceCallRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &StartServiceCallRequest::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &StartServiceCallRequest::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &StartServiceCallRequest::ByteSizeLong, + &StartServiceCallRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_._cached_size_), + false, + }, + &StartServiceCallRequest::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull StartServiceCallRequest_class_data_ = + StartServiceCallRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +StartServiceCallRequest::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&StartServiceCallRequest_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(StartServiceCallRequest_class_data_.tc_table); + return StartServiceCallRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 58, 2> +StartServiceCallRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + StartServiceCallRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::wasm::StartServiceCallRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 timeout_milliseconds = 4; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(StartServiceCallRequest, _impl_.timeout_milliseconds_), 3>(), + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_.timeout_milliseconds_)}}, + // string service = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_.service_)}}, + // string method = 2; + {::_pbi::TcParser::FastUS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_.method_)}}, + // bytes payload = 3; + {::_pbi::TcParser::FastBS1, + {26, 2, 0, + PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_.payload_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string service = 1; + {PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_.service_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string method = 2; + {PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_.method_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes payload = 3; + {PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_.payload_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // uint32 timeout_milliseconds = 4; + {PROTOBUF_FIELD_OFFSET(StartServiceCallRequest, _impl_.timeout_milliseconds_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + "\44\7\6\0\0\0\0\0" + "modlock.wasm.StartServiceCallRequest" + "service" + "method" + }}, +}; +PROTOBUF_NOINLINE void StartServiceCallRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.wasm.StartServiceCallRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.service_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.method_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.payload_.ClearNonDefaultToEmpty(); + } + } + _impl_.timeout_milliseconds_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL StartServiceCallRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const StartServiceCallRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL StartServiceCallRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const StartServiceCallRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.wasm.StartServiceCallRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string service = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_service().empty()) { + const ::std::string& _s = this_._internal_service(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.wasm.StartServiceCallRequest.service"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // string method = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_method().empty()) { + const ::std::string& _s = this_._internal_method(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.wasm.StartServiceCallRequest.method"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + // bytes payload = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_payload().empty()) { + const ::std::string& _s = this_._internal_payload(); + target = stream->WriteBytesMaybeAliased(3, _s, target); + } + } + + // uint32 timeout_milliseconds = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_timeout_milliseconds() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_timeout_milliseconds(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.wasm.StartServiceCallRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t StartServiceCallRequest::ByteSizeLong(const MessageLite& base) { + const StartServiceCallRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t StartServiceCallRequest::ByteSizeLong() const { + const StartServiceCallRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.wasm.StartServiceCallRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // string service = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_service().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_service()); + } + } + // string method = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_method().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_method()); + } + } + // bytes payload = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_payload().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_payload()); + } + } + // uint32 timeout_milliseconds = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_timeout_milliseconds() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_timeout_milliseconds()); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void StartServiceCallRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.wasm.StartServiceCallRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_service().empty()) { + _this->_internal_set_service(from._internal_service()); + } else { + if (_this->_impl_.service_.IsDefault()) { + _this->_internal_set_service(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_method().empty()) { + _this->_internal_set_method(from._internal_method()); + } else { + if (_this->_impl_.method_.IsDefault()) { + _this->_internal_set_method(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_payload().empty()) { + _this->_internal_set_payload(from._internal_payload()); + } else { + if (_this->_impl_.payload_.IsDefault()) { + _this->_internal_set_payload(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_timeout_milliseconds() != 0) { + _this->_impl_.timeout_milliseconds_ = from._impl_.timeout_milliseconds_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void StartServiceCallRequest::CopyFrom(const StartServiceCallRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.wasm.StartServiceCallRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void StartServiceCallRequest::InternalSwap(StartServiceCallRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.service_, &other->_impl_.service_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.method_, &other->_impl_.method_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.payload_, &other->_impl_.payload_, arena); + swap(_impl_.timeout_milliseconds_, other->_impl_.timeout_milliseconds_); +} + +::google::protobuf::Metadata StartServiceCallRequest::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class ServiceCallStarted::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ServiceCallStarted, _impl_._has_bits_); +}; + +ServiceCallStarted::ServiceCallStarted(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServiceCallStarted_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.wasm.ServiceCallStarted) +} +ServiceCallStarted::ServiceCallStarted( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServiceCallStarted& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServiceCallStarted_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE ServiceCallStarted::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void ServiceCallStarted::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.call_ = {}; +} +ServiceCallStarted::~ServiceCallStarted() { + // @@protoc_insertion_point(destructor:modlock.wasm.ServiceCallStarted) + SharedDtor(*this); +} +inline void ServiceCallStarted::SharedDtor(MessageLite& self) { + ServiceCallStarted& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL ServiceCallStarted::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ServiceCallStarted(arena); +} +constexpr auto ServiceCallStarted::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(ServiceCallStarted), + alignof(ServiceCallStarted)); +} +constexpr auto ServiceCallStarted::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_ServiceCallStarted_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ServiceCallStarted::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ServiceCallStarted::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &ServiceCallStarted::ByteSizeLong, + &ServiceCallStarted::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ServiceCallStarted, _impl_._cached_size_), + false, + }, + &ServiceCallStarted::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull ServiceCallStarted_class_data_ = + ServiceCallStarted::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ServiceCallStarted::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&ServiceCallStarted_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(ServiceCallStarted_class_data_.tc_table); + return ServiceCallStarted_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> +ServiceCallStarted::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ServiceCallStarted, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ServiceCallStarted_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::wasm::ServiceCallStarted>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint64 call = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(ServiceCallStarted, _impl_.call_), 0>(), + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(ServiceCallStarted, _impl_.call_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 call = 1; + {PROTOBUF_FIELD_OFFSET(ServiceCallStarted, _impl_.call_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void ServiceCallStarted::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.wasm.ServiceCallStarted) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.call_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL ServiceCallStarted::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const ServiceCallStarted& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL ServiceCallStarted::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const ServiceCallStarted& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.wasm.ServiceCallStarted) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 call = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_call() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_call(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.wasm.ServiceCallStarted) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t ServiceCallStarted::ByteSizeLong(const MessageLite& base) { + const ServiceCallStarted& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t ServiceCallStarted::ByteSizeLong() const { + const ServiceCallStarted& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.wasm.ServiceCallStarted) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // uint64 call = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_call() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_call()); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void ServiceCallStarted::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.wasm.ServiceCallStarted) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_call() != 0) { + _this->_impl_.call_ = from._impl_.call_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void ServiceCallStarted::CopyFrom(const ServiceCallStarted& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.wasm.ServiceCallStarted) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ServiceCallStarted::InternalSwap(ServiceCallStarted* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.call_, other->_impl_.call_); +} + +::google::protobuf::Metadata ServiceCallStarted::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class ServiceRepliedEvent::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_._has_bits_); +}; + +ServiceRepliedEvent::ServiceRepliedEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServiceRepliedEvent_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.wasm.ServiceRepliedEvent) +} +PROTOBUF_NDEBUG_INLINE ServiceRepliedEvent::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::modlock::wasm::ServiceRepliedEvent& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + payload_(arena, from.payload_), + error_(arena, from.error_) {} + +ServiceRepliedEvent::ServiceRepliedEvent( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const ServiceRepliedEvent& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServiceRepliedEvent_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ServiceRepliedEvent* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, call_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, call_), + offsetof(Impl_, failure_) - + offsetof(Impl_, call_) + + sizeof(Impl_::failure_)); + + // @@protoc_insertion_point(copy_constructor:modlock.wasm.ServiceRepliedEvent) +} +PROTOBUF_NDEBUG_INLINE ServiceRepliedEvent::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + payload_(arena), + error_(arena) {} + +inline void ServiceRepliedEvent::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, call_), + 0, + offsetof(Impl_, failure_) - + offsetof(Impl_, call_) + + sizeof(Impl_::failure_)); +} +ServiceRepliedEvent::~ServiceRepliedEvent() { + // @@protoc_insertion_point(destructor:modlock.wasm.ServiceRepliedEvent) + SharedDtor(*this); +} +inline void ServiceRepliedEvent::SharedDtor(MessageLite& self) { + ServiceRepliedEvent& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.payload_.Destroy(); + this_._impl_.error_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL ServiceRepliedEvent::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ServiceRepliedEvent(arena); +} +constexpr auto ServiceRepliedEvent::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ServiceRepliedEvent), + alignof(ServiceRepliedEvent)); +} +constexpr auto ServiceRepliedEvent::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_ServiceRepliedEvent_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ServiceRepliedEvent::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ServiceRepliedEvent::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &ServiceRepliedEvent::ByteSizeLong, + &ServiceRepliedEvent::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_._cached_size_), + false, + }, + &ServiceRepliedEvent::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull ServiceRepliedEvent_class_data_ = + ServiceRepliedEvent::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ServiceRepliedEvent::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&ServiceRepliedEvent_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(ServiceRepliedEvent_class_data_.tc_table); + return ServiceRepliedEvent_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 46, 2> +ServiceRepliedEvent::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ServiceRepliedEvent_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::wasm::ServiceRepliedEvent>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // string error = 4; + {::_pbi::TcParser::FastUS1, + {34, 1, 0, + PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.error_)}}, + // uint64 call = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(ServiceRepliedEvent, _impl_.call_), 2>(), + {8, 2, 0, + PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.call_)}}, + // bytes payload = 2; + {::_pbi::TcParser::FastBS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.payload_)}}, + // .modlock.wasm.ServiceFailure failure = 3; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ServiceRepliedEvent, _impl_.failure_), 3>(), + {24, 3, 0, + PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.failure_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 call = 1; + {PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.call_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // bytes payload = 2; + {PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.payload_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // .modlock.wasm.ServiceFailure failure = 3; + {PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.failure_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, + // string error = 4; + {PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.error_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\40\0\0\0\5\0\0\0" + "modlock.wasm.ServiceRepliedEvent" + "error" + }}, +}; +PROTOBUF_NOINLINE void ServiceRepliedEvent::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.wasm.ServiceRepliedEvent) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.payload_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.error_.ClearNonDefaultToEmpty(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000000cU)) { + ::memset(&_impl_.call_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.failure_) - + reinterpret_cast(&_impl_.call_)) + sizeof(_impl_.failure_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL ServiceRepliedEvent::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const ServiceRepliedEvent& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL ServiceRepliedEvent::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const ServiceRepliedEvent& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.wasm.ServiceRepliedEvent) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 call = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_call() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_call(), target); + } + } + + // bytes payload = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_payload().empty()) { + const ::std::string& _s = this_._internal_payload(); + target = stream->WriteBytesMaybeAliased(2, _s, target); + } + } + + // .modlock.wasm.ServiceFailure failure = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_failure() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this_._internal_failure(), target); + } + } + + // string error = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_error().empty()) { + const ::std::string& _s = this_._internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.wasm.ServiceRepliedEvent.error"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.wasm.ServiceRepliedEvent) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t ServiceRepliedEvent::ByteSizeLong(const MessageLite& base) { + const ServiceRepliedEvent& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t ServiceRepliedEvent::ByteSizeLong() const { + const ServiceRepliedEvent& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.wasm.ServiceRepliedEvent) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // bytes payload = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_payload().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_payload()); + } + } + // string error = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_error().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_error()); + } + } + // uint64 call = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_call() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_call()); + } + } + // .modlock.wasm.ServiceFailure failure = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_failure() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_failure()); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void ServiceRepliedEvent::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.wasm.ServiceRepliedEvent) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_payload().empty()) { + _this->_internal_set_payload(from._internal_payload()); + } else { + if (_this->_impl_.payload_.IsDefault()) { + _this->_internal_set_payload(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_error().empty()) { + _this->_internal_set_error(from._internal_error()); + } else { + if (_this->_impl_.error_.IsDefault()) { + _this->_internal_set_error(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_call() != 0) { + _this->_impl_.call_ = from._impl_.call_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_failure() != 0) { + _this->_impl_.failure_ = from._impl_.failure_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void ServiceRepliedEvent::CopyFrom(const ServiceRepliedEvent& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.wasm.ServiceRepliedEvent) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ServiceRepliedEvent::InternalSwap(ServiceRepliedEvent* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.payload_, &other->_impl_.payload_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.failure_) + + sizeof(ServiceRepliedEvent::_impl_.failure_) + - PROTOBUF_FIELD_OFFSET(ServiceRepliedEvent, _impl_.call_)>( + reinterpret_cast(&_impl_.call_), + reinterpret_cast(&other->_impl_.call_)); +} + +::google::protobuf::Metadata ServiceRepliedEvent::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + class LogRequest::_Internal { public: using HasBits = diff --git a/src/wasm/wasm.pb.go b/src/wasm/wasm.pb.go index 0a88181d..faac84b7 100644 --- a/src/wasm/wasm.pb.go +++ b/src/wasm/wasm.pb.go @@ -9,12 +9,58 @@ import ( io "io" math "math" slices "slices" + strconv "strconv" protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite" json "github.com/aperturerobotics/protobuf-go-lite/json" movement "github.com/paralin/modlock/src/wasm/movement" ) +// ServiceFailure says why a service call ended without an answer. +type ServiceFailure int32 + +const ( + // SERVICE_FAILURE_NONE is an answered call. + ServiceFailure_SERVICE_FAILURE_NONE ServiceFailure = 0 + // SERVICE_FAILURE_REFUSED is a call the service answered with an error. + ServiceFailure_SERVICE_FAILURE_REFUSED ServiceFailure = 1 + // SERVICE_FAILURE_TIMEOUT is a call that waited out its timeout. + ServiceFailure_SERVICE_FAILURE_TIMEOUT ServiceFailure = 2 + // SERVICE_FAILURE_UNAVAILABLE is a call to a service nobody provides + // here, or one more than the host keeps waiting for a mod. + ServiceFailure_SERVICE_FAILURE_UNAVAILABLE ServiceFailure = 3 +) + +// Enum value maps for ServiceFailure. +var ( + ServiceFailure_name = map[int32]string{ + 0: "SERVICE_FAILURE_NONE", + 1: "SERVICE_FAILURE_REFUSED", + 2: "SERVICE_FAILURE_TIMEOUT", + 3: "SERVICE_FAILURE_UNAVAILABLE", + } + ServiceFailure_value = map[string]int32{ + "SERVICE_FAILURE_NONE": 0, + "SERVICE_FAILURE_REFUSED": 1, + "SERVICE_FAILURE_TIMEOUT": 2, + "SERVICE_FAILURE_UNAVAILABLE": 3, + } +) + +func (x ServiceFailure) Enum() *ServiceFailure { + p := new(ServiceFailure) + *p = x + return p +} + +func (x ServiceFailure) String() string { + name, valid := ServiceFailure_name[int32(x)] + if valid { + return name + } + return strconv.Itoa(int(x)) +} + // Call is one method call across the boundary: a mod calling the game // through modlock.host_call, or the game delivering an event through the // mod's modlock_event export. @@ -418,6 +464,123 @@ func (x *ServiceReply) GetPayload() []byte { return nil } +// StartServiceCallRequest calls one method of a service the host provides, +// to be answered in a later frame. +type StartServiceCallRequest struct { + unknownFields []byte + // Service names the service, such as "arena.match". + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + // Method names the method within the service. + Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` + // Payload is the call's argument. + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + // TimeoutMilliseconds is how long the mod waits for the answer; zero or + // more than 30 seconds waits 30 seconds. + TimeoutMilliseconds uint32 `protobuf:"varint,4,opt,name=timeout_milliseconds,json=timeoutMilliseconds,proto3" json:"timeoutMilliseconds,omitempty"` +} + +func (x *StartServiceCallRequest) Reset() { + *x = StartServiceCallRequest{} +} + +func (*StartServiceCallRequest) ProtoMessage() {} + +func (x *StartServiceCallRequest) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *StartServiceCallRequest) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *StartServiceCallRequest) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *StartServiceCallRequest) GetTimeoutMilliseconds() uint32 { + if x != nil { + return x.TimeoutMilliseconds + } + return 0 +} + +// ServiceCallStarted numbers a started service call. +type ServiceCallStarted struct { + unknownFields []byte + // Call is the number the call's ServiceReplied event carries, unique for + // the mod's instance. + Call uint64 `protobuf:"varint,1,opt,name=call,proto3" json:"call,omitempty"` +} + +func (x *ServiceCallStarted) Reset() { + *x = ServiceCallStarted{} +} + +func (*ServiceCallStarted) ProtoMessage() {} + +func (x *ServiceCallStarted) GetCall() uint64 { + if x != nil { + return x.Call + } + return 0 +} + +// ServiceRepliedEvent ends one started service call. +type ServiceRepliedEvent struct { + unknownFields []byte + // Call is the number StartServiceCall returned. + Call uint64 `protobuf:"varint,1,opt,name=call,proto3" json:"call,omitempty"` + // Payload is the answer, when failure is none. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + // Failure says why the call ended without an answer. + Failure ServiceFailure `protobuf:"varint,3,opt,name=failure,proto3" json:"failure,omitempty"` + // Error describes the failure. + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *ServiceRepliedEvent) Reset() { + *x = ServiceRepliedEvent{} +} + +func (*ServiceRepliedEvent) ProtoMessage() {} + +func (x *ServiceRepliedEvent) GetCall() uint64 { + if x != nil { + return x.Call + } + return 0 +} + +func (x *ServiceRepliedEvent) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *ServiceRepliedEvent) GetFailure() ServiceFailure { + if x != nil { + return x.Failure + } + return ServiceFailure_SERVICE_FAILURE_NONE +} + +func (x *ServiceRepliedEvent) GetError() string { + if x != nil { + return x.Error + } + return "" +} + // LogRequest carries one log line. type LogRequest struct { unknownFields []byte @@ -696,6 +859,60 @@ func (m *ServiceReply) CloneMessageVT() protobuf_go_lite.CloneMessage { return m.CloneVT() } +func (m *StartServiceCallRequest) CloneVT() *StartServiceCallRequest { + if m == nil { + return (*StartServiceCallRequest)(nil) + } + r := new(StartServiceCallRequest) + r.Service = m.Service + r.Method = m.Method + r.TimeoutMilliseconds = m.TimeoutMilliseconds + r.Payload = protobuf_go_lite.CloneBytes(m.Payload) + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *StartServiceCallRequest) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + +func (m *ServiceCallStarted) CloneVT() *ServiceCallStarted { + if m == nil { + return (*ServiceCallStarted)(nil) + } + r := new(ServiceCallStarted) + r.Call = m.Call + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *ServiceCallStarted) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + +func (m *ServiceRepliedEvent) CloneVT() *ServiceRepliedEvent { + if m == nil { + return (*ServiceRepliedEvent)(nil) + } + r := new(ServiceRepliedEvent) + r.Call = m.Call + r.Failure = m.Failure + r.Error = m.Error + r.Payload = protobuf_go_lite.CloneBytes(m.Payload) + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *ServiceRepliedEvent) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + func (m *LogRequest) CloneVT() *LogRequest { if m == nil { return (*LogRequest)(nil) @@ -1033,6 +1250,84 @@ func (this *ServiceReply) EqualMessageVT(thatMsg any) bool { return this.EqualVT(that) } +func (this *StartServiceCallRequest) EqualVT(that *StartServiceCallRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Service != that.Service { + return false + } + if this.Method != that.Method { + return false + } + if !protobuf_go_lite.EqualBytes(this.Payload, that.Payload) { + return false + } + if this.TimeoutMilliseconds != that.TimeoutMilliseconds { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StartServiceCallRequest) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*StartServiceCallRequest) + if !ok { + return false + } + return this.EqualVT(that) +} + +func (this *ServiceCallStarted) EqualVT(that *ServiceCallStarted) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Call != that.Call { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ServiceCallStarted) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*ServiceCallStarted) + if !ok { + return false + } + return this.EqualVT(that) +} + +func (this *ServiceRepliedEvent) EqualVT(that *ServiceRepliedEvent) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Call != that.Call { + return false + } + if !protobuf_go_lite.EqualBytes(this.Payload, that.Payload) { + return false + } + if this.Failure != that.Failure { + return false + } + if this.Error != that.Error { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ServiceRepliedEvent) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*ServiceRepliedEvent) + if !ok { + return false + } + return this.EqualVT(that) +} + func (this *LogRequest) EqualVT(that *LogRequest) bool { if this == that { return true @@ -1096,6 +1391,46 @@ func (this *PrecacheOptions) EqualMessageVT(thatMsg any) bool { return this.EqualVT(that) } +// MarshalProtoJSON marshals the ServiceFailure to JSON. +func (x ServiceFailure) MarshalProtoJSON(s *json.MarshalState) { + s.WriteEnum(int32(x), ServiceFailure_name) +} + +// MarshalText marshals the ServiceFailure to text. +func (x ServiceFailure) MarshalText() ([]byte, error) { + return []byte(json.GetEnumString(int32(x), ServiceFailure_name)), nil +} + +// MarshalJSON marshals the ServiceFailure to JSON. +func (x ServiceFailure) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the ServiceFailure from JSON. +func (x *ServiceFailure) UnmarshalProtoJSON(s *json.UnmarshalState) { + v := s.ReadEnum(ServiceFailure_value) + if err := s.Err(); err != nil { + s.SetErrorf("could not read ServiceFailure enum: %v", err) + return + } + *x = ServiceFailure(v) +} + +// UnmarshalText unmarshals the ServiceFailure from text. +func (x *ServiceFailure) UnmarshalText(b []byte) error { + i, err := json.ParseEnumString(string(b), ServiceFailure_value) + if err != nil { + return err + } + *x = ServiceFailure(i) + return nil +} + +// UnmarshalJSON unmarshals the ServiceFailure from JSON. +func (x *ServiceFailure) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + // MarshalProtoJSON marshals the Call message to JSON. func (x *Call) MarshalProtoJSON(s *json.MarshalState) { if x == nil { @@ -1763,29 +2098,44 @@ func (x *ServiceReply) UnmarshalJSON(b []byte) error { return json.DefaultUnmarshalerConfig.Unmarshal(b, x) } -// MarshalProtoJSON marshals the LogRequest message to JSON. -func (x *LogRequest) MarshalProtoJSON(s *json.MarshalState) { +// MarshalProtoJSON marshals the StartServiceCallRequest message to JSON. +func (x *StartServiceCallRequest) MarshalProtoJSON(s *json.MarshalState) { if x == nil { s.WriteNil() return } s.WriteObjectStart() var wroteField bool - if x.Message != "" || s.HasField("message") { + if x.Service != "" || s.HasField("service") { s.WriteMoreIf(&wroteField) - s.WriteObjectField("message") - s.WriteString(x.Message) + s.WriteObjectField("service") + s.WriteString(x.Service) + } + if x.Method != "" || s.HasField("method") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("method") + s.WriteString(x.Method) + } + if len(x.Payload) > 0 || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteBytes(x.Payload) + } + if x.TimeoutMilliseconds != 0 || s.HasField("timeoutMilliseconds") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("timeoutMilliseconds") + s.WriteUint32(x.TimeoutMilliseconds) } s.WriteObjectEnd() } -// MarshalJSON marshals the LogRequest to JSON. -func (x *LogRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON marshals the StartServiceCallRequest to JSON. +func (x *StartServiceCallRequest) MarshalJSON() ([]byte, error) { return json.DefaultMarshalerConfig.Marshal(x) } -// UnmarshalProtoJSON unmarshals the LogRequest message from JSON. -func (x *LogRequest) UnmarshalProtoJSON(s *json.UnmarshalState) { +// UnmarshalProtoJSON unmarshals the StartServiceCallRequest message from JSON. +func (x *StartServiceCallRequest) UnmarshalProtoJSON(s *json.UnmarshalState) { if s.ReadNil() { return } @@ -1793,41 +2143,50 @@ func (x *LogRequest) UnmarshalProtoJSON(s *json.UnmarshalState) { switch key { default: s.Skip() // ignore unknown field - case "message": - s.AddField("message") - x.Message = s.ReadString() + case "service": + s.AddField("service") + x.Service = s.ReadString() + case "method": + s.AddField("method") + x.Method = s.ReadString() + case "payload": + s.AddField("payload") + x.Payload = s.ReadBytes() + case "timeout_milliseconds", "timeoutMilliseconds": + s.AddField("timeout_milliseconds") + x.TimeoutMilliseconds = s.ReadUint32() } }) } -// UnmarshalJSON unmarshals the LogRequest from JSON. -func (x *LogRequest) UnmarshalJSON(b []byte) error { +// UnmarshalJSON unmarshals the StartServiceCallRequest from JSON. +func (x *StartServiceCallRequest) UnmarshalJSON(b []byte) error { return json.DefaultUnmarshalerConfig.Unmarshal(b, x) } -// MarshalProtoJSON marshals the ServerCommandRequest message to JSON. -func (x *ServerCommandRequest) MarshalProtoJSON(s *json.MarshalState) { +// MarshalProtoJSON marshals the ServiceCallStarted message to JSON. +func (x *ServiceCallStarted) MarshalProtoJSON(s *json.MarshalState) { if x == nil { s.WriteNil() return } s.WriteObjectStart() var wroteField bool - if x.Command != "" || s.HasField("command") { + if x.Call != 0 || s.HasField("call") { s.WriteMoreIf(&wroteField) - s.WriteObjectField("command") - s.WriteString(x.Command) + s.WriteObjectField("call") + s.WriteUint64(x.Call) } s.WriteObjectEnd() } -// MarshalJSON marshals the ServerCommandRequest to JSON. -func (x *ServerCommandRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON marshals the ServiceCallStarted to JSON. +func (x *ServiceCallStarted) MarshalJSON() ([]byte, error) { return json.DefaultMarshalerConfig.Marshal(x) } -// UnmarshalProtoJSON unmarshals the ServerCommandRequest message from JSON. -func (x *ServerCommandRequest) UnmarshalProtoJSON(s *json.UnmarshalState) { +// UnmarshalProtoJSON unmarshals the ServiceCallStarted message from JSON. +func (x *ServiceCallStarted) UnmarshalProtoJSON(s *json.UnmarshalState) { if s.ReadNil() { return } @@ -1835,9 +2194,159 @@ func (x *ServerCommandRequest) UnmarshalProtoJSON(s *json.UnmarshalState) { switch key { default: s.Skip() // ignore unknown field - case "command": - s.AddField("command") - x.Command = s.ReadString() + case "call": + s.AddField("call") + x.Call = s.ReadUint64() + } + }) +} + +// UnmarshalJSON unmarshals the ServiceCallStarted from JSON. +func (x *ServiceCallStarted) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + +// MarshalProtoJSON marshals the ServiceRepliedEvent message to JSON. +func (x *ServiceRepliedEvent) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Call != 0 || s.HasField("call") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("call") + s.WriteUint64(x.Call) + } + if len(x.Payload) > 0 || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteBytes(x.Payload) + } + if x.Failure != 0 || s.HasField("failure") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("failure") + x.Failure.MarshalProtoJSON(s) + } + if x.Error != "" || s.HasField("error") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("error") + s.WriteString(x.Error) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the ServiceRepliedEvent to JSON. +func (x *ServiceRepliedEvent) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the ServiceRepliedEvent message from JSON. +func (x *ServiceRepliedEvent) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "call": + s.AddField("call") + x.Call = s.ReadUint64() + case "payload": + s.AddField("payload") + x.Payload = s.ReadBytes() + case "failure": + s.AddField("failure") + x.Failure.UnmarshalProtoJSON(s) + case "error": + s.AddField("error") + x.Error = s.ReadString() + } + }) +} + +// UnmarshalJSON unmarshals the ServiceRepliedEvent from JSON. +func (x *ServiceRepliedEvent) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + +// MarshalProtoJSON marshals the LogRequest message to JSON. +func (x *LogRequest) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Message != "" || s.HasField("message") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("message") + s.WriteString(x.Message) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the LogRequest to JSON. +func (x *LogRequest) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the LogRequest message from JSON. +func (x *LogRequest) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "message": + s.AddField("message") + x.Message = s.ReadString() + } + }) +} + +// UnmarshalJSON unmarshals the LogRequest from JSON. +func (x *LogRequest) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + +// MarshalProtoJSON marshals the ServerCommandRequest message to JSON. +func (x *ServerCommandRequest) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Command != "" || s.HasField("command") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("command") + s.WriteString(x.Command) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the ServerCommandRequest to JSON. +func (x *ServerCommandRequest) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the ServerCommandRequest message from JSON. +func (x *ServerCommandRequest) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "command": + s.AddField("command") + x.Command = s.ReadString() } }) } @@ -2438,6 +2947,147 @@ func (m *ServiceReply) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *StartServiceCallRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StartServiceCallRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StartServiceCallRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if m.TimeoutMilliseconds != 0 { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.TimeoutMilliseconds)) + i-- + dAtA[i] = 0x20 + } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeBytes(dAtA, i, m.Payload) + i-- + dAtA[i] = 0x1a + } + if len(m.Method) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Method) + i-- + dAtA[i] = 0x12 + } + if len(m.Service) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Service) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ServiceCallStarted) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceCallStarted) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ServiceCallStarted) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if m.Call != 0 { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.Call)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ServiceRepliedEvent) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceRepliedEvent) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ServiceRepliedEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if len(m.Error) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Error) + i-- + dAtA[i] = 0x22 + } + if m.Failure != 0 { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.Failure)) + i-- + dAtA[i] = 0x18 + } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeBytes(dAtA, i, m.Payload) + i-- + dAtA[i] = 0x12 + } + if m.Call != 0 { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.Call)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *LogRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -2663,48 +3313,87 @@ func (m *ChatEvent) SizeVT() (n int) { return n } -func (m *CommandResult) SizeVT() (n int) { +func (m *CommandResult) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeBoolNonZero(1, m.Claimed) + n += len(m.unknownFields) + return n +} + +func (m *WorldEvent) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Map) + n += len(m.unknownFields) + return n +} + +func (m *ServiceCall) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Service) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Method) + n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += len(m.unknownFields) + return n +} + +func (m *ServiceReply) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - n += protobuf_go_lite.SizeBoolNonZero(1, m.Claimed) + n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) n += len(m.unknownFields) return n } -func (m *WorldEvent) SizeVT() (n int) { +func (m *StartServiceCallRequest) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - n += protobuf_go_lite.SizeStringNonEmpty(1, m.Map) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Service) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Method) + n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += protobuf_go_lite.SizeVarintNonZero(1, m.TimeoutMilliseconds) n += len(m.unknownFields) return n } -func (m *ServiceCall) SizeVT() (n int) { +func (m *ServiceCallStarted) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - n += protobuf_go_lite.SizeStringNonEmpty(1, m.Service) - n += protobuf_go_lite.SizeStringNonEmpty(1, m.Method) - n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += protobuf_go_lite.SizeVarintNonZero(1, m.Call) n += len(m.unknownFields) return n } -func (m *ServiceReply) SizeVT() (n int) { +func (m *ServiceRepliedEvent) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l + n += protobuf_go_lite.SizeVarintNonZero(1, m.Call) n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += protobuf_go_lite.SizeVarintNonZero(1, m.Failure) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Error) n += len(m.unknownFields) return n } @@ -2743,6 +3432,10 @@ func (m *PrecacheOptions) SizeVT() (n int) { return n } +func (x ServiceFailure) MarshalProtoText() string { + return x.String() +} + func (x *Call) MarshalProtoText() string { var sb protobuf_go_lite.TextBuilder initialLen := protobuf_go_lite.TextStartMessage(&sb, "Call") @@ -2991,6 +3684,72 @@ func (x *ServiceReply) String() string { return x.MarshalProtoText() } +func (x *StartServiceCallRequest) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "StartServiceCallRequest") + if x.Service != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "service") + protobuf_go_lite.TextWriteString(&sb, x.Service) + } + if x.Method != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "method") + protobuf_go_lite.TextWriteString(&sb, x.Method) + } + if len(x.Payload) != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteBytes(&sb, x.Payload) + } + if x.TimeoutMilliseconds != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "timeout_milliseconds") + protobuf_go_lite.TextWriteUint(&sb, x.TimeoutMilliseconds) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *StartServiceCallRequest) String() string { + return x.MarshalProtoText() +} + +func (x *ServiceCallStarted) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "ServiceCallStarted") + if x.Call != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "call") + protobuf_go_lite.TextWriteUint(&sb, x.Call) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *ServiceCallStarted) String() string { + return x.MarshalProtoText() +} + +func (x *ServiceRepliedEvent) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "ServiceRepliedEvent") + if x.Call != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "call") + protobuf_go_lite.TextWriteUint(&sb, x.Call) + } + if len(x.Payload) != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteBytes(&sb, x.Payload) + } + if x.Failure != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "failure") + protobuf_go_lite.TextWriteStringer(&sb, ServiceFailure(x.Failure)) + } + if x.Error != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "error") + protobuf_go_lite.TextWriteString(&sb, x.Error) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *ServiceRepliedEvent) String() string { + return x.MarshalProtoText() +} + func (x *LogRequest) MarshalProtoText() string { var sb protobuf_go_lite.TextBuilder initialLen := protobuf_go_lite.TextStartMessage(&sb, "LogRequest") @@ -3856,6 +4615,219 @@ func (m *ServiceReply) UnmarshalVT(dAtA []byte) error { return nil } +func (m *StartServiceCallRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartServiceCallRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartServiceCallRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Service = v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Method = v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + m.Payload, iNdEx, err = protobuf_go_lite.DecodeBytesAppend(m.Payload, dAtA, iNdEx) + if err != nil { + return err + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutMilliseconds", wireType) + } + m.TimeoutMilliseconds = 0 + m.TimeoutMilliseconds, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *ServiceCallStarted) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceCallStarted: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceCallStarted: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Call", wireType) + } + m.Call = 0 + m.Call, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *ServiceRepliedEvent) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceRepliedEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceRepliedEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Call", wireType) + } + m.Call = 0 + m.Call, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + m.Payload, iNdEx, err = protobuf_go_lite.DecodeBytesAppend(m.Payload, dAtA, iNdEx) + if err != nil { + return err + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Failure", wireType) + } + m.Failure = 0 + var _v uint64 + _v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + m.Failure = ServiceFailure(_v) + if err != nil { + return err + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Error = v + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + func (m *LogRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/src/wasm/wasm.pb.h b/src/wasm/wasm.pb.h index 3ae9462a..cb765d9f 100644 --- a/src/wasm/wasm.pb.h +++ b/src/wasm/wasm.pb.h @@ -31,6 +31,7 @@ #include "google/protobuf/message_lite.h" #include "google/protobuf/repeated_field.h" // IWYU pragma: export #include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/generated_enum_reflection.h" #include "google/protobuf/unknown_field_set.h" #include "abilities/abilities.pb.h" #include "combat/combat.pb.h" @@ -73,6 +74,8 @@ MODLOCK_API extern const ::google::protobuf::internal::DescriptorTable descripto } // extern "C" namespace modlock { namespace wasm { +enum ServiceFailure : int; +extern const uint32_t ServiceFailure_internal_data_[]; class Call; struct CallDefaultTypeInternal; MODLOCK_API extern CallDefaultTypeInternal _Call_default_instance_; @@ -117,6 +120,14 @@ class ServiceCall; struct ServiceCallDefaultTypeInternal; MODLOCK_API extern ServiceCallDefaultTypeInternal _ServiceCall_default_instance_; MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull ServiceCall_class_data_; +class ServiceCallStarted; +struct ServiceCallStartedDefaultTypeInternal; +MODLOCK_API extern ServiceCallStartedDefaultTypeInternal _ServiceCallStarted_default_instance_; +MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull ServiceCallStarted_class_data_; +class ServiceRepliedEvent; +struct ServiceRepliedEventDefaultTypeInternal; +MODLOCK_API extern ServiceRepliedEventDefaultTypeInternal _ServiceRepliedEvent_default_instance_; +MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull ServiceRepliedEvent_class_data_; class ServiceReply; struct ServiceReplyDefaultTypeInternal; MODLOCK_API extern ServiceReplyDefaultTypeInternal _ServiceReply_default_instance_; @@ -129,6 +140,10 @@ class StartResult; struct StartResultDefaultTypeInternal; MODLOCK_API extern StartResultDefaultTypeInternal _StartResult_default_instance_; MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull StartResult_class_data_; +class StartServiceCallRequest; +struct StartServiceCallRequestDefaultTypeInternal; +MODLOCK_API extern StartServiceCallRequestDefaultTypeInternal _StartServiceCallRequest_default_instance_; +MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull StartServiceCallRequest_class_data_; class WorldEvent; struct WorldEventDefaultTypeInternal; MODLOCK_API extern WorldEventDefaultTypeInternal _WorldEvent_default_instance_; @@ -137,11 +152,52 @@ MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull WorldEvent_ } // namespace modlock namespace google { namespace protobuf { +template <> +internal::EnumTraitsT<::modlock::wasm::ServiceFailure_internal_data_> + internal::EnumTraitsImpl::value<::modlock::wasm::ServiceFailure>; } // namespace protobuf } // namespace google namespace modlock { namespace wasm { +enum ServiceFailure : int { + SERVICE_FAILURE_NONE = 0, + SERVICE_FAILURE_REFUSED = 1, + SERVICE_FAILURE_TIMEOUT = 2, + SERVICE_FAILURE_UNAVAILABLE = 3, + ServiceFailure_INT_MIN_SENTINEL_DO_NOT_USE_ = + ::std::numeric_limits<::int32_t>::min(), + ServiceFailure_INT_MAX_SENTINEL_DO_NOT_USE_ = + ::std::numeric_limits<::int32_t>::max(), +}; + +extern const uint32_t ServiceFailure_internal_data_[]; +inline constexpr ServiceFailure ServiceFailure_MIN = + static_cast(0); +inline constexpr ServiceFailure ServiceFailure_MAX = + static_cast(3); +inline bool ServiceFailure_IsValid(int value) { + return 0 <= value && value <= 3; +} +inline constexpr int ServiceFailure_ARRAYSIZE = 3 + 1; +const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL ServiceFailure_descriptor(); +template +const ::std::string& ServiceFailure_Name(T value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to ServiceFailure_Name()."); + return ServiceFailure_Name(static_cast(value)); +} +template <> +inline const ::std::string& ServiceFailure_Name(ServiceFailure value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool ServiceFailure_Parse( + ::absl::string_view name, ServiceFailure* PROTOBUF_NONNULL value) { + return ::google::protobuf::internal::ParseNamedEnum(ServiceFailure_descriptor(), name, + value); +} // =================================================================== @@ -343,6 +399,247 @@ class MODLOCK_API WorldEvent final : public ::google::protobuf::Message MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull WorldEvent_class_data_; // ------------------------------------------------------------------- +class MODLOCK_API StartServiceCallRequest final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.wasm.StartServiceCallRequest) */ { + public: + inline StartServiceCallRequest() : StartServiceCallRequest(nullptr) {} + ~StartServiceCallRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(StartServiceCallRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(StartServiceCallRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR StartServiceCallRequest(::google::protobuf::internal::ConstantInitialized); + + inline StartServiceCallRequest(const StartServiceCallRequest& from) : StartServiceCallRequest(nullptr, from) {} + inline StartServiceCallRequest(StartServiceCallRequest&& from) noexcept + : StartServiceCallRequest(nullptr, ::std::move(from)) {} + inline StartServiceCallRequest& operator=(const StartServiceCallRequest& from) { + CopyFrom(from); + return *this; + } + inline StartServiceCallRequest& operator=(StartServiceCallRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StartServiceCallRequest& default_instance() { + return *reinterpret_cast( + &_StartServiceCallRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 12; + friend void swap(StartServiceCallRequest& a, StartServiceCallRequest& b) { a.Swap(&b); } + inline void Swap(StartServiceCallRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StartServiceCallRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StartServiceCallRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const StartServiceCallRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const StartServiceCallRequest& from) { StartServiceCallRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(StartServiceCallRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.wasm.StartServiceCallRequest"; } + + explicit StartServiceCallRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + StartServiceCallRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const StartServiceCallRequest& from); + StartServiceCallRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, StartServiceCallRequest&& from) noexcept + : StartServiceCallRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kServiceFieldNumber = 1, + kMethodFieldNumber = 2, + kPayloadFieldNumber = 3, + kTimeoutMillisecondsFieldNumber = 4, + }; + // string service = 1; + void clear_service() ; + const ::std::string& service() const; + template + void set_service(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_service(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_service(); + void set_allocated_service(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_service() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_service(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_service(); + + public: + // string method = 2; + void clear_method() ; + const ::std::string& method() const; + template + void set_method(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_method(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_method(); + void set_allocated_method(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_method() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_method(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_method(); + + public: + // bytes payload = 3; + void clear_payload() ; + const ::std::string& payload() const; + template + void set_payload(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_payload(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_payload(); + void set_allocated_payload(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_payload() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_payload(); + + public: + // uint32 timeout_milliseconds = 4; + void clear_timeout_milliseconds() ; + ::uint32_t timeout_milliseconds() const; + void set_timeout_milliseconds(::uint32_t value); + + private: + ::uint32_t _internal_timeout_milliseconds() const; + void _internal_set_timeout_milliseconds(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:modlock.wasm.StartServiceCallRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 0, 58, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const StartServiceCallRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr service_; + ::google::protobuf::internal::ArenaStringPtr method_; + ::google::protobuf::internal::ArenaStringPtr payload_; + ::uint32_t timeout_milliseconds_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto; +}; + +MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull StartServiceCallRequest_class_data_; +// ------------------------------------------------------------------- + class MODLOCK_API StartResult final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:modlock.wasm.StartResult) */ { public: @@ -1007,30 +1304,30 @@ class MODLOCK_API ServiceReply final : public ::google::protobuf::Message MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull ServiceReply_class_data_; // ------------------------------------------------------------------- -class MODLOCK_API ServiceCall final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.wasm.ServiceCall) */ { +class MODLOCK_API ServiceRepliedEvent final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.wasm.ServiceRepliedEvent) */ { public: - inline ServiceCall() : ServiceCall(nullptr) {} - ~ServiceCall() PROTOBUF_FINAL; + inline ServiceRepliedEvent() : ServiceRepliedEvent(nullptr) {} + ~ServiceRepliedEvent() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ServiceCall* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ServiceRepliedEvent* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ServiceCall)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ServiceRepliedEvent)); } #endif template - explicit PROTOBUF_CONSTEXPR ServiceCall(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ServiceRepliedEvent(::google::protobuf::internal::ConstantInitialized); - inline ServiceCall(const ServiceCall& from) : ServiceCall(nullptr, from) {} - inline ServiceCall(ServiceCall&& from) noexcept - : ServiceCall(nullptr, ::std::move(from)) {} - inline ServiceCall& operator=(const ServiceCall& from) { + inline ServiceRepliedEvent(const ServiceRepliedEvent& from) : ServiceRepliedEvent(nullptr, from) {} + inline ServiceRepliedEvent(ServiceRepliedEvent&& from) noexcept + : ServiceRepliedEvent(nullptr, ::std::move(from)) {} + inline ServiceRepliedEvent& operator=(const ServiceRepliedEvent& from) { CopyFrom(from); return *this; } - inline ServiceCall& operator=(ServiceCall&& from) noexcept { + inline ServiceRepliedEvent& operator=(ServiceRepliedEvent&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -1058,13 +1355,13 @@ class MODLOCK_API ServiceCall final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ServiceCall& default_instance() { - return *reinterpret_cast( - &_ServiceCall_default_instance_); + static const ServiceRepliedEvent& default_instance() { + return *reinterpret_cast( + &_ServiceRepliedEvent_default_instance_); } - static constexpr int kIndexInFileMessages = 10; - friend void swap(ServiceCall& a, ServiceCall& b) { a.Swap(&b); } - inline void Swap(ServiceCall* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 14; + friend void swap(ServiceRepliedEvent& a, ServiceRepliedEvent& b) { a.Swap(&b); } + inline void Swap(ServiceRepliedEvent* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -1072,7 +1369,7 @@ class MODLOCK_API ServiceCall final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ServiceCall* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ServiceRepliedEvent* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1080,13 +1377,13 @@ class MODLOCK_API ServiceCall final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ServiceCall* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ServiceRepliedEvent* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ServiceCall& from); + void CopyFrom(const ServiceRepliedEvent& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ServiceCall& from) { ServiceCall::MergeImpl(*this, from); } + void MergeFrom(const ServiceRepliedEvent& from) { ServiceRepliedEvent::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -1122,17 +1419,17 @@ class MODLOCK_API ServiceCall final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ServiceCall* PROTOBUF_NONNULL other); + void InternalSwap(ServiceRepliedEvent* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.wasm.ServiceCall"; } + static ::absl::string_view FullMessageName() { return "modlock.wasm.ServiceRepliedEvent"; } - explicit ServiceCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ServiceCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServiceCall& from); - ServiceCall( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServiceCall&& from) noexcept - : ServiceCall(arena) { + explicit ServiceRepliedEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ServiceRepliedEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServiceRepliedEvent& from); + ServiceRepliedEvent( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServiceRepliedEvent&& from) noexcept + : ServiceRepliedEvent(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -1149,22 +1446,448 @@ class MODLOCK_API ServiceCall final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kServiceFieldNumber = 1, - kMethodFieldNumber = 2, - kPayloadFieldNumber = 3, + kPayloadFieldNumber = 2, + kErrorFieldNumber = 4, + kCallFieldNumber = 1, + kFailureFieldNumber = 3, }; - // string service = 1; - void clear_service() ; - const ::std::string& service() const; + // bytes payload = 2; + void clear_payload() ; + const ::std::string& payload() const; template - void set_service(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_service(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_service(); - void set_allocated_service(::std::string* PROTOBUF_NULLABLE value); + void set_payload(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_payload(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_payload(); + void set_allocated_payload(::std::string* PROTOBUF_NULLABLE value); private: - const ::std::string& _internal_service() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_service(const ::std::string& value); + const ::std::string& _internal_payload() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_payload(); + + public: + // string error = 4; + void clear_error() ; + const ::std::string& error() const; + template + void set_error(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_error(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_error(); + void set_allocated_error(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_error() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_error(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_error(); + + public: + // uint64 call = 1; + void clear_call() ; + ::uint64_t call() const; + void set_call(::uint64_t value); + + private: + ::uint64_t _internal_call() const; + void _internal_set_call(::uint64_t value); + + public: + // .modlock.wasm.ServiceFailure failure = 3; + void clear_failure() ; + ::modlock::wasm::ServiceFailure failure() const; + void set_failure(::modlock::wasm::ServiceFailure value); + + private: + ::modlock::wasm::ServiceFailure _internal_failure() const; + void _internal_set_failure(::modlock::wasm::ServiceFailure value); + + public: + // @@protoc_insertion_point(class_scope:modlock.wasm.ServiceRepliedEvent) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 0, 46, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ServiceRepliedEvent& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr payload_; + ::google::protobuf::internal::ArenaStringPtr error_; + ::uint64_t call_; + int failure_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto; +}; + +MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull ServiceRepliedEvent_class_data_; +// ------------------------------------------------------------------- + +class MODLOCK_API ServiceCallStarted final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.wasm.ServiceCallStarted) */ { + public: + inline ServiceCallStarted() : ServiceCallStarted(nullptr) {} + ~ServiceCallStarted() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ServiceCallStarted* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ServiceCallStarted)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ServiceCallStarted(::google::protobuf::internal::ConstantInitialized); + + inline ServiceCallStarted(const ServiceCallStarted& from) : ServiceCallStarted(nullptr, from) {} + inline ServiceCallStarted(ServiceCallStarted&& from) noexcept + : ServiceCallStarted(nullptr, ::std::move(from)) {} + inline ServiceCallStarted& operator=(const ServiceCallStarted& from) { + CopyFrom(from); + return *this; + } + inline ServiceCallStarted& operator=(ServiceCallStarted&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ServiceCallStarted& default_instance() { + return *reinterpret_cast( + &_ServiceCallStarted_default_instance_); + } + static constexpr int kIndexInFileMessages = 13; + friend void swap(ServiceCallStarted& a, ServiceCallStarted& b) { a.Swap(&b); } + inline void Swap(ServiceCallStarted* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ServiceCallStarted* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ServiceCallStarted* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ServiceCallStarted& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const ServiceCallStarted& from) { ServiceCallStarted::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ServiceCallStarted* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.wasm.ServiceCallStarted"; } + + explicit ServiceCallStarted(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ServiceCallStarted(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServiceCallStarted& from); + ServiceCallStarted( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServiceCallStarted&& from) noexcept + : ServiceCallStarted(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kCallFieldNumber = 1, + }; + // uint64 call = 1; + void clear_call() ; + ::uint64_t call() const; + void set_call(::uint64_t value); + + private: + ::uint64_t _internal_call() const; + void _internal_set_call(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:modlock.wasm.ServiceCallStarted) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ServiceCallStarted& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint64_t call_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fwasm_2eproto; +}; + +MODLOCK_API extern const ::google::protobuf::internal::ClassDataFull ServiceCallStarted_class_data_; +// ------------------------------------------------------------------- + +class MODLOCK_API ServiceCall final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.wasm.ServiceCall) */ { + public: + inline ServiceCall() : ServiceCall(nullptr) {} + ~ServiceCall() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ServiceCall* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ServiceCall)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ServiceCall(::google::protobuf::internal::ConstantInitialized); + + inline ServiceCall(const ServiceCall& from) : ServiceCall(nullptr, from) {} + inline ServiceCall(ServiceCall&& from) noexcept + : ServiceCall(nullptr, ::std::move(from)) {} + inline ServiceCall& operator=(const ServiceCall& from) { + CopyFrom(from); + return *this; + } + inline ServiceCall& operator=(ServiceCall&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ServiceCall& default_instance() { + return *reinterpret_cast( + &_ServiceCall_default_instance_); + } + static constexpr int kIndexInFileMessages = 10; + friend void swap(ServiceCall& a, ServiceCall& b) { a.Swap(&b); } + inline void Swap(ServiceCall* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ServiceCall* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ServiceCall* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ServiceCall& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const ServiceCall& from) { ServiceCall::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ServiceCall* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.wasm.ServiceCall"; } + + explicit ServiceCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ServiceCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServiceCall& from); + ServiceCall( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServiceCall&& from) noexcept + : ServiceCall(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kServiceFieldNumber = 1, + kMethodFieldNumber = 2, + kPayloadFieldNumber = 3, + }; + // string service = 1; + void clear_service() ; + const ::std::string& service() const; + template + void set_service(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_service(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_service(); + void set_allocated_service(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_service() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_service(const ::std::string& value); ::std::string* PROTOBUF_NONNULL _internal_mutable_service(); public: @@ -1291,7 +2014,7 @@ class MODLOCK_API ServerCommandRequest final : public ::google::protobuf::Messag return *reinterpret_cast( &_ServerCommandRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 13; + static constexpr int kIndexInFileMessages = 16; friend void swap(ServerCommandRequest& a, ServerCommandRequest& b) { a.Swap(&b); } inline void Swap(ServerCommandRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1698,7 +2421,7 @@ class MODLOCK_API PrecacheOptions final : public ::google::protobuf::Message return *reinterpret_cast( &_PrecacheOptions_default_instance_); } - static constexpr int kIndexInFileMessages = 14; + static constexpr int kIndexInFileMessages = 17; friend void swap(PrecacheOptions& a, PrecacheOptions& b) { a.Swap(&b); } inline void Swap(PrecacheOptions* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1924,7 +2647,7 @@ class MODLOCK_API LogRequest final : public ::google::protobuf::Message return *reinterpret_cast( &_LogRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 12; + static constexpr int kIndexInFileMessages = 15; friend void swap(LogRequest& a, LogRequest& b) { a.Swap(&b); } inline void Swap(LogRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -4271,129 +4994,397 @@ inline void CommandResult::set_claimed(bool value) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); // @@protoc_insertion_point(field_set:modlock.wasm.CommandResult.claimed) } -inline bool CommandResult::_internal_claimed() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.claimed_; +inline bool CommandResult::_internal_claimed() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.claimed_; +} +inline void CommandResult::_internal_set_claimed(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.claimed_ = value; +} + +// ------------------------------------------------------------------- + +// WorldEvent + +// string map = 1; +inline void WorldEvent::clear_map() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.map_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& WorldEvent::map() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.WorldEvent.map) + return _internal_map(); +} +template +PROTOBUF_ALWAYS_INLINE void WorldEvent::set_map(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.map_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.WorldEvent.map) +} +inline ::std::string* PROTOBUF_NONNULL WorldEvent::mutable_map() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_map(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.WorldEvent.map) + return _s; +} +inline const ::std::string& WorldEvent::_internal_map() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.map_.Get(); +} +inline void WorldEvent::_internal_set_map(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.map_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL WorldEvent::_internal_mutable_map() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.map_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE WorldEvent::release_map() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.wasm.WorldEvent.map) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.map_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.map_.Set("", GetArena()); + } + return released; +} +inline void WorldEvent::set_allocated_map(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.map_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.map_.IsDefault()) { + _impl_.map_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.WorldEvent.map) +} + +// ------------------------------------------------------------------- + +// ServiceCall + +// string service = 1; +inline void ServiceCall::clear_service() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.service_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ServiceCall::service() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceCall.service) + return _internal_service(); +} +template +PROTOBUF_ALWAYS_INLINE void ServiceCall::set_service(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.service_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceCall.service) +} +inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_service() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_service(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceCall.service) + return _s; +} +inline const ::std::string& ServiceCall::_internal_service() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.service_.Get(); +} +inline void ServiceCall::_internal_set_service(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.service_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_service() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.service_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_service() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.wasm.ServiceCall.service) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.service_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.service_.Set("", GetArena()); + } + return released; +} +inline void ServiceCall::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.service_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.service_.IsDefault()) { + _impl_.service_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceCall.service) +} + +// string method = 2; +inline void ServiceCall::clear_method() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.method_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& ServiceCall::method() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceCall.method) + return _internal_method(); +} +template +PROTOBUF_ALWAYS_INLINE void ServiceCall::set_method(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.method_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceCall.method) +} +inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_method() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_method(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceCall.method) + return _s; +} +inline const ::std::string& ServiceCall::_internal_method() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.method_.Get(); +} +inline void ServiceCall::_internal_set_method(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.method_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_method() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.method_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_method() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.wasm.ServiceCall.method) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.method_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.method_.Set("", GetArena()); + } + return released; +} +inline void ServiceCall::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.method_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.method_.IsDefault()) { + _impl_.method_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceCall.method) +} + +// bytes payload = 3; +inline void ServiceCall::clear_payload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.payload_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& ServiceCall::payload() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceCall.payload) + return _internal_payload(); +} +template +PROTOBUF_ALWAYS_INLINE void ServiceCall::set_payload(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceCall.payload) +} +inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_payload() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceCall.payload) + return _s; +} +inline const ::std::string& ServiceCall::_internal_payload() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.payload_.Get(); +} +inline void ServiceCall::_internal_set_payload(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.payload_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_payload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.payload_.Mutable( GetArena()); } -inline void CommandResult::_internal_set_claimed(bool value) { +inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.claimed_ = value; + // @@protoc_insertion_point(field_release:modlock.wasm.ServiceCall.payload) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.payload_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.payload_.Set("", GetArena()); + } + return released; +} +inline void ServiceCall::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.payload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { + _impl_.payload_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceCall.payload) } // ------------------------------------------------------------------- -// WorldEvent +// ServiceReply -// string map = 1; -inline void WorldEvent::clear_map() { +// bytes payload = 1; +inline void ServiceReply::clear_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.map_.ClearToEmpty(); + _impl_.payload_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& WorldEvent::map() const +inline const ::std::string& ServiceReply::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.wasm.WorldEvent.map) - return _internal_map(); + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceReply.payload) + return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void WorldEvent::set_map(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.map_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.wasm.WorldEvent.map) + _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceReply.payload) } -inline ::std::string* PROTOBUF_NONNULL WorldEvent::mutable_map() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_payload() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_map(); - // @@protoc_insertion_point(field_mutable:modlock.wasm.WorldEvent.map) + ::std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceReply.payload) return _s; } -inline const ::std::string& WorldEvent::_internal_map() const { +inline const ::std::string& ServiceReply::_internal_payload() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.map_.Get(); + return _impl_.payload_.Get(); } -inline void WorldEvent::_internal_set_map(const ::std::string& value) { +inline void ServiceReply::_internal_set_payload(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.map_.Set(value, GetArena()); + _impl_.payload_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL WorldEvent::_internal_mutable_map() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.map_.Mutable( GetArena()); + return _impl_.payload_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE WorldEvent::release_map() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.wasm.WorldEvent.map) + // @@protoc_insertion_point(field_release:modlock.wasm.ServiceReply.payload) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.map_.Release(); + auto* released = _impl_.payload_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.map_.Set("", GetArena()); + _impl_.payload_.Set("", GetArena()); } return released; } -inline void WorldEvent::set_allocated_map(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.map_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.map_.IsDefault()) { - _impl_.map_.Set("", GetArena()); + _impl_.payload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { + _impl_.payload_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.wasm.WorldEvent.map) + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceReply.payload) } // ------------------------------------------------------------------- -// ServiceCall +// StartServiceCallRequest // string service = 1; -inline void ServiceCall::clear_service() { +inline void StartServiceCallRequest::clear_service() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.service_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ServiceCall::service() const +inline const ::std::string& StartServiceCallRequest::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.wasm.ServiceCall.service) + // @@protoc_insertion_point(field_get:modlock.wasm.StartServiceCallRequest.service) return _internal_service(); } template -PROTOBUF_ALWAYS_INLINE void ServiceCall::set_service(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void StartServiceCallRequest::set_service(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.service_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.wasm.ServiceCall.service) + // @@protoc_insertion_point(field_set:modlock.wasm.StartServiceCallRequest.service) } -inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_service() +inline ::std::string* PROTOBUF_NONNULL StartServiceCallRequest::mutable_service() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_service(); - // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceCall.service) + // @@protoc_insertion_point(field_mutable:modlock.wasm.StartServiceCallRequest.service) return _s; } -inline const ::std::string& ServiceCall::_internal_service() const { +inline const ::std::string& StartServiceCallRequest::_internal_service() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.service_.Get(); } -inline void ServiceCall::_internal_set_service(const ::std::string& value) { +inline void StartServiceCallRequest::_internal_set_service(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.service_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_service() { +inline ::std::string* PROTOBUF_NONNULL StartServiceCallRequest::_internal_mutable_service() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.service_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_service() { +inline ::std::string* PROTOBUF_NULLABLE StartServiceCallRequest::release_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.wasm.ServiceCall.service) + // @@protoc_insertion_point(field_release:modlock.wasm.StartServiceCallRequest.service) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -4404,7 +5395,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_service() { } return released; } -inline void ServiceCall::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { +inline void StartServiceCallRequest::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -4415,50 +5406,50 @@ inline void ServiceCall::set_allocated_service(::std::string* PROTOBUF_NULLABLE if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.service_.IsDefault()) { _impl_.service_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceCall.service) + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.StartServiceCallRequest.service) } // string method = 2; -inline void ServiceCall::clear_method() { +inline void StartServiceCallRequest::clear_method() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.method_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -inline const ::std::string& ServiceCall::method() const +inline const ::std::string& StartServiceCallRequest::method() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.wasm.ServiceCall.method) + // @@protoc_insertion_point(field_get:modlock.wasm.StartServiceCallRequest.method) return _internal_method(); } template -PROTOBUF_ALWAYS_INLINE void ServiceCall::set_method(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void StartServiceCallRequest::set_method(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000002U); _impl_.method_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.wasm.ServiceCall.method) + // @@protoc_insertion_point(field_set:modlock.wasm.StartServiceCallRequest.method) } -inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_method() +inline ::std::string* PROTOBUF_NONNULL StartServiceCallRequest::mutable_method() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000002U); ::std::string* _s = _internal_mutable_method(); - // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceCall.method) + // @@protoc_insertion_point(field_mutable:modlock.wasm.StartServiceCallRequest.method) return _s; } -inline const ::std::string& ServiceCall::_internal_method() const { +inline const ::std::string& StartServiceCallRequest::_internal_method() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.method_.Get(); } -inline void ServiceCall::_internal_set_method(const ::std::string& value) { +inline void StartServiceCallRequest::_internal_set_method(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.method_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_method() { +inline ::std::string* PROTOBUF_NONNULL StartServiceCallRequest::_internal_mutable_method() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.method_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_method() { +inline ::std::string* PROTOBUF_NULLABLE StartServiceCallRequest::release_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.wasm.ServiceCall.method) + // @@protoc_insertion_point(field_release:modlock.wasm.StartServiceCallRequest.method) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } @@ -4469,7 +5460,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_method() { } return released; } -inline void ServiceCall::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { +inline void StartServiceCallRequest::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000002U); @@ -4480,50 +5471,50 @@ inline void ServiceCall::set_allocated_method(::std::string* PROTOBUF_NULLABLE v if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.method_.IsDefault()) { _impl_.method_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceCall.method) + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.StartServiceCallRequest.method) } // bytes payload = 3; -inline void ServiceCall::clear_payload() { +inline void StartServiceCallRequest::clear_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } -inline const ::std::string& ServiceCall::payload() const +inline const ::std::string& StartServiceCallRequest::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.wasm.ServiceCall.payload) + // @@protoc_insertion_point(field_get:modlock.wasm.StartServiceCallRequest.payload) return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void ServiceCall::set_payload(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void StartServiceCallRequest::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000004U); _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.wasm.ServiceCall.payload) + // @@protoc_insertion_point(field_set:modlock.wasm.StartServiceCallRequest.payload) } -inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_payload() +inline ::std::string* PROTOBUF_NONNULL StartServiceCallRequest::mutable_payload() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000004U); ::std::string* _s = _internal_mutable_payload(); - // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceCall.payload) + // @@protoc_insertion_point(field_mutable:modlock.wasm.StartServiceCallRequest.payload) return _s; } -inline const ::std::string& ServiceCall::_internal_payload() const { +inline const ::std::string& StartServiceCallRequest::_internal_payload() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.payload_.Get(); } -inline void ServiceCall::_internal_set_payload(const ::std::string& value) { +inline void StartServiceCallRequest::_internal_set_payload(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_payload() { +inline ::std::string* PROTOBUF_NONNULL StartServiceCallRequest::_internal_mutable_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.payload_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_payload() { +inline ::std::string* PROTOBUF_NULLABLE StartServiceCallRequest::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.wasm.ServiceCall.payload) + // @@protoc_insertion_point(field_release:modlock.wasm.StartServiceCallRequest.payload) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { return nullptr; } @@ -4534,7 +5525,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_payload() { } return released; } -inline void ServiceCall::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { +inline void StartServiceCallRequest::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000004U); @@ -4545,54 +5536,133 @@ inline void ServiceCall::set_allocated_payload(::std::string* PROTOBUF_NULLABLE if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { _impl_.payload_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceCall.payload) + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.StartServiceCallRequest.payload) +} + +// uint32 timeout_milliseconds = 4; +inline void StartServiceCallRequest::clear_timeout_milliseconds() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.timeout_milliseconds_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t StartServiceCallRequest::timeout_milliseconds() const { + // @@protoc_insertion_point(field_get:modlock.wasm.StartServiceCallRequest.timeout_milliseconds) + return _internal_timeout_milliseconds(); +} +inline void StartServiceCallRequest::set_timeout_milliseconds(::uint32_t value) { + _internal_set_timeout_milliseconds(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:modlock.wasm.StartServiceCallRequest.timeout_milliseconds) +} +inline ::uint32_t StartServiceCallRequest::_internal_timeout_milliseconds() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.timeout_milliseconds_; +} +inline void StartServiceCallRequest::_internal_set_timeout_milliseconds(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.timeout_milliseconds_ = value; } // ------------------------------------------------------------------- -// ServiceReply +// ServiceCallStarted -// bytes payload = 1; -inline void ServiceReply::clear_payload() { +// uint64 call = 1; +inline void ServiceCallStarted::clear_call() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.call_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint64_t ServiceCallStarted::call() const { + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceCallStarted.call) + return _internal_call(); +} +inline void ServiceCallStarted::set_call(::uint64_t value) { + _internal_set_call(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceCallStarted.call) +} +inline ::uint64_t ServiceCallStarted::_internal_call() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.call_; +} +inline void ServiceCallStarted::_internal_set_call(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.call_ = value; +} + +// ------------------------------------------------------------------- + +// ServiceRepliedEvent + +// uint64 call = 1; +inline void ServiceRepliedEvent::clear_call() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.call_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint64_t ServiceRepliedEvent::call() const { + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceRepliedEvent.call) + return _internal_call(); +} +inline void ServiceRepliedEvent::set_call(::uint64_t value) { + _internal_set_call(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceRepliedEvent.call) +} +inline ::uint64_t ServiceRepliedEvent::_internal_call() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.call_; +} +inline void ServiceRepliedEvent::_internal_set_call(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.call_ = value; +} + +// bytes payload = 2; +inline void ServiceRepliedEvent::clear_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ServiceReply::payload() const +inline const ::std::string& ServiceRepliedEvent::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.wasm.ServiceReply.payload) + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceRepliedEvent.payload) return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_payload(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceRepliedEvent::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.wasm.ServiceReply.payload) + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceRepliedEvent.payload) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_payload() +inline ::std::string* PROTOBUF_NONNULL ServiceRepliedEvent::mutable_payload() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_payload(); - // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceReply.payload) + // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceRepliedEvent.payload) return _s; } -inline const ::std::string& ServiceReply::_internal_payload() const { +inline const ::std::string& ServiceRepliedEvent::_internal_payload() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.payload_.Get(); } -inline void ServiceReply::_internal_set_payload(const ::std::string& value) { +inline void ServiceRepliedEvent::_internal_set_payload(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_payload() { +inline ::std::string* PROTOBUF_NONNULL ServiceRepliedEvent::_internal_mutable_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.payload_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_payload() { +inline ::std::string* PROTOBUF_NULLABLE ServiceRepliedEvent::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.wasm.ServiceReply.payload) + // @@protoc_insertion_point(field_release:modlock.wasm.ServiceRepliedEvent.payload) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -4603,7 +5673,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_payload() { } return released; } -inline void ServiceReply::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceRepliedEvent::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -4614,7 +5684,97 @@ inline void ServiceReply::set_allocated_payload(::std::string* PROTOBUF_NULLABLE if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { _impl_.payload_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceReply.payload) + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceRepliedEvent.payload) +} + +// .modlock.wasm.ServiceFailure failure = 3; +inline void ServiceRepliedEvent::clear_failure() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.failure_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::modlock::wasm::ServiceFailure ServiceRepliedEvent::failure() const { + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceRepliedEvent.failure) + return _internal_failure(); +} +inline void ServiceRepliedEvent::set_failure(::modlock::wasm::ServiceFailure value) { + _internal_set_failure(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceRepliedEvent.failure) +} +inline ::modlock::wasm::ServiceFailure ServiceRepliedEvent::_internal_failure() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::modlock::wasm::ServiceFailure>(_impl_.failure_); +} +inline void ServiceRepliedEvent::_internal_set_failure(::modlock::wasm::ServiceFailure value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.failure_ = value; +} + +// string error = 4; +inline void ServiceRepliedEvent::clear_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.error_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& ServiceRepliedEvent::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.ServiceRepliedEvent.error) + return _internal_error(); +} +template +PROTOBUF_ALWAYS_INLINE void ServiceRepliedEvent::set_error(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.error_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.ServiceRepliedEvent.error) +} +inline ::std::string* PROTOBUF_NONNULL ServiceRepliedEvent::mutable_error() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_error(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.ServiceRepliedEvent.error) + return _s; +} +inline const ::std::string& ServiceRepliedEvent::_internal_error() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.error_.Get(); +} +inline void ServiceRepliedEvent::_internal_set_error(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.error_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ServiceRepliedEvent::_internal_mutable_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.error_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ServiceRepliedEvent::release_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.wasm.ServiceRepliedEvent.error) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.error_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.error_.Set("", GetArena()); + } + return released; +} +inline void ServiceRepliedEvent::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.error_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ServiceRepliedEvent.error) } // ------------------------------------------------------------------- @@ -4912,6 +6072,19 @@ PrecacheOptions::_internal_mutable_resources() { } // namespace modlock +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::modlock::wasm::ServiceFailure> : std::true_type {}; +template <> +inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::modlock::wasm::ServiceFailure>() { + return ::modlock::wasm::ServiceFailure_descriptor(); +} + +} // namespace protobuf +} // namespace google + // @@protoc_insertion_point(global_scope) #include "google/protobuf/port_undef.inc" diff --git a/src/wasm/wasm.pb.ts b/src/wasm/wasm.pb.ts index 68243b5f..b758afce 100644 --- a/src/wasm/wasm.pb.ts +++ b/src/wasm/wasm.pb.ts @@ -2,6 +2,7 @@ // @generated from file github.com/paralin/modlock/src/wasm/wasm.proto (package modlock.wasm, syntax proto3) /* eslint-disable */ +import { createEnumType } from '@aptre/protobuf-es-lite/enum' import type { MessageType } from '@aptre/protobuf-es-lite/message' import { createMessageType } from '@aptre/protobuf-es-lite/message' import type { @@ -11,6 +12,44 @@ import type { import type { InteractionKind } from './movement/movement.pb.js' import { InteractionKind_Enum, MovementSample } from './movement/movement.pb.js' +/** + * ServiceFailure says why a service call ended without an answer. + * + * @generated from enum modlock.wasm.ServiceFailure + */ +export enum ServiceFailure { + /** + * SERVICE_FAILURE_NONE is an answered call. + */ + NONE = 0, + + /** + * SERVICE_FAILURE_REFUSED is a call the service answered with an error. + */ + REFUSED = 1, + + /** + * SERVICE_FAILURE_TIMEOUT is a call that waited out its timeout. + */ + TIMEOUT = 2, + + /** + * SERVICE_FAILURE_UNAVAILABLE is a call to a service nobody provides + * here, or one more than the host keeps waiting for a mod. + */ + UNAVAILABLE = 3, +} + +export const ServiceFailure_Enum = /* @__PURE__ */ createEnumType( + 'modlock.wasm.ServiceFailure', + [ + [0, 'SERVICE_FAILURE_NONE'], + [1, 'SERVICE_FAILURE_REFUSED'], + [2, 'SERVICE_FAILURE_TIMEOUT'], + [3, 'SERVICE_FAILURE_UNAVAILABLE'], + ], +) + /** * Call is one method call across the boundary: a mod calling the game * through modlock.host_call, or the game delivering an event through the @@ -723,6 +762,217 @@ export const ServiceReply: MessageType = }, ) +/** + * StartServiceCallRequest calls one method of a service the host provides, + * to be answered in a later frame. + * + * @generated from message modlock.wasm.StartServiceCallRequest + */ +export interface StartServiceCallRequest { + /** + * Service names the service, such as "arena.match". + */ + service?: string + /** + * Method names the method within the service. + */ + method?: string + /** + * Payload is the call's argument. + */ + payload?: Uint8Array + /** + * TimeoutMilliseconds is how long the mod waits for the answer; zero or + * more than 30 seconds waits 30 seconds. + */ + timeoutMilliseconds?: number +} + +export const StartServiceCallRequest: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.wasm.StartServiceCallRequest', + () => [ + [1, 'service', 9], + [2, 'method', 9], + [3, 'payload', 12], + [4, 'timeout_milliseconds', 13], + ], + { + decode: ( + r: BinaryReader, + end: number, + m: StartServiceCallRequest, + ): StartServiceCallRequest => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.service = r.string() + break + case 2: + m.method = r.string() + break + case 3: + m.payload = r.bytes() + break + case 4: + m.timeoutMilliseconds = r.uint32() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: StartServiceCallRequest, w: Writer): void => { + { + const v = m.service + if (v) w.uint32(10).string(v) + } + { + const v = m.method + if (v) w.uint32(18).string(v) + } + { + const v = m.payload + if (v != null && v.length !== 0) w.uint32(26).bytes(v) + } + { + const v = m.timeoutMilliseconds + if (v) w.uint32(32).uint32(v) + } + }, + }, + ) + +/** + * ServiceCallStarted numbers a started service call. + * + * @generated from message modlock.wasm.ServiceCallStarted + */ +export interface ServiceCallStarted { + /** + * Call is the number the call's ServiceReplied event carries, unique for + * the mod's instance. + */ + call?: bigint +} + +export const ServiceCallStarted: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.wasm.ServiceCallStarted', + () => [[1, 'call', 4]], + { + decode: ( + r: BinaryReader, + end: number, + m: ServiceCallStarted, + ): ServiceCallStarted => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.call = r.uint64() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: ServiceCallStarted, w: Writer): void => { + { + const v = m.call + if (v) w.uint32(8).uint64(v) + } + }, + }, + ) + +/** + * ServiceRepliedEvent ends one started service call. + * + * @generated from message modlock.wasm.ServiceRepliedEvent + */ +export interface ServiceRepliedEvent { + /** + * Call is the number StartServiceCall returned. + */ + call?: bigint + /** + * Payload is the answer, when failure is none. + */ + payload?: Uint8Array + /** + * Failure says why the call ended without an answer. + */ + failure?: ServiceFailure + /** + * Error describes the failure. + */ + error?: string +} + +export const ServiceRepliedEvent: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.wasm.ServiceRepliedEvent', + () => [ + [1, 'call', 4], + [2, 'payload', 12], + [3, 'failure', 14, 0, ServiceFailure_Enum], + [4, 'error', 9], + ], + { + decode: ( + r: BinaryReader, + end: number, + m: ServiceRepliedEvent, + ): ServiceRepliedEvent => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.call = r.uint64() + break + case 2: + m.payload = r.bytes() + break + case 3: + m.failure = r.int32() + break + case 4: + m.error = r.string() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: ServiceRepliedEvent, w: Writer): void => { + { + const v = m.call + if (v) w.uint32(8).uint64(v) + } + { + const v = m.payload + if (v != null && v.length !== 0) w.uint32(18).bytes(v) + } + { + const v = m.failure + if (v) w.uint32(24).int32(v) + } + { + const v = m.error + if (v) w.uint32(34).string(v) + } + }, + }, + ) + /** * LogRequest carries one log line. * diff --git a/src/wasm/wasm.proto b/src/wasm/wasm.proto index ca086f02..408cf8ee 100644 --- a/src/wasm/wasm.proto +++ b/src/wasm/wasm.proto @@ -550,6 +550,16 @@ service Host { // service defines the payload's encoding. rpc CallService(ServiceCall) returns (ServiceReply); + // StartServiceCall calls method of a service the host provides and + // returns at once with a number; the answer arrives in a later frame as a + // ServiceReplied event carrying that number. Every call ends once: with + // the reply, the service's refusal, a timeout or no provider at all. A + // service nobody provides is never asked. The host waits at most 30 + // seconds, or the call's shorter timeout, and drops the mod's waiting + // calls when the mod stops or reloads. A service that answers at once + // answers this way too, in the next frame. + rpc StartServiceCall(StartServiceCallRequest) returns (ServiceCallStarted); + // CreateEntity creates any entity the server knows by its designer name, // such as npc_trooper_boss or prop_dynamic, with spawn key values and fields // written before it spawns. The world removes it when the world ends; @@ -731,6 +741,9 @@ service Mod { // Serve calls a service the mod serves from the host. rpc Serve(ServiceCall) returns (ServiceReply); + // ServiceReplied ends one StartServiceCall, in a frame after the call. + rpc ServiceReplied(ServiceRepliedEvent) returns (Empty); + // Damage offers one hit before the game applies it, while the mod asked // for damage. The mod's answer may block the hit or change its amount. rpc Damage(modlock.wasm.combat.DamageEvent) returns (modlock.wasm.combat.DamageResult); @@ -900,6 +913,58 @@ message ServiceReply { bytes payload = 1; } +// StartServiceCallRequest calls one method of a service the host provides, +// to be answered in a later frame. +message StartServiceCallRequest { + // Service names the service, such as "arena.match". + string service = 1; + + // Method names the method within the service. + string method = 2; + + // Payload is the call's argument. + bytes payload = 3; + + // TimeoutMilliseconds is how long the mod waits for the answer; zero or + // more than 30 seconds waits 30 seconds. + uint32 timeout_milliseconds = 4; +} + +// ServiceCallStarted numbers a started service call. +message ServiceCallStarted { + // Call is the number the call's ServiceReplied event carries, unique for + // the mod's instance. + uint64 call = 1; +} + +// ServiceFailure says why a service call ended without an answer. +enum ServiceFailure { + // SERVICE_FAILURE_NONE is an answered call. + SERVICE_FAILURE_NONE = 0; + // SERVICE_FAILURE_REFUSED is a call the service answered with an error. + SERVICE_FAILURE_REFUSED = 1; + // SERVICE_FAILURE_TIMEOUT is a call that waited out its timeout. + SERVICE_FAILURE_TIMEOUT = 2; + // SERVICE_FAILURE_UNAVAILABLE is a call to a service nobody provides + // here, or one more than the host keeps waiting for a mod. + SERVICE_FAILURE_UNAVAILABLE = 3; +} + +// ServiceRepliedEvent ends one started service call. +message ServiceRepliedEvent { + // Call is the number StartServiceCall returned. + uint64 call = 1; + + // Payload is the answer, when failure is none. + bytes payload = 2; + + // Failure says why the call ended without an answer. + ServiceFailure failure = 3; + + // Error describes the failure. + string error = 4; +} + // LogRequest carries one log line. message LogRequest { // Message is the text to log, without a trailing newline. diff --git a/src/wasm/wasm_host.cc b/src/wasm/wasm_host.cc index 1eb19111..95d7e01a 100644 --- a/src/wasm/wasm_host.cc +++ b/src/wasm/wasm_host.cc @@ -100,6 +100,14 @@ void WasmHost::Provide(std::string service, WasmExtension extension) { } } +void WasmHost::ProvideLater(std::string service, WasmLateExtension extension) { + if (extension) { + impl_->late_extensions.insert_or_assign(std::move(service), std::move(extension)); + } else { + impl_->late_extensions.erase(service); + } +} + void WasmHost::KeepSettings(WasmSettings* settings) { impl_->settings = settings ? settings : &impl_->kept; } diff --git a/src/wasm/wasm_plugin.cc b/src/wasm/wasm_plugin.cc index 788cb7c8..986bab5e 100644 --- a/src/wasm/wasm_plugin.cc +++ b/src/wasm/wasm_plugin.cc @@ -302,7 +302,9 @@ void WasmPlugin::Halt() { Untune(untuned_); tuned_ = false; - // Drop the movement, the subscriptions and the game state. + // Drop the movement, the subscriptions, the started service calls and + // the game state. + service_calls_.Drop(); movement_.reset(); hero_slots_.clear(); Unsubscribe(); @@ -334,10 +336,9 @@ void WasmPlugin::ListenForRestart() { } text.remove_prefix(1); if (text.size() < kRestartCommand.size() || - !std::ranges::equal(text.substr(0, kRestartCommand.size()), kRestartCommand, - [](unsigned char a, unsigned char b) { - return std::tolower(a) == b; - })) { + !std::ranges::equal( + text.substr(0, kRestartCommand.size()), kRestartCommand, + [](unsigned char a, unsigned char b) { return std::tolower(a) == b; })) { return; } text.remove_prefix(kRestartCommand.size()); @@ -520,6 +521,9 @@ void WasmPlugin::Tick() { ReportCalls(); } + // End the started service calls that ended, which need no game. + DeliverServiceReplies(); + // Run the game's frame work, and deliver the frame to a mod that wants it. if (GameOpen()) { Play(); diff --git a/src/wasm/wasm_plugin.h b/src/wasm/wasm_plugin.h index d2e06817..b90215e3 100644 --- a/src/wasm/wasm_plugin.h +++ b/src/wasm/wasm_plugin.h @@ -31,6 +31,7 @@ #include "wasm/metrics.h" #include "wasm/player_scope.h" #include "wasm/runtime.h" +#include "wasm/service_calls.h" #include "wasm/settings.h" #include "wasm/ui.h" @@ -48,6 +49,9 @@ struct Mods { std::map> plugins; // extensions holds the services the host provides, by name. std::map> extensions; + // late_extensions holds the services the host answers in a later frame, + // by name. + std::map> late_extensions; // settings keeps players' settings: kept unless the host was given a // keeper. FileSettings kept; @@ -91,6 +95,8 @@ class PluginGame final : public wasm::Game { std::expected Players() override; std::expected CallService( const wasm::ServiceCall& request) override; + std::expected StartServiceCall( + const wasm::StartServiceCallRequest& request) override; std::expected PlayerSetting( const wasm::settings::PlayerSettingRequest& request) override; std::expected SetPlayerSetting( @@ -223,6 +229,11 @@ class WasmPlugin final : public Plugin { // CallService answers the mod's call to a service the host provides. std::expected CallService(const wasm::ServiceCall& call); + // StartServiceCall starts the mod's call to a service the host provides, + // which a later frame ends with a ServiceReplied event. + std::expected StartServiceCall( + const wasm::StartServiceCallRequest& request); + // PlayerSetting returns the value of the setting named key for the player // in slot: the kept value while the manifest still accepts it, and the // default otherwise. @@ -335,6 +346,9 @@ class WasmPlugin final : public Plugin { // DeliverGameEvents passes on the button changes and ended restores the // game queued. void DeliverGameEvents(); + // DeliverServiceReplies tells the mod of each started service call that + // ended. + void DeliverServiceReplies(); void Unsubscribe(); // Move installs the manifest's movement model on the server. void Move(); @@ -494,6 +508,10 @@ class WasmPlugin final : public Plugin { std::string slowest_report_; wasm::profile::SlowFrame slowest_frame_; + // service_calls_ holds the running instance's started service calls until + // a frame delivers their ends. + wasm::ServiceCalls service_calls_; + // calls_ counts the mod's host calls since calls_reported_, the last time // they went to the observers. wasm::CallProfile calls_; diff --git a/src/wasm/wasm_plugin_calls.cc b/src/wasm/wasm_plugin_calls.cc index 1ea30099..c017d31a 100644 --- a/src/wasm/wasm_plugin_calls.cc +++ b/src/wasm/wasm_plugin_calls.cc @@ -287,6 +287,10 @@ std::expected WasmPlugin::CallService( // Find the service, ask it, and wrap its answer. auto found = host_.extensions.find(call.service()); if (found == host_.extensions.end()) { + if (host_.late_extensions.contains(call.service())) { + return std::unexpected("the service " + call.service() + + " answers only calls started with StartServiceCall"); + } return std::unexpected("this host provides no service " + call.service()); } auto answer = found->second(name_, call.method(), call.payload()); @@ -298,6 +302,30 @@ std::expected WasmPlugin::CallService( return reply; } +std::expected WasmPlugin::StartServiceCall( + const wasm::StartServiceCallRequest& request) { + // Number the call; a mod holding too many is refused at once. + auto started = service_calls_.Start(std::chrono::milliseconds(request.timeout_milliseconds())); + if (!started) { + return std::unexpected(started.error()); + } + wasm::ServiceCallStarted reply; + reply.set_call(started->call); + + // Hand the call to the service's late extension, or answer it now from + // its extension. A service nobody provides is never asked. + const auto& service = request.service(); + if (auto late = host_.late_extensions.find(service); late != host_.late_extensions.end()) { + late->second(name_, request.method(), request.payload(), std::move(started->reply)); + } else if (auto found = host_.extensions.find(service); found != host_.extensions.end()) { + started->reply(found->second(name_, request.method(), request.payload())); + } else { + service_calls_.Fail(started->call, wasm::SERVICE_FAILURE_UNAVAILABLE, + "this host provides no service " + service); + } + return reply; +} + std::expected WasmPlugin::PlayerSetting(int32_t slot, std::string_view key) { const auto* setting = wasm::FindSetting(manifest_, key); @@ -443,10 +471,14 @@ uint64_t WasmPlugin::SteamId(int32_t slot) { bool PluginGame::AnswersWithoutGame(std::string_view method) { // Keep this list to the host calls this class overrides. - static constexpr std::array kMethods = { - "Log", "Ui", "CallService", "PlayerSetting", "SetPlayerSetting", "AddMetric", - "HoldReload", "Handoff", "HandedOff", "PlayerHandoff", "PlayerHandedOff", "ReadFile", - "WriteFile", + static constexpr std::array kMethods = { + "Log", "Ui", + "CallService", "StartServiceCall", + "PlayerSetting", "SetPlayerSetting", + "AddMetric", "HoldReload", + "Handoff", "HandedOff", + "PlayerHandoff", "PlayerHandedOff", + "ReadFile", "WriteFile", }; return std::ranges::find(kMethods, method) != kMethods.end(); } @@ -496,6 +528,11 @@ std::expected PluginGame::CallService( return plugin_.CallService(request); } +std::expected PluginGame::StartServiceCall( + const wasm::StartServiceCallRequest& request) { + return plugin_.StartServiceCall(request); +} + std::expected PluginGame::PlayerSetting( const wasm::settings::PlayerSettingRequest& request) { // Read the setting and wrap it. diff --git a/src/wasm/wasm_plugin_events.cc b/src/wasm/wasm_plugin_events.cc index 3dd923ce..f8677f8c 100644 --- a/src/wasm/wasm_plugin_events.cc +++ b/src/wasm/wasm_plugin_events.cc @@ -416,6 +416,16 @@ void WasmPlugin::DeliverGameEvents() { } } +void WasmPlugin::DeliverServiceReplies() { + for (const auto& replied : service_calls_.Take(std::chrono::steady_clock::now())) { + // Tell the mod of each ended call while it runs. + if (!instance_) { + return; + } + static_cast(mod_.ServiceReplied(replied)); + } +} + void WasmPlugin::Unsubscribe() { // Drop the player and combat subscriptions. players_.Reset(); diff --git a/tests/wasm/extension-go/main.go b/tests/wasm/extension-go/main.go index 2dd6c6ae..ddf0db96 100644 --- a/tests/wasm/extension-go/main.go +++ b/tests/wasm/extension-go/main.go @@ -8,11 +8,17 @@ // which makes the calls a host's call profile must count: an allowed and a // refused console command, a refused file name, more distinct files than the // profile keeps, and a method the host does not have; and the crash service, -// which panics and so stops the mod. +// which panics and so stops the mod; and the later service, whose "start" +// starts a call to the service, method and payload its payload names, +// separated by "|", with a timeout in milliseconds after them, and whose +// "ended" lists the calls that ended so far, one line each. package main import ( + "errors" "strconv" + "strings" + "time" "unsafe" "github.com/paralin/modlock/mod" @@ -28,6 +34,9 @@ func hostCall(data unsafe.Pointer, size uint32) uint32 //go:wasmimport modlock host_read func hostRead(data unsafe.Pointer, size uint32) +// ended lists the later service's calls that ended, in order. +var ended []string + // init registers the service before the host starts the mod. func init() { mod.Serve("echo", func(method string, payload []byte) ([]byte, error) { @@ -62,6 +71,23 @@ func init() { } return nil, nil }) + mod.Serve("later", func(method string, payload []byte) ([]byte, error) { + if method == "ended" { + return []byte(strings.Join(ended, "\n")), nil + } + parts := strings.Split(string(payload), "|") + timeout, _ := strconv.Atoi(parts[3]) + mod.CallServiceLater(parts[0], parts[1], []byte(parts[2]), time.Duration(timeout)*time.Millisecond, func(reply []byte, err error) { + var failed *mod.ServiceError + switch { + case errors.As(err, &failed): + ended = append(ended, parts[2]+" "+failed.Failure.String()+": "+failed.Message) + default: + ended = append(ended, parts[2]+" "+string(reply)) + } + }) + return nil, nil + }) mod.Serve("crash", func(string, []byte) ([]byte, error) { panic("crash") }) diff --git a/tests/wasm_host_test.cc b/tests/wasm_host_test.cc index 235ccb38..cdca7c04 100644 --- a/tests/wasm_host_test.cc +++ b/tests/wasm_host_test.cc @@ -9,12 +9,14 @@ #include "modlock/wasm_host.h" #include +#include #include #include #include #include #include #include +#include #include #include "gtest/gtest.h" @@ -188,6 +190,81 @@ TEST(WasmHost, ModsAndHostCallEachOthersServices) { } } +TEST(WasmHost, StartedServiceCallsEndInALaterFrame) { + // Load the test mod with the shout service, answered at once, and the + // slow service, which keeps each call's reply for later. + WasmHost host({}); + host.Provide("shout", Shout); + std::vector kept; + host.ProvideLater("slow", [&](std::string_view mod, std::string_view method, + std::string_view payload, modlock::WasmReply reply) { + EXPECT_EQ(mod, "extension-go"); + EXPECT_EQ(method, "wait"); + kept.push_back(std::move(reply)); + }); + auto plugin = host.Load(EXTENSION_GO_WASM, PluginContext{.check_only = true}); + ASSERT_TRUE(plugin) << plugin.error(); + ASSERT_TRUE((*plugin)->Start()); + const auto start = [&](std::string_view call) { + auto started = host.Call("extension-go", "later", "start", call); + ASSERT_TRUE(started) << started.error(); + }; + const auto ended = [&] { + auto answer = host.Call("extension-go", "later", "ended", ""); + return answer ? *answer : "error: " + answer.error(); + }; + + // Nothing ends during the call, not even an answer the service gave at + // once; the next frame ends the answered, the refused and the call to a + // service nobody provides, which is never asked. + start("shout|say|hi|0"); + start("shout|refuse|no|0"); + start("nobody|any|lost|0"); + start("slow|wait|first|0"); + start("slow|wait|second|20"); + EXPECT_EQ(ended(), ""); + (*plugin)->Tick(); + EXPECT_EQ(ended(), + "hi SAY:HI\n" + "no SERVICE_FAILURE_REFUSED: extension-go may not refuse\n" + "lost SERVICE_FAILURE_UNAVAILABLE: this host provides no service nobody"); + ASSERT_EQ(kept.size(), 2u); + + // A late answer ends its call in the frame after it, and a call past its + // timeout ends with the timeout; its reply afterwards does nothing. + kept[0]("FIRST"); + std::this_thread::sleep_for(std::chrono::milliseconds(40)); + (*plugin)->Tick(); + kept[1]("SECOND"); + (*plugin)->Tick(); + EXPECT_EQ(ended(), + "hi SAY:HI\n" + "no SERVICE_FAILURE_REFUSED: extension-go may not refuse\n" + "lost SERVICE_FAILURE_UNAVAILABLE: this host provides no service nobody\n" + "first FIRST\n" + "second SERVICE_FAILURE_TIMEOUT: the service did not answer in time"); + + // A late service refuses the call that expects an answer at once. + auto unary = host.Call("extension-go", "echo", "say", "hi"); + ASSERT_TRUE(unary); + host.Provide("shout", nullptr); + host.ProvideLater( + "shout", [](std::string_view, std::string_view, std::string_view, modlock::WasmReply) {}); + auto refused = host.Call("extension-go", "echo", "say", "hi"); + ASSERT_FALSE(refused); + EXPECT_EQ(refused.error(), "the service shout answers only calls started with StartServiceCall"); + + // A mod that stops holds nothing: the reply to a call its last build left + // does not reach the next one. + start("slow|wait|left|0"); + ASSERT_EQ(kept.size(), 3u); + ASSERT_TRUE(host.Reload(EXTENSION_GO_WASM)); + kept[2]("LEFT"); + (*plugin)->Tick(); + EXPECT_EQ(ended(), ""); + (*plugin)->Stop(); +} + TEST(PlayerScope, LimitedScopeRulesOnlyItsPlayersHits) { // A limited scope hears hits among its players, blocks hits that cross to // another player, and leaves others' hits alone. A hit with one player, From 3ddcc9e0140f1457a76729a22834c367a0ba9e9b Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Tue, 10 Nov 2026 23:44:23 -0800 Subject: [PATCH 03/15] wasm: let a mod's layout press back to its server A layout drawn from a mod's XML had no way to tell the mod anything, so a card with buttons had to be built from Modlock's own nodes. A layout now calls Modlock.press(action, payload), which runs the console command modlockaction [payload], the same way the renderer already sends a button's press and a text entry's input. The engine names the slot that ran the command, so the host stamps the player and never reads it from the layout. The host takes the press only from a running mod, from a layout node in that player's own tree, with an action name of at most 64 word characters and a payload of at most 180 bytes of UTF-8, and at most eight presses at once refilling four a second for each player. A press that passes reaches the mod as a UiPressEvent on the layout's node with the new action and payload fields, so no SDK needs a new method; the JS SDK hands it to the layout's onAction. Signed-off-by: Christian Stewart --- js/src/host.gen.ts | 22 +++- js/src/index.ts | 2 +- js/src/ui.ts | 54 +++++++- js/test/ui.test.ts | 34 +++++ luau/modlock/init.luau | 14 +- mod/host.gen.go | 3 +- panorama/src/data.ts | 97 +++++++++++++- panorama/src/draw.ts | 60 ++------- panorama/src/layout.test.ts | 43 ++++++ panorama/src/layout.ts | 34 +++++ panorama/src/renderer.test.ts | 28 ++++ python/modlock/__init__.py | 15 ++- src/wasm/ui.cc | 81 ++++++++++++ src/wasm/ui.h | 29 ++++ src/wasm/ui/ui.pb.cc | 241 +++++++++++++++++++++++----------- src/wasm/ui/ui.pb.go | 94 ++++++++++++- src/wasm/ui/ui.pb.h | 172 +++++++++++++++++++++++- src/wasm/ui/ui.pb.ts | 36 ++++- src/wasm/ui/ui.proto | 18 ++- src/wasm/wasm_plugin.cc | 15 +++ src/wasm/wasm_plugin.h | 5 + src/wasm/wasm_plugin_calls.cc | 18 +++ tests/wasm_ui_test.cc | 99 +++++++++++++- 23 files changed, 1057 insertions(+), 157 deletions(-) create mode 100644 panorama/src/layout.test.ts diff --git a/js/src/host.gen.ts b/js/src/host.gen.ts index fe6e2860..635d22f9 100644 --- a/js/src/host.gen.ts +++ b/js/src/host.gen.ts @@ -2307,12 +2307,28 @@ function fromWheel(message: uiPb.Wheel): Wheel { } } -/** UiPressEvent reports a press on a button in a player's interface. */ +/** + * UiPressEvent reports a press on a button in a player's interface, or a + * press a layout's script sent with an action and a payload. + */ export interface UiPressEvent { /** player is the player who pressed. */ readonly player: Player - /** node is the id of the pressed button. */ + /** + * node is the id of the pressed button, or of the layout whose script + * sent the press. + */ readonly node: string + /** + * action names a layout's press, as its script sent it: one to 64 + * letters, digits, '_', '-' and '.'. It is empty for a button's press. + */ + readonly action: string + /** + * payload is the text a layout's press carries, which the layout library + * writes as JSON: valid UTF-8 of at most 180 bytes. + */ + readonly payload: string } /** fromUiPressEvent decodes an UiPressEvent. */ @@ -2320,6 +2336,8 @@ function fromUiPressEvent(message: uiPb.UiPressEvent): UiPressEvent { return { player: Player.of(message.player ?? 0), node: message.node ?? '', + action: message.action ?? '', + payload: message.payload ?? '', } } diff --git a/js/src/index.ts b/js/src/index.ts index 8757d1dc..f9630856 100644 --- a/js/src/index.ts +++ b/js/src/index.ts @@ -482,7 +482,7 @@ const handlers: ModHandlers = { uiPress(event) { // A press arrives under the same CPU budget as a command, so its handler // also runs with the next frame. - after(0, () => press(event.player, event.node)) + after(0, () => press(event.player, event.node, event.action, event.payload)) }, uiInput(event) { diff --git a/js/src/ui.ts b/js/src/ui.ts index 5e551518..4b74ce38 100644 --- a/js/src/ui.ts +++ b/js/src/ui.ts @@ -40,7 +40,10 @@ // . Its script runs in the player's // game, so only a host that has reviewed the mod's content loads it; elsewhere // it draws nothing. The script includes the Panorama library -// scripts/modlock/layout.js and reads data with Modlock.data. +// scripts/modlock/layout.js and reads data with Modlock.data. It presses +// back with Modlock.press('buy', { item: 'boots' }), which runs the element's +// onAction with the player who pressed, the action and the payload: +// ...} />. // // route sends a player a named JSON value that every layout of the mod reads // with Modlock.route, wherever it sits in the tree, such as @@ -359,6 +362,7 @@ export interface Props { readonly sound?: string readonly disabled?: boolean readonly onPress?: (player: Player) => void + readonly onAction?: LayoutPressHandler readonly enter?: Style readonly exit?: Style readonly cycle?: Cycle @@ -548,16 +552,28 @@ export interface ButtonProps extends ElementProps { onPress?: (player: Player) => void } +/** + * LayoutPressHandler hears a press a layout's script sent: the player the + * server says sent it, its action and its JSON payload, undefined for none. + */ +export type LayoutPressHandler = ( + player: Player, + action: string, + payload: unknown, +) => void + /** * LayoutProps load a layout from the mod's content addon: src is its path * there, such as 'shop.xml', and data is the JSON value its script reads with - * Modlock.data. + * Modlock.data. onAction hears each press its script sends with + * Modlock.press. */ export interface LayoutProps { class?: string style?: Style src: string data?: unknown + onAction?: LayoutPressHandler } /** JSX types the elements a mod's JSX may use. */ @@ -861,8 +877,32 @@ export function uiSound( return draw(player) } -/** press runs the handler of the button the player pressed. */ -export function press(player: Player, node: string): void { +/** + * press runs the handler of the button the player pressed, or, for a press + * with an action, the handler of the layout whose script sent it, with the + * payload's JSON, undefined for none or for text JSON cannot read. + */ +export function press( + player: Player, + node: string, + action = '', + payload = '', +): void { + // A press with an action came from a layout's script, not a button. + if (action !== '') { + const pressed = screens.get(player.slot)?.actions.get(node) + if (pressed) { + let value: unknown = undefined + try { + value = payload === '' ? undefined : (JSON.parse(payload) as unknown) + } catch { + value = undefined + } + pressed.handler(player, action, value) + } + return + } + // A click on the game's ability bar names its slot, which no button's id // does. const bar = abilityBarNode.exec(node) @@ -1087,6 +1127,8 @@ interface Screen { readonly presses: Map void }> /** changes maps each input's id to its handler, as presses does. */ readonly changes: Map + /** actions maps each layout's id to its press handler, as presses does. */ + readonly actions: Map /** wheels holds only the enabled sliders that opted in to wheel events. */ readonly wheels: Map< string, @@ -1157,6 +1199,7 @@ class Layout { ids: new Map(), presses: new Map(), changes: new Map(), + actions: new Map(), wheels: new Map(), next: previous?.next ?? 0, } @@ -1275,6 +1318,9 @@ function place(layout: Layout, child: Child, at: string): string[] { node.layout = props.src ?? '' node.data = props.data === undefined ? '' : (JSON.stringify(props.data) ?? '') + if (props.onAction) { + layout.screen.actions.set(node.id!, { handler: props.onAction }) + } break default: node.kind = Kind.PANEL diff --git a/js/test/ui.test.ts b/js/test/ui.test.ts index 82f3dfb8..96d84d4d 100644 --- a/js/test/ui.test.ts +++ b/js/test/ui.test.ts @@ -178,6 +178,40 @@ test('clicks on the ability bar reach the handler while the root asks', () => { expect(slots).toEqual([0, 3]) }) +test("a layout's press reaches its onAction with the player and payload", () => { + // The layout's node goes out as a layout; its press comes back with the + // player the host named, the action and the payload's JSON. + const player = new Player(5) + const heard: [number, string, unknown][] = [] + show( + player, + jsx('layout', { + src: 'card.xml', + onAction: (by: Player, action: string, payload: unknown) => + heard.push([by.slot, action, payload]), + }), + ) + const node = sent.at(-1)!.change!.set!.find((each) => each.layout)! + press(player, node.id!, 'vote', '{"vote":1}') + press(player, node.id!, 'close', '') + press(player, node.id!, 'keep', 'not json') + expect(heard).toEqual([ + [5, 'vote', { vote: 1 }], + [5, 'close', undefined], + [5, 'keep', undefined], + ]) + + // A plain press on the layout, or an action on another node, runs nothing. + press(player, node.id!) + press(player, 'elsewhere', 'vote', '{}') + expect(heard.length).toBe(3) + + // A screen without the layout takes its presses no longer. + show(player, jsx('panel', {})) + press(player, node.id!, 'vote', '{}') + expect(heard.length).toBe(3) +}) + test("the ability display names each row's player as Tab shows them", () => { // Each row carries its player's slot, name and hero, with its abilities' // ids, pictures and upgrades; the viewer's row is its own. diff --git a/luau/modlock/init.luau b/luau/modlock/init.luau index 8cdc6225..db18e48f 100644 --- a/luau/modlock/init.luau +++ b/luau/modlock/init.luau @@ -1420,12 +1420,20 @@ export type Wheel = { fraction: number, } --- UiPressEvent reports a press on a button in a player's interface. +-- UiPressEvent reports a press on a button in a player's interface, or a +-- press a layout's script sent with an action and a payload. export type UiPressEvent = { -- player is the player who pressed. player: Player, - -- node is the id of the pressed button. + -- node is the id of the pressed button, or of the layout whose script + -- sent the press. node: string, + -- action names a layout's press, as its script sent it: one to 64 + -- letters, digits, '_', '-' and '.'. It is empty for a button's press. + action: string, + -- payload is the text a layout's press carries, which the layout library + -- writes as JSON: valid UTF-8 of at most 180 bytes. + payload: string, } -- UiInputEvent reports a change the player made to an input in their @@ -3262,6 +3270,8 @@ schema.Wheel = { schema.UiPressEvent = { { number = 1, name = "player", kind = "int32", class = Player, key = "slot" }, { number = 2, name = "node", kind = "string" }, + { number = 3, name = "action", kind = "string" }, + { number = 4, name = "payload", kind = "string" }, } schema.UiInputEvent = { { number = 1, name = "player", kind = "int32", class = Player, key = "slot" }, diff --git a/mod/host.gen.go b/mod/host.gen.go index 56b7c7d2..d0e6aee6 100644 --- a/mod/host.gen.go +++ b/mod/host.gen.go @@ -508,7 +508,8 @@ type SettingChangedEvent = settingspb.SettingChangedEvent // Wheel reports one wheel step over a slider, anchored to its pointer position. type Wheel = uipb.Wheel -// UiPressEvent reports a press on a button in a player's interface. +// UiPressEvent reports a press on a button in a player's interface, or a +// press a layout's script sent with an action and a payload. type UiPressEvent = uipb.UiPressEvent // UiInputEvent reports a change the player made to an input in their diff --git a/panorama/src/data.ts b/panorama/src/data.ts index c8c0c46e..a5a6ab8a 100644 --- a/panorama/src/data.ts +++ b/panorama/src/data.ts @@ -1,7 +1,8 @@ // The data contract between the renderer and a mod's layout scripts: the -// attributes of a layout's panel that hold its data and the mod's routes, and -// the event that announces a change. The renderer writes them and the layout -// library reads them, so only these two change when the contract does. +// attributes of a layout's panel that hold its data, the mod's routes and +// the names a press goes back with, the event that announces a change, and +// the console command a layout's press runs. The renderer writes them and the +// layout library reads them, so only these two change when the contract does. /** layoutDataAttribute names the attribute holding a layout node's data. */ export const layoutDataAttribute = 'modlock_data' @@ -29,3 +30,93 @@ export const layoutDataChanged = 'modlock_data_changed' export function isRouteName(name: string): boolean { return /^[\w.-]+$/.test(name) } + +/** layoutModAttribute names the attribute holding a layout's mod's slug. */ +export const layoutModAttribute = 'modlock_mod' + +/** layoutNodeAttribute names the attribute holding a layout node's id. */ +export const layoutNodeAttribute = 'modlock_node' + +/** + * maxActionPayload is the most bytes of UTF-8 a layout's press carries, so + * its console command stays inside the engine's line. + */ +export const maxActionPayload = 180 + +/** + * actionCommand is the console command that sends a layout's press to its + * mod: the action's name and payload's text, as unpadded base64url of its + * UTF-8, which an empty payload leaves off. The game server hears it with the sending player, as it hears a + * button's press, and the host refuses it unless that player's tree shows the + * layout. It is empty for a name, a node or a mod the host would refuse, and + * for a payload over maxActionPayload bytes. + */ +export function actionCommand( + mod: string, + node: string, + action: string, + payload: string, +): string { + // Encoding past the limit by a character's most bytes shows an overflow. + const bytes = utf8(payload, maxActionPayload + 4) + if ( + !/^[a-z0-9]+(-[a-z0-9]+)*$/.test(mod) || + !/^[\w.:-]{1,64}$/.test(node) || + !/^[\w.-]{1,64}$/.test(action) || + bytes.length > maxActionPayload + ) { + return '' + } + const command = `modlockaction ${mod} ${node} ${action}` + return bytes.length === 0 ? command : `${command} ${base64Url(bytes)}` +} + +/** + * utf8 returns text's UTF-8 bytes, cut at a character to at most limit bytes. + * A lone surrogate becomes the replacement character. + */ +export function utf8(text: string, limit: number): number[] { + const bytes: number[] = [] + for (const character of text) { + // Encode one character in one to four bytes. + let point = character.codePointAt(0) ?? 0xfffd + if (point >= 0xd800 && point <= 0xdfff) { + point = 0xfffd + } + const tail = (shift: number) => 0x80 | ((point >> shift) & 63) + const encoded = + point < 0x80 + ? [point] + : point < 0x800 + ? [0xc0 | (point >> 6), tail(0)] + : point < 0x10000 + ? [0xe0 | (point >> 12), tail(6), tail(0)] + : [0xf0 | (point >> 18), tail(12), tail(6), tail(0)] + + // Stop before the character that would pass the limit. + if (bytes.length + encoded.length > limit) { + break + } + bytes.push(...encoded) + } + return bytes +} + +/** base64Digits are the digits of base64url in order. */ +const base64Digits = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_' + +/** base64Url writes bytes in unpadded base64url. */ +export function base64Url(bytes: readonly number[]): string { + let written = '' + for (let at = 0; at < bytes.length; at += 3) { + // Each three bytes make four digits; a short end makes one per byte and one. + const chunk = + (bytes[at]! << 16) | ((bytes[at + 1] ?? 0) << 8) | (bytes[at + 2] ?? 0) + const digits = Math.min(3, bytes.length - at) + 1 + for (let digit = 0; digit < digits; digit++) { + written += base64Digits[(chunk >> (18 - 6 * digit)) & 63] + } + } + return written +} diff --git a/panorama/src/draw.ts b/panorama/src/draw.ts index 42050534..1d75eea5 100644 --- a/panorama/src/draw.ts +++ b/panorama/src/draw.ts @@ -55,16 +55,24 @@ import { Weight, } from '../../src/wasm/ui/ui.pb.js' import { + base64Url, isRouteName, layoutDataAttribute, layoutDataChanged, + layoutModAttribute, + layoutNodeAttribute, routeAttribute, + utf8, } from './data.js' export { + actionCommand, isRouteName, layoutDataAttribute, layoutDataChanged, + layoutModAttribute, + layoutNodeAttribute, + maxActionPayload, routeAttribute, } from './data.js' @@ -315,56 +323,6 @@ const maxInput = 240 */ const maxUnanswered = 10 -/** - * utf8 returns text's UTF-8 bytes, cut at a character to at most limit bytes. - * A lone surrogate becomes the replacement character. - */ -function utf8(text: string, limit: number): number[] { - const bytes: number[] = [] - for (const character of text) { - // Encode one character in one to four bytes. - let point = character.codePointAt(0) ?? 0xfffd - if (point >= 0xd800 && point <= 0xdfff) { - point = 0xfffd - } - const tail = (shift: number) => 0x80 | ((point >> shift) & 63) - const encoded = - point < 0x80 - ? [point] - : point < 0x800 - ? [0xc0 | (point >> 6), tail(0)] - : point < 0x10000 - ? [0xe0 | (point >> 12), tail(6), tail(0)] - : [0xf0 | (point >> 18), tail(12), tail(6), tail(0)] - - // Stop before the character that would pass the limit. - if (bytes.length + encoded.length > limit) { - break - } - bytes.push(...encoded) - } - return bytes -} - -/** base64Digits are the digits of base64url in order. */ -const base64Digits = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_' - -/** base64Url writes bytes in unpadded base64url. */ -function base64Url(bytes: readonly number[]): string { - let written = '' - for (let at = 0; at < bytes.length; at += 3) { - // Each three bytes make four digits; a short end makes one per byte and one. - const chunk = - (bytes[at]! << 16) | ((bytes[at + 1] ?? 0) << 8) | (bytes[at + 2] ?? 0) - const digits = Math.min(3, bytes.length - at) + 1 - for (let digit = 0; digit < digits; digit++) { - written += base64Digits[(chunk >> (18 - 6 * digit)) & 63] - } - } - return written -} - /** panelTypes maps each kind of node to the stock panel that draws it. */ const panelTypes: Record = { [Kind.PANEL]: 'Panel', @@ -1217,6 +1175,8 @@ export class Drawing { // Load the node's layout with its data, or hand a loaded layout its new // data. A layout whose addon has not mounted yet loads on a later draw. if (layout && !loaded) { + panel.SetAttributeString(layoutModAttribute, mod) + panel.SetAttributeString(layoutNodeAttribute, id) panel.SetAttributeString(layoutDataAttribute, data) for (const [name, value] of this.routes.get(mod) ?? []) { panel.SetAttributeString(routeAttribute(name), value) diff --git a/panorama/src/layout.test.ts b/panorama/src/layout.test.ts new file mode 100644 index 00000000..5377d20e --- /dev/null +++ b/panorama/src/layout.test.ts @@ -0,0 +1,43 @@ +// Contract tests for the layout library's press: it runs the console command +// that names the layout's mod and node, which the renderer set on its panel, +// and sends nothing it cannot name. +import { expect, test } from 'bun:test' + +/** attributes are the attributes the renderer set on the layout's panel. */ +const attributes = new Map([ + ['modlock_mod', 'arena'], + ['modlock_node', 'card'], +]) + +/** sent holds each event the library dispatched, with its arguments. */ +const sent: unknown[][] = [] + +Object.assign(globalThis, { + $: { + GetContextPanel: () => ({ + GetAttributeString: (name: string, fallback: string) => + attributes.get(name) ?? fallback, + }), + DispatchEvent: (...args: unknown[]) => sent.push(args), + Msg: () => {}, + RegisterForUnhandledEvent: () => {}, + }, +}) +const { press } = await import('./layout.js') + +test('a layout presses its mod with its own node and a JSON payload', () => { + expect(press('vote', { vote: 1 })).toBe(true) + expect(press('close')).toBe(true) + expect(sent).toEqual([ + ['CitadelConCommand', 'modlockaction arena card vote eyJ2b3RlIjoxfQ'], + ['CitadelConCommand', 'modlockaction arena card close'], + ]) + + // A payload past the limit, a bad name or an unnamed layout sends nothing. + sent.length = 0 + expect(press('keep', 'x'.repeat(200))).toBe(false) + expect(press('a b')).toBe(false) + attributes.delete('modlock_node') + expect(press('close')).toBe(false) + expect(sent).toEqual([]) +}) diff --git a/panorama/src/layout.ts b/panorama/src/layout.ts index c182f2e9..ea688cf5 100644 --- a/panorama/src/layout.ts +++ b/panorama/src/layout.ts @@ -15,11 +15,22 @@ // change, with undefined while the mod sends none. The library reads the // attributes the renderer sets on the layout's panel and rereads them on the // renderer's change event, so no layout script names either. +// +// A layout sends a press back to its mod's server with a name and a small +// JSON payload: +// +// Modlock.press('buy', { item: 'boots' }) +// +// The mod hears it as a press on the layout's node with the action and the +// payload's JSON, from the player the server says sent it. import { + actionCommand, isRouteName, layoutDataAttribute, layoutDataChanged, + layoutModAttribute, + layoutNodeAttribute, routeAttribute, } from './data.js' @@ -58,6 +69,29 @@ export function route(name: string, handler: Handler): void { watch(routeAttribute(name), handler) } +/** + * press sends action to the layout's mod with payload as JSON, and reports + * whether it went: a name the host refuses, a payload whose JSON passes the + * bytes a press carries, or a layout the renderer did not name stays here. + * The host takes a few presses a second from each player and drops the rest. + */ +export function press(action: string, payload?: unknown): boolean { + // Build the command from the node the renderer named on this panel. + const json = payload === undefined ? '' : (JSON.stringify(payload) ?? '') + const command = actionCommand( + panel.GetAttributeString(layoutModAttribute, ''), + panel.GetAttributeString(layoutNodeAttribute, ''), + action, + json, + ) + if (command === '') { + $.Msg(`[Modlock] ${action} cannot be pressed`) + return false + } + $.DispatchEvent('CitadelConCommand', command) + return true +} + /** watch registers handler for attribute and hands it the current value. */ function watch(attribute: string, handler: Handler): void { if (watches.length === 0) { diff --git a/panorama/src/renderer.test.ts b/panorama/src/renderer.test.ts index a26a64e1..6fa71a40 100644 --- a/panorama/src/renderer.test.ts +++ b/panorama/src/renderer.test.ts @@ -4,11 +4,13 @@ import { beforeEach, expect, test } from 'bun:test' import { HudPart, Screen } from '../../src/wasm/ui/ui.pb.js' import { Bridge } from './bridge.js' import { + actionCommand, AddonLayouts, Drawing, type InputValue, inputCommand, layoutDataChanged, + maxActionPayload, pressCommand, } from './draw.js' import { @@ -891,6 +893,30 @@ test('draws inputs, avatars and game text, and sends edits', () => { ) }) +test("a layout's press names its mod, node and action and carries a short payload", () => { + // The payload travels as base64url of its UTF-8; an empty one is left off. + expect(actionCommand('arena', 'card', 'vote', '{"vote":1}')).toBe( + 'modlockaction arena card vote eyJ2b3RlIjoxfQ', + ) + expect(actionCommand('arena', 'card', 'close', '')).toBe( + 'modlockaction arena card close', + ) + expect(actionCommand('arena', 'card', 'keep', 'é'.repeat(90))).toBe( + `modlockaction arena card keep ${Buffer.from('é'.repeat(90)).toString('base64url')}`, + ) + + // A payload past the limit, or a name the host refuses, sends nothing. + expect(actionCommand('arena', 'card', 'keep', 'é'.repeat(91))).toBe('') + expect( + actionCommand('arena', 'card', 'keep', 'x'.repeat(maxActionPayload + 1)), + ).toBe('') + for (const action of ['', 'a b', 'a;quit', 'a\nquit', 'x'.repeat(65)]) { + expect(actionCommand('arena', 'card', action, '')).toBe('') + } + expect(actionCommand('Arena', 'card', 'vote', '')).toBe('') + expect(actionCommand('arena', 'a;quit', 'vote', '')).toBe('') +}) + test('sliders map native fractions to ranges and send scoped wheel anchors', () => { // Set up a renderer that reports the values it sends. const root = new FakePanel('Panel', 'ModlockUi') @@ -1589,6 +1615,8 @@ test('loads layouts and style sheets a host allows and hands them data', () => { const panel = root.children[0]!.children[0]! expect(panel.layout).toBe('file://arena/shop.xml') expect(panel.attributes.get('modlock_data')).toBe('{"gold":1}') + expect(panel.attributes.get('modlock_mod')).toBe('arena') + expect(panel.attributes.get('modlock_node')).toBe('a') expect(panel.children).toEqual([]) expect(dispatched).toEqual([]) diff --git a/python/modlock/__init__.py b/python/modlock/__init__.py index 4f42ed0f..aaa98751 100644 --- a/python/modlock/__init__.py +++ b/python/modlock/__init__.py @@ -1738,12 +1738,21 @@ class Wheel: @dataclasses.dataclass(slots=True, kw_only=True) class UiPressEvent: - """UiPressEvent reports a press on a button in a player's interface.""" + """UiPressEvent reports a press on a button in a player's interface, or a + press a layout's script sent with an action and a payload. + """ # player is the player who pressed. player: Player - # node is the id of the pressed button. + # node is the id of the pressed button, or of the layout whose script + # sent the press. node: str = "" + # action names a layout's press, as its script sent it: one to 64 + # letters, digits, '_', '-' and '.'. It is empty for a button's press. + action: str = "" + # payload is the text a layout's press carries, which the layout library + # writes as JSON: valid UTF-8 of at most 180 bytes. + payload: str = "" @dataclasses.dataclass(slots=True, kw_only=True) @@ -3791,6 +3800,8 @@ def remove(self) -> bool: [ wire.Field(1, "player", "int32", cls=Player, key="slot"), wire.Field(2, "node", "string"), + wire.Field(3, "action", "string"), + wire.Field(4, "payload", "string"), ], ), "UiInputEvent": ( diff --git a/src/wasm/ui.cc b/src/wasm/ui.cc index 77be50da..e04236bb 100644 --- a/src/wasm/ui.cc +++ b/src/wasm/ui.cc @@ -5,7 +5,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -335,6 +337,26 @@ float Fit(float value, float min, float max, float step) { return std::clamp(value, min, max); } +// IsActionName reports whether name can name a layout's press: one to 64 +// letters, digits, '_', '-' and '.'. +bool IsActionName(std::string_view name) { + return !name.empty() && name.size() <= 64 && std::ranges::all_of(name, [](unsigned char c) { + return std::isalnum(c) != 0 || c == '_' || c == '-' || c == '.'; + }); +} + +// IsUtf8 reports whether text is well-formed UTF-8. +bool IsUtf8(std::string_view text) { + while (!text.empty()) { + const auto size = CharacterSize(static_cast(text[0])); + if (size == 0 || size > text.size() || !ReadCharacter(text, size)) { + return false; + } + text.remove_prefix(size); + } + return true; +} + } // namespace std::expected UiTrees::Apply(int32_t slot, const ui::Change& change) { @@ -504,7 +526,65 @@ std::expected UiTrees::Input(int32_t slot, std::s return event; } +std::expected UiTrees::Action( + int32_t slot, std::string_view line, std::chrono::steady_clock::time_point now) { + // Split the line into the layout node, the action and the payload. + const auto first = line.find(' '); + const auto node = line.substr(0, first); + const auto rest = first == std::string_view::npos ? std::string_view() : line.substr(first + 1); + const auto second = rest.find(' '); + const auto action = rest.substr(0, second); + const auto encoded = + second == std::string_view::npos ? std::string_view() : rest.substr(second + 1); + + // Refuse a press from a layout the player's tree does not show. + auto tree = trees_.find(slot); + if (tree == trees_.end()) { + return std::unexpected("shows no layout " + std::string(node)); + } + auto shown = tree->second.find(node); + if (shown == tree->second.end() || shown->second.kind != ui::KIND_LAYOUT) { + return std::unexpected("shows no layout " + std::string(node)); + } + if (!IsActionName(action)) { + return std::unexpected("layout " + std::string(node) + " cannot press that name"); + } + if (encoded.size() > (kActionPayload * 4 + 2) / 3) { + return std::unexpected("layout " + std::string(node) + " sent a payload over " + + std::to_string(kActionPayload) + " bytes"); + } + const auto payload = DecodeBase64Url(encoded); + if (!payload || payload->size() > kActionPayload || !IsUtf8(*payload)) { + return std::unexpected("layout " + std::string(node) + + " sent a payload that is not short UTF-8"); + } + + // Refill the player's presses for the time since their last, and spend one. + auto [pace, fresh] = paces_.try_emplace(slot); + if (fresh) { + pace->second.when = now; + } + const std::chrono::duration since = now - pace->second.when; + pace->second.presses = std::min( + kActionBurst, pace->second.presses + std::max(0.0, since.count()) * kActionsPerSecond); + pace->second.when = std::max(now, pace->second.when); + if (pace->second.presses < 1) { + return std::unexpected("layout " + std::string(node) + " pressed faster than " + + std::format("{}", kActionsPerSecond) + " a second"); + } + pace->second.presses -= 1; + + // The engine named the player, so the press is theirs. + ui::UiPressEvent event; + event.set_player(slot); + event.set_node(std::string(node)); + event.set_action(std::string(action)); + event.set_payload(*payload); + return event; +} + bool UiTrees::Drop(int32_t slot) { + paces_.erase(slot); if (trees_.erase(slot) == 0) { return false; } @@ -520,6 +600,7 @@ std::vector UiTrees::Clear() { } trees_.clear(); left_.clear(); + paces_.clear(); return slots; } diff --git a/src/wasm/ui.h b/src/wasm/ui.h index a2f33c7c..69ebc3a5 100644 --- a/src/wasm/ui.h +++ b/src/wasm/ui.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -41,6 +42,24 @@ class UiTrees { std::string_view node, std::string_view value) const; + // Action checks a press a layout's script sent, as a player's game sends + // it: " " and then the payload's UTF-8 in unpadded + // base64url, which an empty payload leaves off. It returns the event the + // mod hears from slot, the player the engine names, while slot's tree shows + // the layout node and the player keeps under kActionsPerSecond presses a + // second after a burst of kActionBurst. A name, a payload or a pace past + // those is refused, and so is every press once the tree is gone. + [[nodiscard]] std::expected Action( + int32_t slot, std::string_view line, std::chrono::steady_clock::time_point now); + + // kActionPayload is the most bytes of payload a layout's press carries. + static constexpr size_t kActionPayload = 180; + + // kActionBurst and kActionsPerSecond bound the presses one player's + // layouts send: a burst, then a steady pace. + static constexpr double kActionBurst = 8; + static constexpr double kActionsPerSecond = 4; + // Drop forgets slot's tree when its player leaves, and reports whether it // held any node. bool Drop(int32_t slot); @@ -74,6 +93,16 @@ class UiTrees { std::map>> trees_; // left_ holds the slots whose player left since their last reset. std::set left_; + + // Pace is what one player's layouts have left of their presses: the + // presses they may still send, as of when. + struct Pace { + double presses = kActionBurst; + std::chrono::steady_clock::time_point when; + }; + + // paces_ maps each slot that pressed through a layout to its pace. + std::map paces_; }; } // namespace modlock::wasm diff --git a/src/wasm/ui/ui.pb.cc b/src/wasm/ui/ui.pb.cc index 44f98bd0..e44fa39e 100644 --- a/src/wasm/ui/ui.pb.cc +++ b/src/wasm/ui/ui.pb.cc @@ -62,6 +62,12 @@ inline constexpr UiPressEvent::Impl_::Impl_( node_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), + action_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + payload_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), player_{0} {} template @@ -1231,11 +1237,15 @@ const ::uint32_t 0, 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::modlock::wasm::ui::UiPressEvent, _impl_._has_bits_), - 5, // hasbit index offset + 7, // hasbit index offset PROTOBUF_FIELD_OFFSET(::modlock::wasm::ui::UiPressEvent, _impl_.player_), PROTOBUF_FIELD_OFFSET(::modlock::wasm::ui::UiPressEvent, _impl_.node_), - 1, + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ui::UiPressEvent, _impl_.action_), + PROTOBUF_FIELD_OFFSET(::modlock::wasm::ui::UiPressEvent, _impl_.payload_), + 3, 0, + 1, + 2, 0x085, // bitmap PROTOBUF_FIELD_OFFSET(::modlock::wasm::ui::UiInputEvent, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::modlock::wasm::ui::UiInputEvent, _impl_._oneof_case_[0]), @@ -1290,8 +1300,8 @@ static const ::_pbi::MigrationSchema {359, sizeof(::modlock::wasm::ui::Region)}, {370, sizeof(::modlock::wasm::ui::Screen)}, {375, sizeof(::modlock::wasm::ui::UiPressEvent)}, - {382, sizeof(::modlock::wasm::ui::UiInputEvent)}, - {401, sizeof(::modlock::wasm::ui::UiRequest)}, + {386, sizeof(::modlock::wasm::ui::UiInputEvent)}, + {405, sizeof(::modlock::wasm::ui::UiRequest)}, }; static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::modlock::wasm::ui::_Node_VariablesEntry_DoNotUse_default_instance_._instance, @@ -1432,64 +1442,65 @@ const char descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwa ".Region\022\r\n\005addon\030\004 \001(\t\022\022\n\ngeneration\030\005 \001" "(\004\"B\n\006Region\022\014\n\004left\030\001 \001(\002\022\013\n\003top\030\002 \001(\002\022" "\r\n\005width\030\003 \001(\002\022\016\n\006height\030\004 \001(\002\".\n\006Screen" - "\022$\n\005trees\030\001 \003(\0132\025.modlock.wasm.ui.Tree\"," + "\022$\n\005trees\030\001 \003(\0132\025.modlock.wasm.ui.Tree\"M" "\n\014UiPressEvent\022\016\n\006player\030\001 \001(\005\022\014\n\004node\030\002" - " \001(\t\"\240\001\n\014UiInputEvent\022\016\n\006player\030\001 \001(\005\022\014\n" - "\004node\030\002 \001(\t\022\016\n\004text\030\003 \001(\tH\000\022\020\n\006number\030\004 " - "\001(\002H\000\022\014\n\002on\030\005 \001(\010H\000\022\020\n\006choice\030\006 \001(\rH\000\022\'\n" - "\005wheel\030\007 \001(\0132\026.modlock.wasm.ui.WheelH\000B\007" - "\n\005value\"D\n\tUiRequest\022\016\n\006player\030\001 \001(\005\022\'\n\006" - "change\030\002 \001(\0132\027.modlock.wasm.ui.Change*\230\001" - "\n\007Scaling\022\023\n\017SCALING_DEFAULT\020\000\022\017\n\013SCALIN" - "G_FIT\020\001\022\021\n\rSCALING_COVER\020\002\022\023\n\017SCALING_ST" - "RETCH\020\003\022\025\n\021SCALING_FIT_WIDTH\020\004\022\026\n\022SCALIN" - "G_FIT_HEIGHT\020\005\022\020\n\014SCALING_NONE\020\006*\215\001\n\010Her" - "oLook\022\023\n\017HERO_LOOK_SMALL\020\000\022\022\n\016HERO_LOOK_" - "CARD\020\001\022\022\n\016HERO_LOOK_ICON\020\002\022\026\n\022HERO_LOOK_" - "VERTICAL\020\003\022\025\n\021HERO_LOOK_TOP_BAR\020\004\022\025\n\021HER" - "O_LOOK_MINIMAP\020\005*\256\002\n\007HudPart\022\024\n\020HUD_PART" - "_UNKNOWN\020\000\022\025\n\021HUD_PART_LEVEL_UP\020\001\022\027\n\023HUD" - "_PART_OWN_HEALTH\020\002\022\024\n\020HUD_PART_TOP_BAR\020\003" - "\022\021\n\rHUD_PART_AMMO\020\004\022\022\n\016HUD_PART_SOULS\020\005\022" - "\024\n\020HUD_PART_MINIMAP\020\006\022\026\n\022HUD_PART_ABILIT" - "IES\020\007\022\023\n\017HUD_PART_STATUS\020\010\022\022\n\016HUD_PART_S" - "TATS\020\t\022\030\n\024HUD_PART_HERO_PICKER\020\n\022\035\n\031HUD_" - "PART_BROKER_COUNTDOWN\020\013\022\020\n\014HUD_PART_ALL\020" - "\014*\236\001\n\004Kind\022\016\n\nKIND_PANEL\020\000\022\016\n\nKIND_LABEL" - "\020\001\022\016\n\nKIND_IMAGE\020\002\022\017\n\013KIND_BUTTON\020\003\022\017\n\013K" - "IND_LAYOUT\020\004\022\016\n\nKIND_ROUTE\020\005\022\023\n\017KIND_HER" - "O_IMAGE\020\006\022\016\n\nKIND_INPUT\020\007\022\017\n\013KIND_AVATAR" - "\020\010*p\n\010Overflow\022\024\n\020OVERFLOW_DEFAULT\020\000\022\023\n\017" - "OVERFLOW_SQUISH\020\001\022\021\n\rOVERFLOW_CLIP\020\002\022\023\n\017" - "OVERFLOW_SCROLL\020\003\022\021\n\rOVERFLOW_SHOW\020\004*\215\001\n" - "\rGradientShape\022\027\n\023GRADIENT_SHAPE_DOWN\020\000\022" - "\030\n\024GRADIENT_SHAPE_RIGHT\020\001\022\025\n\021GRADIENT_SH" - "APE_UP\020\002\022\027\n\023GRADIENT_SHAPE_LEFT\020\003\022\031\n\025GRA" - "DIENT_SHAPE_RADIAL\020\004*\236\001\n\006Weight\022\022\n\016WEIGH" - "T_DEFAULT\020\000\022\017\n\013WEIGHT_THIN\020\001\022\020\n\014WEIGHT_L" - "IGHT\020\002\022\021\n\rWEIGHT_NORMAL\020\003\022\021\n\rWEIGHT_MEDI" - "UM\020\004\022\024\n\020WEIGHT_SEMI_BOLD\020\005\022\017\n\013WEIGHT_BOL" - "D\020\006\022\020\n\014WEIGHT_BLACK\020\007*w\n\014TextOverflow\022\031\n" - "\025TEXT_OVERFLOW_DEFAULT\020\000\022\032\n\026TEXT_OVERFLO" - "W_ELLIPSIS\020\001\022\030\n\024TEXT_OVERFLOW_SHRINK\020\002\022\026" - "\n\022TEXT_OVERFLOW_CLIP\020\003*R\n\nDecoration\022\023\n\017" - "DECORATION_NONE\020\000\022\030\n\024DECORATION_UNDERLIN" - "E\020\001\022\025\n\021DECORATION_STRIKE\020\002*\\\n\006Easing\022\023\n\017" - "EASING_EASE_OUT\020\000\022\022\n\016EASING_EASE_IN\020\001\022\026\n" - "\022EASING_EASE_IN_OUT\020\002\022\021\n\rEASING_LINEAR\020\003" - "*G\n\004Face\022\020\n\014FACE_DEFAULT\020\000\022\r\n\tFACE_BODY\020" - "\001\022\016\n\nFACE_BLOCK\020\002\022\016\n\nFACE_SERIF\020\003*]\n\004Flo" - "w\022\r\n\tFLOW_NONE\020\000\022\r\n\tFLOW_DOWN\020\001\022\016\n\nFLOW_" - "RIGHT\020\002\022\022\n\016FLOW_DOWN_WRAP\020\003\022\023\n\017FLOW_RIGH" - "T_WRAP\020\004*9\n\005Align\022\017\n\013ALIGN_START\020\000\022\020\n\014AL" - "IGN_CENTER\020\001\022\r\n\tALIGN_END\020\002B+Z)github.co" - "m/paralin/modlock/src/wasm/ui;uib\006proto3" + " \001(\t\022\016\n\006action\030\003 \001(\t\022\017\n\007payload\030\004 \001(\t\"\240\001" + "\n\014UiInputEvent\022\016\n\006player\030\001 \001(\005\022\014\n\004node\030\002" + " \001(\t\022\016\n\004text\030\003 \001(\tH\000\022\020\n\006number\030\004 \001(\002H\000\022\014" + "\n\002on\030\005 \001(\010H\000\022\020\n\006choice\030\006 \001(\rH\000\022\'\n\005wheel\030" + "\007 \001(\0132\026.modlock.wasm.ui.WheelH\000B\007\n\005value" + "\"D\n\tUiRequest\022\016\n\006player\030\001 \001(\005\022\'\n\006change\030" + "\002 \001(\0132\027.modlock.wasm.ui.Change*\230\001\n\007Scali" + "ng\022\023\n\017SCALING_DEFAULT\020\000\022\017\n\013SCALING_FIT\020\001" + "\022\021\n\rSCALING_COVER\020\002\022\023\n\017SCALING_STRETCH\020\003" + "\022\025\n\021SCALING_FIT_WIDTH\020\004\022\026\n\022SCALING_FIT_H" + "EIGHT\020\005\022\020\n\014SCALING_NONE\020\006*\215\001\n\010HeroLook\022\023" + "\n\017HERO_LOOK_SMALL\020\000\022\022\n\016HERO_LOOK_CARD\020\001\022" + "\022\n\016HERO_LOOK_ICON\020\002\022\026\n\022HERO_LOOK_VERTICA" + "L\020\003\022\025\n\021HERO_LOOK_TOP_BAR\020\004\022\025\n\021HERO_LOOK_" + "MINIMAP\020\005*\256\002\n\007HudPart\022\024\n\020HUD_PART_UNKNOW" + "N\020\000\022\025\n\021HUD_PART_LEVEL_UP\020\001\022\027\n\023HUD_PART_O" + "WN_HEALTH\020\002\022\024\n\020HUD_PART_TOP_BAR\020\003\022\021\n\rHUD" + "_PART_AMMO\020\004\022\022\n\016HUD_PART_SOULS\020\005\022\024\n\020HUD_" + "PART_MINIMAP\020\006\022\026\n\022HUD_PART_ABILITIES\020\007\022\023" + "\n\017HUD_PART_STATUS\020\010\022\022\n\016HUD_PART_STATS\020\t\022" + "\030\n\024HUD_PART_HERO_PICKER\020\n\022\035\n\031HUD_PART_BR" + "OKER_COUNTDOWN\020\013\022\020\n\014HUD_PART_ALL\020\014*\236\001\n\004K" + "ind\022\016\n\nKIND_PANEL\020\000\022\016\n\nKIND_LABEL\020\001\022\016\n\nK" + "IND_IMAGE\020\002\022\017\n\013KIND_BUTTON\020\003\022\017\n\013KIND_LAY" + "OUT\020\004\022\016\n\nKIND_ROUTE\020\005\022\023\n\017KIND_HERO_IMAGE" + "\020\006\022\016\n\nKIND_INPUT\020\007\022\017\n\013KIND_AVATAR\020\010*p\n\010O" + "verflow\022\024\n\020OVERFLOW_DEFAULT\020\000\022\023\n\017OVERFLO" + "W_SQUISH\020\001\022\021\n\rOVERFLOW_CLIP\020\002\022\023\n\017OVERFLO" + "W_SCROLL\020\003\022\021\n\rOVERFLOW_SHOW\020\004*\215\001\n\rGradie" + "ntShape\022\027\n\023GRADIENT_SHAPE_DOWN\020\000\022\030\n\024GRAD" + "IENT_SHAPE_RIGHT\020\001\022\025\n\021GRADIENT_SHAPE_UP\020" + "\002\022\027\n\023GRADIENT_SHAPE_LEFT\020\003\022\031\n\025GRADIENT_S" + "HAPE_RADIAL\020\004*\236\001\n\006Weight\022\022\n\016WEIGHT_DEFAU" + "LT\020\000\022\017\n\013WEIGHT_THIN\020\001\022\020\n\014WEIGHT_LIGHT\020\002\022" + "\021\n\rWEIGHT_NORMAL\020\003\022\021\n\rWEIGHT_MEDIUM\020\004\022\024\n" + "\020WEIGHT_SEMI_BOLD\020\005\022\017\n\013WEIGHT_BOLD\020\006\022\020\n\014" + "WEIGHT_BLACK\020\007*w\n\014TextOverflow\022\031\n\025TEXT_O" + "VERFLOW_DEFAULT\020\000\022\032\n\026TEXT_OVERFLOW_ELLIP" + "SIS\020\001\022\030\n\024TEXT_OVERFLOW_SHRINK\020\002\022\026\n\022TEXT_" + "OVERFLOW_CLIP\020\003*R\n\nDecoration\022\023\n\017DECORAT" + "ION_NONE\020\000\022\030\n\024DECORATION_UNDERLINE\020\001\022\025\n\021" + "DECORATION_STRIKE\020\002*\\\n\006Easing\022\023\n\017EASING_" + "EASE_OUT\020\000\022\022\n\016EASING_EASE_IN\020\001\022\026\n\022EASING" + "_EASE_IN_OUT\020\002\022\021\n\rEASING_LINEAR\020\003*G\n\004Fac" + "e\022\020\n\014FACE_DEFAULT\020\000\022\r\n\tFACE_BODY\020\001\022\016\n\nFA" + "CE_BLOCK\020\002\022\016\n\nFACE_SERIF\020\003*]\n\004Flow\022\r\n\tFL" + "OW_NONE\020\000\022\r\n\tFLOW_DOWN\020\001\022\016\n\nFLOW_RIGHT\020\002" + "\022\022\n\016FLOW_DOWN_WRAP\020\003\022\023\n\017FLOW_RIGHT_WRAP\020" + "\004*9\n\005Align\022\017\n\013ALIGN_START\020\000\022\020\n\014ALIGN_CEN" + "TER\020\001\022\r\n\tALIGN_END\020\002B+Z)github.com/paral" + "in/modlock/src/wasm/ui;uib\006proto3" }; static ::absl::once_flag descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fui_2fui_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fui_2fui_2eproto = { false, false, - 6440, + 6473, descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fui_2fui_2eproto, "github.com/paralin/modlock/src/wasm/ui/ui.proto", &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fwasm_2fui_2fui_2eproto_once, @@ -11986,7 +11997,9 @@ PROTOBUF_NDEBUG_INLINE UiPressEvent::Impl_::Impl_( [[maybe_unused]] const ::modlock::wasm::ui::UiPressEvent& from_msg) : _has_bits_{from._has_bits_}, _cached_size_{0}, - node_(arena, from.node_) {} + node_(arena, from.node_), + action_(arena, from.action_), + payload_(arena, from.payload_) {} UiPressEvent::UiPressEvent( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, @@ -12009,7 +12022,9 @@ PROTOBUF_NDEBUG_INLINE UiPressEvent::Impl_::Impl_( [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) : _cached_size_{0}, - node_(arena) {} + node_(arena), + action_(arena), + payload_(arena) {} inline void UiPressEvent::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { new (&_impl_) Impl_(internal_visibility(), arena); @@ -12027,6 +12042,8 @@ inline void UiPressEvent::SharedDtor(MessageLite& self) { this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); ABSL_DCHECK(this_.GetArena() == nullptr); this_._impl_.node_.Destroy(); + this_._impl_.action_.Destroy(); + this_._impl_.payload_.Destroy(); this_._impl_.~Impl_(); } @@ -12073,16 +12090,16 @@ UiPressEvent::GetClassData() const { return UiPressEvent_class_data_.base(); } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 41, 2> +const ::_pbi::TcParseTable<2, 4, 0, 54, 2> UiPressEvent::_table_ = { { PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_._has_bits_), 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask + 4, 24, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap + 4294967280, // skipmap offsetof(decltype(_table_), field_entries), - 2, // num_field_entries + 4, // num_field_entries 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries UiPressEvent_class_data_.base(), @@ -12092,27 +12109,41 @@ UiPressEvent::_table_ = { ::_pbi::TcParser::GetTable<::modlock::wasm::ui::UiPressEvent>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ + // string payload = 4; + {::_pbi::TcParser::FastUS1, + {34, 2, 0, + PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.payload_)}}, + // int32 player = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(UiPressEvent, _impl_.player_), 3>(), + {8, 3, 0, + PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.player_)}}, // string node = 2; {::_pbi::TcParser::FastUS1, {18, 0, 0, PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.node_)}}, - // int32 player = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(UiPressEvent, _impl_.player_), 1>(), - {8, 1, 0, - PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.player_)}}, + // string action = 3; + {::_pbi::TcParser::FastUS1, + {26, 1, 0, + PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.action_)}}, }}, {{ 65535, 65535 }}, {{ // int32 player = 1; - {PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.player_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + {PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.player_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, // string node = 2; {PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.node_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string action = 3; + {PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.action_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string payload = 4; + {PROTOBUF_FIELD_OFFSET(UiPressEvent, _impl_.payload_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, }}, // no aux_entries {{ - "\34\0\4\0\0\0\0\0" + "\34\0\4\6\7\0\0\0" "modlock.wasm.ui.UiPressEvent" "node" + "action" + "payload" }}, }; PROTOBUF_NOINLINE void UiPressEvent::Clear() { @@ -12123,8 +12154,16 @@ PROTOBUF_NOINLINE void UiPressEvent::Clear() { (void) cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; - if (CheckHasBit(cached_has_bits, 0x00000001U)) { - _impl_.node_.ClearNonDefaultToEmpty(); + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.node_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.action_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.payload_.ClearNonDefaultToEmpty(); + } } _impl_.player_ = 0; _impl_._has_bits_.Clear(); @@ -12151,7 +12190,7 @@ ::uint8_t* PROTOBUF_NONNULL UiPressEvent::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[0]; // int32 player = 1; - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (this_._internal_player() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<1>( @@ -12169,6 +12208,26 @@ ::uint8_t* PROTOBUF_NONNULL UiPressEvent::_InternalSerialize( } } + // string action = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_action().empty()) { + const ::std::string& _s = this_._internal_action(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.wasm.ui.UiPressEvent.action"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + } + + // string payload = 4; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_payload().empty()) { + const ::std::string& _s = this_._internal_payload(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.wasm.ui.UiPressEvent.payload"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -12194,7 +12253,7 @@ ::size_t UiPressEvent::ByteSizeLong() const { ::_pbi::Prefetch5LinesFrom7Lines(&this_); cached_has_bits = this_._impl_._has_bits_[0]; - if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { // string node = 2; if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (!this_._internal_node().empty()) { @@ -12202,8 +12261,22 @@ ::size_t UiPressEvent::ByteSizeLong() const { this_._internal_node()); } } - // int32 player = 1; + // string action = 3; if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_action().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_action()); + } + } + // string payload = 4; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_payload().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_payload()); + } + } + // int32 player = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (this_._internal_player() != 0) { total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( this_._internal_player()); @@ -12228,7 +12301,7 @@ void UiPressEvent::MergeImpl(::google::protobuf::MessageLite& to_msg, (void)cached_has_bits; cached_has_bits = from._impl_._has_bits_[0]; - if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (!from._internal_node().empty()) { _this->_internal_set_node(from._internal_node()); @@ -12239,6 +12312,24 @@ void UiPressEvent::MergeImpl(::google::protobuf::MessageLite& to_msg, } } if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_action().empty()) { + _this->_internal_set_action(from._internal_action()); + } else { + if (_this->_impl_.action_.IsDefault()) { + _this->_internal_set_action(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_payload().empty()) { + _this->_internal_set_payload(from._internal_payload()); + } else { + if (_this->_impl_.payload_.IsDefault()) { + _this->_internal_set_payload(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (from._internal_player() != 0) { _this->_impl_.player_ = from._impl_.player_; } @@ -12264,6 +12355,8 @@ void UiPressEvent::InternalSwap(UiPressEvent* PROTOBUF_RESTRICT PROTOBUF_NONNULL _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.node_, &other->_impl_.node_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.action_, &other->_impl_.action_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.payload_, &other->_impl_.payload_, arena); swap(_impl_.player_, other->_impl_.player_); } diff --git a/src/wasm/ui/ui.pb.go b/src/wasm/ui/ui.pb.go index 37772a27..d4743f06 100644 --- a/src/wasm/ui/ui.pb.go +++ b/src/wasm/ui/ui.pb.go @@ -236,8 +236,8 @@ const ( // button takes clicks only while the player has a cursor. Kind_KIND_BUTTON Kind = 3 // KIND_LAYOUT loads the node's layout from the mod's content addon, whose - // script runs in the player's game and talks to the mod through its own - // console commands. Only a host that has reviewed the mod's content loads + // script runs in the player's game and sends presses back to the mod, as + // UiPressEvent's action and payload, or its own console commands. Only a host that has reviewed the mod's content loads // it; Modlock's renderer draws an empty panel. Kind_KIND_LAYOUT Kind = 4 // KIND_ROUTE draws nothing: it hands its data to every layout of the mod @@ -2482,13 +2482,21 @@ func (x *Screen) GetTrees() []*Tree { return nil } -// UiPressEvent reports a press on a button in a player's interface. +// UiPressEvent reports a press on a button in a player's interface, or a +// press a layout's script sent with an action and a payload. type UiPressEvent struct { unknownFields []byte // Player is the player who pressed. Player int32 `protobuf:"varint,1,opt,name=player,proto3" json:"player,omitempty"` - // Node is the id of the pressed button. + // Node is the id of the pressed button, or of the layout whose script + // sent the press. Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` + // Action names a layout's press, as its script sent it: one to 64 + // letters, digits, '_', '-' and '.'. It is empty for a button's press. + Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` + // Payload is the text a layout's press carries, which the layout library + // writes as JSON: valid UTF-8 of at most 180 bytes. + Payload string `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` } func (x *UiPressEvent) Reset() { @@ -2511,6 +2519,20 @@ func (x *UiPressEvent) GetNode() string { return "" } +func (x *UiPressEvent) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (x *UiPressEvent) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + // UiInputEvent reports a change the player made to an input in their // interface, with the value as the host checked it. type UiInputEvent struct { @@ -3276,6 +3298,8 @@ func (m *UiPressEvent) CloneVT() *UiPressEvent { r := new(UiPressEvent) r.Player = m.Player r.Node = m.Node + r.Action = m.Action + r.Payload = m.Payload if len(m.unknownFields) > 0 { r.unknownFields = slices.Clone(m.unknownFields) } @@ -4362,6 +4386,12 @@ func (this *UiPressEvent) EqualVT(that *UiPressEvent) bool { if this.Node != that.Node { return false } + if this.Action != that.Action { + return false + } + if this.Payload != that.Payload { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -7424,6 +7454,16 @@ func (x *UiPressEvent) MarshalProtoJSON(s *json.MarshalState) { s.WriteObjectField("node") s.WriteString(x.Node) } + if x.Action != "" || s.HasField("action") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("action") + s.WriteString(x.Action) + } + if x.Payload != "" || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteString(x.Payload) + } s.WriteObjectEnd() } @@ -7447,6 +7487,12 @@ func (x *UiPressEvent) UnmarshalProtoJSON(s *json.UnmarshalState) { case "node": s.AddField("node") x.Node = s.ReadString() + case "action": + s.AddField("action") + x.Action = s.ReadString() + case "payload": + s.AddField("payload") + x.Payload = s.ReadString() } }) } @@ -9525,6 +9571,16 @@ func (m *UiPressEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m.unknownFields != nil { i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Payload) + i-- + dAtA[i] = 0x22 + } + if len(m.Action) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Action) + i-- + dAtA[i] = 0x1a + } if len(m.Node) > 0 { i = protobuf_go_lite.EncodeString(dAtA, i, m.Node) i-- @@ -10282,6 +10338,8 @@ func (m *UiPressEvent) SizeVT() (n int) { _ = l n += protobuf_go_lite.SizeVarintNonZero(1, m.Player) n += protobuf_go_lite.SizeStringNonEmpty(1, m.Node) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Action) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Payload) n += len(m.unknownFields) return n } @@ -11379,6 +11437,14 @@ func (x *UiPressEvent) MarshalProtoText() string { protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "node") protobuf_go_lite.TextWriteString(&sb, x.Node) } + if x.Action != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "action") + protobuf_go_lite.TextWriteString(&sb, x.Action) + } + if x.Payload != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteString(&sb, x.Payload) + } return protobuf_go_lite.TextFinishMessage(&sb) } @@ -14277,6 +14343,26 @@ func (m *UiPressEvent) UnmarshalVT(dAtA []byte) error { return err } m.Node = v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Action = v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Payload = v default: iNdEx = preIndex skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) diff --git a/src/wasm/ui/ui.pb.h b/src/wasm/ui/ui.pb.h index 5f08b38c..bc72ebdb 100644 --- a/src/wasm/ui/ui.pb.h +++ b/src/wasm/ui/ui.pb.h @@ -1111,6 +1111,8 @@ class MODLOCK_API UiPressEvent final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { kNodeFieldNumber = 2, + kActionFieldNumber = 3, + kPayloadFieldNumber = 4, kPlayerFieldNumber = 1, }; // string node = 2; @@ -1127,6 +1129,36 @@ class MODLOCK_API UiPressEvent final : public ::google::protobuf::Message PROTOBUF_ALWAYS_INLINE void _internal_set_node(const ::std::string& value); ::std::string* PROTOBUF_NONNULL _internal_mutable_node(); + public: + // string action = 3; + void clear_action() ; + const ::std::string& action() const; + template + void set_action(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_action(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_action(); + void set_allocated_action(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_action() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_action(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_action(); + + public: + // string payload = 4; + void clear_payload() ; + const ::std::string& payload() const; + template + void set_payload(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_payload(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_payload(); + void set_allocated_payload(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_payload() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_payload(); + public: // int32 player = 1; void clear_player() ; @@ -1142,8 +1174,8 @@ class MODLOCK_API UiPressEvent final : public ::google::protobuf::Message private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 41, + static const ::google::protobuf::internal::TcParseTable<2, 4, + 0, 54, 2> _table_; @@ -1165,6 +1197,8 @@ class MODLOCK_API UiPressEvent final : public ::google::protobuf::Message ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr node_; + ::google::protobuf::internal::ArenaStringPtr action_; + ::google::protobuf::internal::ArenaStringPtr payload_; ::int32_t player_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -14732,7 +14766,7 @@ inline void UiPressEvent::clear_player() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.player_ = 0; ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); + 0x00000008U); } inline ::int32_t UiPressEvent::player() const { // @@protoc_insertion_point(field_get:modlock.wasm.ui.UiPressEvent.player) @@ -14740,7 +14774,7 @@ inline ::int32_t UiPressEvent::player() const { } inline void UiPressEvent::set_player(::int32_t value) { _internal_set_player(value); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); // @@protoc_insertion_point(field_set:modlock.wasm.ui.UiPressEvent.player) } inline ::int32_t UiPressEvent::_internal_player() const { @@ -14817,6 +14851,136 @@ inline void UiPressEvent::set_allocated_node(::std::string* PROTOBUF_NULLABLE va // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ui.UiPressEvent.node) } +// string action = 3; +inline void UiPressEvent::clear_action() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.action_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& UiPressEvent::action() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.ui.UiPressEvent.action) + return _internal_action(); +} +template +PROTOBUF_ALWAYS_INLINE void UiPressEvent::set_action(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.action_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.ui.UiPressEvent.action) +} +inline ::std::string* PROTOBUF_NONNULL UiPressEvent::mutable_action() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_action(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.ui.UiPressEvent.action) + return _s; +} +inline const ::std::string& UiPressEvent::_internal_action() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.action_.Get(); +} +inline void UiPressEvent::_internal_set_action(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.action_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL UiPressEvent::_internal_mutable_action() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.action_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE UiPressEvent::release_action() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.wasm.ui.UiPressEvent.action) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.action_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.action_.Set("", GetArena()); + } + return released; +} +inline void UiPressEvent::set_allocated_action(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.action_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.action_.IsDefault()) { + _impl_.action_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ui.UiPressEvent.action) +} + +// string payload = 4; +inline void UiPressEvent::clear_payload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.payload_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& UiPressEvent::payload() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.wasm.ui.UiPressEvent.payload) + return _internal_payload(); +} +template +PROTOBUF_ALWAYS_INLINE void UiPressEvent::set_payload(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.payload_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.wasm.ui.UiPressEvent.payload) +} +inline ::std::string* PROTOBUF_NONNULL UiPressEvent::mutable_payload() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:modlock.wasm.ui.UiPressEvent.payload) + return _s; +} +inline const ::std::string& UiPressEvent::_internal_payload() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.payload_.Get(); +} +inline void UiPressEvent::_internal_set_payload(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.payload_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL UiPressEvent::_internal_mutable_payload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.payload_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE UiPressEvent::release_payload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.wasm.ui.UiPressEvent.payload) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.payload_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.payload_.Set("", GetArena()); + } + return released; +} +inline void UiPressEvent::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.payload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { + _impl_.payload_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.wasm.ui.UiPressEvent.payload) +} + // ------------------------------------------------------------------- // UiInputEvent diff --git a/src/wasm/ui/ui.pb.ts b/src/wasm/ui/ui.pb.ts index 7660c8f1..92e0467e 100644 --- a/src/wasm/ui/ui.pb.ts +++ b/src/wasm/ui/ui.pb.ts @@ -252,8 +252,8 @@ export enum Kind { /** * KIND_LAYOUT loads the node's layout from the mod's content addon, whose - * script runs in the player's game and talks to the mod through its own - * console commands. Only a host that has reviewed the mod's content loads + * script runs in the player's game and sends presses back to the mod, as + * UiPressEvent's action and payload, or its own console commands. Only a host that has reviewed the mod's content loads * it; Modlock's renderer draws an empty panel. */ LAYOUT = 4, @@ -3238,7 +3238,8 @@ export const Screen: MessageType = ) /** - * UiPressEvent reports a press on a button in a player's interface. + * UiPressEvent reports a press on a button in a player's interface, or a + * press a layout's script sent with an action and a payload. * * @generated from message modlock.wasm.ui.UiPressEvent */ @@ -3248,9 +3249,20 @@ export interface UiPressEvent { */ player?: number /** - * Node is the id of the pressed button. + * Node is the id of the pressed button, or of the layout whose script + * sent the press. */ node?: string + /** + * Action names a layout's press, as its script sent it: one to 64 + * letters, digits, '_', '-' and '.'. It is empty for a button's press. + */ + action?: string + /** + * Payload is the text a layout's press carries, which the layout library + * writes as JSON: valid UTF-8 of at most 180 bytes. + */ + payload?: string } export const UiPressEvent: MessageType = @@ -3259,6 +3271,8 @@ export const UiPressEvent: MessageType = () => [ [1, 'player', 5], [2, 'node', 9], + [3, 'action', 9], + [4, 'payload', 9], ], { decode: (r: BinaryReader, end: number, m: UiPressEvent): UiPressEvent => { @@ -3272,6 +3286,12 @@ export const UiPressEvent: MessageType = case 2: m.node = r.string() break + case 3: + m.action = r.string() + break + case 4: + m.payload = r.string() + break default: r.skip(t) } @@ -3287,6 +3307,14 @@ export const UiPressEvent: MessageType = const v = m.node if (v) w.uint32(18).string(v) } + { + const v = m.action + if (v) w.uint32(26).string(v) + } + { + const v = m.payload + if (v) w.uint32(34).string(v) + } }, }, ) diff --git a/src/wasm/ui/ui.proto b/src/wasm/ui/ui.proto index 13a7b5ac..ebc474c9 100644 --- a/src/wasm/ui/ui.proto +++ b/src/wasm/ui/ui.proto @@ -367,8 +367,8 @@ enum Kind { KIND_BUTTON = 3; // KIND_LAYOUT loads the node's layout from the mod's content addon, whose - // script runs in the player's game and talks to the mod through its own - // console commands. Only a host that has reviewed the mod's content loads + // script runs in the player's game and sends presses back to the mod, as + // UiPressEvent's action and payload, or its own console commands. Only a host that has reviewed the mod's content loads // it; Modlock's renderer draws an empty panel. KIND_LAYOUT = 4; @@ -895,13 +895,23 @@ message Screen { repeated Tree trees = 1; } -// UiPressEvent reports a press on a button in a player's interface. +// UiPressEvent reports a press on a button in a player's interface, or a +// press a layout's script sent with an action and a payload. message UiPressEvent { // Player is the player who pressed. int32 player = 1; - // Node is the id of the pressed button. + // Node is the id of the pressed button, or of the layout whose script + // sent the press. string node = 2; + + // Action names a layout's press, as its script sent it: one to 64 + // letters, digits, '_', '-' and '.'. It is empty for a button's press. + string action = 3; + + // Payload is the text a layout's press carries, which the layout library + // writes as JSON: valid UTF-8 of at most 180 bytes. + string payload = 4; } // UiInputEvent reports a change the player made to an input in their diff --git a/src/wasm/wasm_plugin.cc b/src/wasm/wasm_plugin.cc index 788cb7c8..aa8b52e4 100644 --- a/src/wasm/wasm_plugin.cc +++ b/src/wasm/wasm_plugin.cc @@ -241,6 +241,21 @@ std::expected WasmPlugin::Input(int32_t slot, std::string_vie return {}; } +std::expected WasmPlugin::Action(int32_t slot, std::string_view line) { + // Refuse a press the running mod's layout did not send. + if (!instance_) { + return std::unexpected(name_ + " is not running"); + } + auto event = ui_.Action(slot, line, std::chrono::steady_clock::now()); + if (!event) { + return std::unexpected(name_ + " " + event.error()); + } + + // Deliver the press to the mod. + static_cast(mod_.UiPress(*event)); + return {}; +} + std::expected WasmPlugin::Serve(const wasm::ServiceCall& call) { auto reply = mod_.Serve(call); if (!reply) { diff --git a/src/wasm/wasm_plugin.h b/src/wasm/wasm_plugin.h index d2e06817..de9d0339 100644 --- a/src/wasm/wasm_plugin.h +++ b/src/wasm/wasm_plugin.h @@ -211,6 +211,11 @@ class WasmPlugin final : public Plugin { // it. std::expected Input(int32_t slot, std::string_view line); + // Action delivers a press a layout the mod shows the player in slot sent: + // line is the layout's id, the action and the payload as UiTrees::Action + // reads them. + std::expected Action(int32_t slot, std::string_view line); + // Serve delivers one call to a service the mod serves and returns its answer. std::expected Serve(const wasm::ServiceCall& call); diff --git a/src/wasm/wasm_plugin_calls.cc b/src/wasm/wasm_plugin_calls.cc index 1ea30099..c9d5673f 100644 --- a/src/wasm/wasm_plugin_calls.cc +++ b/src/wasm/wasm_plugin_calls.cc @@ -25,6 +25,11 @@ constexpr std::string_view kPressCommand = "modlockpress "; // with the value as UiTrees::Input reads it. constexpr std::string_view kInputCommand = "modlockinput "; +// kActionCommand starts the console command a mod's layout script sends to +// press back to its mod: "modlockaction [payload]", +// with the rest as UiTrees::Action reads it. +constexpr std::string_view kActionCommand = "modlockaction "; + // kHandoffLimit is the most bytes of handoff state a mod holds for the game // or for one player. constexpr size_t kHandoffLimit = 64 * 1024; @@ -160,6 +165,19 @@ bool WasmPlugin::Command(int32_t slot, std::string_view raw_line) { return true; } + if (line.starts_with(kActionCommand)) { + // A layout's press names this mod, then its layout, action and payload. + const auto sent = line.substr(kActionCommand.size()); + const auto space = sent.find(' '); + if (space == std::string_view::npos || sent.substr(0, space) != slug_) { + return false; + } + if (auto refused = Action(slot, sent.substr(space + 1)); !refused) { + Log(refused.error()); + } + return true; + } + // Then the free for all, then the mod, may claim the command. if (game_.FreeForAllCommand(line)) { return true; diff --git a/tests/wasm_ui_test.cc b/tests/wasm_ui_test.cc index 30350413..373aff14 100644 --- a/tests/wasm_ui_test.cc +++ b/tests/wasm_ui_test.cc @@ -1,8 +1,10 @@ // Contract tests for a mod's interface trees: changes apply in order, a change // that breaks a limit leaves the tree as it was, layouts and style sheets stay // inside the mod's addon, only a shown button takes presses, and only a value a -// shown input can hold reaches the mod. A departed player's slot takes only a -// reset. +// shown input can hold reaches the mod, and a layout's press reaches it only +// from the player whose tree shows the layout, small and at a player's pace. A +// departed player's slot takes only a reset. +#include #include #include "gtest/gtest.h" @@ -266,4 +268,97 @@ TEST(UiTrees, ForgetsPlayers) { EXPECT_TRUE(trees.Clear().empty()); } +// ShowLayout returns a change that shows the layout node id. +Change ShowLayout(std::string id) { + auto change = Set(std::move(id), modlock::wasm::ui::KIND_LAYOUT); + change.mutable_set(0)->set_layout("board.xml"); + return change; +} + +// kStart is when a test's presses begin. +const auto kStart = std::chrono::steady_clock::time_point(std::chrono::hours(1)); + +TEST(UiTrees, TakesALayoutsPressFromThePlayerWhoseTreeShowsIt) { + // Slot 3's tree shows the layout; slot 4's does not. + UiTrees trees; + ASSERT_TRUE(trees.Apply(3, ShowLayout("card"))); + ASSERT_TRUE(trees.Apply(3, Set("ready", modlock::wasm::ui::KIND_BUTTON))); + ASSERT_TRUE(trees.Apply(4, Set("card", modlock::wasm::ui::KIND_BUTTON))); + + // The press carries the slot the engine named, whatever its line says, and + // its payload's text: "eyJ2b3RlIjoxfQ" is {"vote":1}. + auto press = trees.Action(3, "card vote eyJ2b3RlIjoxfQ", kStart); + ASSERT_TRUE(press) << press.error(); + EXPECT_EQ(press->player(), 3); + EXPECT_EQ(press->node(), "card"); + EXPECT_EQ(press->action(), "vote"); + EXPECT_EQ(press->payload(), R"({"vote":1})"); + auto bare = trees.Action(3, "card close", kStart); + ASSERT_TRUE(bare) << bare.error(); + EXPECT_EQ(bare->player(), 3); + EXPECT_EQ(bare->payload(), ""); + + // Another player, a button, a missing layout or a bad name is refused. + EXPECT_FALSE(trees.Action(4, "card vote eyJ2b3RlIjoxfQ", kStart)); + EXPECT_FALSE(trees.Action(3, "ready vote", kStart)); + EXPECT_FALSE(trees.Action(3, "shop vote", kStart)); + for (const char* line : {"card", "card ", "card a;quit", "card a/b", "card vote !!"}) { + EXPECT_FALSE(trees.Action(3, line, kStart)) << line; + } +} + +TEST(UiTrees, RefusesALayoutsOversizedPayload) { + UiTrees trees; + ASSERT_TRUE(trees.Apply(3, ShowLayout("card"))); + + // 180 bytes of payload pass; 181 do not, nor does text that is not UTF-8. + const auto encode = [](size_t bytes) { + // "QUFB" is "AAA"; a tail of one or two bytes is "QQ" or "QUE". + std::string encoded; + for (size_t at = 0; at + 3 <= bytes; at += 3) { + encoded += "QUFB"; + } + encoded += bytes % 3 == 1 ? "QQ" : bytes % 3 == 2 ? "QUE" : ""; + return encoded; + }; + auto most = trees.Action(3, "card keep " + encode(UiTrees::kActionPayload), kStart); + ASSERT_TRUE(most) << most.error(); + EXPECT_EQ(most->payload(), std::string(UiTrees::kActionPayload, 'A')); + EXPECT_FALSE(trees.Action(3, "card keep " + encode(UiTrees::kActionPayload + 1), kStart)); + EXPECT_FALSE(trees.Action(3, "card keep " + encode(3000), kStart)); + EXPECT_FALSE(trees.Action(3, "card keep _w", kStart)); +} + +TEST(UiTrees, KeepsEachPlayersLayoutPressesToAPace) { + UiTrees trees; + ASSERT_TRUE(trees.Apply(3, ShowLayout("card"))); + ASSERT_TRUE(trees.Apply(4, ShowLayout("card"))); + + // A burst passes and the next press at once is refused, for that player only. + for (int i = 0; i < static_cast(UiTrees::kActionBurst); ++i) { + EXPECT_TRUE(trees.Action(3, "card watch", kStart)) << i; + } + EXPECT_FALSE(trees.Action(3, "card watch", kStart)); + EXPECT_TRUE(trees.Action(4, "card watch", kStart)); + + // A quarter second later one more press passes. + const auto later = kStart + std::chrono::milliseconds(250); + EXPECT_TRUE(trees.Action(3, "card watch", later)); + EXPECT_FALSE(trees.Action(3, "card watch", later)); +} + +TEST(UiTrees, TakesNoLayoutPressOnceTheModStops) { + // A stopping mod clears every tree, so its layouts' presses go nowhere. + UiTrees trees; + ASSERT_TRUE(trees.Apply(3, ShowLayout("card"))); + ASSERT_TRUE(trees.Action(3, "card close", kStart)); + EXPECT_EQ(trees.Clear(), std::vector{3}); + EXPECT_FALSE(trees.Action(3, "card close", kStart)); + + // A player who leaves takes their layout's presses with them. + ASSERT_TRUE(trees.Apply(5, ShowLayout("card"))); + EXPECT_TRUE(trees.Drop(5)); + EXPECT_FALSE(trees.Action(5, "card close", kStart)); +} + } // namespace From 73b5729f1d34073629a122b81d5f3154814ab75e Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 00:03:47 -0800 Subject: [PATCH 04/15] wasm: tell observers when a mod's running build halts WasmHostObserver gains Halted, which the host sends when a mod's running build stops for a reload, a restart, a failure or its end, after its started service calls are dropped and before its next build starts. A host that keeps state for those calls, such as a provider waiting on a server's answer, forgets it there; Started comes only after the next build's start, which may already have started calls of its own. Signed-off-by: Christian Stewart --- include/modlock/wasm_host.h | 6 ++++++ src/wasm/wasm_plugin.cc | 1 + tests/wasm_host_test.cc | 12 ++++++++++++ 3 files changed, 19 insertions(+) diff --git a/include/modlock/wasm_host.h b/include/modlock/wasm_host.h index f72dd22c..9478f8bc 100644 --- a/include/modlock/wasm_host.h +++ b/include/modlock/wasm_host.h @@ -59,6 +59,12 @@ class MODLOCK_API WasmHostObserver { // that stops, and a player who leaves, end with a reset change. virtual void Ui(std::string_view mod, int32_t slot, const wasm::ui::Change& change) = 0; + // Halted reports that mod's running build stopped: for a reload, a + // restart, a failure or the mod's end. Its started service calls are + // dropped before its next build starts, so a host forgets what it keeps + // for them here, and their replies do nothing. + virtual void Halted(std::string_view /*mod*/) {} + // Slowed reports an event of mod that ran past its slow time and finished, // with where the time went. The players may restart a mod that stays stuck. virtual void Slowed(std::string_view /*mod*/, std::string_view /*report*/) {} diff --git a/src/wasm/wasm_plugin.cc b/src/wasm/wasm_plugin.cc index 986bab5e..99764b05 100644 --- a/src/wasm/wasm_plugin.cc +++ b/src/wasm/wasm_plugin.cc @@ -305,6 +305,7 @@ void WasmPlugin::Halt() { // Drop the movement, the subscriptions, the started service calls and // the game state. service_calls_.Drop(); + host_.Notify([&](WasmHostObserver& observer) { observer.Halted(name_); }); movement_.reset(); hero_slots_.clear(); Unsubscribe(); diff --git a/tests/wasm_host_test.cc b/tests/wasm_host_test.cc index cdca7c04..3df6a2c6 100644 --- a/tests/wasm_host_test.cc +++ b/tests/wasm_host_test.cc @@ -49,6 +49,9 @@ class Events final : public WasmHostObserver { void Held(std::string_view, bool held) override { seen.push_back(held ? "held" : "released"); } + // Halted keeps how many events came before each halt. + void Halted(std::string_view) override { halted.push_back(seen.size()); } + void Called(std::string_view mod, const modlock::wasm::profile::CallProfile& reported) override { if (mod == "extension-go") { calls.MergeFrom(reported); @@ -66,6 +69,7 @@ class Events final : public WasmHostObserver { } std::vector seen; + std::vector halted; modlock::wasm::profile::CallProfile calls; }; @@ -194,6 +198,8 @@ TEST(WasmHost, StartedServiceCallsEndInALaterFrame) { // Load the test mod with the shout service, answered at once, and the // slow service, which keeps each call's reply for later. WasmHost host({}); + Events events; + host.Observe(&events); host.Provide("shout", Shout); std::vector kept; host.ProvideLater("slow", [&](std::string_view mod, std::string_view method, @@ -258,11 +264,17 @@ TEST(WasmHost, StartedServiceCallsEndInALaterFrame) { // does not reach the next one. start("slow|wait|left|0"); ASSERT_EQ(kept.size(), 3u); + // The host hears the halt before the next build starts, so it can forget + // the calls first. ASSERT_TRUE(host.Reload(EXTENSION_GO_WASM)); + EXPECT_EQ(events.seen, (std::vector{"started", "reloaded"})); + EXPECT_EQ(events.halted, (std::vector{1})); kept[2]("LEFT"); (*plugin)->Tick(); EXPECT_EQ(ended(), ""); (*plugin)->Stop(); + EXPECT_EQ(events.halted, (std::vector{1, 2})); + host.Unobserve(&events); } TEST(PlayerScope, LimitedScopeRulesOnlyItsPlayersHits) { From 2cfdebd03e252569f5ff2ac7298b9bc2a830cc84 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 00:08:17 -0800 Subject: [PATCH 05/15] README: only the sandbox reads the services a mod names The services section said a host refuses a mod whose needed service it cannot provide. Only the sandbox does; the game host starts the mod either way, and the mod's call to a missing service fails. Signed-off-by: Christian Stewart --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a6ccda34..50db5565 100644 --- a/README.md +++ b/README.md @@ -1485,9 +1485,11 @@ The game draws interfaces with the renderer in [`panorama/`](panorama): [How mods reach the game](#how-mods-reach-the-game) for the protocol. Name each service the mod calls in `mod.json`; a service is needed unless it -is marked optional. A host refuses to start a mod whose needed service it -cannot provide, naming it, and starts one without an optional service, whose -calls then fail: +is marked optional. The sandbox refuses to start a mod whose needed service +nobody provides there, naming it, and starts one without an optional +service, whose calls then fail. A game host does not read the list yet: it +starts the mod either way, and a call to a service it does not provide +fails: ```json "services": [ From a0a1c9c842d2a2e05f46356bb4e58f1069fd7470 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 00:12:58 -0800 Subject: [PATCH 06/15] wasm: run a Luau and a Python mod's late service calls Each runtime starts two calls through its library, then gets a refusal, an answer, a second answer for the same call and a reply for a call it never made. Each call's function runs once, with the reply or the failure, and the extra replies are ignored. Signed-off-by: Christian Stewart --- tests/wasm_instance_test.cc | 124 ++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/tests/wasm_instance_test.cc b/tests/wasm_instance_test.cc index 4594175f..68dc036c 100644 --- a/tests/wasm_instance_test.cc +++ b/tests/wasm_instance_test.cc @@ -23,6 +23,8 @@ using modlock::wasm::Limits; using modlock::wasm::LogRequest; using modlock::wasm::Reply; using modlock::wasm::Runtime; +using modlock::wasm::ServiceCallStarted; +using modlock::wasm::ServiceRepliedEvent; using modlock::wasm::StartEvent; using modlock::wasm::StartResult; using modlock::wasm::effects::ChatRequest; @@ -351,6 +353,128 @@ TEST(WasmInstance, PythonModAnswersEvents) { EXPECT_EQ(Parse(recorder.calls[1].request()).message(), "first frame at tick 7"); } +// LaterCalls answers each StartServiceCall with the next number from 7, and +// keeps every call and the lines the mod logs. +struct LaterCalls { + std::vector calls; + std::vector logged; + uint64_t next = 7; + + Instance::HostCall Answer() { + return [this](const Call& call) { + calls.push_back(call); + Reply reply; + if (call.method() == "StartServiceCall") { + ServiceCallStarted started; + started.set_call(next++); + reply.set_response(started.SerializeAsString()); + } else if (call.method() == "Log") { + logged.push_back(Parse(call.request()).message()); + } + return reply; + }; + } +}; + +// Replied returns the ServiceReplied event ending call with payload, or with +// failure and error. +Call Replied(uint64_t call, std::string payload, + modlock::wasm::ServiceFailure failure = modlock::wasm::SERVICE_FAILURE_NONE, + std::string error = {}) { + ServiceRepliedEvent event; + event.set_call(call); + event.set_payload(std::move(payload)); + event.set_failure(failure); + event.set_error(std::move(error)); + return Event("ServiceReplied", event); +} + +// ExpectLaterCalls checks a mod that starts two calls to example.drills.v1 +// and logs how each ends: the first answered, the second refused, and a +// reply for a call it never made ignored. +void ExpectLaterCalls(Instance& instance, LaterCalls& host) { + // Both calls reached the host with their method, payload and timeout. + ASSERT_EQ(host.calls.size(), 2); + for (const auto& call : host.calls) { + EXPECT_EQ(call.method(), "StartServiceCall"); + } + const auto first = Parse(host.calls[0].request()); + EXPECT_EQ(first.service(), "example.drills.v1"); + EXPECT_EQ(first.method(), "List"); + EXPECT_EQ(first.payload(), "map"); + EXPECT_EQ(first.timeout_milliseconds(), 2500); + host.calls.clear(); + + // The answer reaches the first call's function, the refusal the second's. + ASSERT_TRUE(instance.Deliver(Replied(8, "", modlock::wasm::SERVICE_FAILURE_REFUSED, "no"))); + ASSERT_TRUE(instance.Deliver(Replied(7, "two"))); + ASSERT_TRUE(instance.Deliver(Replied(7, "again"))); + ASSERT_TRUE(instance.Deliver(Replied(99, "stray"))); + EXPECT_EQ(host.logged, (std::vector{"8 refused no", "7 reply two"})); +} + +TEST(WasmInstance, LuauCallServiceLaterEndsEachCallOnce) { + // Load the Luau runtime with a mod that starts two calls. + Runtime runtime; + LaterCalls host; + auto instance = Instance::Load(runtime, ReadFile(LUAU_WASM), Limits{}, host.Answer()); + ASSERT_TRUE(instance) << instance.error(); + const std::string library = LUAU_LIBRARY; + StartEvent start; + start.set_source(Zip({ + {"main.luau", R"( +local modlock = require("@modlock") + +modlock.callServiceLater("example.drills.v1", "List", "map", function(reply, error, failure) + modlock.log("7 " .. (reply and ("reply " .. reply) or (failure .. " " .. (error or "")))) +end, 2.5) +modlock.callServiceLater("example.drills.v1", "Get", "", function(reply, error, failure) + modlock.log("8 " .. (reply and ("reply " .. reply) or (failure .. " " .. (error or "")))) +end) +)"}, + {"@modlock/init.luau", Text(library + "/init.luau")}, + {"@modlock/wire.luau", Text(library + "/wire.luau")}, + })); + auto started = (*instance)->Deliver(Event("Start", start)); + ASSERT_TRUE(started) << started.error(); + ASSERT_EQ(started->error(), ""); + ExpectLaterCalls(**instance, host); +} + +TEST(WasmInstance, PythonCallServiceLaterEndsEachCallOnce) { + // Load the Python runtime with a mod that starts two calls. + Runtime runtime; + LaterCalls host; + auto instance = Instance::Load(runtime, ReadFile(PYTHON_WASM), Limits{}, host.Answer()); + ASSERT_TRUE(instance) << instance.error(); + const std::string library = PYTHON_LIBRARY; + StartEvent start; + start.set_source(Zip({ + {"main.py", R"( +import modlock + + +def ended(number): + def done(reply, error, failure): + if reply is not None: + modlock.log(f"{number} reply {reply.decode()}") + else: + modlock.log(f"{number} {failure} {error}") + return done + + +modlock.call_service_later("example.drills.v1", "List", b"map", ended(7), 2.5) +modlock.call_service_later("example.drills.v1", "Get", b"", ended(8)) +)"}, + {"modlock/__init__.py", Text(library + "/__init__.py")}, + {"modlock/wire.py", Text(library + "/wire.py")}, + })); + auto started = (*instance)->Deliver(Event("Start", start)); + ASSERT_TRUE(started) << started.error(); + ASSERT_EQ(started->error(), ""); + ExpectLaterCalls(**instance, host); +} + TEST(WasmInstance, TrapStopsTheMod) { // Load a mod whose handler traps. Runtime runtime; From e2c3a5d459e6ebbf57e98c407b9ed0f447af9382 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 00:28:04 -0800 Subject: [PATCH 07/15] panorama: say a layout's mod attribute holds the running instance's name The renderer writes the tree's mod, which is the name the host runs the mod under. That is the slug unless the host loaded it under another name. Signed-off-by: Christian Stewart --- panorama/src/data.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panorama/src/data.ts b/panorama/src/data.ts index a5a6ab8a..4479c3db 100644 --- a/panorama/src/data.ts +++ b/panorama/src/data.ts @@ -31,7 +31,11 @@ export function isRouteName(name: string): boolean { return /^[\w.-]+$/.test(name) } -/** layoutModAttribute names the attribute holding a layout's mod's slug. */ +/** + * layoutModAttribute names the attribute holding the name of the running mod + * instance whose tree shows the layout. That name is the mod's slug unless + * the host loaded the mod under another name. + */ export const layoutModAttribute = 'modlock_mod' /** layoutNodeAttribute names the attribute holding a layout node's id. */ From 3cab789ab7bb7750b21078df31497f83e9185caf Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 00:28:09 -0800 Subject: [PATCH 08/15] README: describe a layout's press back to its mod Say how a layout's script presses its mod with Modlock.press and the element's onAction, the console command it runs, what the server checks and bounds, and that the sandbox runs no layout scripts. Signed-off-by: Christian Stewart --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 17306ea9..1b9a8889 100644 --- a/README.md +++ b/README.md @@ -1448,8 +1448,33 @@ Each handler runs at once with the current value and again after each change, with `undefined` while the mod sends none. The library reads the panel's `modlock_data` and `modlock_route_` attributes and rereads them on the unhandled `PlaySoundEffect` event `modlock_data_changed`, which the renderer -sends once per draw that changes any. The layout answers the mod with its own -console commands. +sends once per draw that changes any. + +The layout answers the mod by pressing back. `Modlock.press('buy', { item: +'boots' })` sends the action with its payload as JSON, and the layout's +element hears it as `onAction`, with the player the server says sent it: + +```tsx + buy(player, action, payload)} +/> +``` + +A press runs the console command `modlockaction +[payload]` in the player's game, the payload's UTF-8 in unpadded base64url. +The server checks the press against the player who sent it and that +player's tree. It takes a press only while that player's tree shows the +layout. The action must be one to 64 letters, digits, `_`, `-` and `.`, and +the payload at most 180 bytes of UTF-8. Each player gets a burst of 8 +presses, refilling at 4 a second. It takes nothing once the mod stops. +`press` returns false and logs a line for a press it will not send: a name +the server would refuse, a payload over 180 bytes, or a layout the renderer +did not name. A press the server refuses goes to the server's log. A +layout may still run its own console commands. `modlock dev` and +`modlock play` in the sandbox draw a layout's panels but run none of its +scripts, so a press happens only in the game. The game draws interfaces with the renderer in [`panorama/`](panorama): From 77d2b932e01b575c79f53108834d189d20a933ad Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 10:45:12 -0800 Subject: [PATCH 09/15] preview: run layout scripts and send their presses The sandbox preview drew a layout's panels and sheets but ran none of its scripts, so a mod whose interface is a layout script showed an empty panel, and a press the script sent never left the page. Run each layout's script includes in order, in one scope, with a $ that has the layout's panel as its context, cancellable timers and the unhandled events the layout library listens on. The page serves a build's scripts from their compiled source and the layout library from its own copy. A script's modlockaction command becomes a press with its action and payload, which the sandbox delivers as the game's host would, and refuses when the game could not carry it. Signed-off-by: Christian Stewart --- cli/cli.pb.go | 88 +++++++++++++++++- cli/cli.pb.ts | 30 ++++++- cli/cli.proto | 12 ++- cmd/modlock/play.go | 8 +- js/library.go | 5 +- panorama/browser/dom.ts | 147 +++++++++++++++++++++++++++++-- panorama/browser/layouts.test.ts | 40 +++++++++ panorama/browser/layouts.ts | 50 +++++++++++ panorama/browser/preview.ts | 11 ++- preview/preview.go | 29 ++++++ preview/preview_test.go | 62 +++++++++++++ sandbox/sandbox.go | 27 +++++- sandbox/sandbox_test.go | 18 +++- 13 files changed, 502 insertions(+), 25 deletions(-) create mode 100644 panorama/browser/layouts.test.ts create mode 100644 panorama/browser/layouts.ts create mode 100644 preview/preview_test.go diff --git a/cli/cli.pb.go b/cli/cli.pb.go index 17ecd14b..3327ed7b 100644 --- a/cli/cli.pb.go +++ b/cli/cli.pb.go @@ -557,15 +557,21 @@ func (x *Change) GetEvent() *ui.UiInputEvent { return nil } -// Press identifies a button in the interface a mod shows a player. +// Press identifies a button in the interface a mod shows a player, or a +// press a layout's script sent from its node. type Press struct { unknownFields []byte // Mod is the mod's name. Mod string `protobuf:"bytes,1,opt,name=mod,proto3" json:"mod,omitempty"` // Slot identifies the player. Slot int32 `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty"` - // Node is the button's id in the mod's tree. + // Node is the button's id in the mod's tree, or the layout's. Node string `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"` + // Action names a layout's press, as its script sent it with Modlock.press. + // It is empty for a button's press. + Action string `protobuf:"bytes,4,opt,name=action,proto3" json:"action,omitempty"` + // Payload is the JSON text a layout's press carries, or empty. + Payload string `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` } func (x *Press) Reset() { @@ -595,6 +601,20 @@ func (x *Press) GetNode() string { return "" } +func (x *Press) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (x *Press) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + // Published reports a release. type Published struct { unknownFields []byte @@ -1160,6 +1180,8 @@ func (m *Press) CloneVT() *Press { r.Mod = m.Mod r.Slot = m.Slot r.Node = m.Node + r.Action = m.Action + r.Payload = m.Payload if len(m.unknownFields) > 0 { r.unknownFields = slices.Clone(m.unknownFields) } @@ -1800,6 +1822,12 @@ func (this *Press) EqualVT(that *Press) bool { if this.Node != that.Node { return false } + if this.Action != that.Action { + return false + } + if this.Payload != that.Payload { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -2687,6 +2715,16 @@ func (x *Press) MarshalProtoJSON(s *json.MarshalState) { s.WriteObjectField("node") s.WriteString(x.Node) } + if x.Action != "" || s.HasField("action") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("action") + s.WriteString(x.Action) + } + if x.Payload != "" || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteString(x.Payload) + } s.WriteObjectEnd() } @@ -2713,6 +2751,12 @@ func (x *Press) UnmarshalProtoJSON(s *json.UnmarshalState) { case "node": s.AddField("node") x.Node = s.ReadString() + case "action": + s.AddField("action") + x.Action = s.ReadString() + case "payload": + s.AddField("payload") + x.Payload = s.ReadString() } }) } @@ -3749,6 +3793,16 @@ func (m *Press) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m.unknownFields != nil { i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Payload) + i-- + dAtA[i] = 0x2a + } + if len(m.Action) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Action) + i-- + dAtA[i] = 0x22 + } if len(m.Node) > 0 { i = protobuf_go_lite.EncodeString(dAtA, i, m.Node) i-- @@ -4384,6 +4438,8 @@ func (m *Press) SizeVT() (n int) { n += protobuf_go_lite.SizeStringNonEmpty(1, m.Mod) n += protobuf_go_lite.SizeVarintNonZero(1, m.Slot) n += protobuf_go_lite.SizeStringNonEmpty(1, m.Node) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Action) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Payload) n += len(m.unknownFields) return n } @@ -4787,6 +4843,14 @@ func (x *Press) MarshalProtoText() string { protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "node") protobuf_go_lite.TextWriteString(&sb, x.Node) } + if x.Action != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "action") + protobuf_go_lite.TextWriteString(&sb, x.Action) + } + if x.Payload != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteString(&sb, x.Payload) + } return protobuf_go_lite.TextFinishMessage(&sb) } @@ -5796,6 +5860,26 @@ func (m *Press) UnmarshalVT(dAtA []byte) error { return err } m.Node = v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Action = v + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Payload = v default: iNdEx = preIndex skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) diff --git a/cli/cli.pb.ts b/cli/cli.pb.ts index 54e23578..98b54af4 100644 --- a/cli/cli.pb.ts +++ b/cli/cli.pb.ts @@ -759,7 +759,8 @@ export const Change: MessageType = ) /** - * Press identifies a button in the interface a mod shows a player. + * Press identifies a button in the interface a mod shows a player, or a + * press a layout's script sent from its node. * * @generated from message modlock.cli.Press */ @@ -773,9 +774,18 @@ export interface Press { */ slot?: number /** - * Node is the button's id in the mod's tree. + * Node is the button's id in the mod's tree, or the layout's. */ node?: string + /** + * Action names a layout's press, as its script sent it with Modlock.press. + * It is empty for a button's press. + */ + action?: string + /** + * Payload is the JSON text a layout's press carries, or empty. + */ + payload?: string } export const Press: MessageType = @@ -785,6 +795,8 @@ export const Press: MessageType = [1, 'mod', 9], [2, 'slot', 5], [3, 'node', 9], + [4, 'action', 9], + [5, 'payload', 9], ], { decode: (r: BinaryReader, end: number, m: Press): Press => { @@ -801,6 +813,12 @@ export const Press: MessageType = case 3: m.node = r.string() break + case 4: + m.action = r.string() + break + case 5: + m.payload = r.string() + break default: r.skip(t) } @@ -820,6 +838,14 @@ export const Press: MessageType = const v = m.node if (v) w.uint32(26).string(v) } + { + const v = m.action + if (v) w.uint32(34).string(v) + } + { + const v = m.payload + if (v) w.uint32(42).string(v) + } }, }, ) diff --git a/cli/cli.proto b/cli/cli.proto index 4dd8808b..54bd32a2 100644 --- a/cli/cli.proto +++ b/cli/cli.proto @@ -162,7 +162,8 @@ message Change { modlock.wasm.ui.UiInputEvent event = 2; } -// Press identifies a button in the interface a mod shows a player. +// Press identifies a button in the interface a mod shows a player, or a +// press a layout's script sent from its node. message Press { // Mod is the mod's name. string mod = 1; @@ -170,8 +171,15 @@ message Press { // Slot identifies the player. int32 slot = 2; - // Node is the button's id in the mod's tree. + // Node is the button's id in the mod's tree, or the layout's. string node = 3; + + // Action names a layout's press, as its script sent it with Modlock.press. + // It is empty for a button's press. + string action = 4; + + // Payload is the JSON text a layout's press carries, or empty. + string payload = 5; } // Published reports a release. diff --git a/cmd/modlock/play.go b/cmd/modlock/play.go index 5d66c624..86f0e2e2 100644 --- a/cmd/modlock/play.go +++ b/cmd/modlock/play.go @@ -336,9 +336,13 @@ func input(ctx context.Context, out *printer, box *sandbox.Sandbox, line string) // deliver presses the button or sends the command in to the sandbox's mods, // and returns a line for the creator when no mod received it, or empty. func deliver(ctx context.Context, box *sandbox.Sandbox, in *modcli.Input) string { - // Press the button. + // Press the button, or send the layout's press; a press the game would + // refuse says why. if press := in.GetPress(); press != nil { - pressed, err := box.Press(ctx, press.GetMod(), press.GetSlot(), press.GetNode()) + pressed, err := box.Press(ctx, press.GetMod(), press.GetSlot(), press.GetNode(), press.GetAction(), press.GetPayload()) + if err != nil && ctx.Err() == nil { + return press.GetMod() + ": " + err.Error() + } if err == nil && !pressed { return press.GetMod() + " is not running to receive the press" } diff --git a/js/library.go b/js/library.go index 51a56f2a..58dd3ef5 100644 --- a/js/library.go +++ b/js/library.go @@ -409,8 +409,8 @@ func Build(ctx context.Context, source, out string) error { } } - // Bundle the library, the entity classes, the console, the renderer and - // the pages. + // Bundle the library, the entity classes, the console, the renderer, the + // layout library and the pages, which run the layout library as well. bundles := []struct { name string options api.BuildOptions @@ -420,6 +420,7 @@ func Build(ctx context.Context, source, out string) error { {"console.js", api.BuildOptions{EntryPoints: []string{"js/src/console.ts"}, Format: api.FormatESModule, Target: api.ES2023, External: []string{"modlock"}}}, {Renderer, api.BuildOptions{EntryPoints: []string{"panorama/src/main.ts"}, Format: api.FormatIIFE, Target: api.ES2020, MinifyWhitespace: true, MinifyIdentifiers: true, MinifySyntax: true}}, {LayoutLibrary, api.BuildOptions{EntryPoints: []string{"panorama/src/layout.ts"}, Format: api.FormatIIFE, GlobalName: "Modlock", Target: api.ES2020, MinifySyntax: true}}, + {Preview + "/" + LayoutLibrary, api.BuildOptions{EntryPoints: []string{"panorama/src/layout.ts"}, Format: api.FormatIIFE, GlobalName: "Modlock", Target: api.ES2020, MinifySyntax: true}}, {Preview + "/preview.js", api.BuildOptions{EntryPoints: []string{"panorama/browser/preview.ts"}, Format: api.FormatIIFE, Target: api.ES2022, MinifySyntax: true}}, {Studio + "/studio.js", api.BuildOptions{ EntryPoints: []string{"studio/web/main.tsx"}, Format: api.FormatIIFE, Target: api.ES2022, diff --git a/panorama/browser/dom.ts b/panorama/browser/dom.ts index fb8d6c84..d2306827 100644 --- a/panorama/browser/dom.ts +++ b/panorama/browser/dom.ts @@ -1,4 +1,5 @@ import type { Panel, Panorama } from '../src/draw.js' +import { scriptPath } from './layouts.js' import { cascade, parseSheet, type Rule, type Scope } from './sheets.js' /** mouse is the last pointer position in window pixels, as Panorama reports it. */ @@ -10,10 +11,10 @@ const mouse = { x: 0, y: 0 } * layout with the CSS in panels.css, which the page must link: children * overlap unless the panel flows them down or right, and fill-parent-flow * takes the remaining space. Fonts and engine-only styles are approximate. - * A layout it loads draws its panels, their classes and inline styles, and + * A layout it loads draws its panels, their classes and inline styles, * applies its style sheets to the panel it loads into and that panel's - * subtree, but runs none of its scripts; the installed game remains the - * reference. + * subtree, and runs its scripts with that panel as their context; the + * installed game remains the reference. */ export class DomPanel implements Panel { readonly element: HTMLElement @@ -120,10 +121,28 @@ export class DomPanel implements Panel { return this.element.offsetWidth } + get actuallayoutheight(): number { + return this.element.offsetHeight + } + get actualuiscale_x(): number { return this.element.getBoundingClientRect().width / this.element.offsetWidth } + get actualuiscale_y(): number { + return ( + this.element.getBoundingClientRect().height / this.element.offsetHeight + ) + } + + get actualxoffset(): number { + return this.element.offsetLeft + } + + get actualyoffset(): number { + return this.element.offsetTop + } + GetPositionWithinWindow(): { x: number; y: number } { const bounds = this.element.getBoundingClientRect() return { x: bounds.x, y: bounds.y } @@ -301,6 +320,9 @@ export class DomPanel implements Panel { return this.attributes.get(name) ?? fallback } + // The page shows no web page in a panel, so an HTML panel stays empty. + SetURL(_url: string) {} + SetImage(path: string) { this.element.style.backgroundImage = path ? `url(${JSON.stringify(path)})` @@ -311,8 +333,9 @@ export class DomPanel implements Panel { * BLoadLayout loads the layout a page path such as /layout/mod/board.xml * serves into this panel, as Panorama does: the layout's top panel * describes this one and its children become this panel's, though a style - * the drawing already gave this panel stays. It loads in the background, - * and refuses a game path, which a browser cannot read. + * the drawing already gave this panel stays. Its scripts run once its + * panels are built. It loads in the background, and refuses a game path, + * which a browser cannot read. */ BLoadLayout(url: string) { if (!url.startsWith('/')) return false @@ -320,6 +343,8 @@ export class DomPanel implements Panel { new DOMParser().parseFromString(text, 'text/xml'), ) .then((layout) => { + // Style the panel, then build its panels, then run its scripts + // over them. const top = [...layout.documentElement.children].find( (child) => !nonPanels.has(child.tagName.toLowerCase()), ) @@ -328,6 +353,9 @@ export class DomPanel implements Panel { if (child.tagName.toLowerCase() === 'styles') this.loadSheets(child, url) if (top) this.loadElement(top, new Set(Object.keys(this.inline))) + for (const child of layout.documentElement.children) + if (child.tagName.toLowerCase() === 'scripts') + this.loadScripts(child, url) }) .catch((error: unknown) => console.debug(`layout ${url}:`, error)) return true @@ -387,6 +415,34 @@ export class DomPanel implements Panel { } } + // loadScripts runs the scripts a layout's scripts element includes, fetched + // from the page beside the layout at url, in order and in one scope, as the + // game runs a layout's scripts in one context: the layout library's Modlock + // is the next script's. A script the page does not serve leaves the rest + // unrun, since a later one leans on it. + private loadScripts(scripts: Element, url: string) { + const build = new URL(url, location.href).search + const paths = [...scripts.children].map((include) => + scriptPath(include.getAttribute('src') ?? '', build), + ) + if (paths.some((path) => path === '')) { + console.debug(`layout ${url}: a script the page cannot load`) + return + } + void Promise.all(paths.map((path) => fetchOnce(path, (text) => text))) + .then((sources) => { + if (!this.valid) return + // A mod's layout script is code by design; the page runs what the + // game would. + // oxlint-disable-next-line typescript/no-implied-eval + const run = new Function('$', sources.join('\n;\n')) as ( + panorama: unknown, + ) => void + run(layoutPanorama(this)) + }) + .catch((error: unknown) => console.debug(`layout ${url}:`, error)) + } + /** applySheets writes the values the style sheets now give this panel. */ applySheets(values: ReadonlyMap) { for (const [name, value] of values) { @@ -500,10 +556,32 @@ if (typeof document !== 'undefined') { // than panels. const nonPanels = new Set(['styles', 'scripts', 'snippets']) +/** Listener is a layout script's handler for an event nothing handled. */ +interface Listener { + readonly event: string + readonly handler: (...values: unknown[]) => void + readonly context: DomPanel +} + +// listeners holds the layout scripts' handlers in registration order; one +// whose layout left the page hears nothing more, and one that throws keeps +// the rest from missing the event. command passes on the console +// commands the scripts dispatch. +const listeners = new Set() +let command: (line: string) => void = () => {} + +/** + * onCommand passes each console command a layout's script dispatches, such + * as a press for its mod, to handler. + */ +export function onCommand(handler: (line: string) => void): void { + command = handler +} + /** * domPanorama is the part of Panorama a Drawing uses, on DomPanels. Debug - * messages go to the console; a press reaches the page through the Drawing's - * Press, so dispatched events go nowhere. + * messages go to the console; a button's press reaches the page through the + * Drawing's Press, and a layout's through onCommand. */ export const domPanorama = { MousePosition: () => mouse, @@ -540,8 +618,30 @@ export const domPanorama = { const values = Object.values(panel.dialogVariables()) return values.length ? `${token} ${values.join(' ')}` : token }, - // A text tooltip shows as the element's title; other events go nowhere. + // A console command goes to the page, a text tooltip shows as the element's + // title, and other events reach the layout scripts listening for them. DispatchEvent(event: string, ...values: unknown[]) { + // A console command, such as a layout's press, is the page's alone. + if (event === 'CitadelConCommand') { + command(typeof values[0] === 'string' ? values[0] : '') + return + } + + // Each live layout listening hears the event. + for (const listener of listeners) { + const { context } = listener + if (!context.IsValid() || !context.element.isConnected) { + listeners.delete(listener) + } else if (listener.event === event) { + try { + listener.handler(...values) + } catch (error: unknown) { + console.debug(`layout script ${event}:`, error) + } + } + } + + // A tooltip shows on the panel it names. const [panel, text] = values if (!(panel instanceof DomPanel)) return if (event === 'UIShowTextTooltip') panel.element.title = String(text) @@ -555,6 +655,37 @@ export const domPanorama = { }, } satisfies Panorama +/** + * layoutPanorama is the $ a layout's scripts see: domPanorama with context as + * the panel the layout loaded into, timers it can cancel, and handlers for + * the events nothing else handles. Called with a selector #id, it finds that + * panel in context's subtree. + */ +export function layoutPanorama(context: DomPanel) { + const find = (selector: string) => + selector.startsWith('#') + ? context.FindChildTraverse(selector.slice(1)) + : null + return Object.assign(find, domPanorama, { + GetContextPanel: () => context, + Schedule: (seconds: number, callback: () => void) => + setTimeout(callback, seconds * 1000), + CancelScheduled: (handle: ReturnType) => + clearTimeout(handle), + RegisterForUnhandledEvent( + event: string, + handler: (...values: unknown[]) => void, + ) { + const listener = { event, handler, context } + listeners.add(listener) + return listener + }, + UnregisterForUnhandledEvent(_event: string, listener: Listener) { + listeners.delete(listener) + }, + }) +} + // control returns the form element a panel of type draws on, made with // properties as the game makes it, or undefined for a plain panel. function control( diff --git a/panorama/browser/layouts.test.ts b/panorama/browser/layouts.test.ts new file mode 100644 index 00000000..391593dc --- /dev/null +++ b/panorama/browser/layouts.test.ts @@ -0,0 +1,40 @@ +import { expect, test } from 'bun:test' +import { actionCommand } from '../src/data.js' +import { layoutPress, scriptPath } from './layouts.js' + +test('a layout press reads back from the command the library writes', () => { + // A press with a payload and one without come back as sent. + const payload = JSON.stringify({ route: 'gate', note: 'é→' }) + expect(layoutPress(actionCommand('arena', 'card', 'retry', payload))).toEqual( + { mod: 'arena', node: 'card', action: 'retry', payload }, + ) + expect(layoutPress(actionCommand('arena', 'card', 'close', ''))).toEqual({ + mod: 'arena', + node: 'card', + action: 'close', + payload: '', + }) + + // Another command, a short one and a payload that is not UTF-8 read as none. + expect(layoutPress('say hello')).toBeUndefined() + expect(layoutPress('modlockaction arena card')).toBeUndefined() + expect(layoutPress('modlockaction arena card keep _w')).toBeUndefined() + expect(layoutPress('modlockaction arena card keep a+b')).toBeUndefined() +}) + +test('a layout script loads from the page', () => { + // The layout library is the page's copy; a mod's script is its build's. + expect( + scriptPath('s2r://panorama/scripts/modlock/layout.vjs', '?build=2'), + ).toBe('/layout.js') + expect( + scriptPath('file://{resources}/scripts/modlock/layout.js', '?build=2'), + ).toBe('/layout.js') + expect( + scriptPath('s2r://panorama/scripts/arena-1a2b/board.vjs', '?build=2'), + ).toBe('/scripts/arena-1a2b/board.js?build=2') + + // A game path the page does not serve has none. + expect(scriptPath('s2r://panorama/scripts/board.vjs', '')).toBe('') + expect(scriptPath('file://{resources}/layout/arena/board.xml', '')).toBe('') +}) diff --git a/panorama/browser/layouts.ts b/panorama/browser/layouts.ts new file mode 100644 index 00000000..66926748 --- /dev/null +++ b/panorama/browser/layouts.ts @@ -0,0 +1,50 @@ +// The preview page runs a layout's scripts from the page's own paths, and +// reads back the press a script sends as the console command actionCommand +// writes, to send it to modlock dev. + +/** LayoutPress is a press a layout's script sent from its node. */ +export interface LayoutPress { + readonly mod: string + readonly node: string + readonly action: string + readonly payload: string +} + +/** + * layoutPress reads the press in a modlockaction console command, with its + * payload decoded to text, or returns undefined for any other command and for + * a payload that is not base64url of UTF-8. + */ +export function layoutPress(line: string): LayoutPress | undefined { + // Split the command into its words. + const [name, mod, node, action, encoded, ...rest] = line.split(' ') + if (name !== 'modlockaction' || !mod || !node || !action || rest.length) { + return undefined + } + if (encoded === undefined) return { mod, node, action, payload: '' } + + // Decode the payload's base64url, then its UTF-8. + if (!/^[\w-]+$/.test(encoded)) return undefined + try { + const binary = atob(encoded.replace(/-/g, '+').replace(/_/g, '/')) + const bytes = Uint8Array.from(binary, (each) => each.charCodeAt(0)) + const payload = new TextDecoder('utf-8', { fatal: true }).decode(bytes) + return { mod, node, action, payload } + } catch { + return undefined + } +} + +/** + * scriptPath returns the page path of a script a layout includes by its game + * path, with build's query, or '' for one the page does not serve. The layout + * library is the page's own copy. + */ +export function scriptPath(src: string, build: string): string { + const match = + /^(?:s2r:\/\/panorama|file:\/\/\{resources\})\/scripts\/([^/]+\/.+)\.v?js$/.exec( + src, + ) + if (match?.[1] === 'modlock/layout') return '/layout.js' + return match ? `/scripts/${match[1]}.js${build}` : '' +} diff --git a/panorama/browser/preview.ts b/panorama/browser/preview.ts index 1e420193..0b4e2d40 100644 --- a/panorama/browser/preview.ts +++ b/panorama/browser/preview.ts @@ -4,7 +4,8 @@ import { type Built, Input, Preview, type Stopped } from '../../cli/cli.pb.js' import { Drawing, type Layouts } from '../src/draw.js' -import { DomPanel, domPanorama } from './dom.js' +import { DomPanel, domPanorama, onCommand } from './dom.js' +import { layoutPress } from './layouts.js' /** View is what the page shows, derived from modlock dev's latest state. */ type View = @@ -97,6 +98,14 @@ const drawing = new Drawing( }, ) +// A layout's press reaches the mods as the player's, with its action and +// payload; any other command a layout dispatches is the game's alone. +onCommand((line) => { + const press = layoutPress(line) + if (press) send({ body: { case: 'press', value: press } }) + else console.debug(`console command ${line}`) +}) + /** building is true while the latest state reports a build. */ let building = false diff --git a/preview/preview.go b/preview/preview.go index d33410f8..09126a03 100644 --- a/preview/preview.go +++ b/preview/preview.go @@ -22,6 +22,7 @@ import ( "github.com/paralin/modlock/cli" "github.com/paralin/modlock/session" "github.com/paralin/modlock/source2/panorama" + "github.com/paralin/modlock/source2/resource" ) // logLines is how many of a mod's last log lines a stop carries. @@ -139,6 +140,8 @@ func (p *Page) ServeHTTP(w http.ResponseWriter, request *http.Request) { p.layout(w, strings.TrimPrefix(request.URL.Path, "/layout/")) case request.Method == http.MethodGet && strings.HasPrefix(request.URL.Path, "/styles/"): p.sheet(w, strings.TrimPrefix(request.URL.Path, "/styles/")) + case request.Method == http.MethodGet && strings.HasPrefix(request.URL.Path, "/scripts/"): + p.script(w, strings.TrimPrefix(request.URL.Path, "/scripts/")) case request.Method == http.MethodGet: p.files.ServeHTTP(w, request) default: @@ -207,6 +210,32 @@ func (p *Page) sheet(w http.ResponseWriter, name string) { _, _ = w.Write([]byte(source)) } +// script answers with the source of the built script that name, +// /, names, as a loaded layout's include names it, so the page +// runs a layout's scripts as the game does. +func (p *Page) script(w http.ResponseWriter, name string) { + // Find the script in the build's content. + compiled, ok := panorama.Compiled(name) + if !ok || path.Ext(name) != ".js" || !fs.ValidPath(compiled) || !strings.Contains(compiled, "/") { + http.NotFound(w, nil) + return + } + data, err := fs.ReadFile(p.built, path.Join(check.ContentDir, "scripts", compiled)) + if err != nil { + http.Error(w, "the mod's build has no script "+name, http.StatusNotFound) + return + } + + // A compiled script's data block is its source. + source, err := resource.ReadBlock(data, "DATA") + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + w.Header().Set("Content-Type", "text/javascript; charset=utf-8") + _, _ = w.Write(source) +} + // current returns the page's state with the player's screen, and channels // that close when the state or the screen changes. func (p *Page) current() (*cli.Preview, <-chan struct{}, <-chan struct{}) { diff --git a/preview/preview_test.go b/preview/preview_test.go new file mode 100644 index 00000000..c0ad0e41 --- /dev/null +++ b/preview/preview_test.go @@ -0,0 +1,62 @@ +package preview + +import ( + "net/http" + "net/http/httptest" + "os" + "path/filepath" + "testing" + + "github.com/paralin/modlock/source2/panorama" +) + +// TestScriptServesTheBuiltSource checks the page answers a layout's script +// include with the script's source from the build, and nothing outside the +// build's scripts. +func TestScriptServesTheBuiltSource(t *testing.T) { + // Build one script into a mod's content addon. + built := t.TempDir() + source := []byte("Modlock.data((value) => $.Msg(value))\n") + compiled, err := panorama.Compile("arena-1a2b", "panorama/scripts/board.js", source) + if err != nil { + t.Fatal(err) + } + dir := filepath.Join(built, "panorama", "scripts", "arena-1a2b") + if err := os.MkdirAll(dir, 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(dir, "board.vjs_c"), compiled, 0o644); err != nil { + t.Fatal(err) + } + page := New(t.TempDir(), built, false, nil) + + // get answers one loopback request from the page itself. + get := func(path string) *httptest.ResponseRecorder { + request := httptest.NewRequest(http.MethodGet, "http://localhost:4000"+path, nil) + answer := httptest.NewRecorder() + page.ServeHTTP(answer, request) + return answer + } + + // The include's path names the addon and the script's source path. + answer := get("/scripts/arena-1a2b/board.js") + if answer.Code != http.StatusOK || answer.Body.String() != string(source) { + t.Fatalf("board.js: %d %q", answer.Code, answer.Body.String()) + } + if kind := answer.Header().Get("Content-Type"); kind != "text/javascript; charset=utf-8" { + t.Fatalf("board.js type %q", kind) + } + + // A missing script, another kind of file and a path out of the addon find + // nothing. + for _, path := range []string{ + "/scripts/arena-1a2b/missing.js", + "/scripts/arena-1a2b/board.css", + "/scripts/board.js", + "/scripts/../scripts/arena-1a2b/board.js", + } { + if answer := get(path); answer.Code == http.StatusOK { + t.Fatalf("%s answered %q", path, answer.Body.String()) + } + } +} diff --git a/sandbox/sandbox.go b/sandbox/sandbox.go index 152a52bd..fe4dde5d 100644 --- a/sandbox/sandbox.go +++ b/sandbox/sandbox.go @@ -4,9 +4,11 @@ import ( "context" "os" "path/filepath" + "regexp" "strconv" "strings" "time" + "unicode/utf8" "github.com/paralin/modlock/files" "github.com/paralin/modlock/metrics" @@ -142,19 +144,38 @@ func (s *Sandbox) Command(ctx context.Context, line string) (bool, error) { } // Press presses the button node in the interface mod shows the player in -// slot, and reports whether the mod is running to receive it. -func (s *Sandbox) Press(ctx context.Context, mod string, slot int32, node string) (bool, error) { +// slot, or with an action sends the press node's layout script made with +// that payload, and reports whether the mod is running to receive it. It +// refuses an action or payload the game's host would not pass on. +func (s *Sandbox) Press(ctx context.Context, mod string, slot int32, node, action, payload string) (bool, error) { + // Hold a layout's press to what the game carries. + if action != "" && !layoutAction.MatchString(action) { + return false, errors.Errorf("%s cannot name a layout's press", action) + } + if len(payload) > maxActionPayload || !utf8.ValidString(payload) || (action == "" && payload != "") { + return false, errors.New("a layout's press carries at most 180 bytes of text") + } + + // Deliver the press to the mod that shows it. var pressed bool + event := &ui.UiPressEvent{Player: slot, Node: node, Action: action, Payload: payload} err := s.do(ctx, func(ctx context.Context) { for _, running := range s.mods { if running.name == mod { - pressed = s.deliver(ctx, running, "UiPress", &ui.UiPressEvent{Player: slot, Node: node}, nil) + pressed = s.deliver(ctx, running, "UiPress", event, nil) } } }) return pressed, err } +// layoutAction matches the name of a layout's press, as the game's host +// takes it. +var layoutAction = regexp.MustCompile(`^[\w.-]{1,64}$`) + +// maxActionPayload is the most bytes of text a layout's press carries. +const maxActionPayload = 180 + // Input delivers a change to an input in the interface mod shows the // event's player, and reports whether the mod is running to receive it. The // creator's own preview sends it, so the sandbox passes the value on as sent. diff --git a/sandbox/sandbox_test.go b/sandbox/sandbox_test.go index 28dbe7a3..3985b877 100644 --- a/sandbox/sandbox_test.go +++ b/sandbox/sandbox_test.go @@ -15,8 +15,8 @@ import ( // TestSandbox runs a Go mod that answers /hello: the stand-in player joins, // the command reaches the mod and its chat comes back as a message, an -// unknown command and a press in a missing mod go unhandled, and a reload -// restarts the mod. +// unknown command and a press in a missing mod go unhandled, a layout press +// the game could not carry is refused, and a reload restarts the mod. func TestSandbox(t *testing.T) { // Build the mod. dist := t.TempDir() @@ -62,9 +62,21 @@ func TestSandbox(t *testing.T) { case <-time.After(10 * time.Second): t.Fatal("/hello did not answer within 10 s") } - if pressed, err := box.Press(ctx, "missing", 0, "button"); err != nil || pressed { + if pressed, err := box.Press(ctx, "missing", 0, "button", "", ""); err != nil || pressed { t.Fatalf("press in a missing mod: pressed %v, %v", pressed, err) } + + // A layout's press the game could not carry is refused before any mod. + for _, refused := range [][2]string{ + {"buy now", ""}, + {"", "{}"}, + {"buy", string(make([]byte, 181))}, + {"buy", "\xff"}, + } { + if pressed, err := box.Press(ctx, "hello", 0, "card", refused[0], refused[1]); err == nil || pressed { + t.Fatalf("press %q %q: pressed %v, %v", refused[0], refused[1], pressed, err) + } + } if err := box.Reload(ctx, dist); err != nil { t.Fatal(err) } From 00f0d31d4aa5916912dbf09bfd952d3f3bbe47c1 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 12:12:47 -0800 Subject: [PATCH 10/15] play: answer a project's service fixtures in the game modlock play answered a named service from services/.json only in the sandbox, and the game host started a mod whatever services its manifest named, so a mod that needs a service failed only at its first call in the game. The host now refuses to start a mod whose needed service nobody provides, naming the service, and starts one without an optional service. modlock play reads the projects' fixtures before a real game starts, prints who answers each named service, and hands the host the replies in a file it names with the new --fixtures option. Each fixture answers only its own mod, and a method the fixture lacks is refused, naming the file. Signed-off-by: Christian Stewart --- CMakeLists.txt | 10 + README.md | 18 +- cmd/modlock/play.go | 60 + cmd/modlock/play_test.go | 107 + sandbox/services.go | 30 +- session/config.go | 3 + session/host.go | 3 + session/host_config.go | 3 + session/session.go | 1 + src/host_app/control/control.pb.cc | 828 +++- src/host_app/control/control.pb.go | 630 +++ src/host_app/control/control.pb.h | 6031 ++++++++++++++++------------ src/host_app/control/control.pb.ts | 126 + src/host_app/control/control.proto | 20 + src/host_app/fixtures.cc | 58 + src/host_app/fixtures.h | 19 + src/host_app/main.cc | 26 +- src/wasm/wasm_plugin.cc | 11 + tests/host_fixtures_test.cc | 129 + 19 files changed, 5505 insertions(+), 2608 deletions(-) create mode 100644 cmd/modlock/play_test.go create mode 100644 src/host_app/fixtures.cc create mode 100644 src/host_app/fixtures.h create mode 100644 tests/host_fixtures_test.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index 6567a055..2756e9fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -293,6 +293,7 @@ endif() add_executable(modlock-host src/host_app/control_link.cc + src/host_app/fixtures.cc src/host_app/game_dump.cc src/host_app/game_dump_console.cc src/host_app/game_dump_entities.cc @@ -678,6 +679,15 @@ if(BUILD_TESTING) target_compile_definitions(wasm_host_test PRIVATE EXTENSION_GO_WASM="${extension_go_wasm}") target_link_libraries(wasm_host_test PRIVATE modlock::sdk gtest_main) add_test(NAME wasm_host_test COMMAND wasm_host_test) + # host_fixtures_test runs the same mod against needed services and the + # host's fixtures. + add_executable(host_fixtures_test tests/host_fixtures_test.cc src/host_app/fixtures.cc + src/host_app/control/control.pb.cc) + add_dependencies(host_fixtures_test extension_go_wasm) + target_include_directories(host_fixtures_test PRIVATE src) + target_compile_definitions(host_fixtures_test PRIVATE EXTENSION_GO_WASM="${extension_go_wasm}") + target_link_libraries(host_fixtures_test PRIVATE modlock::sdk gtest_main) + add_test(NAME host_fixtures_test COMMAND host_fixtures_test) add_executable(wasm_ui_test tests/wasm_ui_test.cc src/wasm/ui.cc) target_include_directories(wasm_ui_test PRIVATE src) target_link_libraries(wasm_ui_test PRIVATE modlock::sdk gtest_main) diff --git a/README.md b/README.md index 51b88fcc..2b4459b5 100644 --- a/README.md +++ b/README.md @@ -1517,11 +1517,9 @@ The game draws interfaces with the renderer in [`panorama/`](panorama): [How mods reach the game](#how-mods-reach-the-game) for the protocol. Name each service the mod calls in `mod.json`; a service is needed unless it -is marked optional. The sandbox refuses to start a mod whose needed service -nobody provides there, naming it, and starts one without an optional -service, whose calls then fail. A game host does not read the list yet: it -starts the mod either way, and a call to a service it does not provide -fails: +is marked optional. The sandbox and the game host refuse to start a mod whose +needed service nobody provides there, naming it, and start one without an +optional service, whose calls then fail: ```json "services": [ @@ -1530,10 +1528,12 @@ fails: ] ``` -The sandbox answers a named service from a fixture in the project: -`services/.json`, an object whose keys are the service's methods and -whose values are their replies, sent as JSON. Before the mod starts, the -sandbox logs which provider answers each named service: a fixture or nobody. +`modlock play` answers a named service from a fixture in the project, in the +sandbox and in the game: `services/.json`, an object whose keys are the +service's methods and whose values are their replies, sent as JSON. Before the +mod starts, it logs which provider answers each named service: a fixture or +nobody. In the game, `modlock play` hands the host the fixtures in a file it +names with `--fixtures`, and each fixture answers only its own mod. A service may answer in a later frame, as one that asks a server across the network does. `callServiceLater(service, method, payload, done)` returns at diff --git a/cmd/modlock/play.go b/cmd/modlock/play.go index 86f0e2e2..eadb84b4 100644 --- a/cmd/modlock/play.go +++ b/cmd/modlock/play.go @@ -3,6 +3,7 @@ package main import ( "bufio" "context" + "maps" "os" "path/filepath" "slices" @@ -224,6 +225,12 @@ func startServer(c *cli.Context, out *printer, events func(*control.HostEvent), out.mark("!", yellow, "mod interfaces show only in the browser preview: "+err.Error()) } } + // Hand the host the projects' service fixtures, naming who answers each + // service the mods call. + fixtures, err := writeFixtures(out, mods, filepath.Join(filepath.Dir(logPath), "fixtures.pb")) + if err != nil { + return nil, err + } running, err := session.Start(c.Context, session.Config{ Version: Version, Mods: mods, @@ -232,6 +239,7 @@ func startServer(c *cli.Context, out *printer, events func(*control.HostEvent), Args: c.StringSlice("arg"), Settings: configPath("settings.json"), Files: configPath("files"), + Fixtures: fixtures, Launch: !c.Bool("no-game"), HostOutput: log, Interface: ui, @@ -252,6 +260,58 @@ func startServer(c *cli.Context, out *printer, events func(*control.HostEvent), return running, nil } +// writeFixtures writes the service fixtures of the projects whose builds are +// mods to path, as the host's --fixtures file, and prints which answers each +// service a mod names: a fixture or nobody. It returns path, or empty when no +// mod has a fixture. The host refuses to start a mod whose needed service +// nobody provides. +func writeFixtures(out *printer, mods []string, path string) (string, error) { + // Read each named service's fixture from its mod's project. + fixtures := &control.Fixtures{} + for _, mod := range mods { + manifest, err := project.ReadManifest(mod) + if err != nil { + return "", err + } + slug := manifest.GetSlug() + for _, service := range manifest.GetServices() { + name := service.GetName() + source, replies, err := sandbox.ReadFixture(projectFixtures(mod), name) + switch { + case err != nil: + return "", err + case source != "": + out.mark("·", dim, slug+": service "+name+": fixture "+source) + case service.GetOptional(): + out.mark("·", dim, slug+": service "+name+": nobody (optional)") + default: + out.mark("!", yellow, slug+": service "+name+": nobody; the mod needs it, so add "+ + filepath.Join(sandbox.FixtureDir, name+".json")) + } + + // Keep the replies in method order, so the file is the same each run. + for _, method := range slices.Sorted(maps.Keys(replies)) { + fixtures.Fixtures = append(fixtures.Fixtures, &control.Fixture{ + Mod: slug, Service: name, Method: method, Payload: replies[method], Source: source, + }) + } + } + } + + // Write the file the host reads, or none. + if len(fixtures.GetFixtures()) == 0 { + return "", nil + } + data, err := fixtures.MarshalVT() + if err != nil { + return "", err + } + if err := os.WriteFile(path, data, 0o644); err != nil { + return "", errors.Wrap(err, "write the service fixtures") + } + return path, nil +} + // readRenderer returns the built renderer the game draws the mods' // interfaces with. func readRenderer(ctx context.Context) (*session.Renderer, error) { diff --git a/cmd/modlock/play_test.go b/cmd/modlock/play_test.go new file mode 100644 index 00000000..aad98892 --- /dev/null +++ b/cmd/modlock/play_test.go @@ -0,0 +1,107 @@ +package main + +import ( + "io" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/paralin/modlock/src/host_app/control" +) + +// TestWriteFixtures checks a real-game session hands the host its project's +// fixtures and names who answers each service. +func TestWriteFixtures(t *testing.T) { + // A project names a needed service with a fixture, an optional one + // without, and a needed one without. + dir := t.TempDir() + build := filepath.Join(dir, "build") + manifest := `{"slug":"drills","services":[{"name":"example.drills.v1"},` + + `{"name":"example.ghosts.v1","optional":true},{"name":"example.scores.v1"}]}` + for _, file := range []string{filepath.Join(dir, "mod.json"), filepath.Join(build, "mod.json")} { + if err := os.MkdirAll(filepath.Dir(file), 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(file, []byte(manifest), 0o644); err != nil { + t.Fatal(err) + } + } + fixture := filepath.Join(dir, "services", "example.drills.v1.json") + if err := os.MkdirAll(filepath.Dir(fixture), 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(fixture, []byte(`{"read": { "key": "slide" }, "save": true}`), 0o644); err != nil { + t.Fatal(err) + } + + // Write the host's file, keeping what the session prints. + path := filepath.Join(t.TempDir(), "fixtures.pb") + printed, written := capture(t, func() (string, error) { + return writeFixtures(&printer{}, []string{build}, path) + }) + if written != path { + t.Fatalf("wrote %q, want %q", written, path) + } + + // Each service names its provider, and the missing needed one says how to + // add it. + for _, want := range []string{ + "drills: service example.drills.v1: fixture " + fixture, + "drills: service example.ghosts.v1: nobody (optional)", + "drills: service example.scores.v1: nobody; the mod needs it, so add " + + filepath.Join("services", "example.scores.v1.json"), + } { + if !strings.Contains(printed, want) { + t.Errorf("output lacks %q:\n%s", want, printed) + } + } + + // The file holds each method's compact reply, in method order. + data, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + fixtures := &control.Fixtures{} + if err := fixtures.UnmarshalVT(data); err != nil { + t.Fatal(err) + } + var got []string + for _, each := range fixtures.GetFixtures() { + got = append(got, each.GetMod()+" "+each.GetService()+" "+each.GetMethod()+" "+ + string(each.GetPayload())+" "+each.GetSource()) + } + want := []string{ + "drills example.drills.v1 read {\"key\":\"slide\"} " + fixture, + "drills example.drills.v1 save true " + fixture, + } + if strings.Join(got, "\n") != strings.Join(want, "\n") { + t.Fatalf("fixtures:\n%s\nwant:\n%s", strings.Join(got, "\n"), strings.Join(want, "\n")) + } + + // A built mod outside a project, with no fixture, writes no file. + none, err := writeFixtures(&printer{brief: true}, []string{dir}, filepath.Join(t.TempDir(), "none.pb")) + if err != nil || none != "" { + t.Fatalf("a mod without fixtures wrote %q, %v", none, err) + } +} + +// capture runs fn with standard output kept, returning what it printed and +// fn's path, and failing the test on fn's error. +func capture(t *testing.T, fn func() (string, error)) (string, string) { + t.Helper() + reader, writer, err := os.Pipe() + if err != nil { + t.Fatal(err) + } + stdout := os.Stdout + os.Stdout = writer + path, fnErr := fn() + os.Stdout = stdout + _ = writer.Close() + printed, _ := io.ReadAll(reader) + if fnErr != nil { + t.Fatal(fnErr) + } + return string(printed), path +} diff --git a/sandbox/services.go b/sandbox/services.go index 3586f481..da75d9ab 100644 --- a/sandbox/services.go +++ b/sandbox/services.go @@ -41,7 +41,7 @@ func (s *Sandbox) provide(path string, build *Build) error { var missing error for _, service := range build.Manifest.GetServices() { name := service.GetName() - provider, err := s.provider(dir, name) + provider, err := readFixture(dir, name) switch { case err != nil: return err @@ -65,9 +65,31 @@ func (s *Sandbox) provide(path string, build *Build) error { return missing } -// provider reads the fixture of service name in dir, or is nil when dir holds -// none. -func (s *Sandbox) provider(dir, name string) (*fixture, error) { +// ReadFixture reads the fixture of service name in dir: its file and each +// method's reply as compact JSON. The path is empty when dir holds none, so a +// game host can answer from the same files the sandbox does. +func ReadFixture(dir, name string) (string, map[string][]byte, error) { + // Read the file, if there is one. + found, err := readFixture(dir, name) + if err != nil || found == nil { + return "", nil, err + } + + // Compact each reply as the sandbox sends it. + replies := make(map[string][]byte, len(found.replies)) + for method, reply := range found.replies { + var compact bytes.Buffer + if err := json.Compact(&compact, reply); err != nil { + return "", nil, errors.Wrapf(err, "compact %s's reply to %s", found.path, method) + } + replies[method] = compact.Bytes() + } + return found.path, replies, nil +} + +// readFixture reads the fixture of service name in dir, or is nil when dir +// holds none. +func readFixture(dir, name string) (*fixture, error) { // A service without a fixture file has no fixture; a name that is not one // file name never reads outside dir. if dir == "" || name == "" || name == "." || name == ".." || filepath.Base(name) != name { diff --git a/session/config.go b/session/config.go index 3b8b3322..9b38d404 100644 --- a/session/config.go +++ b/session/config.go @@ -25,6 +25,9 @@ type Config struct { // Files is the directory that keeps the files mods write, or empty to // refuse their writes. Files string + // Fixtures is the file of service fixtures the host answers from, a + // control.Fixtures message, or empty for none. + Fixtures string // Launch starts the Deadlock client once the server is ready. Launch bool // HostOutput receives the host's console output. diff --git a/session/host.go b/session/host.go index a031e302..d480c0f3 100644 --- a/session/host.go +++ b/session/host.go @@ -67,6 +67,9 @@ func StartHost(ctx context.Context, config HostConfig) (*Host, error) { if config.Files != "" { arguments = append(arguments, "--files", path(config.Files)) } + if config.Fixtures != "" { + arguments = append(arguments, "--fixtures", path(config.Fixtures)) + } for _, mod := range config.Mods { arguments = append(arguments, "--plugin", path(mod)) } diff --git a/session/host_config.go b/session/host_config.go index 4eb0b0d6..3d1d34f9 100644 --- a/session/host_config.go +++ b/session/host_config.go @@ -24,6 +24,9 @@ type HostConfig struct { // Files is the directory that keeps the files mods write, or empty to // refuse their writes. Files string + // Fixtures is the file of service fixtures the host answers from, a + // control.Fixtures message, or empty for none. + Fixtures string // Steam is the Steam installation; on Linux its Proton runs the host. Steam *Steam // Output receives the host's console output. diff --git a/session/session.go b/session/session.go index 64495c10..f3a26884 100644 --- a/session/session.go +++ b/session/session.go @@ -111,6 +111,7 @@ func Start(ctx context.Context, config Config) (*Session, error) { Args: config.Args, Settings: config.Settings, Files: config.Files, + Fixtures: config.Fixtures, Steam: steam, Output: config.HostOutput, }) diff --git a/src/host_app/control/control.pb.cc b/src/host_app/control/control.pb.cc index 91b99e69..62cb9683 100644 --- a/src/host_app/control/control.pb.cc +++ b/src/host_app/control/control.pb.cc @@ -364,6 +364,70 @@ struct ModFailedDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModFailedDefaultTypeInternal _ModFailed_default_instance_; +inline constexpr Fixture::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + mod_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + service_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + method_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + payload_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + source_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR Fixture::Fixture(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(Fixture_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct FixtureDefaultTypeInternal { + PROTOBUF_CONSTEXPR FixtureDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~FixtureDefaultTypeInternal() {} + union { + Fixture _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FixtureDefaultTypeInternal _Fixture_default_instance_; + +inline constexpr Fixtures::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + fixtures_{} {} + +template +PROTOBUF_CONSTEXPR Fixtures::Fixtures(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(Fixtures_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct FixturesDefaultTypeInternal { + PROTOBUF_CONSTEXPR FixturesDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~FixturesDefaultTypeInternal() {} + union { + Fixtures _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FixturesDefaultTypeInternal _Fixtures_default_instance_; + inline constexpr ControlRequest::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : body_{}, @@ -643,6 +707,24 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceResult, _impl_.error_), 0, 1, + 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixture, _impl_._has_bits_), + 8, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixture, _impl_.mod_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixture, _impl_.service_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixture, _impl_.method_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixture, _impl_.payload_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixture, _impl_.source_), + 0, + 1, + 2, + 3, + 4, + 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixtures, _impl_._has_bits_), + 4, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixtures, _impl_.fixtures_), + 0, }; static const ::_pbi::MigrationSchema @@ -663,6 +745,8 @@ static const ::_pbi::MigrationSchema {102, sizeof(::modlock::host_app::control::UiChanged)}, {111, sizeof(::modlock::host_app::control::ServiceReply)}, {126, sizeof(::modlock::host_app::control::ServiceResult)}, + {133, sizeof(::modlock::host_app::control::Fixture)}, + {146, sizeof(::modlock::host_app::control::Fixtures)}, }; static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::modlock::host_app::control::_ControlRequest_default_instance_._instance, @@ -681,6 +765,8 @@ static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::modlock::host_app::control::_UiChanged_default_instance_._instance, &::modlock::host_app::control::_ServiceReply_default_instance_._instance, &::modlock::host_app::control::_ServiceResult_default_instance_._instance, + &::modlock::host_app::control::_Fixture_default_instance_._instance, + &::modlock::host_app::control::_Fixtures_default_instance_._instance, }; const char descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { @@ -733,11 +819,15 @@ const char descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fho "e\"g\n\014ServiceReply\022\013\n\003mod\030\001 \001(\t\022\017\n\007servic" "e\030\002 \001(\t\022\016\n\006method\030\003 \001(\t\022\017\n\007payload\030\004 \001(\014" "\022\014\n\004path\030\005 \001(\t\022\n\n\002id\030\006 \001(\t\"*\n\rServiceRes" - "ult\022\n\n\002id\030\001 \001(\t\022\r\n\005error\030\002 \001(\t*\\\n\013Messag" - "eKind\022\025\n\021MESSAGE_KIND_CHAT\020\000\022\027\n\023MESSAGE_" - "KIND_CENTER\020\001\022\035\n\031MESSAGE_KIND_ANNOUNCEME" - "NT\020\002B9Z7github.com/paralin/modlock/src/h" - "ost_app/control;controlb\006proto3" + "ult\022\n\n\002id\030\001 \001(\t\022\r\n\005error\030\002 \001(\t\"X\n\007Fixtur" + "e\022\013\n\003mod\030\001 \001(\t\022\017\n\007service\030\002 \001(\t\022\016\n\006metho" + "d\030\003 \001(\t\022\017\n\007payload\030\004 \001(\014\022\016\n\006source\030\005 \001(\t" + "\"\?\n\010Fixtures\0223\n\010fixtures\030\001 \003(\0132!.modlock" + ".host_app.control.Fixture*\\\n\013MessageKind" + "\022\025\n\021MESSAGE_KIND_CHAT\020\000\022\027\n\023MESSAGE_KIND_" + "CENTER\020\001\022\035\n\031MESSAGE_KIND_ANNOUNCEMENT\020\002B" + "9Z7github.com/paralin/modlock/src/host_a" + "pp/control;controlb\006proto3" }; static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto_deps[3] = { @@ -749,13 +839,13 @@ static ::absl::once_flag descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto = { false, false, - 2151, + 2306, descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto, "github.com/paralin/modlock/src/host_app/control/control.proto", &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto_once, descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto_deps, 3, - 16, + 18, schemas, file_default_instances, TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto::offsets, @@ -6745,6 +6835,730 @@ void ServiceResult::InternalSwap(ServiceResult* PROTOBUF_RESTRICT PROTOBUF_NONNU ::google::protobuf::Metadata ServiceResult::GetMetadata() const { return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); } +// =================================================================== + +class Fixture::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Fixture, _impl_._has_bits_); +}; + +Fixture::Fixture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, Fixture_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.host_app.control.Fixture) +} +PROTOBUF_NDEBUG_INLINE Fixture::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::modlock::host_app::control::Fixture& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + mod_(arena, from.mod_), + service_(arena, from.service_), + method_(arena, from.method_), + payload_(arena, from.payload_), + source_(arena, from.source_) {} + +Fixture::Fixture( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const Fixture& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, Fixture_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + Fixture* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.Fixture) +} +PROTOBUF_NDEBUG_INLINE Fixture::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + mod_(arena), + service_(arena), + method_(arena), + payload_(arena), + source_(arena) {} + +inline void Fixture::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Fixture::~Fixture() { + // @@protoc_insertion_point(destructor:modlock.host_app.control.Fixture) + SharedDtor(*this); +} +inline void Fixture::SharedDtor(MessageLite& self) { + Fixture& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.mod_.Destroy(); + this_._impl_.service_.Destroy(); + this_._impl_.method_.Destroy(); + this_._impl_.payload_.Destroy(); + this_._impl_.source_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL Fixture::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) Fixture(arena); +} +constexpr auto Fixture::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Fixture), + alignof(Fixture)); +} +constexpr auto Fixture::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_Fixture_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &Fixture::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &Fixture::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &Fixture::ByteSizeLong, + &Fixture::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(Fixture, _impl_._cached_size_), + false, + }, + &Fixture::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull Fixture_class_data_ = + Fixture::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +Fixture::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&Fixture_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(Fixture_class_data_.tc_table); + return Fixture_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 0, 63, 2> +Fixture::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Fixture, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + Fixture_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::host_app::control::Fixture>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string mod = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(Fixture, _impl_.mod_)}}, + // string service = 2; + {::_pbi::TcParser::FastUS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(Fixture, _impl_.service_)}}, + // string method = 3; + {::_pbi::TcParser::FastUS1, + {26, 2, 0, + PROTOBUF_FIELD_OFFSET(Fixture, _impl_.method_)}}, + // bytes payload = 4; + {::_pbi::TcParser::FastBS1, + {34, 3, 0, + PROTOBUF_FIELD_OFFSET(Fixture, _impl_.payload_)}}, + // string source = 5; + {::_pbi::TcParser::FastUS1, + {42, 4, 0, + PROTOBUF_FIELD_OFFSET(Fixture, _impl_.source_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // string mod = 1; + {PROTOBUF_FIELD_OFFSET(Fixture, _impl_.mod_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string service = 2; + {PROTOBUF_FIELD_OFFSET(Fixture, _impl_.service_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string method = 3; + {PROTOBUF_FIELD_OFFSET(Fixture, _impl_.method_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes payload = 4; + {PROTOBUF_FIELD_OFFSET(Fixture, _impl_.payload_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // string source = 5; + {PROTOBUF_FIELD_OFFSET(Fixture, _impl_.source_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\40\3\7\6\0\6\0\0" + "modlock.host_app.control.Fixture" + "mod" + "service" + "method" + "source" + }}, +}; +PROTOBUF_NOINLINE void Fixture::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.host_app.control.Fixture) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.mod_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.service_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.method_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + _impl_.payload_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + _impl_.source_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL Fixture::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const Fixture& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL Fixture::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const Fixture& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.host_app.control.Fixture) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string mod = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_mod().empty()) { + const ::std::string& _s = this_._internal_mod(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.Fixture.mod"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // string service = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_service().empty()) { + const ::std::string& _s = this_._internal_service(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.Fixture.service"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + // string method = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_method().empty()) { + const ::std::string& _s = this_._internal_method(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.Fixture.method"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + } + + // bytes payload = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_payload().empty()) { + const ::std::string& _s = this_._internal_payload(); + target = stream->WriteBytesMaybeAliased(4, _s, target); + } + } + + // string source = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (!this_._internal_source().empty()) { + const ::std::string& _s = this_._internal_source(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.Fixture.source"); + target = stream->WriteStringMaybeAliased(5, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.host_app.control.Fixture) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t Fixture::ByteSizeLong(const MessageLite& base) { + const Fixture& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t Fixture::ByteSizeLong() const { + const Fixture& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.host_app.control.Fixture) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // string mod = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_mod().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_mod()); + } + } + // string service = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_service().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_service()); + } + } + // string method = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_method().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_method()); + } + } + // bytes payload = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_payload().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_payload()); + } + } + // string source = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (!this_._internal_source().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_source()); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void Fixture::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.host_app.control.Fixture) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_mod().empty()) { + _this->_internal_set_mod(from._internal_mod()); + } else { + if (_this->_impl_.mod_.IsDefault()) { + _this->_internal_set_mod(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_service().empty()) { + _this->_internal_set_service(from._internal_service()); + } else { + if (_this->_impl_.service_.IsDefault()) { + _this->_internal_set_service(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_method().empty()) { + _this->_internal_set_method(from._internal_method()); + } else { + if (_this->_impl_.method_.IsDefault()) { + _this->_internal_set_method(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!from._internal_payload().empty()) { + _this->_internal_set_payload(from._internal_payload()); + } else { + if (_this->_impl_.payload_.IsDefault()) { + _this->_internal_set_payload(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (!from._internal_source().empty()) { + _this->_internal_set_source(from._internal_source()); + } else { + if (_this->_impl_.source_.IsDefault()) { + _this->_internal_set_source(""); + } + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void Fixture::CopyFrom(const Fixture& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.host_app.control.Fixture) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Fixture::InternalSwap(Fixture* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.mod_, &other->_impl_.mod_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.service_, &other->_impl_.service_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.method_, &other->_impl_.method_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.payload_, &other->_impl_.payload_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.source_, &other->_impl_.source_, arena); +} + +::google::protobuf::Metadata Fixture::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Fixtures::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._has_bits_); +}; + +Fixtures::Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, Fixtures_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.host_app.control.Fixtures) +} +PROTOBUF_NDEBUG_INLINE Fixtures::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::modlock::host_app::control::Fixtures& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + fixtures_{visibility, arena, from.fixtures_} {} + +Fixtures::Fixtures( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const Fixtures& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, Fixtures_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + Fixtures* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.Fixtures) +} +PROTOBUF_NDEBUG_INLINE Fixtures::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + fixtures_{visibility, arena} {} + +inline void Fixtures::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Fixtures::~Fixtures() { + // @@protoc_insertion_point(destructor:modlock.host_app.control.Fixtures) + SharedDtor(*this); +} +inline void Fixtures::SharedDtor(MessageLite& self) { + Fixtures& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL Fixtures::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) Fixtures(arena); +} +constexpr auto Fixtures::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_) + + decltype(Fixtures::_impl_.fixtures_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(Fixtures), alignof(Fixtures), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&Fixtures::PlacementNew_, + sizeof(Fixtures), + alignof(Fixtures)); + } +} +constexpr auto Fixtures::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_Fixtures_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &Fixtures::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &Fixtures::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &Fixtures::ByteSizeLong, + &Fixtures::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._cached_size_), + false, + }, + &Fixtures::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull Fixtures_class_data_ = + Fixtures::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +Fixtures::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&Fixtures_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(Fixtures_class_data_.tc_table); + return Fixtures_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> +Fixtures::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + Fixtures_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::host_app::control::Fixtures>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .modlock.host_app.control.Fixture fixtures = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .modlock.host_app.control.Fixture fixtures = 1; + {PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::modlock::host_app::control::Fixture>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void Fixtures::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.host_app.control.Fixtures) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.fixtures_.Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL Fixtures::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const Fixtures& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL Fixtures::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const Fixtures& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.host_app.control.Fixtures) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .modlock.host_app.control.Fixture fixtures = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_fixtures_size()); + i < n; i++) { + const auto& repfield = this_._internal_fixtures().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.host_app.control.Fixtures) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t Fixtures::ByteSizeLong(const MessageLite& base) { + const Fixtures& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t Fixtures::ByteSizeLong() const { + const Fixtures& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.host_app.control.Fixtures) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .modlock.host_app.control.Fixture fixtures = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_fixtures_size(); + for (const auto& msg : this_._internal_fixtures()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void Fixtures::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.host_app.control.Fixtures) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_fixtures()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_fixtures()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void Fixtures::CopyFrom(const Fixtures& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.host_app.control.Fixtures) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Fixtures::InternalSwap(Fixtures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.fixtures_.InternalSwap(&other->_impl_.fixtures_); +} + +::google::protobuf::Metadata Fixtures::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} // @@protoc_insertion_point(namespace_scope) } // namespace control } // namespace host_app diff --git a/src/host_app/control/control.pb.go b/src/host_app/control/control.pb.go index 3825d135..7e3beda9 100644 --- a/src/host_app/control/control.pb.go +++ b/src/host_app/control/control.pb.go @@ -813,6 +813,82 @@ func (x *ServiceResult) GetError() string { return "" } +// Fixture is one method's reply from a mod project's service fixture, which +// the controller hands the host at start so the mod's first frame can call it. +type Fixture struct { + unknownFields []byte + // Mod is the slug of the mod the reply answers. + Mod string `protobuf:"bytes,1,opt,name=mod,proto3" json:"mod,omitempty"` + // Service and Method select the call this reply answers. + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` + // Payload is the reply's bytes, opaque to Modlock. + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` + // Source names the fixture file, for the host's log. + Source string `protobuf:"bytes,5,opt,name=source,proto3" json:"source,omitempty"` +} + +func (x *Fixture) Reset() { + *x = Fixture{} +} + +func (*Fixture) ProtoMessage() {} + +func (x *Fixture) GetMod() string { + if x != nil { + return x.Mod + } + return "" +} + +func (x *Fixture) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *Fixture) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *Fixture) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *Fixture) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +// Fixtures is the file --fixtures names: every fixture reply of the mods the +// host loads. +type Fixtures struct { + unknownFields []byte + Fixtures []*Fixture `protobuf:"bytes,1,rep,name=fixtures,proto3" json:"fixtures,omitempty"` +} + +func (x *Fixtures) Reset() { + *x = Fixtures{} +} + +func (*Fixtures) ProtoMessage() {} + +func (x *Fixtures) GetFixtures() []*Fixture { + if x != nil { + return x.Fixtures + } + return nil +} + func (m *ControlRequest) CloneVT() *ControlRequest { if m == nil { return (*ControlRequest)(nil) @@ -1289,6 +1365,42 @@ func (m *ServiceResult) CloneMessageVT() protobuf_go_lite.CloneMessage { return m.CloneVT() } +func (m *Fixture) CloneVT() *Fixture { + if m == nil { + return (*Fixture)(nil) + } + r := new(Fixture) + r.Mod = m.Mod + r.Service = m.Service + r.Method = m.Method + r.Source = m.Source + r.Payload = protobuf_go_lite.CloneBytes(m.Payload) + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *Fixture) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + +func (m *Fixtures) CloneVT() *Fixtures { + if m == nil { + return (*Fixtures)(nil) + } + r := new(Fixtures) + r.Fixtures = protobuf_go_lite.CloneVTSlice(m.Fixtures) + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *Fixtures) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + func (this *ControlRequest) EqualVT(that *ControlRequest) bool { if this == that { return true @@ -1943,6 +2055,58 @@ func (this *ServiceResult) EqualMessageVT(thatMsg any) bool { return this.EqualVT(that) } +func (this *Fixture) EqualVT(that *Fixture) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Mod != that.Mod { + return false + } + if this.Service != that.Service { + return false + } + if this.Method != that.Method { + return false + } + if !protobuf_go_lite.EqualBytes(this.Payload, that.Payload) { + return false + } + if this.Source != that.Source { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Fixture) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*Fixture) + if !ok { + return false + } + return this.EqualVT(that) +} + +func (this *Fixtures) EqualVT(that *Fixtures) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !protobuf_go_lite.EqualVTSliceImplicit(this.Fixtures, that.Fixtures, func() *Fixture { return &Fixture{} }) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Fixtures) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*Fixtures) + if !ok { + return false + } + return this.EqualVT(that) +} + // MarshalProtoJSON marshals the MessageKind to JSON. func (x MessageKind) MarshalProtoJSON(s *json.MarshalState) { s.WriteEnum(int32(x), MessageKind_name) @@ -3022,6 +3186,143 @@ func (x *ServiceResult) UnmarshalJSON(b []byte) error { return json.DefaultUnmarshalerConfig.Unmarshal(b, x) } +// MarshalProtoJSON marshals the Fixture message to JSON. +func (x *Fixture) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Mod != "" || s.HasField("mod") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("mod") + s.WriteString(x.Mod) + } + if x.Service != "" || s.HasField("service") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("service") + s.WriteString(x.Service) + } + if x.Method != "" || s.HasField("method") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("method") + s.WriteString(x.Method) + } + if len(x.Payload) > 0 || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteBytes(x.Payload) + } + if x.Source != "" || s.HasField("source") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("source") + s.WriteString(x.Source) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the Fixture to JSON. +func (x *Fixture) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the Fixture message from JSON. +func (x *Fixture) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "mod": + s.AddField("mod") + x.Mod = s.ReadString() + case "service": + s.AddField("service") + x.Service = s.ReadString() + case "method": + s.AddField("method") + x.Method = s.ReadString() + case "payload": + s.AddField("payload") + x.Payload = s.ReadBytes() + case "source": + s.AddField("source") + x.Source = s.ReadString() + } + }) +} + +// UnmarshalJSON unmarshals the Fixture from JSON. +func (x *Fixture) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + +// MarshalProtoJSON marshals the Fixtures message to JSON. +func (x *Fixtures) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if len(x.Fixtures) > 0 || s.HasField("fixtures") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("fixtures") + s.WriteArrayStart() + var wroteElement bool + for _, element := range x.Fixtures { + s.WriteMoreIf(&wroteElement) + element.MarshalProtoJSON(s.WithField("fixtures")) + } + s.WriteArrayEnd() + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the Fixtures to JSON. +func (x *Fixtures) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the Fixtures message from JSON. +func (x *Fixtures) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "fixtures": + s.AddField("fixtures") + if s.ReadNil() { + x.Fixtures = nil + return + } + s.ReadArray(func() { + if s.ReadNil() { + x.Fixtures = append(x.Fixtures, nil) + return + } + v := &Fixture{} + v.UnmarshalProtoJSON(s.WithField("fixtures", false)) + if s.Err() != nil { + return + } + x.Fixtures = append(x.Fixtures, v) + }) + } + }) +} + +// UnmarshalJSON unmarshals the Fixtures from JSON. +func (x *Fixtures) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + func (m *ControlRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -4102,6 +4403,107 @@ func (m *ServiceResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Fixture) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Fixture) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Fixture) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if len(m.Source) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Source) + i-- + dAtA[i] = 0x2a + } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeBytes(dAtA, i, m.Payload) + i-- + dAtA[i] = 0x22 + } + if len(m.Method) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Method) + i-- + dAtA[i] = 0x1a + } + if len(m.Service) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Service) + i-- + dAtA[i] = 0x12 + } + if len(m.Mod) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Mod) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Fixtures) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Fixtures) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Fixtures) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if len(m.Fixtures) > 0 { + for iNdEx := len(m.Fixtures) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Fixtures[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *ControlRequest) SizeVT() (n int) { if m == nil { return 0 @@ -4537,6 +4939,35 @@ func (m *ServiceResult) SizeVT() (n int) { return n } +func (m *Fixture) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Mod) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Service) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Method) + n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Source) + n += len(m.unknownFields) + return n +} + +func (m *Fixtures) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + for _, e := range m.Fixtures { + l = e.SizeVT() + n += protobuf_go_lite.SizeMessage(1, l) + } + n += len(m.unknownFields) + return n +} + func (x MessageKind) MarshalProtoText() string { return x.String() } @@ -4950,6 +5381,58 @@ func (x *ServiceResult) String() string { return x.MarshalProtoText() } +func (x *Fixture) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "Fixture") + if x.Mod != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "mod") + protobuf_go_lite.TextWriteString(&sb, x.Mod) + } + if x.Service != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "service") + protobuf_go_lite.TextWriteString(&sb, x.Service) + } + if x.Method != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "method") + protobuf_go_lite.TextWriteString(&sb, x.Method) + } + if len(x.Payload) != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteBytes(&sb, x.Payload) + } + if x.Source != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "source") + protobuf_go_lite.TextWriteString(&sb, x.Source) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *Fixture) String() string { + return x.MarshalProtoText() +} + +func (x *Fixtures) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "Fixtures") + if len(x.Fixtures) > 0 { + protobuf_go_lite.TextWriteListStart(&sb, initialLen, "fixtures") + for i, v := range x.Fixtures { + protobuf_go_lite.TextWriteListSeparator(&sb, i) + if v == nil { + protobuf_go_lite.TextWriteTextMarshaler(&sb, &Fixture{}) + } else { + protobuf_go_lite.TextWriteTextMarshaler(&sb, v) + } + } + protobuf_go_lite.TextWriteListEnd(&sb) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *Fixtures) String() string { + return x.MarshalProtoText() +} + func (m *ControlRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6297,3 +6780,150 @@ func (m *ServiceResult) UnmarshalVT(dAtA []byte) error { } return nil } + +func (m *Fixture) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Fixture: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Fixture: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mod", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Mod = v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Service = v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Method = v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + m.Payload, iNdEx, err = protobuf_go_lite.DecodeBytesAppend(m.Payload, dAtA, iNdEx) + if err != nil { + return err + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Source = v + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *Fixtures) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Fixtures: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Fixtures: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixtures", wireType) + } + msgStart, postIndex, err := protobuf_go_lite.DecodeLengthDelimited(dAtA, iNdEx) + if err != nil { + return err + } + m.Fixtures = append(m.Fixtures, &Fixture{}) + if err := m.Fixtures[len(m.Fixtures)-1].UnmarshalVT(dAtA[msgStart:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/src/host_app/control/control.pb.h b/src/host_app/control/control.pb.h index e4061d55..fcb0f61a 100644 --- a/src/host_app/control/control.pb.h +++ b/src/host_app/control/control.pb.h @@ -67,6 +67,14 @@ class ControlRequest; struct ControlRequestDefaultTypeInternal; extern ControlRequestDefaultTypeInternal _ControlRequest_default_instance_; extern const ::google::protobuf::internal::ClassDataFull ControlRequest_class_data_; +class Fixture; +struct FixtureDefaultTypeInternal; +extern FixtureDefaultTypeInternal _Fixture_default_instance_; +extern const ::google::protobuf::internal::ClassDataFull Fixture_class_data_; +class Fixtures; +struct FixturesDefaultTypeInternal; +extern FixturesDefaultTypeInternal _Fixtures_default_instance_; +extern const ::google::protobuf::internal::ClassDataFull Fixtures_class_data_; class HostEvent; struct HostEventDefaultTypeInternal; extern HostEventDefaultTypeInternal _HostEvent_default_instance_; @@ -2583,30 +2591,30 @@ class ModFailed final : public ::google::protobuf::Message extern const ::google::protobuf::internal::ClassDataFull ModFailed_class_data_; // ------------------------------------------------------------------- -class ControlRequest final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ControlRequest) */ { +class Fixture final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.Fixture) */ { public: - inline ControlRequest() : ControlRequest(nullptr) {} - ~ControlRequest() PROTOBUF_FINAL; + inline Fixture() : Fixture(nullptr) {} + ~Fixture() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ControlRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(Fixture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ControlRequest)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Fixture)); } #endif template - explicit PROTOBUF_CONSTEXPR ControlRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Fixture(::google::protobuf::internal::ConstantInitialized); - inline ControlRequest(const ControlRequest& from) : ControlRequest(nullptr, from) {} - inline ControlRequest(ControlRequest&& from) noexcept - : ControlRequest(nullptr, ::std::move(from)) {} - inline ControlRequest& operator=(const ControlRequest& from) { + inline Fixture(const Fixture& from) : Fixture(nullptr, from) {} + inline Fixture(Fixture&& from) noexcept + : Fixture(nullptr, ::std::move(from)) {} + inline Fixture& operator=(const Fixture& from) { CopyFrom(from); return *this; } - inline ControlRequest& operator=(ControlRequest&& from) noexcept { + inline Fixture& operator=(Fixture&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -2634,19 +2642,13 @@ class ControlRequest final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ControlRequest& default_instance() { - return *reinterpret_cast( - &_ControlRequest_default_instance_); + static const Fixture& default_instance() { + return *reinterpret_cast( + &_Fixture_default_instance_); } - enum BodyCase { - kReload = 1, - kRoles = 2, - kService = 3, - BODY_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 0; - friend void swap(ControlRequest& a, ControlRequest& b) { a.Swap(&b); } - inline void Swap(ControlRequest* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 16; + friend void swap(Fixture& a, Fixture& b) { a.Swap(&b); } + inline void Swap(Fixture* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -2654,7 +2656,7 @@ class ControlRequest final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ControlRequest* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(Fixture* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2662,13 +2664,13 @@ class ControlRequest final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ControlRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + Fixture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ControlRequest& from); + void CopyFrom(const Fixture& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ControlRequest& from) { ControlRequest::MergeImpl(*this, from); } + void MergeFrom(const Fixture& from) { Fixture::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -2704,17 +2706,17 @@ class ControlRequest final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ControlRequest* PROTOBUF_NONNULL other); + void InternalSwap(Fixture* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ControlRequest"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.Fixture"; } - explicit ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ControlRequest& from); - ControlRequest( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ControlRequest&& from) noexcept - : ControlRequest(arena) { + explicit Fixture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + Fixture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Fixture& from); + Fixture( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Fixture&& from) noexcept + : Fixture(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -2731,80 +2733,93 @@ class ControlRequest final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kReloadFieldNumber = 1, - kRolesFieldNumber = 2, - kServiceFieldNumber = 3, + kModFieldNumber = 1, + kServiceFieldNumber = 2, + kMethodFieldNumber = 3, + kPayloadFieldNumber = 4, + kSourceFieldNumber = 5, }; - // .modlock.host_app.control.ReloadRequest reload = 1; - bool has_reload() const; - private: - bool _internal_has_reload() const; - - public: - void clear_reload() ; - const ::modlock::host_app::control::ReloadRequest& reload() const; - [[nodiscard]] ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE release_reload(); - ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL mutable_reload(); - void set_allocated_reload(::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_reload(::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE unsafe_arena_release_reload(); + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; + template + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); private: - const ::modlock::host_app::control::ReloadRequest& _internal_reload() const; - ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL _internal_mutable_reload(); + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - // .modlock.wasm.players.RolesTable roles = 2; - bool has_roles() const; + // string service = 2; + void clear_service() ; + const ::std::string& service() const; + template + void set_service(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_service(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_service(); + void set_allocated_service(::std::string* PROTOBUF_NULLABLE value); + private: - bool _internal_has_roles() const; + const ::std::string& _internal_service() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_service(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_service(); public: - void clear_roles() ; - const ::modlock::wasm::players::RolesTable& roles() const; - [[nodiscard]] ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE release_roles(); - ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL mutable_roles(); - void set_allocated_roles(::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_roles(::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value); - ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE unsafe_arena_release_roles(); + // string method = 3; + void clear_method() ; + const ::std::string& method() const; + template + void set_method(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_method(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_method(); + void set_allocated_method(::std::string* PROTOBUF_NULLABLE value); private: - const ::modlock::wasm::players::RolesTable& _internal_roles() const; - ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL _internal_mutable_roles(); + const ::std::string& _internal_method() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_method(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_method(); public: - // .modlock.host_app.control.ServiceReply service = 3; - bool has_service() const; + // bytes payload = 4; + void clear_payload() ; + const ::std::string& payload() const; + template + void set_payload(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_payload(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_payload(); + void set_allocated_payload(::std::string* PROTOBUF_NULLABLE value); + private: - bool _internal_has_service() const; + const ::std::string& _internal_payload() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_payload(); public: - void clear_service() ; - const ::modlock::host_app::control::ServiceReply& service() const; - [[nodiscard]] ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE release_service(); - ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL mutable_service(); - void set_allocated_service(::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_service(::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE unsafe_arena_release_service(); + // string source = 5; + void clear_source() ; + const ::std::string& source() const; + template + void set_source(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_source(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_source(); + void set_allocated_source(::std::string* PROTOBUF_NULLABLE value); private: - const ::modlock::host_app::control::ServiceReply& _internal_service() const; - ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL _internal_mutable_service(); + const ::std::string& _internal_source() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_source(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_source(); public: - void clear_body(); - BodyCase body_case() const; - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ControlRequest) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.Fixture) private: class _Internal; - void set_has_reload(); - void set_has_roles(); - void set_has_service(); - inline bool has_body() const; - inline void clear_has_body(); friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 3, - 3, 0, + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 63, 2> _table_; @@ -2822,49 +2837,47 @@ class ControlRequest final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ControlRequest& from_msg); - union BodyUnion { - constexpr BodyUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - ::google::protobuf::Message* PROTOBUF_NULLABLE reload_; - ::google::protobuf::Message* PROTOBUF_NULLABLE roles_; - ::google::protobuf::Message* PROTOBUF_NULLABLE service_; - } body_; + const Fixture& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::google::protobuf::internal::ArenaStringPtr service_; + ::google::protobuf::internal::ArenaStringPtr method_; + ::google::protobuf::internal::ArenaStringPtr payload_; + ::google::protobuf::internal::ArenaStringPtr source_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ControlRequest_class_data_; +extern const ::google::protobuf::internal::ClassDataFull Fixture_class_data_; // ------------------------------------------------------------------- -class ModCalls final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModCalls) */ { +class Fixtures final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.Fixtures) */ { public: - inline ModCalls() : ModCalls(nullptr) {} - ~ModCalls() PROTOBUF_FINAL; + inline Fixtures() : Fixtures(nullptr) {} + ~Fixtures() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ModCalls* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(Fixtures* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ModCalls)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Fixtures)); } #endif template - explicit PROTOBUF_CONSTEXPR ModCalls(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Fixtures(::google::protobuf::internal::ConstantInitialized); - inline ModCalls(const ModCalls& from) : ModCalls(nullptr, from) {} - inline ModCalls(ModCalls&& from) noexcept - : ModCalls(nullptr, ::std::move(from)) {} - inline ModCalls& operator=(const ModCalls& from) { + inline Fixtures(const Fixtures& from) : Fixtures(nullptr, from) {} + inline Fixtures(Fixtures&& from) noexcept + : Fixtures(nullptr, ::std::move(from)) {} + inline Fixtures& operator=(const Fixtures& from) { CopyFrom(from); return *this; } - inline ModCalls& operator=(ModCalls&& from) noexcept { + inline Fixtures& operator=(Fixtures&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -2892,13 +2905,13 @@ class ModCalls final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ModCalls& default_instance() { - return *reinterpret_cast( - &_ModCalls_default_instance_); + static const Fixtures& default_instance() { + return *reinterpret_cast( + &_Fixtures_default_instance_); } - static constexpr int kIndexInFileMessages = 7; - friend void swap(ModCalls& a, ModCalls& b) { a.Swap(&b); } - inline void Swap(ModCalls* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 17; + friend void swap(Fixtures& a, Fixtures& b) { a.Swap(&b); } + inline void Swap(Fixtures* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -2906,7 +2919,7 @@ class ModCalls final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ModCalls* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(Fixtures* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2914,13 +2927,13 @@ class ModCalls final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ModCalls* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + Fixtures* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ModCalls& from); + void CopyFrom(const Fixtures& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ModCalls& from) { ModCalls::MergeImpl(*this, from); } + void MergeFrom(const Fixtures& from) { Fixtures::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -2956,17 +2969,17 @@ class ModCalls final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ModCalls* PROTOBUF_NONNULL other); + void InternalSwap(Fixtures* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModCalls"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.Fixtures"; } - explicit ModCalls(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ModCalls(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModCalls& from); - ModCalls( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModCalls&& from) noexcept - : ModCalls(arena) { + explicit Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Fixtures& from); + Fixtures( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Fixtures&& from) noexcept + : Fixtures(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -2983,45 +2996,31 @@ class ModCalls final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kModFieldNumber = 1, - kProfileFieldNumber = 2, + kFixturesFieldNumber = 1, }; - // string mod = 1; - void clear_mod() ; - const ::std::string& mod() const; - template - void set_mod(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_mod(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); - void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); - + // repeated .modlock.host_app.control.Fixture fixtures = 1; + int fixtures_size() const; private: - const ::std::string& _internal_mod() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); + int _internal_fixtures_size() const; public: - // .modlock.wasm.profile.CallProfile profile = 2; - bool has_profile() const; - void clear_profile() ; - const ::modlock::wasm::profile::CallProfile& profile() const; - [[nodiscard]] ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE release_profile(); - ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL mutable_profile(); - void set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value); - ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE unsafe_arena_release_profile(); + void clear_fixtures() ; + ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL mutable_fixtures(int index); + ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL mutable_fixtures(); private: - const ::modlock::wasm::profile::CallProfile& _internal_profile() const; - ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL _internal_mutable_profile(); - + const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& _internal_fixtures() const; + ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL _internal_mutable_fixtures(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModCalls) + const ::modlock::host_app::control::Fixture& fixtures(int index) const; + ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL add_fixtures(); + const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& fixtures() const; + // @@protoc_insertion_point(class_scope:modlock.host_app.control.Fixtures) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 1, 45, + static const ::google::protobuf::internal::TcParseTable<0, 1, + 1, 0, 2> _table_; @@ -3039,44 +3038,43 @@ class ModCalls final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ModCalls& from_msg); + const Fixtures& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr mod_; - ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE profile_; + ::google::protobuf::RepeatedPtrField< ::modlock::host_app::control::Fixture > fixtures_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ModCalls_class_data_; +extern const ::google::protobuf::internal::ClassDataFull Fixtures_class_data_; // ------------------------------------------------------------------- -class ModSlowFrame final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModSlowFrame) */ { +class ControlRequest final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ControlRequest) */ { public: - inline ModSlowFrame() : ModSlowFrame(nullptr) {} - ~ModSlowFrame() PROTOBUF_FINAL; + inline ControlRequest() : ControlRequest(nullptr) {} + ~ControlRequest() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ModSlowFrame* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ControlRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ModSlowFrame)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ControlRequest)); } #endif template - explicit PROTOBUF_CONSTEXPR ModSlowFrame(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ControlRequest(::google::protobuf::internal::ConstantInitialized); - inline ModSlowFrame(const ModSlowFrame& from) : ModSlowFrame(nullptr, from) {} - inline ModSlowFrame(ModSlowFrame&& from) noexcept - : ModSlowFrame(nullptr, ::std::move(from)) {} - inline ModSlowFrame& operator=(const ModSlowFrame& from) { + inline ControlRequest(const ControlRequest& from) : ControlRequest(nullptr, from) {} + inline ControlRequest(ControlRequest&& from) noexcept + : ControlRequest(nullptr, ::std::move(from)) {} + inline ControlRequest& operator=(const ControlRequest& from) { CopyFrom(from); return *this; } - inline ModSlowFrame& operator=(ModSlowFrame&& from) noexcept { + inline ControlRequest& operator=(ControlRequest&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -3104,21 +3102,27 @@ class ModSlowFrame final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ModSlowFrame& default_instance() { - return *reinterpret_cast( - &_ModSlowFrame_default_instance_); + static const ControlRequest& default_instance() { + return *reinterpret_cast( + &_ControlRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 8; - friend void swap(ModSlowFrame& a, ModSlowFrame& b) { a.Swap(&b); } - inline void Swap(ModSlowFrame* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { + enum BodyCase { + kReload = 1, + kRoles = 2, + kService = 3, + BODY_NOT_SET = 0, + }; + static constexpr int kIndexInFileMessages = 0; + friend void swap(ControlRequest& a, ControlRequest& b) { a.Swap(&b); } + inline void Swap(ControlRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ModSlowFrame* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ControlRequest* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3126,13 +3130,13 @@ class ModSlowFrame final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ModSlowFrame* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ControlRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ModSlowFrame& from); + void CopyFrom(const ControlRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ModSlowFrame& from) { ModSlowFrame::MergeImpl(*this, from); } + void MergeFrom(const ControlRequest& from) { ControlRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -3168,17 +3172,17 @@ class ModSlowFrame final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ModSlowFrame* PROTOBUF_NONNULL other); + void InternalSwap(ControlRequest* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModSlowFrame"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ControlRequest"; } - explicit ModSlowFrame(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ModSlowFrame(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModSlowFrame& from); - ModSlowFrame( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModSlowFrame&& from) noexcept - : ModSlowFrame(arena) { + explicit ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ControlRequest& from); + ControlRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ControlRequest&& from) noexcept + : ControlRequest(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -3195,45 +3199,80 @@ class ModSlowFrame final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kModFieldNumber = 1, - kReportFieldNumber = 2, + kReloadFieldNumber = 1, + kRolesFieldNumber = 2, + kServiceFieldNumber = 3, }; - // string mod = 1; - void clear_mod() ; - const ::std::string& mod() const; - template - void set_mod(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_mod(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); - void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); + // .modlock.host_app.control.ReloadRequest reload = 1; + bool has_reload() const; + private: + bool _internal_has_reload() const; + + public: + void clear_reload() ; + const ::modlock::host_app::control::ReloadRequest& reload() const; + [[nodiscard]] ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE release_reload(); + ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL mutable_reload(); + void set_allocated_reload(::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_reload(::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE unsafe_arena_release_reload(); private: - const ::std::string& _internal_mod() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); + const ::modlock::host_app::control::ReloadRequest& _internal_reload() const; + ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL _internal_mutable_reload(); public: - // .modlock.wasm.profile.SlowFrame report = 2; - bool has_report() const; - void clear_report() ; - const ::modlock::wasm::profile::SlowFrame& report() const; - [[nodiscard]] ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE release_report(); - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL mutable_report(); - void set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value); - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE unsafe_arena_release_report(); + // .modlock.wasm.players.RolesTable roles = 2; + bool has_roles() const; + private: + bool _internal_has_roles() const; + + public: + void clear_roles() ; + const ::modlock::wasm::players::RolesTable& roles() const; + [[nodiscard]] ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE release_roles(); + ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL mutable_roles(); + void set_allocated_roles(::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_roles(::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value); + ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE unsafe_arena_release_roles(); private: - const ::modlock::wasm::profile::SlowFrame& _internal_report() const; - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL _internal_mutable_report(); + const ::modlock::wasm::players::RolesTable& _internal_roles() const; + ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL _internal_mutable_roles(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModSlowFrame) + // .modlock.host_app.control.ServiceReply service = 3; + bool has_service() const; + private: + bool _internal_has_service() const; + + public: + void clear_service() ; + const ::modlock::host_app::control::ServiceReply& service() const; + [[nodiscard]] ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE release_service(); + ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL mutable_service(); + void set_allocated_service(::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_service(::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE unsafe_arena_release_service(); + + private: + const ::modlock::host_app::control::ServiceReply& _internal_service() const; + ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL _internal_mutable_service(); + + public: + void clear_body(); + BodyCase body_case() const; + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ControlRequest) private: class _Internal; + void set_has_reload(); + void set_has_roles(); + void set_has_service(); + inline bool has_body() const; + inline void clear_has_body(); friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 1, 49, + static const ::google::protobuf::internal::TcParseTable<0, 3, + 3, 0, 2> _table_; @@ -3251,44 +3290,49 @@ class ModSlowFrame final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ModSlowFrame& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; + const ControlRequest& from_msg); + union BodyUnion { + constexpr BodyUnion() : _constinit_{} {} + ::google::protobuf::internal::ConstantInitialized _constinit_; + ::google::protobuf::Message* PROTOBUF_NULLABLE reload_; + ::google::protobuf::Message* PROTOBUF_NULLABLE roles_; + ::google::protobuf::Message* PROTOBUF_NULLABLE service_; + } body_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr mod_; - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE report_; + ::uint32_t _oneof_case_[1]; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ModSlowFrame_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ControlRequest_class_data_; // ------------------------------------------------------------------- -class UiChanged final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.UiChanged) */ { +class ModCalls final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModCalls) */ { public: - inline UiChanged() : UiChanged(nullptr) {} - ~UiChanged() PROTOBUF_FINAL; + inline ModCalls() : ModCalls(nullptr) {} + ~ModCalls() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(UiChanged* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ModCalls* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(UiChanged)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ModCalls)); } #endif template - explicit PROTOBUF_CONSTEXPR UiChanged(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ModCalls(::google::protobuf::internal::ConstantInitialized); - inline UiChanged(const UiChanged& from) : UiChanged(nullptr, from) {} - inline UiChanged(UiChanged&& from) noexcept - : UiChanged(nullptr, ::std::move(from)) {} - inline UiChanged& operator=(const UiChanged& from) { + inline ModCalls(const ModCalls& from) : ModCalls(nullptr, from) {} + inline ModCalls(ModCalls&& from) noexcept + : ModCalls(nullptr, ::std::move(from)) {} + inline ModCalls& operator=(const ModCalls& from) { CopyFrom(from); return *this; } - inline UiChanged& operator=(UiChanged&& from) noexcept { + inline ModCalls& operator=(ModCalls&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -3316,13 +3360,13 @@ class UiChanged final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const UiChanged& default_instance() { - return *reinterpret_cast( - &_UiChanged_default_instance_); + static const ModCalls& default_instance() { + return *reinterpret_cast( + &_ModCalls_default_instance_); } - static constexpr int kIndexInFileMessages = 13; - friend void swap(UiChanged& a, UiChanged& b) { a.Swap(&b); } - inline void Swap(UiChanged* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 7; + friend void swap(ModCalls& a, ModCalls& b) { a.Swap(&b); } + inline void Swap(ModCalls* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -3330,7 +3374,7 @@ class UiChanged final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(UiChanged* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ModCalls* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3338,13 +3382,13 @@ class UiChanged final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - UiChanged* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ModCalls* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const UiChanged& from); + void CopyFrom(const ModCalls& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const UiChanged& from) { UiChanged::MergeImpl(*this, from); } + void MergeFrom(const ModCalls& from) { ModCalls::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -3380,17 +3424,17 @@ class UiChanged final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(UiChanged* PROTOBUF_NONNULL other); + void InternalSwap(ModCalls* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.UiChanged"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModCalls"; } - explicit UiChanged(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - UiChanged(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const UiChanged& from); - UiChanged( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, UiChanged&& from) noexcept - : UiChanged(arena) { + explicit ModCalls(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ModCalls(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModCalls& from); + ModCalls( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModCalls&& from) noexcept + : ModCalls(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -3408,8 +3452,7 @@ class UiChanged final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { kModFieldNumber = 1, - kChangeFieldNumber = 3, - kSlotFieldNumber = 2, + kProfileFieldNumber = 2, }; // string mod = 1; void clear_mod() ; @@ -3426,37 +3469,27 @@ class UiChanged final : public ::google::protobuf::Message ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - // .modlock.wasm.ui.Change change = 3; - bool has_change() const; - void clear_change() ; - const ::modlock::wasm::ui::Change& change() const; - [[nodiscard]] ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE release_change(); - ::modlock::wasm::ui::Change* PROTOBUF_NONNULL mutable_change(); - void set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value); - ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE unsafe_arena_release_change(); - - private: - const ::modlock::wasm::ui::Change& _internal_change() const; - ::modlock::wasm::ui::Change* PROTOBUF_NONNULL _internal_mutable_change(); - - public: - // int32 slot = 2; - void clear_slot() ; - ::int32_t slot() const; - void set_slot(::int32_t value); + // .modlock.wasm.profile.CallProfile profile = 2; + bool has_profile() const; + void clear_profile() ; + const ::modlock::wasm::profile::CallProfile& profile() const; + [[nodiscard]] ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE release_profile(); + ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL mutable_profile(); + void set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value); + ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE unsafe_arena_release_profile(); private: - ::int32_t _internal_slot() const; - void _internal_set_slot(::int32_t value); + const ::modlock::wasm::profile::CallProfile& _internal_profile() const; + ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL _internal_mutable_profile(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.UiChanged) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModCalls) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 1, 46, + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 45, 2> _table_; @@ -3474,45 +3507,44 @@ class UiChanged final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const UiChanged& from_msg); + const ModCalls& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr mod_; - ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE change_; - ::int32_t slot_; + ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE profile_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull UiChanged_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ModCalls_class_data_; // ------------------------------------------------------------------- -class HostEvent final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.HostEvent) */ { +class ModSlowFrame final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModSlowFrame) */ { public: - inline HostEvent() : HostEvent(nullptr) {} - ~HostEvent() PROTOBUF_FINAL; - + inline ModSlowFrame() : ModSlowFrame(nullptr) {} + ~ModSlowFrame() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(HostEvent* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ModSlowFrame* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(HostEvent)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ModSlowFrame)); } #endif template - explicit PROTOBUF_CONSTEXPR HostEvent(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ModSlowFrame(::google::protobuf::internal::ConstantInitialized); - inline HostEvent(const HostEvent& from) : HostEvent(nullptr, from) {} - inline HostEvent(HostEvent&& from) noexcept - : HostEvent(nullptr, ::std::move(from)) {} - inline HostEvent& operator=(const HostEvent& from) { + inline ModSlowFrame(const ModSlowFrame& from) : ModSlowFrame(nullptr, from) {} + inline ModSlowFrame(ModSlowFrame&& from) noexcept + : ModSlowFrame(nullptr, ::std::move(from)) {} + inline ModSlowFrame& operator=(const ModSlowFrame& from) { CopyFrom(from); return *this; } - inline HostEvent& operator=(HostEvent&& from) noexcept { + inline ModSlowFrame& operator=(ModSlowFrame&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -3540,28 +3572,13 @@ class HostEvent final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const HostEvent& default_instance() { - return *reinterpret_cast( - &_HostEvent_default_instance_); + static const ModSlowFrame& default_instance() { + return *reinterpret_cast( + &_ModSlowFrame_default_instance_); } - enum BodyCase { - kStarted = 1, - kLog = 2, - kFailed = 3, - kJoined = 4, - kReady = 5, - kUi = 6, - kLeft = 7, - kMessage = 8, - kChat = 9, - kCalls = 10, - kSlowFrame = 11, - kServiceApplied = 12, - BODY_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 2; - friend void swap(HostEvent& a, HostEvent& b) { a.Swap(&b); } - inline void Swap(HostEvent* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 8; + friend void swap(ModSlowFrame& a, ModSlowFrame& b) { a.Swap(&b); } + inline void Swap(ModSlowFrame* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -3569,7 +3586,7 @@ class HostEvent final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(HostEvent* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ModSlowFrame* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3577,13 +3594,13 @@ class HostEvent final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - HostEvent* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ModSlowFrame* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const HostEvent& from); + void CopyFrom(const ModSlowFrame& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const HostEvent& from) { HostEvent::MergeImpl(*this, from); } + void MergeFrom(const ModSlowFrame& from) { ModSlowFrame::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -3619,17 +3636,17 @@ class HostEvent final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(HostEvent* PROTOBUF_NONNULL other); + void InternalSwap(ModSlowFrame* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.HostEvent"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModSlowFrame"; } - explicit HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HostEvent& from); - HostEvent( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, HostEvent&& from) noexcept - : HostEvent(arena) { + explicit ModSlowFrame(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ModSlowFrame(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModSlowFrame& from); + ModSlowFrame( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModSlowFrame&& from) noexcept + : ModSlowFrame(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -3646,269 +3663,268 @@ class HostEvent final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kStartedFieldNumber = 1, - kLogFieldNumber = 2, - kFailedFieldNumber = 3, - kJoinedFieldNumber = 4, - kReadyFieldNumber = 5, - kUiFieldNumber = 6, - kLeftFieldNumber = 7, - kMessageFieldNumber = 8, - kChatFieldNumber = 9, - kCallsFieldNumber = 10, - kSlowFrameFieldNumber = 11, - kServiceAppliedFieldNumber = 12, + kModFieldNumber = 1, + kReportFieldNumber = 2, }; - // .modlock.host_app.control.ModStarted started = 1; - bool has_started() const; - private: - bool _internal_has_started() const; - - public: - void clear_started() ; - const ::modlock::host_app::control::ModStarted& started() const; - [[nodiscard]] ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE release_started(); - ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL mutable_started(); - void set_allocated_started(::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_started(::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE unsafe_arena_release_started(); - - private: - const ::modlock::host_app::control::ModStarted& _internal_started() const; - ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL _internal_mutable_started(); + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; + template + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); - public: - // .modlock.host_app.control.ModLog log = 2; - bool has_log() const; private: - bool _internal_has_log() const; + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - void clear_log() ; - const ::modlock::host_app::control::ModLog& log() const; - [[nodiscard]] ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE release_log(); - ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL mutable_log(); - void set_allocated_log(::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_log(::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE unsafe_arena_release_log(); - - private: - const ::modlock::host_app::control::ModLog& _internal_log() const; - ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL _internal_mutable_log(); + // .modlock.wasm.profile.SlowFrame report = 2; + bool has_report() const; + void clear_report() ; + const ::modlock::wasm::profile::SlowFrame& report() const; + [[nodiscard]] ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE release_report(); + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL mutable_report(); + void set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value); + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE unsafe_arena_release_report(); - public: - // .modlock.host_app.control.ModFailed failed = 3; - bool has_failed() const; private: - bool _internal_has_failed() const; + const ::modlock::wasm::profile::SlowFrame& _internal_report() const; + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL _internal_mutable_report(); public: - void clear_failed() ; - const ::modlock::host_app::control::ModFailed& failed() const; - [[nodiscard]] ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE release_failed(); - ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL mutable_failed(); - void set_allocated_failed(::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_failed(::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE unsafe_arena_release_failed(); + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModSlowFrame) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 49, + 2> + _table_; - private: - const ::modlock::host_app::control::ModFailed& _internal_failed() const; - ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL _internal_mutable_failed(); + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ModSlowFrame& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE report_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; +}; - public: - // .modlock.host_app.control.PlayerJoined joined = 4; - bool has_joined() const; - private: - bool _internal_has_joined() const; +extern const ::google::protobuf::internal::ClassDataFull ModSlowFrame_class_data_; +// ------------------------------------------------------------------- - public: - void clear_joined() ; - const ::modlock::host_app::control::PlayerJoined& joined() const; - [[nodiscard]] ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE release_joined(); - ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL mutable_joined(); - void set_allocated_joined(::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_joined(::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE unsafe_arena_release_joined(); +class UiChanged final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.UiChanged) */ { + public: + inline UiChanged() : UiChanged(nullptr) {} + ~UiChanged() PROTOBUF_FINAL; - private: - const ::modlock::host_app::control::PlayerJoined& _internal_joined() const; - ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL _internal_mutable_joined(); +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(UiChanged* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(UiChanged)); + } +#endif - public: - // .modlock.host_app.control.ServerReady ready = 5; - bool has_ready() const; - private: - bool _internal_has_ready() const; + template + explicit PROTOBUF_CONSTEXPR UiChanged(::google::protobuf::internal::ConstantInitialized); - public: - void clear_ready() ; - const ::modlock::host_app::control::ServerReady& ready() const; - [[nodiscard]] ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE release_ready(); - ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL mutable_ready(); - void set_allocated_ready(::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_ready(::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE unsafe_arena_release_ready(); + inline UiChanged(const UiChanged& from) : UiChanged(nullptr, from) {} + inline UiChanged(UiChanged&& from) noexcept + : UiChanged(nullptr, ::std::move(from)) {} + inline UiChanged& operator=(const UiChanged& from) { + CopyFrom(from); + return *this; + } + inline UiChanged& operator=(UiChanged&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } - private: - const ::modlock::host_app::control::ServerReady& _internal_ready() const; - ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL _internal_mutable_ready(); + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } - public: - // .modlock.host_app.control.UiChanged ui = 6; - bool has_ui() const; - private: - bool _internal_has_ui() const; - - public: - void clear_ui() ; - const ::modlock::host_app::control::UiChanged& ui() const; - [[nodiscard]] ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE release_ui(); - ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL mutable_ui(); - void set_allocated_ui(::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_ui(::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE unsafe_arena_release_ui(); - - private: - const ::modlock::host_app::control::UiChanged& _internal_ui() const; - ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL _internal_mutable_ui(); + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UiChanged& default_instance() { + return *reinterpret_cast( + &_UiChanged_default_instance_); + } + static constexpr int kIndexInFileMessages = 13; + friend void swap(UiChanged& a, UiChanged& b) { a.Swap(&b); } + inline void Swap(UiChanged* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UiChanged* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } - public: - // .modlock.host_app.control.PlayerLeft left = 7; - bool has_left() const; - private: - bool _internal_has_left() const; + // implements Message ---------------------------------------------- - public: - void clear_left() ; - const ::modlock::host_app::control::PlayerLeft& left() const; - [[nodiscard]] ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE release_left(); - ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL mutable_left(); - void set_allocated_left(::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_left(::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE unsafe_arena_release_left(); + UiChanged* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const UiChanged& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const UiChanged& from) { UiChanged::MergeImpl(*this, from); } private: - const ::modlock::host_app::control::PlayerLeft& _internal_left() const; - ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL _internal_mutable_left(); + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); public: - // .modlock.host_app.control.PlayerMessage message = 8; - bool has_message() const; + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) private: - bool _internal_has_message() const; + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); public: - void clear_message() ; - const ::modlock::host_app::control::PlayerMessage& message() const; - [[nodiscard]] ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE release_message(); - ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL mutable_message(); - void set_allocated_message(::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_message(::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE unsafe_arena_release_message(); - - private: - const ::modlock::host_app::control::PlayerMessage& _internal_message() const; - ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL _internal_mutable_message(); + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } - public: - // .modlock.host_app.control.PlayerChat chat = 9; - bool has_chat() const; private: - bool _internal_has_chat() const; - - public: - void clear_chat() ; - const ::modlock::host_app::control::PlayerChat& chat() const; - [[nodiscard]] ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE release_chat(); - ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL mutable_chat(); - void set_allocated_chat(::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_chat(::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE unsafe_arena_release_chat(); + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(UiChanged* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.UiChanged"; } - private: - const ::modlock::host_app::control::PlayerChat& _internal_chat() const; - ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL _internal_mutable_chat(); + explicit UiChanged(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + UiChanged(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const UiChanged& from); + UiChanged( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, UiChanged&& from) noexcept + : UiChanged(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); - public: - // .modlock.host_app.control.ModCalls calls = 10; - bool has_calls() const; - private: - bool _internal_has_calls() const; + public: + static constexpr auto InternalGenerateClassData_(); - public: - void clear_calls() ; - const ::modlock::host_app::control::ModCalls& calls() const; - [[nodiscard]] ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE release_calls(); - ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL mutable_calls(); - void set_allocated_calls(::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_calls(::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE unsafe_arena_release_calls(); + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- - private: - const ::modlock::host_app::control::ModCalls& _internal_calls() const; - ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL _internal_mutable_calls(); + // accessors ------------------------------------------------------- + enum : int { + kModFieldNumber = 1, + kChangeFieldNumber = 3, + kSlotFieldNumber = 2, + }; + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; + template + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); - public: - // .modlock.host_app.control.ModSlowFrame slow_frame = 11; - bool has_slow_frame() const; private: - bool _internal_has_slow_frame() const; + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - void clear_slow_frame() ; - const ::modlock::host_app::control::ModSlowFrame& slow_frame() const; - [[nodiscard]] ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE release_slow_frame(); - ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL mutable_slow_frame(); - void set_allocated_slow_frame(::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_slow_frame(::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE unsafe_arena_release_slow_frame(); - - private: - const ::modlock::host_app::control::ModSlowFrame& _internal_slow_frame() const; - ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL _internal_mutable_slow_frame(); + // .modlock.wasm.ui.Change change = 3; + bool has_change() const; + void clear_change() ; + const ::modlock::wasm::ui::Change& change() const; + [[nodiscard]] ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE release_change(); + ::modlock::wasm::ui::Change* PROTOBUF_NONNULL mutable_change(); + void set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value); + ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE unsafe_arena_release_change(); - public: - // .modlock.host_app.control.ServiceResult service_applied = 12; - bool has_service_applied() const; private: - bool _internal_has_service_applied() const; + const ::modlock::wasm::ui::Change& _internal_change() const; + ::modlock::wasm::ui::Change* PROTOBUF_NONNULL _internal_mutable_change(); public: - void clear_service_applied() ; - const ::modlock::host_app::control::ServiceResult& service_applied() const; - [[nodiscard]] ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE release_service_applied(); - ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL mutable_service_applied(); - void set_allocated_service_applied(::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_service_applied(::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE unsafe_arena_release_service_applied(); + // int32 slot = 2; + void clear_slot() ; + ::int32_t slot() const; + void set_slot(::int32_t value); private: - const ::modlock::host_app::control::ServiceResult& _internal_service_applied() const; - ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL _internal_mutable_service_applied(); + ::int32_t _internal_slot() const; + void _internal_set_slot(::int32_t value); public: - void clear_body(); - BodyCase body_case() const; - // @@protoc_insertion_point(class_scope:modlock.host_app.control.HostEvent) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.UiChanged) private: class _Internal; - void set_has_started(); - void set_has_log(); - void set_has_failed(); - void set_has_joined(); - void set_has_ready(); - void set_has_ui(); - void set_has_left(); - void set_has_message(); - void set_has_chat(); - void set_has_calls(); - void set_has_slow_frame(); - void set_has_service_applied(); - inline bool has_body() const; - inline void clear_has_body(); friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 12, - 12, 0, + static const ::google::protobuf::internal::TcParseTable<2, 3, + 1, 46, 2> _table_; @@ -3926,1657 +3942,2849 @@ class HostEvent final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const HostEvent& from_msg); - union BodyUnion { - constexpr BodyUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - ::google::protobuf::Message* PROTOBUF_NULLABLE started_; - ::google::protobuf::Message* PROTOBUF_NULLABLE log_; - ::google::protobuf::Message* PROTOBUF_NULLABLE failed_; - ::google::protobuf::Message* PROTOBUF_NULLABLE joined_; - ::google::protobuf::Message* PROTOBUF_NULLABLE ready_; - ::google::protobuf::Message* PROTOBUF_NULLABLE ui_; - ::google::protobuf::Message* PROTOBUF_NULLABLE left_; - ::google::protobuf::Message* PROTOBUF_NULLABLE message_; - ::google::protobuf::Message* PROTOBUF_NULLABLE chat_; - ::google::protobuf::Message* PROTOBUF_NULLABLE calls_; - ::google::protobuf::Message* PROTOBUF_NULLABLE slow_frame_; - ::google::protobuf::Message* PROTOBUF_NULLABLE service_applied_; - } body_; + const UiChanged& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE change_; + ::int32_t slot_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull HostEvent_class_data_; +extern const ::google::protobuf::internal::ClassDataFull UiChanged_class_data_; +// ------------------------------------------------------------------- -// =================================================================== +class HostEvent final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.HostEvent) */ { + public: + inline HostEvent() : HostEvent(nullptr) {} + ~HostEvent() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(HostEvent* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(HostEvent)); + } +#endif + template + explicit PROTOBUF_CONSTEXPR HostEvent(::google::protobuf::internal::ConstantInitialized); + inline HostEvent(const HostEvent& from) : HostEvent(nullptr, from) {} + inline HostEvent(HostEvent&& from) noexcept + : HostEvent(nullptr, ::std::move(from)) {} + inline HostEvent& operator=(const HostEvent& from) { + CopyFrom(from); + return *this; + } + inline HostEvent& operator=(HostEvent&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } -// =================================================================== + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HostEvent& default_instance() { + return *reinterpret_cast( + &_HostEvent_default_instance_); + } + enum BodyCase { + kStarted = 1, + kLog = 2, + kFailed = 3, + kJoined = 4, + kReady = 5, + kUi = 6, + kLeft = 7, + kMessage = 8, + kChat = 9, + kCalls = 10, + kSlowFrame = 11, + kServiceApplied = 12, + BODY_NOT_SET = 0, + }; + static constexpr int kIndexInFileMessages = 2; + friend void swap(HostEvent& a, HostEvent& b) { a.Swap(&b); } + inline void Swap(HostEvent* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HostEvent* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HostEvent* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const HostEvent& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const HostEvent& from) { HostEvent::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(HostEvent* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.HostEvent"; } + + explicit HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HostEvent& from); + HostEvent( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, HostEvent&& from) noexcept + : HostEvent(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kStartedFieldNumber = 1, + kLogFieldNumber = 2, + kFailedFieldNumber = 3, + kJoinedFieldNumber = 4, + kReadyFieldNumber = 5, + kUiFieldNumber = 6, + kLeftFieldNumber = 7, + kMessageFieldNumber = 8, + kChatFieldNumber = 9, + kCallsFieldNumber = 10, + kSlowFrameFieldNumber = 11, + kServiceAppliedFieldNumber = 12, + }; + // .modlock.host_app.control.ModStarted started = 1; + bool has_started() const; + private: + bool _internal_has_started() const; + + public: + void clear_started() ; + const ::modlock::host_app::control::ModStarted& started() const; + [[nodiscard]] ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE release_started(); + ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL mutable_started(); + void set_allocated_started(::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_started(::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE unsafe_arena_release_started(); + + private: + const ::modlock::host_app::control::ModStarted& _internal_started() const; + ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL _internal_mutable_started(); + + public: + // .modlock.host_app.control.ModLog log = 2; + bool has_log() const; + private: + bool _internal_has_log() const; + + public: + void clear_log() ; + const ::modlock::host_app::control::ModLog& log() const; + [[nodiscard]] ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE release_log(); + ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL mutable_log(); + void set_allocated_log(::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_log(::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE unsafe_arena_release_log(); + + private: + const ::modlock::host_app::control::ModLog& _internal_log() const; + ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL _internal_mutable_log(); + + public: + // .modlock.host_app.control.ModFailed failed = 3; + bool has_failed() const; + private: + bool _internal_has_failed() const; + + public: + void clear_failed() ; + const ::modlock::host_app::control::ModFailed& failed() const; + [[nodiscard]] ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE release_failed(); + ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL mutable_failed(); + void set_allocated_failed(::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_failed(::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE unsafe_arena_release_failed(); + + private: + const ::modlock::host_app::control::ModFailed& _internal_failed() const; + ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL _internal_mutable_failed(); + + public: + // .modlock.host_app.control.PlayerJoined joined = 4; + bool has_joined() const; + private: + bool _internal_has_joined() const; + + public: + void clear_joined() ; + const ::modlock::host_app::control::PlayerJoined& joined() const; + [[nodiscard]] ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE release_joined(); + ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL mutable_joined(); + void set_allocated_joined(::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_joined(::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE unsafe_arena_release_joined(); + private: + const ::modlock::host_app::control::PlayerJoined& _internal_joined() const; + ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL _internal_mutable_joined(); + + public: + // .modlock.host_app.control.ServerReady ready = 5; + bool has_ready() const; + private: + bool _internal_has_ready() const; + + public: + void clear_ready() ; + const ::modlock::host_app::control::ServerReady& ready() const; + [[nodiscard]] ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE release_ready(); + ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL mutable_ready(); + void set_allocated_ready(::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_ready(::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE unsafe_arena_release_ready(); + + private: + const ::modlock::host_app::control::ServerReady& _internal_ready() const; + ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL _internal_mutable_ready(); + + public: + // .modlock.host_app.control.UiChanged ui = 6; + bool has_ui() const; + private: + bool _internal_has_ui() const; + + public: + void clear_ui() ; + const ::modlock::host_app::control::UiChanged& ui() const; + [[nodiscard]] ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE release_ui(); + ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL mutable_ui(); + void set_allocated_ui(::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_ui(::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE unsafe_arena_release_ui(); + + private: + const ::modlock::host_app::control::UiChanged& _internal_ui() const; + ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL _internal_mutable_ui(); + + public: + // .modlock.host_app.control.PlayerLeft left = 7; + bool has_left() const; + private: + bool _internal_has_left() const; + + public: + void clear_left() ; + const ::modlock::host_app::control::PlayerLeft& left() const; + [[nodiscard]] ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE release_left(); + ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL mutable_left(); + void set_allocated_left(::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_left(::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE unsafe_arena_release_left(); + + private: + const ::modlock::host_app::control::PlayerLeft& _internal_left() const; + ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL _internal_mutable_left(); + + public: + // .modlock.host_app.control.PlayerMessage message = 8; + bool has_message() const; + private: + bool _internal_has_message() const; + + public: + void clear_message() ; + const ::modlock::host_app::control::PlayerMessage& message() const; + [[nodiscard]] ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE release_message(); + ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL mutable_message(); + void set_allocated_message(::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_message(::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE unsafe_arena_release_message(); + + private: + const ::modlock::host_app::control::PlayerMessage& _internal_message() const; + ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL _internal_mutable_message(); + + public: + // .modlock.host_app.control.PlayerChat chat = 9; + bool has_chat() const; + private: + bool _internal_has_chat() const; + + public: + void clear_chat() ; + const ::modlock::host_app::control::PlayerChat& chat() const; + [[nodiscard]] ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE release_chat(); + ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL mutable_chat(); + void set_allocated_chat(::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_chat(::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE unsafe_arena_release_chat(); + + private: + const ::modlock::host_app::control::PlayerChat& _internal_chat() const; + ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL _internal_mutable_chat(); + + public: + // .modlock.host_app.control.ModCalls calls = 10; + bool has_calls() const; + private: + bool _internal_has_calls() const; + + public: + void clear_calls() ; + const ::modlock::host_app::control::ModCalls& calls() const; + [[nodiscard]] ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE release_calls(); + ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL mutable_calls(); + void set_allocated_calls(::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_calls(::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE unsafe_arena_release_calls(); + + private: + const ::modlock::host_app::control::ModCalls& _internal_calls() const; + ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL _internal_mutable_calls(); + + public: + // .modlock.host_app.control.ModSlowFrame slow_frame = 11; + bool has_slow_frame() const; + private: + bool _internal_has_slow_frame() const; + + public: + void clear_slow_frame() ; + const ::modlock::host_app::control::ModSlowFrame& slow_frame() const; + [[nodiscard]] ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE release_slow_frame(); + ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL mutable_slow_frame(); + void set_allocated_slow_frame(::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_slow_frame(::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE unsafe_arena_release_slow_frame(); + + private: + const ::modlock::host_app::control::ModSlowFrame& _internal_slow_frame() const; + ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL _internal_mutable_slow_frame(); + + public: + // .modlock.host_app.control.ServiceResult service_applied = 12; + bool has_service_applied() const; + private: + bool _internal_has_service_applied() const; + + public: + void clear_service_applied() ; + const ::modlock::host_app::control::ServiceResult& service_applied() const; + [[nodiscard]] ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE release_service_applied(); + ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL mutable_service_applied(); + void set_allocated_service_applied(::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_service_applied(::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE unsafe_arena_release_service_applied(); + + private: + const ::modlock::host_app::control::ServiceResult& _internal_service_applied() const; + ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL _internal_mutable_service_applied(); + + public: + void clear_body(); + BodyCase body_case() const; + // @@protoc_insertion_point(class_scope:modlock.host_app.control.HostEvent) + private: + class _Internal; + void set_has_started(); + void set_has_log(); + void set_has_failed(); + void set_has_joined(); + void set_has_ready(); + void set_has_ui(); + void set_has_left(); + void set_has_message(); + void set_has_chat(); + void set_has_calls(); + void set_has_slow_frame(); + void set_has_service_applied(); + inline bool has_body() const; + inline void clear_has_body(); + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 12, + 12, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const HostEvent& from_msg); + union BodyUnion { + constexpr BodyUnion() : _constinit_{} {} + ::google::protobuf::internal::ConstantInitialized _constinit_; + ::google::protobuf::Message* PROTOBUF_NULLABLE started_; + ::google::protobuf::Message* PROTOBUF_NULLABLE log_; + ::google::protobuf::Message* PROTOBUF_NULLABLE failed_; + ::google::protobuf::Message* PROTOBUF_NULLABLE joined_; + ::google::protobuf::Message* PROTOBUF_NULLABLE ready_; + ::google::protobuf::Message* PROTOBUF_NULLABLE ui_; + ::google::protobuf::Message* PROTOBUF_NULLABLE left_; + ::google::protobuf::Message* PROTOBUF_NULLABLE message_; + ::google::protobuf::Message* PROTOBUF_NULLABLE chat_; + ::google::protobuf::Message* PROTOBUF_NULLABLE calls_; + ::google::protobuf::Message* PROTOBUF_NULLABLE slow_frame_; + ::google::protobuf::Message* PROTOBUF_NULLABLE service_applied_; + } body_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t _oneof_case_[1]; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataFull HostEvent_class_data_; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ControlRequest + +// .modlock.host_app.control.ReloadRequest reload = 1; +inline bool ControlRequest::has_reload() const { + return body_case() == kReload; +} +inline bool ControlRequest::_internal_has_reload() const { + return body_case() == kReload; +} +inline void ControlRequest::set_has_reload() { + _impl_._oneof_case_[0] = kReload; +} +inline void ControlRequest::clear_reload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kReload) { + if (GetArena() == nullptr) { + delete _impl_.body_.reload_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.reload_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE ControlRequest::release_reload() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.reload) + if (body_case() == kReload) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.reload_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ReloadRequest& ControlRequest::_internal_reload() const { + return body_case() == kReload ? static_cast(*reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_)) + : reinterpret_cast(::modlock::host_app::control::_ReloadRequest_default_instance_); +} +inline const ::modlock::host_app::control::ReloadRequest& ControlRequest::reload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.reload) + return _internal_reload(); +} +inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_reload() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.reload) + if (body_case() == kReload) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); + _impl_.body_.reload_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlRequest::unsafe_arena_set_allocated_reload( + ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_reload(); + _impl_.body_.reload_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.reload) +} +inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL ControlRequest::_internal_mutable_reload() { + if (body_case() != kReload) { + clear_body(); + set_has_reload(); + _impl_.body_.reload_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ReloadRequest>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); +} +inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL ControlRequest::mutable_reload() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ReloadRequest* _msg = _internal_mutable_reload(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.reload) + return _msg; +} + +// .modlock.wasm.players.RolesTable roles = 2; +inline bool ControlRequest::has_roles() const { + return body_case() == kRoles; +} +inline bool ControlRequest::_internal_has_roles() const { + return body_case() == kRoles; +} +inline void ControlRequest::set_has_roles() { + _impl_._oneof_case_[0] = kRoles; +} +inline ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE ControlRequest::release_roles() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.roles) + if (body_case() == kRoles) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.roles_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::wasm::players::RolesTable& ControlRequest::_internal_roles() const { + return body_case() == kRoles ? static_cast(*reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_)) + : reinterpret_cast(::modlock::wasm::players::_RolesTable_default_instance_); +} +inline const ::modlock::wasm::players::RolesTable& ControlRequest::roles() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.roles) + return _internal_roles(); +} +inline ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_roles() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.roles) + if (body_case() == kRoles) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); + _impl_.body_.roles_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlRequest::unsafe_arena_set_allocated_roles( + ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_roles(); + _impl_.body_.roles_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.roles) +} +inline ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL ControlRequest::_internal_mutable_roles() { + if (body_case() != kRoles) { + clear_body(); + set_has_roles(); + _impl_.body_.roles_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::players::RolesTable>(GetArena())); + } + return reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); +} +inline ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL ControlRequest::mutable_roles() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::wasm::players::RolesTable* _msg = _internal_mutable_roles(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.roles) + return _msg; +} + +// .modlock.host_app.control.ServiceReply service = 3; +inline bool ControlRequest::has_service() const { + return body_case() == kService; +} +inline bool ControlRequest::_internal_has_service() const { + return body_case() == kService; +} +inline void ControlRequest::set_has_service() { + _impl_._oneof_case_[0] = kService; +} +inline void ControlRequest::clear_service() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kService) { + if (GetArena() == nullptr) { + delete _impl_.body_.service_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE ControlRequest::release_service() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.service) + if (body_case() == kService) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.service_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ServiceReply& ControlRequest::_internal_service() const { + return body_case() == kService ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_)) + : reinterpret_cast(::modlock::host_app::control::_ServiceReply_default_instance_); +} +inline const ::modlock::host_app::control::ServiceReply& ControlRequest::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.service) + return _internal_service(); +} +inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_service() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.service) + if (body_case() == kService) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); + _impl_.body_.service_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlRequest::unsafe_arena_set_allocated_service( + ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_service(); + _impl_.body_.service_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.service) +} +inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL ControlRequest::_internal_mutable_service() { + if (body_case() != kService) { + clear_body(); + set_has_service(); + _impl_.body_.service_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceReply>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); +} +inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL ControlRequest::mutable_service() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ServiceReply* _msg = _internal_mutable_service(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.service) + return _msg; +} + +inline bool ControlRequest::has_body() const { + return body_case() != BODY_NOT_SET; +} +inline void ControlRequest::clear_has_body() { + _impl_._oneof_case_[0] = BODY_NOT_SET; +} +inline ControlRequest::BodyCase ControlRequest::body_case() const { + return ControlRequest::BodyCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// ReloadRequest + +// string path = 1; +inline void ReloadRequest::clear_path() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.path_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ReloadRequest::path() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ReloadRequest.path) + return _internal_path(); +} +template +PROTOBUF_ALWAYS_INLINE void ReloadRequest::set_path(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.path_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ReloadRequest.path) +} +inline ::std::string* PROTOBUF_NONNULL ReloadRequest::mutable_path() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_path(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ReloadRequest.path) + return _s; +} +inline const ::std::string& ReloadRequest::_internal_path() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.path_.Get(); +} +inline void ReloadRequest::_internal_set_path(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.path_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ReloadRequest::_internal_mutable_path() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.path_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ReloadRequest::release_path() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ReloadRequest.path) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.path_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.path_.Set("", GetArena()); + } + return released; +} +inline void ReloadRequest::set_allocated_path(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.path_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.path_.IsDefault()) { + _impl_.path_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ReloadRequest.path) +} + +// ------------------------------------------------------------------- + +// HostEvent + +// .modlock.host_app.control.ModStarted started = 1; +inline bool HostEvent::has_started() const { + return body_case() == kStarted; +} +inline bool HostEvent::_internal_has_started() const { + return body_case() == kStarted; +} +inline void HostEvent::set_has_started() { + _impl_._oneof_case_[0] = kStarted; +} +inline void HostEvent::clear_started() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kStarted) { + if (GetArena() == nullptr) { + delete _impl_.body_.started_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.started_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE HostEvent::release_started() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.started) + if (body_case() == kStarted) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.started_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ModStarted& HostEvent::_internal_started() const { + return body_case() == kStarted ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_)) + : reinterpret_cast(::modlock::host_app::control::_ModStarted_default_instance_); +} +inline const ::modlock::host_app::control::ModStarted& HostEvent::started() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.started) + return _internal_started(); +} +inline ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_started() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.started) + if (body_case() == kStarted) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); + _impl_.body_.started_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void HostEvent::unsafe_arena_set_allocated_started( + ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_started(); + _impl_.body_.started_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.started) +} +inline ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL HostEvent::_internal_mutable_started() { + if (body_case() != kStarted) { + clear_body(); + set_has_started(); + _impl_.body_.started_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModStarted>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); +} +inline ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL HostEvent::mutable_started() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ModStarted* _msg = _internal_mutable_started(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.started) + return _msg; +} + +// .modlock.host_app.control.ModLog log = 2; +inline bool HostEvent::has_log() const { + return body_case() == kLog; +} +inline bool HostEvent::_internal_has_log() const { + return body_case() == kLog; +} +inline void HostEvent::set_has_log() { + _impl_._oneof_case_[0] = kLog; +} +inline void HostEvent::clear_log() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kLog) { + if (GetArena() == nullptr) { + delete _impl_.body_.log_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.log_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE HostEvent::release_log() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.log) + if (body_case() == kLog) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.log_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ModLog& HostEvent::_internal_log() const { + return body_case() == kLog ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_)) + : reinterpret_cast(::modlock::host_app::control::_ModLog_default_instance_); +} +inline const ::modlock::host_app::control::ModLog& HostEvent::log() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.log) + return _internal_log(); +} +inline ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_log() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.log) + if (body_case() == kLog) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); + _impl_.body_.log_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void HostEvent::unsafe_arena_set_allocated_log( + ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_log(); + _impl_.body_.log_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.log) +} +inline ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL HostEvent::_internal_mutable_log() { + if (body_case() != kLog) { + clear_body(); + set_has_log(); + _impl_.body_.log_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModLog>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); +} +inline ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL HostEvent::mutable_log() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ModLog* _msg = _internal_mutable_log(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.log) + return _msg; +} -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- +// .modlock.host_app.control.ModFailed failed = 3; +inline bool HostEvent::has_failed() const { + return body_case() == kFailed; +} +inline bool HostEvent::_internal_has_failed() const { + return body_case() == kFailed; +} +inline void HostEvent::set_has_failed() { + _impl_._oneof_case_[0] = kFailed; +} +inline void HostEvent::clear_failed() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kFailed) { + if (GetArena() == nullptr) { + delete _impl_.body_.failed_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.failed_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE HostEvent::release_failed() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.failed) + if (body_case() == kFailed) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.failed_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ModFailed& HostEvent::_internal_failed() const { + return body_case() == kFailed ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_)) + : reinterpret_cast(::modlock::host_app::control::_ModFailed_default_instance_); +} +inline const ::modlock::host_app::control::ModFailed& HostEvent::failed() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.failed) + return _internal_failed(); +} +inline ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_failed() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.failed) + if (body_case() == kFailed) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); + _impl_.body_.failed_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void HostEvent::unsafe_arena_set_allocated_failed( + ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_failed(); + _impl_.body_.failed_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.failed) +} +inline ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL HostEvent::_internal_mutable_failed() { + if (body_case() != kFailed) { + clear_body(); + set_has_failed(); + _impl_.body_.failed_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModFailed>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); +} +inline ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL HostEvent::mutable_failed() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ModFailed* _msg = _internal_mutable_failed(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.failed) + return _msg; +} -// ControlRequest +// .modlock.host_app.control.PlayerJoined joined = 4; +inline bool HostEvent::has_joined() const { + return body_case() == kJoined; +} +inline bool HostEvent::_internal_has_joined() const { + return body_case() == kJoined; +} +inline void HostEvent::set_has_joined() { + _impl_._oneof_case_[0] = kJoined; +} +inline void HostEvent::clear_joined() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kJoined) { + if (GetArena() == nullptr) { + delete _impl_.body_.joined_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.joined_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE HostEvent::release_joined() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.joined) + if (body_case() == kJoined) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.joined_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::PlayerJoined& HostEvent::_internal_joined() const { + return body_case() == kJoined ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_)) + : reinterpret_cast(::modlock::host_app::control::_PlayerJoined_default_instance_); +} +inline const ::modlock::host_app::control::PlayerJoined& HostEvent::joined() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.joined) + return _internal_joined(); +} +inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_joined() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.joined) + if (body_case() == kJoined) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); + _impl_.body_.joined_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void HostEvent::unsafe_arena_set_allocated_joined( + ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_joined(); + _impl_.body_.joined_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.joined) +} +inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL HostEvent::_internal_mutable_joined() { + if (body_case() != kJoined) { + clear_body(); + set_has_joined(); + _impl_.body_.joined_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerJoined>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); +} +inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL HostEvent::mutable_joined() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::PlayerJoined* _msg = _internal_mutable_joined(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.joined) + return _msg; +} -// .modlock.host_app.control.ReloadRequest reload = 1; -inline bool ControlRequest::has_reload() const { - return body_case() == kReload; +// .modlock.host_app.control.ServerReady ready = 5; +inline bool HostEvent::has_ready() const { + return body_case() == kReady; } -inline bool ControlRequest::_internal_has_reload() const { - return body_case() == kReload; +inline bool HostEvent::_internal_has_ready() const { + return body_case() == kReady; } -inline void ControlRequest::set_has_reload() { - _impl_._oneof_case_[0] = kReload; +inline void HostEvent::set_has_ready() { + _impl_._oneof_case_[0] = kReady; } -inline void ControlRequest::clear_reload() { +inline void HostEvent::clear_ready() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kReload) { + if (body_case() == kReady) { if (GetArena() == nullptr) { - delete _impl_.body_.reload_; + delete _impl_.body_.ready_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.reload_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.ready_); } clear_has_body(); } } -inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE ControlRequest::release_reload() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.reload) - if (body_case() == kReload) { +inline ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE HostEvent::release_ready() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.ready) + if (body_case() == kReady) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.reload_ = nullptr; + _impl_.body_.ready_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ReloadRequest& ControlRequest::_internal_reload() const { - return body_case() == kReload ? static_cast(*reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_)) - : reinterpret_cast(::modlock::host_app::control::_ReloadRequest_default_instance_); +inline const ::modlock::host_app::control::ServerReady& HostEvent::_internal_ready() const { + return body_case() == kReady ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_)) + : reinterpret_cast(::modlock::host_app::control::_ServerReady_default_instance_); } -inline const ::modlock::host_app::control::ReloadRequest& ControlRequest::reload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.reload) - return _internal_reload(); +inline const ::modlock::host_app::control::ServerReady& HostEvent::ready() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.ready) + return _internal_ready(); } -inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_reload() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.reload) - if (body_case() == kReload) { +inline ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_ready() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.ready) + if (body_case() == kReady) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); - _impl_.body_.reload_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); + _impl_.body_.ready_ = nullptr; return temp; } else { return nullptr; } } -inline void ControlRequest::unsafe_arena_set_allocated_reload( - ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_ready( + ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_reload(); - _impl_.body_.reload_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_ready(); + _impl_.body_.ready_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.reload) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.ready) } -inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL ControlRequest::_internal_mutable_reload() { - if (body_case() != kReload) { +inline ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL HostEvent::_internal_mutable_ready() { + if (body_case() != kReady) { clear_body(); - set_has_reload(); - _impl_.body_.reload_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ReloadRequest>(GetArena())); + set_has_ready(); + _impl_.body_.ready_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServerReady>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); + return reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); } -inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL ControlRequest::mutable_reload() +inline ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL HostEvent::mutable_ready() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ReloadRequest* _msg = _internal_mutable_reload(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.reload) + ::modlock::host_app::control::ServerReady* _msg = _internal_mutable_ready(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.ready) return _msg; } -// .modlock.wasm.players.RolesTable roles = 2; -inline bool ControlRequest::has_roles() const { - return body_case() == kRoles; +// .modlock.host_app.control.UiChanged ui = 6; +inline bool HostEvent::has_ui() const { + return body_case() == kUi; } -inline bool ControlRequest::_internal_has_roles() const { - return body_case() == kRoles; +inline bool HostEvent::_internal_has_ui() const { + return body_case() == kUi; } -inline void ControlRequest::set_has_roles() { - _impl_._oneof_case_[0] = kRoles; +inline void HostEvent::set_has_ui() { + _impl_._oneof_case_[0] = kUi; } -inline ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE ControlRequest::release_roles() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.roles) - if (body_case() == kRoles) { +inline void HostEvent::clear_ui() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kUi) { + if (GetArena() == nullptr) { + delete _impl_.body_.ui_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.ui_); + } clear_has_body(); - auto* temp = reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); + } +} +inline ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE HostEvent::release_ui() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.ui) + if (body_case() == kUi) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.roles_ = nullptr; + _impl_.body_.ui_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::wasm::players::RolesTable& ControlRequest::_internal_roles() const { - return body_case() == kRoles ? static_cast(*reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_)) - : reinterpret_cast(::modlock::wasm::players::_RolesTable_default_instance_); +inline const ::modlock::host_app::control::UiChanged& HostEvent::_internal_ui() const { + return body_case() == kUi ? static_cast(*reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_)) + : reinterpret_cast(::modlock::host_app::control::_UiChanged_default_instance_); } -inline const ::modlock::wasm::players::RolesTable& ControlRequest::roles() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.roles) - return _internal_roles(); +inline const ::modlock::host_app::control::UiChanged& HostEvent::ui() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.ui) + return _internal_ui(); } -inline ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_roles() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.roles) - if (body_case() == kRoles) { +inline ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_ui() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.ui) + if (body_case() == kUi) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); - _impl_.body_.roles_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); + _impl_.body_.ui_ = nullptr; return temp; } else { return nullptr; } } -inline void ControlRequest::unsafe_arena_set_allocated_roles( - ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_ui( + ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_roles(); - _impl_.body_.roles_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_ui(); + _impl_.body_.ui_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.roles) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.ui) } -inline ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL ControlRequest::_internal_mutable_roles() { - if (body_case() != kRoles) { +inline ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL HostEvent::_internal_mutable_ui() { + if (body_case() != kUi) { clear_body(); - set_has_roles(); - _impl_.body_.roles_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::players::RolesTable>(GetArena())); + set_has_ui(); + _impl_.body_.ui_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::UiChanged>(GetArena())); } - return reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); + return reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); } -inline ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL ControlRequest::mutable_roles() +inline ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL HostEvent::mutable_ui() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::wasm::players::RolesTable* _msg = _internal_mutable_roles(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.roles) + ::modlock::host_app::control::UiChanged* _msg = _internal_mutable_ui(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.ui) return _msg; } -// .modlock.host_app.control.ServiceReply service = 3; -inline bool ControlRequest::has_service() const { - return body_case() == kService; +// .modlock.host_app.control.PlayerLeft left = 7; +inline bool HostEvent::has_left() const { + return body_case() == kLeft; } -inline bool ControlRequest::_internal_has_service() const { - return body_case() == kService; +inline bool HostEvent::_internal_has_left() const { + return body_case() == kLeft; } -inline void ControlRequest::set_has_service() { - _impl_._oneof_case_[0] = kService; +inline void HostEvent::set_has_left() { + _impl_._oneof_case_[0] = kLeft; } -inline void ControlRequest::clear_service() { +inline void HostEvent::clear_left() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kService) { + if (body_case() == kLeft) { if (GetArena() == nullptr) { - delete _impl_.body_.service_; + delete _impl_.body_.left_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.left_); } clear_has_body(); } } -inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE ControlRequest::release_service() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.service) - if (body_case() == kService) { +inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE HostEvent::release_left() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.left) + if (body_case() == kLeft) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.service_ = nullptr; + _impl_.body_.left_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ServiceReply& ControlRequest::_internal_service() const { - return body_case() == kService ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_)) - : reinterpret_cast(::modlock::host_app::control::_ServiceReply_default_instance_); +inline const ::modlock::host_app::control::PlayerLeft& HostEvent::_internal_left() const { + return body_case() == kLeft ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_)) + : reinterpret_cast(::modlock::host_app::control::_PlayerLeft_default_instance_); } -inline const ::modlock::host_app::control::ServiceReply& ControlRequest::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.service) - return _internal_service(); +inline const ::modlock::host_app::control::PlayerLeft& HostEvent::left() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.left) + return _internal_left(); } -inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_service() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.service) - if (body_case() == kService) { +inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_left() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.left) + if (body_case() == kLeft) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); - _impl_.body_.service_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); + _impl_.body_.left_ = nullptr; return temp; } else { return nullptr; } } -inline void ControlRequest::unsafe_arena_set_allocated_service( - ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_left( + ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_service(); - _impl_.body_.service_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_left(); + _impl_.body_.left_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.service) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.left) } -inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL ControlRequest::_internal_mutable_service() { - if (body_case() != kService) { +inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL HostEvent::_internal_mutable_left() { + if (body_case() != kLeft) { clear_body(); - set_has_service(); - _impl_.body_.service_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceReply>(GetArena())); + set_has_left(); + _impl_.body_.left_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerLeft>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); + return reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); } -inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL ControlRequest::mutable_service() +inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL HostEvent::mutable_left() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ServiceReply* _msg = _internal_mutable_service(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.service) + ::modlock::host_app::control::PlayerLeft* _msg = _internal_mutable_left(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.left) return _msg; } -inline bool ControlRequest::has_body() const { - return body_case() != BODY_NOT_SET; -} -inline void ControlRequest::clear_has_body() { - _impl_._oneof_case_[0] = BODY_NOT_SET; -} -inline ControlRequest::BodyCase ControlRequest::body_case() const { - return ControlRequest::BodyCase(_impl_._oneof_case_[0]); +// .modlock.host_app.control.PlayerMessage message = 8; +inline bool HostEvent::has_message() const { + return body_case() == kMessage; } -// ------------------------------------------------------------------- - -// ReloadRequest - -// string path = 1; -inline void ReloadRequest::clear_path() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.path_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); +inline bool HostEvent::_internal_has_message() const { + return body_case() == kMessage; } -inline const ::std::string& ReloadRequest::path() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ReloadRequest.path) - return _internal_path(); +inline void HostEvent::set_has_message() { + _impl_._oneof_case_[0] = kMessage; } -template -PROTOBUF_ALWAYS_INLINE void ReloadRequest::set_path(Arg_&& arg, Args_... args) { +inline void HostEvent::clear_message() { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.path_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ReloadRequest.path) -} -inline ::std::string* PROTOBUF_NONNULL ReloadRequest::mutable_path() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_path(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ReloadRequest.path) - return _s; -} -inline const ::std::string& ReloadRequest::_internal_path() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.path_.Get(); + if (body_case() == kMessage) { + if (GetArena() == nullptr) { + delete _impl_.body_.message_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.message_); + } + clear_has_body(); + } } -inline void ReloadRequest::_internal_set_path(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.path_.Set(value, GetArena()); +inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE HostEvent::release_message() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.message) + if (body_case() == kMessage) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.message_ = nullptr; + return temp; + } else { + return nullptr; + } } -inline ::std::string* PROTOBUF_NONNULL ReloadRequest::_internal_mutable_path() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.path_.Mutable( GetArena()); +inline const ::modlock::host_app::control::PlayerMessage& HostEvent::_internal_message() const { + return body_case() == kMessage ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_)) + : reinterpret_cast(::modlock::host_app::control::_PlayerMessage_default_instance_); } -inline ::std::string* PROTOBUF_NULLABLE ReloadRequest::release_path() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ReloadRequest.path) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { +inline const ::modlock::host_app::control::PlayerMessage& HostEvent::message() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.message) + return _internal_message(); +} +inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.message) + if (body_case() == kMessage) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); + _impl_.body_.message_ = nullptr; + return temp; + } else { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.path_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.path_.Set("", GetArena()); - } - return released; } -inline void ReloadRequest::set_allocated_path(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); +inline void HostEvent::unsafe_arena_set_allocated_message( + ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_message(); + _impl_.body_.message_ = reinterpret_cast<::google::protobuf::Message*>(value); } - _impl_.path_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.path_.IsDefault()) { - _impl_.path_.Set("", GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.message) +} +inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL HostEvent::_internal_mutable_message() { + if (body_case() != kMessage) { + clear_body(); + set_has_message(); + _impl_.body_.message_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerMessage>(GetArena())); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ReloadRequest.path) + return reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); +} +inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL HostEvent::mutable_message() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::PlayerMessage* _msg = _internal_mutable_message(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.message) + return _msg; } -// ------------------------------------------------------------------- - -// HostEvent - -// .modlock.host_app.control.ModStarted started = 1; -inline bool HostEvent::has_started() const { - return body_case() == kStarted; +// .modlock.host_app.control.PlayerChat chat = 9; +inline bool HostEvent::has_chat() const { + return body_case() == kChat; } -inline bool HostEvent::_internal_has_started() const { - return body_case() == kStarted; +inline bool HostEvent::_internal_has_chat() const { + return body_case() == kChat; } -inline void HostEvent::set_has_started() { - _impl_._oneof_case_[0] = kStarted; +inline void HostEvent::set_has_chat() { + _impl_._oneof_case_[0] = kChat; } -inline void HostEvent::clear_started() { +inline void HostEvent::clear_chat() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kStarted) { + if (body_case() == kChat) { if (GetArena() == nullptr) { - delete _impl_.body_.started_; + delete _impl_.body_.chat_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.started_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.chat_); } clear_has_body(); } } -inline ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE HostEvent::release_started() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.started) - if (body_case() == kStarted) { +inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE HostEvent::release_chat() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.chat) + if (body_case() == kChat) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.started_ = nullptr; + _impl_.body_.chat_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ModStarted& HostEvent::_internal_started() const { - return body_case() == kStarted ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_)) - : reinterpret_cast(::modlock::host_app::control::_ModStarted_default_instance_); +inline const ::modlock::host_app::control::PlayerChat& HostEvent::_internal_chat() const { + return body_case() == kChat ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_)) + : reinterpret_cast(::modlock::host_app::control::_PlayerChat_default_instance_); } -inline const ::modlock::host_app::control::ModStarted& HostEvent::started() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.started) - return _internal_started(); +inline const ::modlock::host_app::control::PlayerChat& HostEvent::chat() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.chat) + return _internal_chat(); } -inline ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_started() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.started) - if (body_case() == kStarted) { +inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_chat() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.chat) + if (body_case() == kChat) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); - _impl_.body_.started_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); + _impl_.body_.chat_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_started( - ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_chat( + ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_started(); - _impl_.body_.started_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_chat(); + _impl_.body_.chat_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.started) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.chat) } -inline ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL HostEvent::_internal_mutable_started() { - if (body_case() != kStarted) { +inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL HostEvent::_internal_mutable_chat() { + if (body_case() != kChat) { clear_body(); - set_has_started(); - _impl_.body_.started_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModStarted>(GetArena())); + set_has_chat(); + _impl_.body_.chat_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerChat>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); + return reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); } -inline ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL HostEvent::mutable_started() +inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL HostEvent::mutable_chat() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModStarted* _msg = _internal_mutable_started(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.started) + ::modlock::host_app::control::PlayerChat* _msg = _internal_mutable_chat(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.chat) return _msg; } -// .modlock.host_app.control.ModLog log = 2; -inline bool HostEvent::has_log() const { - return body_case() == kLog; +// .modlock.host_app.control.ModCalls calls = 10; +inline bool HostEvent::has_calls() const { + return body_case() == kCalls; } -inline bool HostEvent::_internal_has_log() const { - return body_case() == kLog; +inline bool HostEvent::_internal_has_calls() const { + return body_case() == kCalls; } -inline void HostEvent::set_has_log() { - _impl_._oneof_case_[0] = kLog; +inline void HostEvent::set_has_calls() { + _impl_._oneof_case_[0] = kCalls; } -inline void HostEvent::clear_log() { +inline void HostEvent::clear_calls() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kLog) { + if (body_case() == kCalls) { if (GetArena() == nullptr) { - delete _impl_.body_.log_; + delete _impl_.body_.calls_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.log_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.calls_); } clear_has_body(); } } -inline ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE HostEvent::release_log() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.log) - if (body_case() == kLog) { +inline ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE HostEvent::release_calls() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.calls) + if (body_case() == kCalls) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.log_ = nullptr; + _impl_.body_.calls_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ModLog& HostEvent::_internal_log() const { - return body_case() == kLog ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_)) - : reinterpret_cast(::modlock::host_app::control::_ModLog_default_instance_); +inline const ::modlock::host_app::control::ModCalls& HostEvent::_internal_calls() const { + return body_case() == kCalls ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_)) + : reinterpret_cast(::modlock::host_app::control::_ModCalls_default_instance_); } -inline const ::modlock::host_app::control::ModLog& HostEvent::log() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.log) - return _internal_log(); +inline const ::modlock::host_app::control::ModCalls& HostEvent::calls() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.calls) + return _internal_calls(); } -inline ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_log() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.log) - if (body_case() == kLog) { +inline ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_calls() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.calls) + if (body_case() == kCalls) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); - _impl_.body_.log_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); + _impl_.body_.calls_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_log( - ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_calls( + ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_log(); - _impl_.body_.log_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_calls(); + _impl_.body_.calls_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.log) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.calls) } -inline ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL HostEvent::_internal_mutable_log() { - if (body_case() != kLog) { +inline ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL HostEvent::_internal_mutable_calls() { + if (body_case() != kCalls) { clear_body(); - set_has_log(); - _impl_.body_.log_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModLog>(GetArena())); + set_has_calls(); + _impl_.body_.calls_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModCalls>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); + return reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); } -inline ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL HostEvent::mutable_log() +inline ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL HostEvent::mutable_calls() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModLog* _msg = _internal_mutable_log(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.log) + ::modlock::host_app::control::ModCalls* _msg = _internal_mutable_calls(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.calls) return _msg; } -// .modlock.host_app.control.ModFailed failed = 3; -inline bool HostEvent::has_failed() const { - return body_case() == kFailed; +// .modlock.host_app.control.ModSlowFrame slow_frame = 11; +inline bool HostEvent::has_slow_frame() const { + return body_case() == kSlowFrame; } -inline bool HostEvent::_internal_has_failed() const { - return body_case() == kFailed; +inline bool HostEvent::_internal_has_slow_frame() const { + return body_case() == kSlowFrame; } -inline void HostEvent::set_has_failed() { - _impl_._oneof_case_[0] = kFailed; +inline void HostEvent::set_has_slow_frame() { + _impl_._oneof_case_[0] = kSlowFrame; } -inline void HostEvent::clear_failed() { +inline void HostEvent::clear_slow_frame() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kFailed) { + if (body_case() == kSlowFrame) { if (GetArena() == nullptr) { - delete _impl_.body_.failed_; + delete _impl_.body_.slow_frame_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.failed_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.slow_frame_); } clear_has_body(); } } -inline ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE HostEvent::release_failed() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.failed) - if (body_case() == kFailed) { +inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE HostEvent::release_slow_frame() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.slow_frame) + if (body_case() == kSlowFrame) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.failed_ = nullptr; + _impl_.body_.slow_frame_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ModFailed& HostEvent::_internal_failed() const { - return body_case() == kFailed ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_)) - : reinterpret_cast(::modlock::host_app::control::_ModFailed_default_instance_); +inline const ::modlock::host_app::control::ModSlowFrame& HostEvent::_internal_slow_frame() const { + return body_case() == kSlowFrame ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_)) + : reinterpret_cast(::modlock::host_app::control::_ModSlowFrame_default_instance_); } -inline const ::modlock::host_app::control::ModFailed& HostEvent::failed() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.failed) - return _internal_failed(); +inline const ::modlock::host_app::control::ModSlowFrame& HostEvent::slow_frame() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.slow_frame) + return _internal_slow_frame(); } -inline ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_failed() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.failed) - if (body_case() == kFailed) { +inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_slow_frame() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.slow_frame) + if (body_case() == kSlowFrame) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); - _impl_.body_.failed_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); + _impl_.body_.slow_frame_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_failed( - ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_slow_frame( + ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_failed(); - _impl_.body_.failed_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_slow_frame(); + _impl_.body_.slow_frame_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.failed) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.slow_frame) } -inline ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL HostEvent::_internal_mutable_failed() { - if (body_case() != kFailed) { +inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL HostEvent::_internal_mutable_slow_frame() { + if (body_case() != kSlowFrame) { clear_body(); - set_has_failed(); - _impl_.body_.failed_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModFailed>(GetArena())); + set_has_slow_frame(); + _impl_.body_.slow_frame_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModSlowFrame>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); + return reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); } -inline ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL HostEvent::mutable_failed() +inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL HostEvent::mutable_slow_frame() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModFailed* _msg = _internal_mutable_failed(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.failed) + ::modlock::host_app::control::ModSlowFrame* _msg = _internal_mutable_slow_frame(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.slow_frame) return _msg; } -// .modlock.host_app.control.PlayerJoined joined = 4; -inline bool HostEvent::has_joined() const { - return body_case() == kJoined; +// .modlock.host_app.control.ServiceResult service_applied = 12; +inline bool HostEvent::has_service_applied() const { + return body_case() == kServiceApplied; } -inline bool HostEvent::_internal_has_joined() const { - return body_case() == kJoined; +inline bool HostEvent::_internal_has_service_applied() const { + return body_case() == kServiceApplied; } -inline void HostEvent::set_has_joined() { - _impl_._oneof_case_[0] = kJoined; +inline void HostEvent::set_has_service_applied() { + _impl_._oneof_case_[0] = kServiceApplied; } -inline void HostEvent::clear_joined() { +inline void HostEvent::clear_service_applied() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kJoined) { + if (body_case() == kServiceApplied) { if (GetArena() == nullptr) { - delete _impl_.body_.joined_; + delete _impl_.body_.service_applied_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.joined_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_applied_); } clear_has_body(); } } -inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE HostEvent::release_joined() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.joined) - if (body_case() == kJoined) { +inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE HostEvent::release_service_applied() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.service_applied) + if (body_case() == kServiceApplied) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.joined_ = nullptr; + _impl_.body_.service_applied_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::PlayerJoined& HostEvent::_internal_joined() const { - return body_case() == kJoined ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_)) - : reinterpret_cast(::modlock::host_app::control::_PlayerJoined_default_instance_); +inline const ::modlock::host_app::control::ServiceResult& HostEvent::_internal_service_applied() const { + return body_case() == kServiceApplied ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_)) + : reinterpret_cast(::modlock::host_app::control::_ServiceResult_default_instance_); } -inline const ::modlock::host_app::control::PlayerJoined& HostEvent::joined() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.joined) - return _internal_joined(); +inline const ::modlock::host_app::control::ServiceResult& HostEvent::service_applied() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.service_applied) + return _internal_service_applied(); } -inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_joined() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.joined) - if (body_case() == kJoined) { +inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_service_applied() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.service_applied) + if (body_case() == kServiceApplied) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); - _impl_.body_.joined_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); + _impl_.body_.service_applied_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_joined( - ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_service_applied( + ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_joined(); - _impl_.body_.joined_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_service_applied(); + _impl_.body_.service_applied_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.joined) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.service_applied) } -inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL HostEvent::_internal_mutable_joined() { - if (body_case() != kJoined) { +inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL HostEvent::_internal_mutable_service_applied() { + if (body_case() != kServiceApplied) { clear_body(); - set_has_joined(); - _impl_.body_.joined_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerJoined>(GetArena())); + set_has_service_applied(); + _impl_.body_.service_applied_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceResult>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); + return reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); +} +inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL HostEvent::mutable_service_applied() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ServiceResult* _msg = _internal_mutable_service_applied(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.service_applied) + return _msg; +} + +inline bool HostEvent::has_body() const { + return body_case() != BODY_NOT_SET; +} +inline void HostEvent::clear_has_body() { + _impl_._oneof_case_[0] = BODY_NOT_SET; +} +inline HostEvent::BodyCase HostEvent::body_case() const { + return HostEvent::BodyCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// PlayerChat + +// int32 slot = 1; +inline void PlayerChat::clear_slot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t PlayerChat::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.slot) + return _internal_slot(); +} +inline void PlayerChat::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.slot) +} +inline ::int32_t PlayerChat::_internal_slot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slot_; +} +inline void PlayerChat::_internal_set_slot(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = value; +} + +// string name = 2; +inline void PlayerChat::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& PlayerChat::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.name) + return _internal_name(); +} +template +PROTOBUF_ALWAYS_INLINE void PlayerChat::set_name(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.name) +} +inline ::std::string* PROTOBUF_NONNULL PlayerChat::mutable_name() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerChat.name) + return _s; +} +inline const ::std::string& PlayerChat::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void PlayerChat::_internal_set_name(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL PlayerChat::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.name_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE PlayerChat::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerChat.name) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); + } + return released; +} +inline void PlayerChat::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerChat.name) +} + +// string text = 3; +inline void PlayerChat::clear_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.text_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& PlayerChat::text() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.text) + return _internal_text(); +} +template +PROTOBUF_ALWAYS_INLINE void PlayerChat::set_text(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.text_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.text) } -inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL HostEvent::mutable_joined() +inline ::std::string* PROTOBUF_NONNULL PlayerChat::mutable_text() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::PlayerJoined* _msg = _internal_mutable_joined(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.joined) - return _msg; -} - -// .modlock.host_app.control.ServerReady ready = 5; -inline bool HostEvent::has_ready() const { - return body_case() == kReady; + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_text(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerChat.text) + return _s; } -inline bool HostEvent::_internal_has_ready() const { - return body_case() == kReady; +inline const ::std::string& PlayerChat::_internal_text() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.text_.Get(); } -inline void HostEvent::set_has_ready() { - _impl_._oneof_case_[0] = kReady; +inline void PlayerChat::_internal_set_text(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.text_.Set(value, GetArena()); } -inline void HostEvent::clear_ready() { +inline ::std::string* PROTOBUF_NONNULL PlayerChat::_internal_mutable_text() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kReady) { - if (GetArena() == nullptr) { - delete _impl_.body_.ready_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.ready_); - } - clear_has_body(); - } + return _impl_.text_.Mutable( GetArena()); } -inline ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE HostEvent::release_ready() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.ready) - if (body_case() == kReady) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.ready_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NULLABLE PlayerChat::release_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerChat.text) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.text_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.text_.Set("", GetArena()); + } + return released; } -inline const ::modlock::host_app::control::ServerReady& HostEvent::_internal_ready() const { - return body_case() == kReady ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_)) - : reinterpret_cast(::modlock::host_app::control::_ServerReady_default_instance_); -} -inline const ::modlock::host_app::control::ServerReady& HostEvent::ready() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.ready) - return _internal_ready(); -} -inline ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_ready() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.ready) - if (body_case() == kReady) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); - _impl_.body_.ready_ = nullptr; - return temp; +inline void PlayerChat::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - return nullptr; + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -} -inline void HostEvent::unsafe_arena_set_allocated_ready( - ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_ready(); - _impl_.body_.ready_ = reinterpret_cast<::google::protobuf::Message*>(value); + _impl_.text_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { + _impl_.text_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.ready) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerChat.text) } -inline ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL HostEvent::_internal_mutable_ready() { - if (body_case() != kReady) { - clear_body(); - set_has_ready(); - _impl_.body_.ready_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServerReady>(GetArena())); - } - return reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); + +// ------------------------------------------------------------------- + +// ModStarted + +// string mod = 1; +inline void ModStarted::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); } -inline ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL HostEvent::mutable_ready() +inline const ::std::string& ModStarted::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ServerReady* _msg = _internal_mutable_ready(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.ready) - return _msg; + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModStarted.mod) + return _internal_mod(); } - -// .modlock.host_app.control.UiChanged ui = 6; -inline bool HostEvent::has_ui() const { - return body_case() == kUi; +template +PROTOBUF_ALWAYS_INLINE void ModStarted::set_mod(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModStarted.mod) } -inline bool HostEvent::_internal_has_ui() const { - return body_case() == kUi; +inline ::std::string* PROTOBUF_NONNULL ModStarted::mutable_mod() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModStarted.mod) + return _s; } -inline void HostEvent::set_has_ui() { - _impl_._oneof_case_[0] = kUi; +inline const ::std::string& ModStarted::_internal_mod() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.mod_.Get(); } -inline void HostEvent::clear_ui() { +inline void ModStarted::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kUi) { - if (GetArena() == nullptr) { - delete _impl_.body_.ui_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.ui_); - } - clear_has_body(); + _impl_.mod_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ModStarted::_internal_mutable_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.mod_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ModStarted::release_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModStarted.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.mod_.Set("", GetArena()); } + return released; } -inline ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE HostEvent::release_ui() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.ui) - if (body_case() == kUi) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.ui_ = nullptr; - return temp; +inline void ModStarted::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { - return nullptr; + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModStarted.mod) } -inline const ::modlock::host_app::control::UiChanged& HostEvent::_internal_ui() const { - return body_case() == kUi ? static_cast(*reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_)) - : reinterpret_cast(::modlock::host_app::control::_UiChanged_default_instance_); + +// bool reloaded = 2; +inline void ModStarted::clear_reloaded() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reloaded_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); } -inline const ::modlock::host_app::control::UiChanged& HostEvent::ui() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.ui) - return _internal_ui(); +inline bool ModStarted::reloaded() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModStarted.reloaded) + return _internal_reloaded(); } -inline ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_ui() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.ui) - if (body_case() == kUi) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); - _impl_.body_.ui_ = nullptr; - return temp; - } else { - return nullptr; - } +inline void ModStarted::set_reloaded(bool value) { + _internal_set_reloaded(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModStarted.reloaded) } -inline void HostEvent::unsafe_arena_set_allocated_ui( - ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_ui(); - _impl_.body_.ui_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.ui) +inline bool ModStarted::_internal_reloaded() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.reloaded_; } -inline ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL HostEvent::_internal_mutable_ui() { - if (body_case() != kUi) { - clear_body(); - set_has_ui(); - _impl_.body_.ui_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::UiChanged>(GetArena())); - } - return reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); +inline void ModStarted::_internal_set_reloaded(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reloaded_ = value; +} + +// ------------------------------------------------------------------- + +// ModLog + +// string mod = 1; +inline void ModLog::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); } -inline ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL HostEvent::mutable_ui() +inline const ::std::string& ModLog::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::UiChanged* _msg = _internal_mutable_ui(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.ui) - return _msg; + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModLog.mod) + return _internal_mod(); } - -// .modlock.host_app.control.PlayerLeft left = 7; -inline bool HostEvent::has_left() const { - return body_case() == kLeft; +template +PROTOBUF_ALWAYS_INLINE void ModLog::set_mod(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModLog.mod) } -inline bool HostEvent::_internal_has_left() const { - return body_case() == kLeft; +inline ::std::string* PROTOBUF_NONNULL ModLog::mutable_mod() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModLog.mod) + return _s; } -inline void HostEvent::set_has_left() { - _impl_._oneof_case_[0] = kLeft; +inline const ::std::string& ModLog::_internal_mod() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.mod_.Get(); } -inline void HostEvent::clear_left() { +inline void ModLog::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kLeft) { - if (GetArena() == nullptr) { - delete _impl_.body_.left_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.left_); - } - clear_has_body(); - } + _impl_.mod_.Set(value, GetArena()); } -inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE HostEvent::release_left() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.left) - if (body_case() == kLeft) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.left_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NONNULL ModLog::_internal_mutable_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.mod_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ModLog::release_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModLog.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.mod_.Set("", GetArena()); + } + return released; } -inline const ::modlock::host_app::control::PlayerLeft& HostEvent::_internal_left() const { - return body_case() == kLeft ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_)) - : reinterpret_cast(::modlock::host_app::control::_PlayerLeft_default_instance_); -} -inline const ::modlock::host_app::control::PlayerLeft& HostEvent::left() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.left) - return _internal_left(); -} -inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_left() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.left) - if (body_case() == kLeft) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); - _impl_.body_.left_ = nullptr; - return temp; +inline void ModLog::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { - return nullptr; + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -} -inline void HostEvent::unsafe_arena_set_allocated_left( - ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_left(); - _impl_.body_.left_ = reinterpret_cast<::google::protobuf::Message*>(value); + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.left) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModLog.mod) } -inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL HostEvent::_internal_mutable_left() { - if (body_case() != kLeft) { - clear_body(); - set_has_left(); - _impl_.body_.left_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerLeft>(GetArena())); - } - return reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); + +// string text = 2; +inline void ModLog::clear_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.text_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); } -inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL HostEvent::mutable_left() +inline const ::std::string& ModLog::text() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::PlayerLeft* _msg = _internal_mutable_left(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.left) - return _msg; + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModLog.text) + return _internal_text(); } - -// .modlock.host_app.control.PlayerMessage message = 8; -inline bool HostEvent::has_message() const { - return body_case() == kMessage; +template +PROTOBUF_ALWAYS_INLINE void ModLog::set_text(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.text_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModLog.text) } -inline bool HostEvent::_internal_has_message() const { - return body_case() == kMessage; +inline ::std::string* PROTOBUF_NONNULL ModLog::mutable_text() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_text(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModLog.text) + return _s; } -inline void HostEvent::set_has_message() { - _impl_._oneof_case_[0] = kMessage; +inline const ::std::string& ModLog::_internal_text() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.text_.Get(); } -inline void HostEvent::clear_message() { +inline void ModLog::_internal_set_text(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kMessage) { - if (GetArena() == nullptr) { - delete _impl_.body_.message_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.message_); - } - clear_has_body(); - } + _impl_.text_.Set(value, GetArena()); } -inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE HostEvent::release_message() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.message) - if (body_case() == kMessage) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.message_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NONNULL ModLog::_internal_mutable_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.text_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ModLog::release_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModLog.text) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.text_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.text_.Set("", GetArena()); + } + return released; } -inline const ::modlock::host_app::control::PlayerMessage& HostEvent::_internal_message() const { - return body_case() == kMessage ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_)) - : reinterpret_cast(::modlock::host_app::control::_PlayerMessage_default_instance_); -} -inline const ::modlock::host_app::control::PlayerMessage& HostEvent::message() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.message) - return _internal_message(); -} -inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.message) - if (body_case() == kMessage) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); - _impl_.body_.message_ = nullptr; - return temp; +inline void ModLog::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - return nullptr; + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -} -inline void HostEvent::unsafe_arena_set_allocated_message( - ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_message(); - _impl_.body_.message_ = reinterpret_cast<::google::protobuf::Message*>(value); + _impl_.text_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { + _impl_.text_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.message) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModLog.text) } -inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL HostEvent::_internal_mutable_message() { - if (body_case() != kMessage) { - clear_body(); - set_has_message(); - _impl_.body_.message_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerMessage>(GetArena())); - } - return reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); + +// ------------------------------------------------------------------- + +// ModFailed + +// string mod = 1; +inline void ModFailed::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); } -inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL HostEvent::mutable_message() +inline const ::std::string& ModFailed::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::PlayerMessage* _msg = _internal_mutable_message(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.message) - return _msg; + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModFailed.mod) + return _internal_mod(); +} +template +PROTOBUF_ALWAYS_INLINE void ModFailed::set_mod(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModFailed.mod) } - -// .modlock.host_app.control.PlayerChat chat = 9; -inline bool HostEvent::has_chat() const { - return body_case() == kChat; +inline ::std::string* PROTOBUF_NONNULL ModFailed::mutable_mod() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModFailed.mod) + return _s; } -inline bool HostEvent::_internal_has_chat() const { - return body_case() == kChat; +inline const ::std::string& ModFailed::_internal_mod() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.mod_.Get(); } -inline void HostEvent::set_has_chat() { - _impl_._oneof_case_[0] = kChat; +inline void ModFailed::_internal_set_mod(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.Set(value, GetArena()); } -inline void HostEvent::clear_chat() { +inline ::std::string* PROTOBUF_NONNULL ModFailed::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kChat) { - if (GetArena() == nullptr) { - delete _impl_.body_.chat_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.chat_); - } - clear_has_body(); - } + return _impl_.mod_.Mutable( GetArena()); } -inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE HostEvent::release_chat() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.chat) - if (body_case() == kChat) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.chat_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NULLABLE ModFailed::release_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModFailed.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.mod_.Set("", GetArena()); + } + return released; } -inline const ::modlock::host_app::control::PlayerChat& HostEvent::_internal_chat() const { - return body_case() == kChat ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_)) - : reinterpret_cast(::modlock::host_app::control::_PlayerChat_default_instance_); -} -inline const ::modlock::host_app::control::PlayerChat& HostEvent::chat() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.chat) - return _internal_chat(); -} -inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_chat() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.chat) - if (body_case() == kChat) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); - _impl_.body_.chat_ = nullptr; - return temp; +inline void ModFailed::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { - return nullptr; + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -} -inline void HostEvent::unsafe_arena_set_allocated_chat( - ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_chat(); - _impl_.body_.chat_ = reinterpret_cast<::google::protobuf::Message*>(value); + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.chat) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModFailed.mod) } -inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL HostEvent::_internal_mutable_chat() { - if (body_case() != kChat) { - clear_body(); - set_has_chat(); - _impl_.body_.chat_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerChat>(GetArena())); - } - return reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); + +// string error = 2; +inline void ModFailed::clear_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.error_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); } -inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL HostEvent::mutable_chat() +inline const ::std::string& ModFailed::error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::PlayerChat* _msg = _internal_mutable_chat(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.chat) - return _msg; + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModFailed.error) + return _internal_error(); } - -// .modlock.host_app.control.ModCalls calls = 10; -inline bool HostEvent::has_calls() const { - return body_case() == kCalls; +template +PROTOBUF_ALWAYS_INLINE void ModFailed::set_error(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.error_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModFailed.error) } -inline bool HostEvent::_internal_has_calls() const { - return body_case() == kCalls; +inline ::std::string* PROTOBUF_NONNULL ModFailed::mutable_error() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_error(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModFailed.error) + return _s; } -inline void HostEvent::set_has_calls() { - _impl_._oneof_case_[0] = kCalls; +inline const ::std::string& ModFailed::_internal_error() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.error_.Get(); } -inline void HostEvent::clear_calls() { +inline void ModFailed::_internal_set_error(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kCalls) { - if (GetArena() == nullptr) { - delete _impl_.body_.calls_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.calls_); - } - clear_has_body(); - } -} -inline ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE HostEvent::release_calls() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.calls) - if (body_case() == kCalls) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.calls_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::modlock::host_app::control::ModCalls& HostEvent::_internal_calls() const { - return body_case() == kCalls ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_)) - : reinterpret_cast(::modlock::host_app::control::_ModCalls_default_instance_); + _impl_.error_.Set(value, GetArena()); } -inline const ::modlock::host_app::control::ModCalls& HostEvent::calls() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.calls) - return _internal_calls(); +inline ::std::string* PROTOBUF_NONNULL ModFailed::_internal_mutable_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.error_.Mutable( GetArena()); } -inline ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_calls() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.calls) - if (body_case() == kCalls) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); - _impl_.body_.calls_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NULLABLE ModFailed::release_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModFailed.error) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } -} -inline void HostEvent::unsafe_arena_set_allocated_calls( - ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_calls(); - _impl_.body_.calls_ = reinterpret_cast<::google::protobuf::Message*>(value); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.error_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.error_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.calls) + return released; } -inline ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL HostEvent::_internal_mutable_calls() { - if (body_case() != kCalls) { - clear_body(); - set_has_calls(); - _impl_.body_.calls_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModCalls>(GetArena())); +inline void ModFailed::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - return reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); -} -inline ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL HostEvent::mutable_calls() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModCalls* _msg = _internal_mutable_calls(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.calls) - return _msg; + _impl_.error_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModFailed.error) } -// .modlock.host_app.control.ModSlowFrame slow_frame = 11; -inline bool HostEvent::has_slow_frame() const { - return body_case() == kSlowFrame; -} -inline bool HostEvent::_internal_has_slow_frame() const { - return body_case() == kSlowFrame; +// ------------------------------------------------------------------- + +// ModCalls + +// string mod = 1; +inline void ModCalls::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); } -inline void HostEvent::set_has_slow_frame() { - _impl_._oneof_case_[0] = kSlowFrame; +inline const ::std::string& ModCalls::mod() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModCalls.mod) + return _internal_mod(); } -inline void HostEvent::clear_slow_frame() { +template +PROTOBUF_ALWAYS_INLINE void ModCalls::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kSlowFrame) { - if (GetArena() == nullptr) { - delete _impl_.body_.slow_frame_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.slow_frame_); - } - clear_has_body(); - } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModCalls.mod) } -inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE HostEvent::release_slow_frame() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.slow_frame) - if (body_case() == kSlowFrame) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.slow_frame_ = nullptr; - return temp; - } else { - return nullptr; - } +inline ::std::string* PROTOBUF_NONNULL ModCalls::mutable_mod() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModCalls.mod) + return _s; } -inline const ::modlock::host_app::control::ModSlowFrame& HostEvent::_internal_slow_frame() const { - return body_case() == kSlowFrame ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_)) - : reinterpret_cast(::modlock::host_app::control::_ModSlowFrame_default_instance_); +inline const ::std::string& ModCalls::_internal_mod() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.mod_.Get(); } -inline const ::modlock::host_app::control::ModSlowFrame& HostEvent::slow_frame() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.slow_frame) - return _internal_slow_frame(); +inline void ModCalls::_internal_set_mod(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.Set(value, GetArena()); } -inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_slow_frame() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.slow_frame) - if (body_case() == kSlowFrame) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); - _impl_.body_.slow_frame_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NONNULL ModCalls::_internal_mutable_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.mod_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ModCalls::release_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModCalls.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } -} -inline void HostEvent::unsafe_arena_set_allocated_slow_frame( - ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_slow_frame(); - _impl_.body_.slow_frame_ = reinterpret_cast<::google::protobuf::Message*>(value); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.slow_frame) + return released; } -inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL HostEvent::_internal_mutable_slow_frame() { - if (body_case() != kSlowFrame) { - clear_body(); - set_has_slow_frame(); - _impl_.body_.slow_frame_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModSlowFrame>(GetArena())); +inline void ModCalls::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - return reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); -} -inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL HostEvent::mutable_slow_frame() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModSlowFrame* _msg = _internal_mutable_slow_frame(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.slow_frame) - return _msg; + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModCalls.mod) } -// .modlock.host_app.control.ServiceResult service_applied = 12; -inline bool HostEvent::has_service_applied() const { - return body_case() == kServiceApplied; +// .modlock.wasm.profile.CallProfile profile = 2; +inline bool ModCalls::has_profile() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.profile_ != nullptr); + return value; } -inline bool HostEvent::_internal_has_service_applied() const { - return body_case() == kServiceApplied; +inline const ::modlock::wasm::profile::CallProfile& ModCalls::_internal_profile() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::modlock::wasm::profile::CallProfile* p = _impl_.profile_; + return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::profile::_CallProfile_default_instance_); } -inline void HostEvent::set_has_service_applied() { - _impl_._oneof_case_[0] = kServiceApplied; +inline const ::modlock::wasm::profile::CallProfile& ModCalls::profile() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModCalls.profile) + return _internal_profile(); } -inline void HostEvent::clear_service_applied() { +inline void ModCalls::unsafe_arena_set_allocated_profile( + ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kServiceApplied) { - if (GetArena() == nullptr) { - delete _impl_.body_.service_applied_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_applied_); - } - clear_has_body(); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.profile_); } -} -inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE HostEvent::release_service_applied() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.service_applied) - if (body_case() == kServiceApplied) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.service_applied_ = nullptr; - return temp; + _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - return nullptr; + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ModCalls.profile) } -inline const ::modlock::host_app::control::ServiceResult& HostEvent::_internal_service_applied() const { - return body_case() == kServiceApplied ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_)) - : reinterpret_cast(::modlock::host_app::control::_ServiceResult_default_instance_); -} -inline const ::modlock::host_app::control::ServiceResult& HostEvent::service_applied() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.service_applied) - return _internal_service_applied(); -} -inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_service_applied() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.service_applied) - if (body_case() == kServiceApplied) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); - _impl_.body_.service_applied_ = nullptr; - return temp; +inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE ModCalls::release_profile() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::CallProfile* released = _impl_.profile_; + _impl_.profile_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } } else { - return nullptr; + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } } + return released; } -inline void HostEvent::unsafe_arena_set_allocated_service_applied( - ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_service_applied(); - _impl_.body_.service_applied_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.service_applied) +inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE ModCalls::unsafe_arena_release_profile() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModCalls.profile) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::CallProfile* temp = _impl_.profile_; + _impl_.profile_ = nullptr; + return temp; } -inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL HostEvent::_internal_mutable_service_applied() { - if (body_case() != kServiceApplied) { - clear_body(); - set_has_service_applied(); - _impl_.body_.service_applied_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceResult>(GetArena())); +inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL ModCalls::_internal_mutable_profile() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.profile_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::profile::CallProfile>(GetArena()); + _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(p); } - return reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); + return _impl_.profile_; } -inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL HostEvent::mutable_service_applied() +inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL ModCalls::mutable_profile() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ServiceResult* _msg = _internal_mutable_service_applied(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.service_applied) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::CallProfile* _msg = _internal_mutable_profile(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModCalls.profile) return _msg; } +inline void ModCalls::set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.profile_); + } -inline bool HostEvent::has_body() const { - return body_case() != BODY_NOT_SET; -} -inline void HostEvent::clear_has_body() { - _impl_._oneof_case_[0] = BODY_NOT_SET; -} -inline HostEvent::BodyCase HostEvent::body_case() const { - return HostEvent::BodyCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// PlayerChat + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } -// int32 slot = 1; -inline void PlayerChat::clear_slot() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; - ClearHasBit(_impl_._has_bits_[0], - 0x00000004U); -} -inline ::int32_t PlayerChat::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.slot) - return _internal_slot(); -} -inline void PlayerChat::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.slot) -} -inline ::int32_t PlayerChat::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; -} -inline void PlayerChat::_internal_set_slot(::int32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; + _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(value); + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModCalls.profile) } -// string name = 2; -inline void PlayerChat::clear_name() { +// ------------------------------------------------------------------- + +// ModSlowFrame + +// string mod = 1; +inline void ModSlowFrame::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); + _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& PlayerChat::name() const +inline const ::std::string& ModSlowFrame::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.name) - return _internal_name(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModSlowFrame.mod) + return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void PlayerChat::set_name(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ModSlowFrame::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.name) + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModSlowFrame.mod) } -inline ::std::string* PROTOBUF_NONNULL PlayerChat::mutable_name() +inline ::std::string* PROTOBUF_NONNULL ModSlowFrame::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerChat.name) + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModSlowFrame.mod) return _s; } -inline const ::std::string& PlayerChat::_internal_name() const { +inline const ::std::string& ModSlowFrame::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); + return _impl_.mod_.Get(); } -inline void PlayerChat::_internal_set_name(const ::std::string& value) { +inline void ModSlowFrame::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.Set(value, GetArena()); + _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerChat::_internal_mutable_name() { +inline ::std::string* PROTOBUF_NONNULL ModSlowFrame::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); + return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerChat::release_name() { +inline ::std::string* PROTOBUF_NULLABLE ModSlowFrame::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerChat.name) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModSlowFrame.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.name_.Release(); + auto* released = _impl_.mod_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); + _impl_.mod_.Set("", GetArena()); } return released; } -inline void PlayerChat::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { +inline void ModSlowFrame::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerChat.name) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModSlowFrame.mod) } -// string text = 3; -inline void PlayerChat::clear_text() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); -} -inline const ::std::string& PlayerChat::text() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.text) - return _internal_text(); -} -template -PROTOBUF_ALWAYS_INLINE void PlayerChat::set_text(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.text_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.text) -} -inline ::std::string* PROTOBUF_NONNULL PlayerChat::mutable_text() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_text(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerChat.text) - return _s; +// .modlock.wasm.profile.SlowFrame report = 2; +inline bool ModSlowFrame::has_report() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.report_ != nullptr); + return value; } -inline const ::std::string& PlayerChat::_internal_text() const { +inline const ::modlock::wasm::profile::SlowFrame& ModSlowFrame::_internal_report() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.text_.Get(); + const ::modlock::wasm::profile::SlowFrame* p = _impl_.report_; + return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::profile::_SlowFrame_default_instance_); } -inline void PlayerChat::_internal_set_text(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.Set(value, GetArena()); +inline const ::modlock::wasm::profile::SlowFrame& ModSlowFrame::report() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModSlowFrame.report) + return _internal_report(); } -inline ::std::string* PROTOBUF_NONNULL PlayerChat::_internal_mutable_text() { +inline void ModSlowFrame::unsafe_arena_set_allocated_report( + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.text_.Mutable( GetArena()); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.report_); + } + _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ModSlowFrame.report) } -inline ::std::string* PROTOBUF_NULLABLE PlayerChat::release_text() { +inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::release_report() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerChat.text) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { - return nullptr; - } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.text_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.text_.Set("", GetArena()); + ::modlock::wasm::profile::SlowFrame* released = _impl_.report_; + _impl_.report_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } } return released; } -inline void PlayerChat::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { +inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::unsafe_arena_release_report() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModSlowFrame.report) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::SlowFrame* temp = _impl_.report_; + _impl_.report_ = nullptr; + return temp; +} +inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL ModSlowFrame::_internal_mutable_report() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.report_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::profile::SlowFrame>(GetArena()); + _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(p); + } + return _impl_.report_; +} +inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL ModSlowFrame::mutable_report() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::SlowFrame* _msg = _internal_mutable_report(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModSlowFrame.report) + return _msg; +} +inline void ModSlowFrame::set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.report_); + } + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - _impl_.text_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { - _impl_.text_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerChat.text) + + _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(value); + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModSlowFrame.report) } // ------------------------------------------------------------------- -// ModStarted +// PlayerJoined -// string mod = 1; -inline void ModStarted::clear_mod() { +// int32 slot = 1; +inline void PlayerJoined::clear_slot() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.slot_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t PlayerJoined::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.slot) + return _internal_slot(); +} +inline void PlayerJoined::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.slot) +} +inline ::int32_t PlayerJoined::_internal_slot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slot_; +} +inline void PlayerJoined::_internal_set_slot(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = value; +} + +// string name = 2; +inline void PlayerJoined::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ModStarted::mod() const +inline const ::std::string& PlayerJoined::name() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModStarted.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.name) + return _internal_name(); } template -PROTOBUF_ALWAYS_INLINE void ModStarted::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void PlayerJoined::set_name(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModStarted.mod) + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.name) } -inline ::std::string* PROTOBUF_NONNULL ModStarted::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL PlayerJoined::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModStarted.mod) + ::std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerJoined.name) return _s; } -inline const ::std::string& ModStarted::_internal_mod() const { +inline const ::std::string& PlayerJoined::_internal_name() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.name_.Get(); } -inline void ModStarted::_internal_set_mod(const ::std::string& value) { +inline void PlayerJoined::_internal_set_name(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.name_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModStarted::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL PlayerJoined::_internal_mutable_name() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.name_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModStarted::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE PlayerJoined::release_name() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModStarted.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerJoined.name) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + auto* released = _impl_.name_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.name_.Set("", GetArena()); } return released; } -inline void ModStarted::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerJoined::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModStarted.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerJoined.name) } -// bool reloaded = 2; -inline void ModStarted::clear_reloaded() { +// fixed64 steam_id = 3; +inline void PlayerJoined::clear_steam_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.reloaded_ = false; + _impl_.steam_id_ = ::uint64_t{0u}; ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -inline bool ModStarted::reloaded() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModStarted.reloaded) - return _internal_reloaded(); +inline ::uint64_t PlayerJoined::steam_id() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.steam_id) + return _internal_steam_id(); } -inline void ModStarted::set_reloaded(bool value) { - _internal_set_reloaded(value); +inline void PlayerJoined::set_steam_id(::uint64_t value) { + _internal_set_steam_id(value); SetHasBit(_impl_._has_bits_[0], 0x00000002U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModStarted.reloaded) + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.steam_id) } -inline bool ModStarted::_internal_reloaded() const { +inline ::uint64_t PlayerJoined::_internal_steam_id() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.reloaded_; + return _impl_.steam_id_; } -inline void ModStarted::_internal_set_reloaded(bool value) { +inline void PlayerJoined::_internal_set_steam_id(::uint64_t value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.reloaded_ = value; + _impl_.steam_id_ = value; } // ------------------------------------------------------------------- -// ModLog +// PlayerLeft + +// int32 slot = 1; +inline void PlayerLeft::clear_slot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t PlayerLeft::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerLeft.slot) + return _internal_slot(); +} +inline void PlayerLeft::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerLeft.slot) +} +inline ::int32_t PlayerLeft::_internal_slot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slot_; +} +inline void PlayerLeft::_internal_set_slot(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = value; +} + +// ------------------------------------------------------------------- + +// PlayerMessage // string mod = 1; -inline void ModLog::clear_mod() { +inline void PlayerMessage::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ModLog::mod() const +inline const ::std::string& PlayerMessage::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.mod) return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void ModLog::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.mod) } -inline ::std::string* PROTOBUF_NONNULL ModLog::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.mod) return _s; } -inline const ::std::string& ModLog::_internal_mod() const { +inline const ::std::string& PlayerMessage::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.mod_.Get(); } -inline void ModLog::_internal_set_mod(const ::std::string& value) { +inline void PlayerMessage::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModLog::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModLog::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -5587,7 +6795,7 @@ inline ::std::string* PROTOBUF_NULLABLE ModLog::release_mod() { } return released; } -inline void ModLog::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerMessage::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -5598,415 +6806,303 @@ inline void ModLog::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.mod) } -// string text = 2; -inline void ModLog::clear_text() { +// int32 slot = 2; +inline void PlayerMessage::clear_slot() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.ClearToEmpty(); + _impl_.slot_ = 0; ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); -} -inline const ::std::string& ModLog::text() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModLog.text) - return _internal_text(); + 0x00000008U); } -template -PROTOBUF_ALWAYS_INLINE void ModLog::set_text(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.text_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModLog.text) +inline ::int32_t PlayerMessage::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.slot) + return _internal_slot(); } -inline ::std::string* PROTOBUF_NONNULL ModLog::mutable_text() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_text(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModLog.text) - return _s; +inline void PlayerMessage::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.slot) } -inline const ::std::string& ModLog::_internal_text() const { +inline ::int32_t PlayerMessage::_internal_slot() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.text_.Get(); + return _impl_.slot_; } -inline void ModLog::_internal_set_text(const ::std::string& value) { +inline void PlayerMessage::_internal_set_slot(::int32_t value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.Set(value, GetArena()); + _impl_.slot_ = value; } -inline ::std::string* PROTOBUF_NONNULL ModLog::_internal_mutable_text() { + +// .modlock.host_app.control.MessageKind kind = 3; +inline void PlayerMessage::clear_kind() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.text_.Mutable( GetArena()); + _impl_.kind_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); } -inline ::std::string* PROTOBUF_NULLABLE ModLog::release_text() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModLog.text) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { - return nullptr; - } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.text_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.text_.Set("", GetArena()); - } - return released; +inline ::modlock::host_app::control::MessageKind PlayerMessage::kind() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.kind) + return _internal_kind(); } -inline void ModLog::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerMessage::set_kind(::modlock::host_app::control::MessageKind value) { + _internal_set_kind(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.kind) +} +inline ::modlock::host_app::control::MessageKind PlayerMessage::_internal_kind() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::modlock::host_app::control::MessageKind>(_impl_.kind_); +} +inline void PlayerMessage::_internal_set_kind(::modlock::host_app::control::MessageKind value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - } - _impl_.text_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { - _impl_.text_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModLog.text) + _impl_.kind_ = value; } -// ------------------------------------------------------------------- - -// ModFailed - -// string mod = 1; -inline void ModFailed::clear_mod() { +// string title = 4; +inline void PlayerMessage::clear_title() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.title_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); + 0x00000002U); } -inline const ::std::string& ModFailed::mod() const +inline const ::std::string& PlayerMessage::title() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModFailed.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.title) + return _internal_title(); } template -PROTOBUF_ALWAYS_INLINE void ModFailed::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_title(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModFailed.mod) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.title_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.title) } -inline ::std::string* PROTOBUF_NONNULL ModFailed::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_title() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModFailed.mod) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_title(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.title) return _s; } -inline const ::std::string& ModFailed::_internal_mod() const { +inline const ::std::string& PlayerMessage::_internal_title() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.title_.Get(); } -inline void ModFailed::_internal_set_mod(const ::std::string& value) { +inline void PlayerMessage::_internal_set_title(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.title_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModFailed::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_title() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.title_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModFailed::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_title() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModFailed.mod) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.title) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.title_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.title_.Set("", GetArena()); } return released; } -inline void ModFailed::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerMessage::set_allocated_title(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); + _impl_.title_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.title_.IsDefault()) { + _impl_.title_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModFailed.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.title) } -// string error = 2; -inline void ModFailed::clear_error() { +// string text = 5; +inline void PlayerMessage::clear_text() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.error_.ClearToEmpty(); + _impl_.text_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); + 0x00000004U); } -inline const ::std::string& ModFailed::error() const +inline const ::std::string& PlayerMessage::text() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModFailed.error) - return _internal_error(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.text) + return _internal_text(); } template -PROTOBUF_ALWAYS_INLINE void ModFailed::set_error(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_text(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.error_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModFailed.error) + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.text_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.text) } -inline ::std::string* PROTOBUF_NONNULL ModFailed::mutable_error() +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_text() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_error(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModFailed.error) + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_text(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.text) return _s; } -inline const ::std::string& ModFailed::_internal_error() const { +inline const ::std::string& PlayerMessage::_internal_text() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.error_.Get(); + return _impl_.text_.Get(); } -inline void ModFailed::_internal_set_error(const ::std::string& value) { +inline void PlayerMessage::_internal_set_text(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.error_.Set(value, GetArena()); + _impl_.text_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModFailed::_internal_mutable_error() { +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_text() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.error_.Mutable( GetArena()); + return _impl_.text_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModFailed::release_error() { +inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_text() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModFailed.error) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.text) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.error_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.text_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.error_.Set("", GetArena()); + _impl_.text_.Set("", GetArena()); } return released; } -inline void ModFailed::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerMessage::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } - _impl_.error_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArena()); + _impl_.text_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { + _impl_.text_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModFailed.error) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.text) } // ------------------------------------------------------------------- -// ModCalls +// ServerReady -// string mod = 1; -inline void ModCalls::clear_mod() { +// string map = 1; +inline void ServerReady::clear_map() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.map_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ModCalls::mod() const +inline const ::std::string& ServerReady::map() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModCalls.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServerReady.map) + return _internal_map(); } template -PROTOBUF_ALWAYS_INLINE void ModCalls::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServerReady::set_map(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModCalls.mod) + _impl_.map_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServerReady.map) } -inline ::std::string* PROTOBUF_NONNULL ModCalls::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL ServerReady::mutable_map() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModCalls.mod) + ::std::string* _s = _internal_mutable_map(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServerReady.map) return _s; } -inline const ::std::string& ModCalls::_internal_mod() const { +inline const ::std::string& ServerReady::_internal_map() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.map_.Get(); } -inline void ModCalls::_internal_set_mod(const ::std::string& value) { +inline void ServerReady::_internal_set_map(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.map_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModCalls::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL ServerReady::_internal_mutable_map() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.map_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModCalls::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE ServerReady::release_map() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModCalls.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServerReady.map) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + auto* released = _impl_.map_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.map_.Set("", GetArena()); } return released; } -inline void ModCalls::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void ServerReady::set_allocated_map(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModCalls.mod) -} - -// .modlock.wasm.profile.CallProfile profile = 2; -inline bool ModCalls::has_profile() const { - bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); - PROTOBUF_ASSUME(!value || _impl_.profile_ != nullptr); - return value; -} -inline const ::modlock::wasm::profile::CallProfile& ModCalls::_internal_profile() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::modlock::wasm::profile::CallProfile* p = _impl_.profile_; - return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::profile::_CallProfile_default_instance_); -} -inline const ::modlock::wasm::profile::CallProfile& ModCalls::profile() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModCalls.profile) - return _internal_profile(); -} -inline void ModCalls::unsafe_arena_set_allocated_profile( - ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.profile_); - } - _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(value); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ModCalls.profile) -} -inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE ModCalls::release_profile() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::CallProfile* released = _impl_.profile_; - _impl_.profile_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE ModCalls::unsafe_arena_release_profile() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModCalls.profile) - - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::CallProfile* temp = _impl_.profile_; - _impl_.profile_ = nullptr; - return temp; -} -inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL ModCalls::_internal_mutable_profile() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.profile_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::profile::CallProfile>(GetArena()); - _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(p); - } - return _impl_.profile_; -} -inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL ModCalls::mutable_profile() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::CallProfile* _msg = _internal_mutable_profile(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModCalls.profile) - return _msg; -} -inline void ModCalls::set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.profile_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.map_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.map_.IsDefault()) { + _impl_.map_.Set("", GetArena()); } - - _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(value); - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModCalls.profile) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServerReady.map) } // ------------------------------------------------------------------- -// ModSlowFrame +// UiChanged // string mod = 1; -inline void ModSlowFrame::clear_mod() { +inline void UiChanged::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ModSlowFrame::mod() const +inline const ::std::string& UiChanged::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.mod) return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void ModSlowFrame::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void UiChanged::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_set:modlock.host_app.control.UiChanged.mod) } -inline ::std::string* PROTOBUF_NONNULL ModSlowFrame::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL UiChanged::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.UiChanged.mod) return _s; } -inline const ::std::string& ModSlowFrame::_internal_mod() const { +inline const ::std::string& UiChanged::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.mod_.Get(); } -inline void ModSlowFrame::_internal_set_mod(const ::std::string& value) { +inline void UiChanged::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModSlowFrame::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL UiChanged::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModSlowFrame::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE UiChanged::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.UiChanged.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -6017,7 +7113,7 @@ inline ::std::string* PROTOBUF_NULLABLE ModSlowFrame::release_mod() { } return released; } -inline void ModSlowFrame::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void UiChanged::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -6028,44 +7124,69 @@ inline void ModSlowFrame::set_allocated_mod(::std::string* PROTOBUF_NULLABLE val if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.UiChanged.mod) +} + +// int32 slot = 2; +inline void UiChanged::clear_slot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t UiChanged::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.slot) + return _internal_slot(); +} +inline void UiChanged::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.UiChanged.slot) +} +inline ::int32_t UiChanged::_internal_slot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slot_; +} +inline void UiChanged::_internal_set_slot(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = value; } -// .modlock.wasm.profile.SlowFrame report = 2; -inline bool ModSlowFrame::has_report() const { +// .modlock.wasm.ui.Change change = 3; +inline bool UiChanged::has_change() const { bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); - PROTOBUF_ASSUME(!value || _impl_.report_ != nullptr); + PROTOBUF_ASSUME(!value || _impl_.change_ != nullptr); return value; } -inline const ::modlock::wasm::profile::SlowFrame& ModSlowFrame::_internal_report() const { +inline const ::modlock::wasm::ui::Change& UiChanged::_internal_change() const { ::google::protobuf::internal::TSanRead(&_impl_); - const ::modlock::wasm::profile::SlowFrame* p = _impl_.report_; - return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::profile::_SlowFrame_default_instance_); + const ::modlock::wasm::ui::Change* p = _impl_.change_; + return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::ui::_Change_default_instance_); } -inline const ::modlock::wasm::profile::SlowFrame& ModSlowFrame::report() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModSlowFrame.report) - return _internal_report(); +inline const ::modlock::wasm::ui::Change& UiChanged::change() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.change) + return _internal_change(); } -inline void ModSlowFrame::unsafe_arena_set_allocated_report( - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value) { +inline void UiChanged::unsafe_arena_set_allocated_change( + ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.report_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.change_); } - _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(value); + _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(value); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ModSlowFrame.report) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.UiChanged.change) } -inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::release_report() { +inline ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE UiChanged::release_change() { ::google::protobuf::internal::TSanWrite(&_impl_); ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::SlowFrame* released = _impl_.report_; - _impl_.report_ = nullptr; + ::modlock::wasm::ui::Change* released = _impl_.change_; + _impl_.change_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); released = ::google::protobuf::internal::DuplicateIfNonNull(released); @@ -6079,35 +7200,35 @@ inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::rele } return released; } -inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::unsafe_arena_release_report() { +inline ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE UiChanged::unsafe_arena_release_change() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModSlowFrame.report) + // @@protoc_insertion_point(field_release:modlock.host_app.control.UiChanged.change) ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::SlowFrame* temp = _impl_.report_; - _impl_.report_ = nullptr; + ::modlock::wasm::ui::Change* temp = _impl_.change_; + _impl_.change_ = nullptr; return temp; } -inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL ModSlowFrame::_internal_mutable_report() { +inline ::modlock::wasm::ui::Change* PROTOBUF_NONNULL UiChanged::_internal_mutable_change() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.report_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::profile::SlowFrame>(GetArena()); - _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(p); + if (_impl_.change_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::ui::Change>(GetArena()); + _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(p); } - return _impl_.report_; + return _impl_.change_; } -inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL ModSlowFrame::mutable_report() +inline ::modlock::wasm::ui::Change* PROTOBUF_NONNULL UiChanged::mutable_change() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::SlowFrame* _msg = _internal_mutable_report(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModSlowFrame.report) + ::modlock::wasm::ui::Change* _msg = _internal_mutable_change(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.UiChanged.change) return _msg; } -inline void ModSlowFrame::set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value) { +inline void UiChanged::set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value) { ::google::protobuf::Arena* message_arena = GetArena(); ::google::protobuf::internal::TSanWrite(&_impl_); if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.report_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.change_); } if (value != nullptr) { @@ -6120,708 +7241,583 @@ inline void ModSlowFrame::set_allocated_report(::modlock::wasm::profile::SlowFra ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(value); - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModSlowFrame.report) + _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(value); + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.UiChanged.change) } // ------------------------------------------------------------------- -// PlayerJoined - -// int32 slot = 1; -inline void PlayerJoined::clear_slot() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; - ClearHasBit(_impl_._has_bits_[0], - 0x00000004U); -} -inline ::int32_t PlayerJoined::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.slot) - return _internal_slot(); -} -inline void PlayerJoined::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.slot) -} -inline ::int32_t PlayerJoined::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; -} -inline void PlayerJoined::_internal_set_slot(::int32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; -} +// ServiceReply -// string name = 2; -inline void PlayerJoined::clear_name() { +// string mod = 1; +inline void ServiceReply::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); + _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& PlayerJoined::name() const +inline const ::std::string& ServiceReply::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.name) - return _internal_name(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.mod) + return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void PlayerJoined::set_name(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.name) + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.mod) } -inline ::std::string* PROTOBUF_NONNULL PlayerJoined::mutable_name() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerJoined.name) + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.mod) return _s; } -inline const ::std::string& PlayerJoined::_internal_name() const { +inline const ::std::string& ServiceReply::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); + return _impl_.mod_.Get(); } -inline void PlayerJoined::_internal_set_name(const ::std::string& value) { +inline void ServiceReply::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.Set(value, GetArena()); + _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerJoined::_internal_mutable_name() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); + return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerJoined::release_name() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerJoined.name) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.name_.Release(); + auto* released = _impl_.mod_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); + _impl_.mod_.Set("", GetArena()); } return released; } -inline void PlayerJoined::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerJoined.name) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.mod) } -// fixed64 steam_id = 3; -inline void PlayerJoined::clear_steam_id() { +// string service = 2; +inline void ServiceReply::clear_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.steam_id_ = ::uint64_t{0u}; + _impl_.service_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -inline ::uint64_t PlayerJoined::steam_id() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.steam_id) - return _internal_steam_id(); +inline const ::std::string& ServiceReply::service() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.service) + return _internal_service(); } -inline void PlayerJoined::set_steam_id(::uint64_t value) { - _internal_set_steam_id(value); +template +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_service(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000002U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.steam_id) + _impl_.service_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.service) } -inline ::uint64_t PlayerJoined::_internal_steam_id() const { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_service() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_service(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.service) + return _s; +} +inline const ::std::string& ServiceReply::_internal_service() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.steam_id_; + return _impl_.service_.Get(); } -inline void PlayerJoined::_internal_set_steam_id(::uint64_t value) { +inline void ServiceReply::_internal_set_service(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.steam_id_ = value; + _impl_.service_.Set(value, GetArena()); } - -// ------------------------------------------------------------------- - -// PlayerLeft - -// int32 slot = 1; -inline void PlayerLeft::clear_slot() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; - ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); -} -inline ::int32_t PlayerLeft::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerLeft.slot) - return _internal_slot(); -} -inline void PlayerLeft::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerLeft.slot) + return _impl_.service_.Mutable( GetArena()); } -inline ::int32_t PlayerLeft::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_service() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.service) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.service_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.service_.Set("", GetArena()); + } + return released; } -inline void PlayerLeft::_internal_set_slot(::int32_t value) { +inline void ServiceReply::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.service_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.service_.IsDefault()) { + _impl_.service_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.service) } -// ------------------------------------------------------------------- - -// PlayerMessage - -// string mod = 1; -inline void PlayerMessage::clear_mod() { +// string method = 3; +inline void ServiceReply::clear_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.method_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); + 0x00000004U); } -inline const ::std::string& PlayerMessage::mod() const +inline const ::std::string& ServiceReply::method() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.method) + return _internal_method(); } template -PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_method(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.mod) + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.method_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.method) } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_method() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.mod) + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_method(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.method) return _s; } -inline const ::std::string& PlayerMessage::_internal_mod() const { +inline const ::std::string& ServiceReply::_internal_method() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.method_.Get(); } -inline void PlayerMessage::_internal_set_mod(const ::std::string& value) { +inline void ServiceReply::_internal_set_method(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.method_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.method_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.mod) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.method) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.method_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.method_.Set("", GetArena()); } return released; } -inline void PlayerMessage::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); + _impl_.method_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.method_.IsDefault()) { + _impl_.method_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.method) } -// int32 slot = 2; -inline void PlayerMessage::clear_slot() { +// bytes payload = 4; +inline void ServiceReply::clear_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; + _impl_.payload_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } -inline ::int32_t PlayerMessage::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.slot) - return _internal_slot(); -} -inline void PlayerMessage::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000008U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.slot) -} -inline ::int32_t PlayerMessage::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; -} -inline void PlayerMessage::_internal_set_slot(::int32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; -} - -// .modlock.host_app.control.MessageKind kind = 3; -inline void PlayerMessage::clear_kind() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.kind_ = 0; - ClearHasBit(_impl_._has_bits_[0], - 0x00000010U); -} -inline ::modlock::host_app::control::MessageKind PlayerMessage::kind() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.kind) - return _internal_kind(); -} -inline void PlayerMessage::set_kind(::modlock::host_app::control::MessageKind value) { - _internal_set_kind(value); - SetHasBit(_impl_._has_bits_[0], 0x00000010U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.kind) -} -inline ::modlock::host_app::control::MessageKind PlayerMessage::_internal_kind() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::modlock::host_app::control::MessageKind>(_impl_.kind_); -} -inline void PlayerMessage::_internal_set_kind(::modlock::host_app::control::MessageKind value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.kind_ = value; -} - -// string title = 4; -inline void PlayerMessage::clear_title() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.title_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); -} -inline const ::std::string& PlayerMessage::title() const +inline const ::std::string& ServiceReply::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.title) - return _internal_title(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.payload) + return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_title(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.title_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.title) + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.payload) } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_title() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_payload() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_title(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.title) + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.payload) return _s; } -inline const ::std::string& PlayerMessage::_internal_title() const { +inline const ::std::string& ServiceReply::_internal_payload() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.title_.Get(); + return _impl_.payload_.Get(); } -inline void PlayerMessage::_internal_set_title(const ::std::string& value) { +inline void ServiceReply::_internal_set_payload(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.title_.Set(value, GetArena()); + _impl_.payload_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_title() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.title_.Mutable( GetArena()); + return _impl_.payload_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_title() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.title) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.payload) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.title_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + auto* released = _impl_.payload_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.title_.Set("", GetArena()); + _impl_.payload_.Set("", GetArena()); } return released; } -inline void PlayerMessage::set_allocated_title(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } - _impl_.title_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.title_.IsDefault()) { - _impl_.title_.Set("", GetArena()); + _impl_.payload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { + _impl_.payload_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.title) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.payload) } -// string text = 5; -inline void PlayerMessage::clear_text() { +// string path = 5; +inline void ServiceReply::clear_path() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.ClearToEmpty(); + _impl_.path_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000004U); + 0x00000010U); } -inline const ::std::string& PlayerMessage::text() const +inline const ::std::string& ServiceReply::path() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.text) - return _internal_text(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.path) + return _internal_path(); } template -PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_text(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_path(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - _impl_.text_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.text) + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + _impl_.path_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.path) } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_text() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_path() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - ::std::string* _s = _internal_mutable_text(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.text) + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::std::string* _s = _internal_mutable_path(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.path) return _s; } -inline const ::std::string& PlayerMessage::_internal_text() const { +inline const ::std::string& ServiceReply::_internal_path() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.text_.Get(); + return _impl_.path_.Get(); } -inline void PlayerMessage::_internal_set_text(const ::std::string& value) { +inline void ServiceReply::_internal_set_path(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.Set(value, GetArena()); + _impl_.path_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_text() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_path() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.text_.Mutable( GetArena()); + return _impl_.path_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_text() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_path() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.text) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.path) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000010U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000004U); - auto* released = _impl_.text_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + auto* released = _impl_.path_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.text_.Set("", GetArena()); + _impl_.path_.Set("", GetArena()); } return released; } -inline void PlayerMessage::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_path(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000004U); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); } - _impl_.text_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { - _impl_.text_.Set("", GetArena()); + _impl_.path_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.path_.IsDefault()) { + _impl_.path_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.text) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.path) } -// ------------------------------------------------------------------- - -// ServerReady - -// string map = 1; -inline void ServerReady::clear_map() { +// string id = 6; +inline void ServiceReply::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.map_.ClearToEmpty(); + _impl_.id_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); + 0x00000020U); } -inline const ::std::string& ServerReady::map() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServerReady.map) - return _internal_map(); +inline const ::std::string& ServiceReply::id() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.id) + return _internal_id(); } template -PROTOBUF_ALWAYS_INLINE void ServerReady::set_map(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_id(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.map_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServerReady.map) + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + _impl_.id_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.id) } -inline ::std::string* PROTOBUF_NONNULL ServerReady::mutable_map() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_id() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_map(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServerReady.map) + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + ::std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.id) return _s; } -inline const ::std::string& ServerReady::_internal_map() const { +inline const ::std::string& ServiceReply::_internal_id() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.map_.Get(); + return _impl_.id_.Get(); } -inline void ServerReady::_internal_set_map(const ::std::string& value) { +inline void ServiceReply::_internal_set_id(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.map_.Set(value, GetArena()); + _impl_.id_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServerReady::_internal_mutable_map() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.map_.Mutable( GetArena()); + return _impl_.id_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServerReady::release_map() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServerReady.map) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.id) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000020U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.map_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + auto* released = _impl_.id_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.map_.Set("", GetArena()); + _impl_.id_.Set("", GetArena()); } return released; } -inline void ServerReady::set_allocated_map(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); } - _impl_.map_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.map_.IsDefault()) { - _impl_.map_.Set("", GetArena()); + _impl_.id_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServerReady.map) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.id) } // ------------------------------------------------------------------- -// UiChanged +// ServiceResult -// string mod = 1; -inline void UiChanged::clear_mod() { +// string id = 1; +inline void ServiceResult::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.id_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& UiChanged::mod() const +inline const ::std::string& ServiceResult::id() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceResult.id) + return _internal_id(); } template -PROTOBUF_ALWAYS_INLINE void UiChanged::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceResult::set_id(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.UiChanged.mod) + _impl_.id_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceResult.id) } -inline ::std::string* PROTOBUF_NONNULL UiChanged::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL ServiceResult::mutable_id() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.UiChanged.mod) + ::std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceResult.id) return _s; } -inline const ::std::string& UiChanged::_internal_mod() const { +inline const ::std::string& ServiceResult::_internal_id() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.id_.Get(); } -inline void UiChanged::_internal_set_mod(const ::std::string& value) { +inline void ServiceResult::_internal_set_id(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.id_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL UiChanged::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL ServiceResult::_internal_mutable_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.id_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE UiChanged::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE ServiceResult::release_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.UiChanged.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceResult.id) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + auto* released = _impl_.id_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.id_.Set("", GetArena()); } return released; } -inline void UiChanged::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceResult::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); + _impl_.id_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.UiChanged.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceResult.id) } -// int32 slot = 2; -inline void UiChanged::clear_slot() { +// string error = 2; +inline void ServiceResult::clear_error() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; + _impl_.error_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000004U); -} -inline ::int32_t UiChanged::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.slot) - return _internal_slot(); -} -inline void UiChanged::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.UiChanged.slot) + 0x00000002U); } -inline ::int32_t UiChanged::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; +inline const ::std::string& ServiceResult::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceResult.error) + return _internal_error(); } -inline void UiChanged::_internal_set_slot(::int32_t value) { +template +PROTOBUF_ALWAYS_INLINE void ServiceResult::set_error(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.error_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceResult.error) } - -// .modlock.wasm.ui.Change change = 3; -inline bool UiChanged::has_change() const { - bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); - PROTOBUF_ASSUME(!value || _impl_.change_ != nullptr); - return value; +inline ::std::string* PROTOBUF_NONNULL ServiceResult::mutable_error() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_error(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceResult.error) + return _s; } -inline const ::modlock::wasm::ui::Change& UiChanged::_internal_change() const { +inline const ::std::string& ServiceResult::_internal_error() const { ::google::protobuf::internal::TSanRead(&_impl_); - const ::modlock::wasm::ui::Change* p = _impl_.change_; - return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::ui::_Change_default_instance_); -} -inline const ::modlock::wasm::ui::Change& UiChanged::change() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.change) - return _internal_change(); + return _impl_.error_.Get(); } -inline void UiChanged::unsafe_arena_set_allocated_change( - ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value) { +inline void ServiceResult::_internal_set_error(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.change_); - } - _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(value); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.UiChanged.change) + _impl_.error_.Set(value, GetArena()); } -inline ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE UiChanged::release_change() { +inline ::std::string* PROTOBUF_NONNULL ServiceResult::_internal_mutable_error() { ::google::protobuf::internal::TSanWrite(&_impl_); - - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::ui::Change* released = _impl_.change_; - _impl_.change_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; + return _impl_.error_.Mutable( GetArena()); } -inline ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE UiChanged::unsafe_arena_release_change() { +inline ::std::string* PROTOBUF_NULLABLE ServiceResult::release_error() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.UiChanged.change) - + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceResult.error) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::ui::Change* temp = _impl_.change_; - _impl_.change_ = nullptr; - return temp; -} -inline ::modlock::wasm::ui::Change* PROTOBUF_NONNULL UiChanged::_internal_mutable_change() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.change_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::ui::Change>(GetArena()); - _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(p); + auto* released = _impl_.error_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.error_.Set("", GetArena()); } - return _impl_.change_; -} -inline ::modlock::wasm::ui::Change* PROTOBUF_NONNULL UiChanged::mutable_change() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::ui::Change* _msg = _internal_mutable_change(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.UiChanged.change) - return _msg; + return released; } -inline void UiChanged::set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); +inline void ServiceResult::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.change_); - } - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - - _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(value); - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.UiChanged.change) + _impl_.error_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceResult.error) } // ------------------------------------------------------------------- -// ServiceReply +// Fixture // string mod = 1; -inline void ServiceReply::clear_mod() { +inline void Fixture::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ServiceReply::mod() const +inline const ::std::string& Fixture::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.mod) return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.mod) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.mod) return _s; } -inline const ::std::string& ServiceReply::_internal_mod() const { +inline const ::std::string& Fixture::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.mod_.Get(); } -inline void ServiceReply::_internal_set_mod(const ::std::string& value) { +inline void Fixture::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -6832,7 +7828,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_mod() { } return released; } -inline void ServiceReply::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void Fixture::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -6843,50 +7839,50 @@ inline void ServiceReply::set_allocated_mod(::std::string* PROTOBUF_NULLABLE val if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.mod) } // string service = 2; -inline void ServiceReply::clear_service() { +inline void Fixture::clear_service() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.service_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -inline const ::std::string& ServiceReply::service() const +inline const ::std::string& Fixture::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.service) return _internal_service(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_service(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_service(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000002U); _impl_.service_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.service) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_service() +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_service() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000002U); ::std::string* _s = _internal_mutable_service(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.service) return _s; } -inline const ::std::string& ServiceReply::_internal_service() const { +inline const ::std::string& Fixture::_internal_service() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.service_.Get(); } -inline void ServiceReply::_internal_set_service(const ::std::string& value) { +inline void Fixture::_internal_set_service(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.service_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_service() { +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_service() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.service_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_service() { +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.service) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } @@ -6897,7 +7893,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_service() { } return released; } -inline void ServiceReply::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { +inline void Fixture::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000002U); @@ -6908,50 +7904,50 @@ inline void ServiceReply::set_allocated_service(::std::string* PROTOBUF_NULLABLE if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.service_.IsDefault()) { _impl_.service_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.service) } // string method = 3; -inline void ServiceReply::clear_method() { +inline void Fixture::clear_method() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.method_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } -inline const ::std::string& ServiceReply::method() const +inline const ::std::string& Fixture::method() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.method) return _internal_method(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_method(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_method(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000004U); _impl_.method_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.method) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_method() +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_method() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000004U); ::std::string* _s = _internal_mutable_method(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.method) return _s; } -inline const ::std::string& ServiceReply::_internal_method() const { +inline const ::std::string& Fixture::_internal_method() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.method_.Get(); } -inline void ServiceReply::_internal_set_method(const ::std::string& value) { +inline void Fixture::_internal_set_method(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.method_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_method() { +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_method() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.method_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_method() { +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.method) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { return nullptr; } @@ -6962,7 +7958,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_method() { } return released; } -inline void ServiceReply::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { +inline void Fixture::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000004U); @@ -6973,50 +7969,50 @@ inline void ServiceReply::set_allocated_method(::std::string* PROTOBUF_NULLABLE if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.method_.IsDefault()) { _impl_.method_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.method) } // bytes payload = 4; -inline void ServiceReply::clear_payload() { +inline void Fixture::clear_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } -inline const ::std::string& ServiceReply::payload() const +inline const ::std::string& Fixture::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.payload) + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.payload) return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_payload(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000008U); _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.payload) + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.payload) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_payload() +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_payload() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000008U); ::std::string* _s = _internal_mutable_payload(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.payload) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.payload) return _s; } -inline const ::std::string& ServiceReply::_internal_payload() const { +inline const ::std::string& Fixture::_internal_payload() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.payload_.Get(); } -inline void ServiceReply::_internal_set_payload(const ::std::string& value) { +inline void Fixture::_internal_set_payload(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_payload() { +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.payload_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_payload() { +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.payload) + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.payload) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { return nullptr; } @@ -7027,7 +8023,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_payload() { } return released; } -inline void ServiceReply::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { +inline void Fixture::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000008U); @@ -7038,271 +8034,132 @@ inline void ServiceReply::set_allocated_payload(::std::string* PROTOBUF_NULLABLE if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { _impl_.payload_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.payload) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.payload) } -// string path = 5; -inline void ServiceReply::clear_path() { +// string source = 5; +inline void Fixture::clear_source() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.path_.ClearToEmpty(); + _impl_.source_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000010U); } -inline const ::std::string& ServiceReply::path() const +inline const ::std::string& Fixture::source() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.path) - return _internal_path(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.source) + return _internal_source(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_path(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_source(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000010U); - _impl_.path_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.path) + _impl_.source_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.source) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_path() +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_source() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000010U); - ::std::string* _s = _internal_mutable_path(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.path) + ::std::string* _s = _internal_mutable_source(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.source) return _s; } -inline const ::std::string& ServiceReply::_internal_path() const { +inline const ::std::string& Fixture::_internal_source() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.path_.Get(); + return _impl_.source_.Get(); } -inline void ServiceReply::_internal_set_path(const ::std::string& value) { +inline void Fixture::_internal_set_source(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.path_.Set(value, GetArena()); + _impl_.source_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_path() { +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_source() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.path_.Mutable( GetArena()); + return _impl_.source_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_path() { +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_source() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.path) + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.source) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000010U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000010U); - auto* released = _impl_.path_.Release(); + auto* released = _impl_.source_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.path_.Set("", GetArena()); + _impl_.source_.Set("", GetArena()); } return released; } -inline void ServiceReply::set_allocated_path(::std::string* PROTOBUF_NULLABLE value) { +inline void Fixture::set_allocated_source(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000010U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000010U); } - _impl_.path_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.path_.IsDefault()) { - _impl_.path_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.path) -} - -// string id = 6; -inline void ServiceReply::clear_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.id_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000020U); -} -inline const ::std::string& ServiceReply::id() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.id) - return _internal_id(); -} -template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_id(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000020U); - _impl_.id_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.id) -} -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_id() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000020U); - ::std::string* _s = _internal_mutable_id(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.id) - return _s; -} -inline const ::std::string& ServiceReply::_internal_id() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.id_.Get(); -} -inline void ServiceReply::_internal_set_id(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.id_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.id_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.id) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000020U)) { - return nullptr; - } - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); - auto* released = _impl_.id_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.id_.Set("", GetArena()); - } - return released; -} -inline void ServiceReply::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000020U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); - } - _impl_.id_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { - _impl_.id_.Set("", GetArena()); + _impl_.source_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.source_.IsDefault()) { + _impl_.source_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.id) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.source) } // ------------------------------------------------------------------- -// ServiceResult +// Fixtures -// string id = 1; -inline void ServiceResult::clear_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.id_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); +// repeated .modlock.host_app.control.Fixture fixtures = 1; +inline int Fixtures::_internal_fixtures_size() const { + return _internal_fixtures().size(); } -inline const ::std::string& ServiceResult::id() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceResult.id) - return _internal_id(); +inline int Fixtures::fixtures_size() const { + return _internal_fixtures_size(); } -template -PROTOBUF_ALWAYS_INLINE void ServiceResult::set_id(Arg_&& arg, Args_... args) { +inline void Fixtures::clear_fixtures() { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.id_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceResult.id) + _impl_.fixtures_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); } -inline ::std::string* PROTOBUF_NONNULL ServiceResult::mutable_id() +inline ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL Fixtures::mutable_fixtures(int index) ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_id(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceResult.id) - return _s; -} -inline const ::std::string& ServiceResult::_internal_id() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.id_.Get(); -} -inline void ServiceResult::_internal_set_id(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.id_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL ServiceResult::_internal_mutable_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.id_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE ServiceResult::release_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceResult.id) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { - return nullptr; - } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.id_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.id_.Set("", GetArena()); - } - return released; -} -inline void ServiceResult::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - } - _impl_.id_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { - _impl_.id_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceResult.id) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixtures.fixtures) + return _internal_mutable_fixtures()->Mutable(index); } - -// string error = 2; -inline void ServiceResult::clear_error() { +inline ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL Fixtures::mutable_fixtures() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:modlock.host_app.control.Fixtures.fixtures) ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.error_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); + return _internal_mutable_fixtures(); } -inline const ::std::string& ServiceResult::error() const +inline const ::modlock::host_app::control::Fixture& Fixtures::fixtures(int index) const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceResult.error) - return _internal_error(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixtures.fixtures) + return _internal_fixtures().Get(index); } -template -PROTOBUF_ALWAYS_INLINE void ServiceResult::set_error(Arg_&& arg, Args_... args) { +inline ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL Fixtures::add_fixtures() + ABSL_ATTRIBUTE_LIFETIME_BOUND { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.error_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceResult.error) + ::modlock::host_app::control::Fixture* _add = + _internal_mutable_fixtures()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:modlock.host_app.control.Fixtures.fixtures) + return _add; } -inline ::std::string* PROTOBUF_NONNULL ServiceResult::mutable_error() +inline const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& Fixtures::fixtures() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_error(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceResult.error) - return _s; + // @@protoc_insertion_point(field_list:modlock.host_app.control.Fixtures.fixtures) + return _internal_fixtures(); } -inline const ::std::string& ServiceResult::_internal_error() const { +inline const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& +Fixtures::_internal_fixtures() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.error_.Get(); -} -inline void ServiceResult::_internal_set_error(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.error_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL ServiceResult::_internal_mutable_error() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.error_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE ServiceResult::release_error() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceResult.error) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { - return nullptr; - } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.error_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.error_.Set("", GetArena()); - } - return released; + return _impl_.fixtures_; } -inline void ServiceResult::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - } - _impl_.error_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceResult.error) +inline ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL +Fixtures::_internal_mutable_fixtures() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.fixtures_; } #ifdef __GNUC__ diff --git a/src/host_app/control/control.pb.ts b/src/host_app/control/control.pb.ts index 6b9712ed..dd65ce11 100644 --- a/src/host_app/control/control.pb.ts +++ b/src/host_app/control/control.pb.ts @@ -1225,3 +1225,129 @@ export const ServiceResult: MessageType = }, }, ) + +/** + * Fixture is one method's reply from a mod project's service fixture, which + * the controller hands the host at start so the mod's first frame can call it. + * + * @generated from message modlock.host_app.control.Fixture + */ +export interface Fixture { + /** + * Mod is the slug of the mod the reply answers. + */ + mod?: string + /** + * Service and Method select the call this reply answers. + */ + service?: string + method?: string + /** + * Payload is the reply's bytes, opaque to Modlock. + */ + payload?: Uint8Array + /** + * Source names the fixture file, for the host's log. + */ + source?: string +} + +export const Fixture: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.host_app.control.Fixture', + () => [ + [1, 'mod', 9], + [2, 'service', 9], + [3, 'method', 9], + [4, 'payload', 12], + [5, 'source', 9], + ], + { + decode: (r: BinaryReader, end: number, m: Fixture): Fixture => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.mod = r.string() + break + case 2: + m.service = r.string() + break + case 3: + m.method = r.string() + break + case 4: + m.payload = r.bytes() + break + case 5: + m.source = r.string() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: Fixture, w: Writer): void => { + { + const v = m.mod + if (v) w.uint32(10).string(v) + } + { + const v = m.service + if (v) w.uint32(18).string(v) + } + { + const v = m.method + if (v) w.uint32(26).string(v) + } + { + const v = m.payload + if (v != null && v.length !== 0) w.uint32(34).bytes(v) + } + { + const v = m.source + if (v) w.uint32(42).string(v) + } + }, + }, + ) + +/** + * Fixtures is the file --fixtures names: every fixture reply of the mods the + * host loads. + * + * @generated from message modlock.host_app.control.Fixtures + */ +export interface Fixtures { + fixtures?: Fixture[] +} + +export const Fixtures: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.host_app.control.Fixtures', + () => [[1, 'fixtures', 11, 1, Fixture.codec]], + { + decode: (r: BinaryReader, end: number, m: Fixtures): Fixtures => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + ;(m.fixtures ??= []).push(Fixture.decode(r, r.delimited(), {})) + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: Fixtures, w: Writer): void => { + { + const a = m.fixtures + if (a != null) for (const e of a) Fixture.writeField(w, 1, e) + } + }, + }, + ) diff --git a/src/host_app/control/control.proto b/src/host_app/control/control.proto index cd90b757..299663dc 100644 --- a/src/host_app/control/control.proto +++ b/src/host_app/control/control.proto @@ -232,3 +232,23 @@ message ServiceResult { // Error is empty when the mod restarted with the new configuration. string error = 2; } + +// Fixture is one method's reply from a mod project's service fixture, which +// the controller hands the host at start so the mod's first frame can call it. +message Fixture { + // Mod is the slug of the mod the reply answers. + string mod = 1; + // Service and Method select the call this reply answers. + string service = 2; + string method = 3; + // Payload is the reply's bytes, opaque to Modlock. + bytes payload = 4; + // Source names the fixture file, for the host's log. + string source = 5; +} + +// Fixtures is the file --fixtures names: every fixture reply of the mods the +// host loads. +message Fixtures { + repeated Fixture fixtures = 1; +} diff --git a/src/host_app/fixtures.cc b/src/host_app/fixtures.cc new file mode 100644 index 00000000..8561d033 --- /dev/null +++ b/src/host_app/fixtures.cc @@ -0,0 +1,58 @@ +#include "host_app/fixtures.h" + +#include +#include +#include +#include +#include + +#include "src/host_app/control/control.pb.h" + +namespace modlock::host_app { + +std::expected ProvideFixtures(WasmHost& host, std::string_view data) { + // Read the replies. + control::Fixtures fixtures; + if (!fixtures.ParseFromArray(data.data(), static_cast(data.size()))) { + return std::unexpected("the fixtures file is malformed"); + } + + // Keep each service's replies by mod and method, and its files by mod. + struct Service { + std::map, std::string, std::less<>> replies; + std::map> sources; + }; + std::map> services; + for (const auto& fixture : fixtures.fixtures()) { + auto& service = services[fixture.service()]; + if (!service) { + service = std::make_shared(); + } + service->replies.insert_or_assign({fixture.mod(), fixture.method()}, fixture.payload()); + service->sources.insert_or_assign(fixture.mod(), fixture.source()); + } + + // Provide each service, answering a mod only from its own fixture. + std::string lines; + for (auto& [name, service] : services) { + for (const auto& [mod, source] : service->sources) { + lines += mod + ": service " + name + ": fixture " + source + "\n"; + } + host.Provide(name, [service](std::string_view mod, std::string_view method, + std::string_view) -> std::expected { + const auto source = service->sources.find(mod); + if (source == service->sources.end()) { + return std::unexpected("this host has no fixture of this service for " + std::string(mod)); + } + const auto found = service->replies.find(std::pair(std::string(mod), std::string(method))); + if (found == service->replies.end()) { + return std::unexpected("the fixture " + source->second + " has no method " + + std::string(method)); + } + return found->second; + }); + } + return lines; +} + +} // namespace modlock::host_app diff --git a/src/host_app/fixtures.h b/src/host_app/fixtures.h new file mode 100644 index 00000000..0e7068ce --- /dev/null +++ b/src/host_app/fixtures.h @@ -0,0 +1,19 @@ +#pragma once + +#include +#include +#include + +#include "modlock/wasm_host.h" + +namespace modlock::host_app { + +// ProvideFixtures provides every service the Fixtures message in data names, +// answering each mod's call to a method with that mod's fixture reply. A +// method or a mod the fixtures lack is refused, naming the fixture file. It +// returns one line per service and mod for the host's log, or an error for a +// message that does not parse. +[[nodiscard]] std::expected ProvideFixtures(WasmHost& host, + std::string_view data); + +} // namespace modlock::host_app diff --git a/src/host_app/main.cc b/src/host_app/main.cc index 627059f4..64349be4 100644 --- a/src/host_app/main.cc +++ b/src/host_app/main.cc @@ -1,4 +1,6 @@ #include +#include +#include #include #include #include @@ -11,6 +13,7 @@ #include #include "host_app/control_link.h" +#include "host_app/fixtures.h" #include "host_app/game_dump.h" #include "modlock/build.h" #include "modlock/engine_host.h" @@ -36,6 +39,8 @@ void Help() { " --settings PATH Keep players' mod settings in the JSON file PATH\n" " --files DIRECTORY Keep the files mods write in DIRECTORY, one\n" " directory per mod\n" + " --fixtures PATH Answer the services the Fixtures message in PATH names\n" + " with its replies\n" " --game-data PATH Read signatures and virtual slots from PATH instead\n" " of the game_signatures.txtpb beside the host\n" " --control ADDRESS Report to and take reloads from the controller at\n" @@ -111,6 +116,7 @@ struct Options { std::string_view control; std::filesystem::path settings_file; std::filesystem::path files_directory; + std::filesystem::path fixtures_file; std::filesystem::path dump_directory; std::filesystem::path game_data; modlock::net::LaunchConfig launch; @@ -145,6 +151,8 @@ std::expected SetOption(Options& options, std::string_view argum options.settings_file = value; } else if (argument == "--files") { options.files_directory = value; + } else if (argument == "--fixtures") { + options.fixtures_file = value; } else if (argument == "--dump") { options.dump_directory = value; } else if (argument == "--game-data") { @@ -215,7 +223,7 @@ std::expected ParseOptions(int argc, char** argv) { if (argument != "--plugin" && argument != "--game-dir" && argument != "--hostport" && argument != "--map" && argument != "--engine-args" && argument != "--control" && argument != "--settings" && argument != "--files" && - argument != "--dump" && argument != "--game-data") { + argument != "--fixtures" && argument != "--dump" && argument != "--game-data") { std::cerr << "Unknown option: " << argument << ". Use --help for usage.\n"; return std::unexpected(2); } @@ -278,6 +286,22 @@ int main(int argc, char** argv) { mods.KeepSettings(&settings.emplace(options.settings_file)); } mods.KeepFiles(options.files_directory); + if (!options.fixtures_file.empty()) { + // The fixtures answer before any mod starts, so a mod that needs one + // starts. + std::ifstream file(options.fixtures_file, std::ios::binary); + if (!file) { + std::cerr << "fixtures: cannot read " << options.fixtures_file.string() << '\n'; + return 1; + } + const std::string data{std::istreambuf_iterator(file), {}}; + auto provided = modlock::host_app::ProvideFixtures(mods, data); + if (!provided) { + std::cerr << "fixtures: " << provided.error() << '\n'; + return 1; + } + std::cout << *provided; + } FailureRecorder failures; mods.Observe(&failures); std::unique_ptr link; diff --git a/src/wasm/wasm_plugin.cc b/src/wasm/wasm_plugin.cc index b696253b..0e18b086 100644 --- a/src/wasm/wasm_plugin.cc +++ b/src/wasm/wasm_plugin.cc @@ -265,6 +265,17 @@ std::expected WasmPlugin::Serve(const wasm::ServiceCal } std::expected WasmPlugin::Begin(bool reloaded) { + // A mod whose needed service nobody here provides does not start, and the + // error names the service. + for (const auto& service : manifest_.services()) { + if (!service.optional() && !host_.extensions.contains(service.name()) && + !host_.late_extensions.contains(service.name())) { + auto error = "the mod needs service " + service.name() + ", which nobody provides here"; + Failed(error); + return std::unexpected(std::move(error)); + } + } + // Start the mod and learn which events it consumes. wasm::StartEvent event; for (const auto& arg : args_) { diff --git a/tests/host_fixtures_test.cc b/tests/host_fixtures_test.cc new file mode 100644 index 00000000..66d52758 --- /dev/null +++ b/tests/host_fixtures_test.cc @@ -0,0 +1,129 @@ +// Contract tests for a mod's needed services and the host's fixtures: a mod +// whose needed service nobody provides does not start and its failure names +// the service, an optional one starts the mod, and a fixture handed to the +// host at start answers each method with its reply, for its own mod only. +#include +#include +#include +#include +#include +#include + +#include "gtest/gtest.h" +#include "host_app/fixtures.h" +#include "modlock/wasm_host.h" +#include "src/host_app/control/control.pb.h" + +namespace { + +using modlock::PluginContext; +using modlock::WasmHost; +using modlock::WasmHostObserver; + +// Failures records the failures the host's mods report. +class Failures final : public WasmHostObserver { + public: + void Started(std::string_view, bool) override {} + void Logged(std::string_view, std::string_view) override {} + void Failed(std::string_view, std::string_view error) override { seen.emplace_back(error); } + void Ui(std::string_view, int32_t, const modlock::wasm::ui::Change&) override {} + + std::vector seen; +}; + +// Build stages the test mod under a mod.json that names services. +class Build { + public: + explicit Build(std::string_view services) + : root_(std::filesystem::temp_directory_path() / "modlock-host-fixtures-test") { + std::filesystem::remove_all(root_); + std::filesystem::create_directories(root_); + std::filesystem::copy_file(EXTENSION_GO_WASM, root_ / "mod.wasm"); + std::ofstream(root_ / "mod.json") + << R"({"slug":"extension-go","runtime":"RUNTIME_WASM","entry":"mod.wasm","services":)" << services << "}"; + } + ~Build() { std::filesystem::remove_all(root_); } + Build(const Build&) = delete; + Build& operator=(const Build&) = delete; + + const std::filesystem::path& Path() const { return root_; } + + private: + std::filesystem::path root_; +}; + +// Fixtures encodes one reply of service shout for mod. +std::string Fixtures(std::string_view mod) { + modlock::host_app::control::Fixtures fixtures; + auto* fixture = fixtures.add_fixtures(); + fixture->set_mod(std::string(mod)); + fixture->set_service("shout"); + fixture->set_method("say"); + fixture->set_payload(R"({"said":"hi"})"); + fixture->set_source("services/shout.json"); + return fixtures.SerializeAsString(); +} + +TEST(HostFixtures, ANeededServiceNobodyProvidesStopsTheStart) { + // With nothing provided, the mod that needs shout does not start, and its + // failure names the service. + Build build(R"([{"name":"shout"},{"name":"ghost","optional":true}])"); + WasmHost host({}); + Failures failures; + host.Observe(&failures); + auto plugin = host.Load(build.Path(), PluginContext{.check_only = true}); + ASSERT_TRUE(plugin) << plugin.error(); + EXPECT_FALSE((*plugin)->Start()); + ASSERT_EQ(failures.seen.size(), 1u); + EXPECT_EQ(failures.seen[0], "the mod needs service shout, which nobody provides here"); + + // A service answered later counts as provided; the optional ghost does not + // hold the start. + host.ProvideLater("shout", [](std::string_view, std::string_view, std::string_view, + modlock::WasmReply reply) { reply(std::string("late")); }); + EXPECT_TRUE((*plugin)->Start()); + (*plugin)->Stop(); + host.Unobserve(&failures); +} + +TEST(HostFixtures, AFixtureAnswersItsModsCalls) { + // The fixture provides shout, so the mod that needs it starts, and the host + // logs who answers. + Build build(R"([{"name":"shout"}])"); + WasmHost host({}); + auto provided = modlock::host_app::ProvideFixtures(host, Fixtures("extension-go")); + ASSERT_TRUE(provided) << provided.error(); + EXPECT_EQ(*provided, "extension-go: service shout: fixture services/shout.json\n"); + auto plugin = host.Load(build.Path(), PluginContext{.check_only = true}); + ASSERT_TRUE(plugin) << plugin.error(); + ASSERT_TRUE((*plugin)->Start()); + + // A method's call gets its reply; a method the fixture lacks is refused, + // naming the file. + auto answer = host.Call("extension-go", "echo", "say", ""); + ASSERT_TRUE(answer) << answer.error(); + EXPECT_EQ(*answer, R"({"said":"hi"})"); + auto missing = host.Call("extension-go", "echo", "sing", ""); + ASSERT_FALSE(missing); + EXPECT_EQ(missing.error(), "the fixture services/shout.json has no method sing"); + (*plugin)->Stop(); +} + +TEST(HostFixtures, AFixtureAnswersNoOtherMod) { + // Another mod's fixture of the same service does not answer this one. + Build build(R"([{"name":"shout","optional":true}])"); + WasmHost host({}); + ASSERT_TRUE(modlock::host_app::ProvideFixtures(host, Fixtures("arena"))); + auto plugin = host.Load(build.Path(), PluginContext{.check_only = true}); + ASSERT_TRUE(plugin) << plugin.error(); + ASSERT_TRUE((*plugin)->Start()); + auto refused = host.Call("extension-go", "echo", "say", ""); + ASSERT_FALSE(refused); + EXPECT_EQ(refused.error(), "this host has no fixture of this service for extension-go"); + (*plugin)->Stop(); + + // A file that is not a Fixtures message provides nothing. + EXPECT_FALSE(modlock::host_app::ProvideFixtures(host, "\xff\xff\xff")); +} + +} // namespace From a7d1dc8b336b67efac40e41b9ca3ef9d682ec14b Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 12:17:48 -0800 Subject: [PATCH 11/15] panorama: embed the browser's layouts source browser/dom.ts imports browser/layouts.ts since the preview began running layout scripts, so a vendored copy of the sources could not build the page without it. Signed-off-by: Christian Stewart --- panorama/panorama.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panorama/panorama.go b/panorama/panorama.go index 18919dea..46d1f63f 100644 --- a/panorama/panorama.go +++ b/panorama/panorama.go @@ -23,7 +23,7 @@ import "embed" // display's and the layout library's TypeScript source and the drawing's // browser stand-in. // -//go:embed src/draw.ts src/data.ts src/hud.ts src/guard.ts src/ability-hud.ts src/abilities.ts src/layout.ts browser/dom.ts browser/sheets.ts browser/panels.css +//go:embed src/draw.ts src/data.ts src/hud.ts src/guard.ts src/ability-hud.ts src/abilities.ts src/layout.ts browser/dom.ts browser/layouts.ts browser/sheets.ts browser/panels.css var Sources embed.FS // Layout is the renderer's layout, which a client content package installs From 9d086e3d86836d32b7129c21e0c2695ccde3ca33 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 11 Nov 2026 12:38:33 -0800 Subject: [PATCH 12/15] play: forward the mods' services to a backend as the saved login A real game session answers a mod's named services from fixtures only, so a mod whose service lives on a backend cannot run its own data under plain modlock play. With the forward services flag, modlock play writes a forward for each named service in place of its fixture, and the host sends each call a mod starts on that service over the control link. The session posts it to the origin the flag names with the session modlock login saved, read at each call, and hands the answer back to the host. The flag is off by default, never signs in, and refuses an origin that is not https or loopback http. Calls made at once still fail on a forwarded service, at most eight calls wait on the origin, and the host fails the calls still waiting when the controller goes. Signed-off-by: Christian Stewart --- CMakeLists.txt | 6 +- README.md | 10 + cmd/modlock/play.go | 54 +- cmd/modlock/play_test.go | 44 +- publish/hyperline.go | 40 + publish/hyperline_test.go | 71 + publish/publish.pb.go | 546 ++ publish/publish.pb.ts | 123 + publish/publish.proto | 22 + session/answer_test.go | 52 + session/config.go | 5 + session/control.go | 5 + session/session.go | 32 + src/host_app/control/control.pb.cc | 1808 +++++- src/host_app/control/control.pb.go | 1353 ++++- src/host_app/control/control.pb.h | 8281 +++++++++++++++++----------- src/host_app/control/control.pb.ts | 274 +- src/host_app/control/control.proto | 45 +- src/host_app/control_link.cc | 53 + src/host_app/control_link.h | 14 +- src/host_app/fixtures.cc | 56 +- src/host_app/fixtures.h | 18 +- src/host_app/main.cc | 43 +- tests/host_fixtures_test.cc | 207 +- 24 files changed, 9586 insertions(+), 3576 deletions(-) create mode 100644 session/answer_test.go diff --git a/CMakeLists.txt b/CMakeLists.txt index 2756e9fb..924f3031 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -680,13 +680,17 @@ if(BUILD_TESTING) target_link_libraries(wasm_host_test PRIVATE modlock::sdk gtest_main) add_test(NAME wasm_host_test COMMAND wasm_host_test) # host_fixtures_test runs the same mod against needed services and the - # host's fixtures. + # host's fixtures, and its forwarded calls over the control link. add_executable(host_fixtures_test tests/host_fixtures_test.cc src/host_app/fixtures.cc + src/host_app/control_link.cc src/host_app/control/control.pb.cc) add_dependencies(host_fixtures_test extension_go_wasm) target_include_directories(host_fixtures_test PRIVATE src) target_compile_definitions(host_fixtures_test PRIVATE EXTENSION_GO_WASM="${extension_go_wasm}") target_link_libraries(host_fixtures_test PRIVATE modlock::sdk gtest_main) + if(WIN32) + target_link_libraries(host_fixtures_test PRIVATE ws2_32) + endif() add_test(NAME host_fixtures_test COMMAND host_fixtures_test) add_executable(wasm_ui_test tests/wasm_ui_test.cc src/wasm/ui.cc) target_include_directories(wasm_ui_test PRIVATE src) diff --git a/README.md b/README.md index 2b4459b5..24f747c8 100644 --- a/README.md +++ b/README.md @@ -1535,6 +1535,16 @@ mod starts, it logs which provider answers each named service: a fixture or nobody. In the game, `modlock play` hands the host the fixtures in a file it names with `--fixtures`, and each fixture answers only its own mod. +`modlock play --forward-services ` answers the mod's named services +from the service at that origin in place of fixtures, in the game only. Each +call a mod starts goes from the host over `--control` to `modlock play`, which +posts it to `/api/mods/services/call` with the session `modlock login` +saved, read at each call, and hands back the answer. It never signs in: without +a saved session for that origin the call fails, naming `modlock login`. The +origin must be https, or http on 127.0.0.1. A forwarded service answers only +calls started with `callServiceLater`, and at most 8 calls wait on the origin +at once; the host fails the calls still waiting when `modlock play` goes. + A service may answer in a later frame, as one that asks a server across the network does. `callServiceLater(service, method, payload, done)` returns at once, and `done(reply, error, failure)` runs once in a later frame: with the diff --git a/cmd/modlock/play.go b/cmd/modlock/play.go index eadb84b4..ba798a7e 100644 --- a/cmd/modlock/play.go +++ b/cmd/modlock/play.go @@ -14,6 +14,7 @@ import ( modcli "github.com/paralin/modlock/cli" "github.com/paralin/modlock/js" "github.com/paralin/modlock/project" + modpublish "github.com/paralin/modlock/publish" "github.com/paralin/modlock/sandbox" "github.com/paralin/modlock/session" "github.com/paralin/modlock/src/host_app/control" @@ -59,6 +60,10 @@ func playCommand(out *printer) *cli.Command { &cli.BoolFlag{Name: "host", Usage: "let friends join this PC's server with a join code"}, &cli.BoolFlag{Name: "lobby", Usage: "let friends join this PC's server through a Hyperline lobby"}, &cli.UintFlag{Name: "preview-port", Value: previewPort, Usage: "the watched project's browser preview port; 0 turns it off"}, + &cli.StringFlag{ + Name: "forward-services", + Usage: "answer the services the mods name from the service at this origin, as your saved modlock login, in place of fixtures", + }, ), Action: func(c *cli.Context) error { // Take each mod as a built mod or a project's build, building a @@ -166,6 +171,9 @@ func startSession(c *cli.Context, out *printer, mods []string, logPath string) ( // Run the mods in the sandbox, with the interpreters from the host's // package and the modules compiled in earlier sessions. out.sandbox(reason) + if c.String("forward-services") != "" { + out.mark("!", yellow, "the sandbox answers services from fixtures; --forward-services works only in the game") + } compiled := "" if cache, err := os.UserCacheDir(); err == nil { compiled = filepath.Join(cache, "modlock", "compiled") @@ -225,9 +233,14 @@ func startServer(c *cli.Context, out *printer, events func(*control.HostEvent), out.mark("!", yellow, "mod interfaces show only in the browser preview: "+err.Error()) } } - // Hand the host the projects' service fixtures, naming who answers each - // service the mods call. - fixtures, err := writeFixtures(out, mods, filepath.Join(filepath.Dir(logPath), "fixtures.pb")) + // Hand the host the projects' service fixtures, or the services to + // forward, naming who answers each service the mods call. + forward := strings.TrimSuffix(c.String("forward-services"), "/") + fixtures, err := writeFixtures(out, mods, filepath.Join(filepath.Dir(logPath), "fixtures.pb"), forward) + if err != nil { + return nil, err + } + answer, err := forwarder(forward) if err != nil { return nil, err } @@ -240,6 +253,7 @@ func startServer(c *cli.Context, out *printer, events func(*control.HostEvent), Settings: configPath("settings.json"), Files: configPath("files"), Fixtures: fixtures, + Answer: answer, Launch: !c.Bool("no-game"), HostOutput: log, Interface: ui, @@ -265,8 +279,9 @@ func startServer(c *cli.Context, out *printer, events func(*control.HostEvent), // service a mod names: a fixture or nobody. It returns path, or empty when no // mod has a fixture. The host refuses to start a mod whose needed service // nobody provides. -func writeFixtures(out *printer, mods []string, path string) (string, error) { - // Read each named service's fixture from its mod's project. +func writeFixtures(out *printer, mods []string, path, forward string) (string, error) { + // Read each named service's fixture from its mod's project, or forward + // every service to the origin forward names. fixtures := &control.Fixtures{} for _, mod := range mods { manifest, err := project.ReadManifest(mod) @@ -276,6 +291,11 @@ func writeFixtures(out *printer, mods []string, path string) (string, error) { slug := manifest.GetSlug() for _, service := range manifest.GetServices() { name := service.GetName() + if forward != "" { + out.mark("·", dim, slug+": service "+name+": forwarded to "+forward) + fixtures.Forwards = append(fixtures.Forwards, &control.Forward{Mod: slug, Service: name, Target: forward}) + continue + } source, replies, err := sandbox.ReadFixture(projectFixtures(mod), name) switch { case err != nil: @@ -299,7 +319,7 @@ func writeFixtures(out *printer, mods []string, path string) (string, error) { } // Write the file the host reads, or none. - if len(fixtures.GetFixtures()) == 0 { + if len(fixtures.GetFixtures()) == 0 && len(fixtures.GetForwards()) == 0 { return "", nil } data, err := fixtures.MarshalVT() @@ -312,6 +332,28 @@ func writeFixtures(out *printer, mods []string, path string) (string, error) { return path, nil } +// forwarder returns what answers the forwarded calls: the service at origin, +// called with the saved modlock login, read at each call; nil without origin. +func forwarder(origin string) (func(context.Context, *control.ServiceCall) ([]byte, error), error) { + // Forward only when asked, to a service that keeps the session private. + if origin == "" { + return nil, nil + } + if err := modpublish.CheckOrigin(origin); err != nil { + return nil, errors.Wrap(err, "--forward-services") + } + sessionFile, err := hyperlineSessionFile() + if err != nil { + return nil, err + } + service := &modpublish.Hyperline{Origin: origin, SessionFile: sessionFile} + return func(ctx context.Context, call *control.ServiceCall) ([]byte, error) { + return service.CallService(ctx, &modpublish.ServiceCall{ + Mod: call.GetMod(), Service: call.GetService(), Method: call.GetMethod(), Payload: call.GetPayload(), + }) + }, nil +} + // readRenderer returns the built renderer the game draws the mods' // interfaces with. func readRenderer(ctx context.Context) (*session.Renderer, error) { diff --git a/cmd/modlock/play_test.go b/cmd/modlock/play_test.go index aad98892..f5d0b5bb 100644 --- a/cmd/modlock/play_test.go +++ b/cmd/modlock/play_test.go @@ -4,6 +4,7 @@ import ( "io" "os" "path/filepath" + "slices" "strings" "testing" @@ -38,7 +39,7 @@ func TestWriteFixtures(t *testing.T) { // Write the host's file, keeping what the session prints. path := filepath.Join(t.TempDir(), "fixtures.pb") printed, written := capture(t, func() (string, error) { - return writeFixtures(&printer{}, []string{build}, path) + return writeFixtures(&printer{}, []string{build}, path, "") }) if written != path { t.Fatalf("wrote %q, want %q", written, path) @@ -80,10 +81,49 @@ func TestWriteFixtures(t *testing.T) { } // A built mod outside a project, with no fixture, writes no file. - none, err := writeFixtures(&printer{brief: true}, []string{dir}, filepath.Join(t.TempDir(), "none.pb")) + none, err := writeFixtures(&printer{brief: true}, []string{dir}, filepath.Join(t.TempDir(), "none.pb"), "") if err != nil || none != "" { t.Fatalf("a mod without fixtures wrote %q, %v", none, err) } + + // A forward origin forwards every service the mod names, fixture or not. + forwarded := filepath.Join(t.TempDir(), "forwarded.pb") + printed, _ = capture(t, func() (string, error) { + return writeFixtures(&printer{}, []string{build}, forwarded, "http://127.0.0.1:9") + }) + data, err = os.ReadFile(forwarded) + if err != nil { + t.Fatal(err) + } + fixtures = &control.Fixtures{} + if err := fixtures.UnmarshalVT(data); err != nil { + t.Fatal(err) + } + got = nil + for _, each := range fixtures.GetForwards() { + got = append(got, each.GetMod()+" "+each.GetService()+" "+each.GetTarget()) + if !strings.Contains(printed, "drills: service "+each.GetService()+": forwarded to http://127.0.0.1:9") { + t.Errorf("output lacks the forward of %s:\n%s", each.GetService(), printed) + } + } + if len(fixtures.GetFixtures()) != 0 || !slices.Equal(got, []string{ + "drills example.drills.v1 http://127.0.0.1:9", + "drills example.ghosts.v1 http://127.0.0.1:9", + "drills example.scores.v1 http://127.0.0.1:9", + }) { + t.Errorf("forwarded %q with %d fixtures", got, len(fixtures.GetFixtures())) + } +} + +// TestForwarderNeedsASafeOrigin forwards nothing without the flag and refuses +// an origin that would send the session in the clear. +func TestForwarderNeedsASafeOrigin(t *testing.T) { + if answer, err := forwarder(""); answer != nil || err != nil { + t.Errorf("no origin: %v, %v", answer != nil, err) + } + if _, err := forwarder("http://example.com"); err == nil { + t.Error("a plain http origin was taken") + } } // capture runs fn with standard output kept, returning what it printed and diff --git a/publish/hyperline.go b/publish/hyperline.go index 4e0d1852..2b83fd92 100644 --- a/publish/hyperline.go +++ b/publish/hyperline.go @@ -42,6 +42,10 @@ const maxResponseBytes = 1 << 20 // contentType is the media type of every request and response body. const contentType = "application/octet-stream" +// serviceCallPath answers a local session's call to a service its mod names, +// for the mod's signed-in developer. +const serviceCallPath = "/api/mods/services/call" + // Hyperline publishes to hyperline.gg or another service with its API. type Hyperline struct { // Origin is the service, such as DefaultOrigin. @@ -86,6 +90,36 @@ func (h *Hyperline) JoinDevLobby(ctx context.Context, lobby string) (*DevLobbyHo return host, h.signedSend(ctx, devLobbyJoinPath, body, host) } +// CallService sends one call a mod in a local session made to a service its +// mod.json names, as the saved session's developer, and returns the reply. It +// never signs in: without a usable saved session it fails, naming modlock +// login. +func (h *Hyperline) CallService(ctx context.Context, call *ServiceCall) ([]byte, error) { + // Use only the saved session. + if err := checkOrigin(h.Origin); err != nil { + return nil, err + } + saved := SavedSession(h.SessionFile, h.Origin) + if saved == nil { + return nil, errors.Errorf("no saved sign-in for %s; run modlock login first", h.Origin) + } + + // Send the call; a refused session needs a new sign-in. + body, err := call.MarshalVT() + if err != nil { + return nil, err + } + answer := &ServiceAnswer{} + err = h.send(ctx, serviceCallPath, saved.GetToken(), body, answer) + if errors.Is(err, errSignIn) { + return nil, errors.Errorf("%s refused the saved sign-in; run modlock login again", h.Origin) + } + if err != nil { + return nil, err + } + return answer.GetPayload(), nil +} + // errSignIn reports that the service refused the session. var errSignIn = errors.New("sign in again") @@ -287,6 +321,12 @@ func (h *Hyperline) signIn(ctx context.Context) (*Session, error) { }, nil } +// CheckOrigin requires origin to be a service origin over HTTPS, or HTTP on +// loopback for a local service. +func CheckOrigin(origin string) error { + return checkOrigin(origin) +} + // checkOrigin requires HTTPS, except on loopback for a local service. func checkOrigin(origin string) error { parsed, err := url.Parse(origin) diff --git a/publish/hyperline_test.go b/publish/hyperline_test.go index bc8bb4bc..7281becc 100644 --- a/publish/hyperline_test.go +++ b/publish/hyperline_test.go @@ -139,3 +139,74 @@ func tarNames(t *testing.T, body io.Reader) []string { names = append(names, header.Name) } } + +// TestCallService sends a call with the saved session only, and reads back the +// service's answer and its refusals without ever signing in. +func TestCallService(t *testing.T) { + // Serve the call endpoint, refusing any other session. + var got *ServiceCall + service := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // Refuse any other path or session. + if r.URL.Path != serviceCallPath || r.Header.Get("Authorization") != "Bearer saved" { + w.WriteHeader(http.StatusUnauthorized) + return + } + + // Record the call, then refuse another mod or answer. + body, _ := io.ReadAll(r.Body) + got = &ServiceCall{} + if err := got.UnmarshalVT(body); err != nil { + t.Error(err) + } + if got.GetMod() != "arena" { + data, _ := (&Error{Code: "forbidden", Message: "this account cannot call that service"}).MarshalVT() + w.WriteHeader(http.StatusForbidden) + _, _ = w.Write(data) + return + } + data, _ := (&ServiceAnswer{Payload: []byte(`{"drills":[]}`)}).MarshalVT() + _, _ = w.Write(data) + })) + defer service.Close() + call := &ServiceCall{Mod: "arena", Service: "Drills", Method: "ListDrills", Payload: []byte("{}")} + + // With no saved session the call fails before it is sent. + sessionFile := filepath.Join(t.TempDir(), "session.json") + hyperline := &Hyperline{Origin: service.URL, SessionFile: sessionFile, Output: io.Discard} + if _, err := hyperline.CallService(t.Context(), call); err == nil || got != nil { + t.Fatalf("no session: err %v, sent %v", err, got) + } + + // A refused session asks for a new sign-in rather than making one. + save := func(token string) { + saved, _ := (&Session{Origin: service.URL, Token: token, ExpiresAt: time.Now().Add(time.Hour).UnixMilli()}).MarshalJSON() + if err := os.WriteFile(sessionFile, saved, 0o600); err != nil { + t.Fatal(err) + } + } + save("stale") + if _, err := hyperline.CallService(t.Context(), call); err == nil || err.Error() != service.URL+" refused the saved sign-in; run modlock login again" { + t.Fatalf("stale session: %v", err) + } + + // The saved session's call reaches the service and returns its reply. + save("saved") + payload, err := hyperline.CallService(t.Context(), call) + if err != nil || string(payload) != `{"drills":[]}` { + t.Fatalf("answered %q, %v", payload, err) + } + if got.GetService() != "Drills" || got.GetMethod() != "ListDrills" || string(got.GetPayload()) != "{}" { + t.Errorf("the service got %v", got) + } + + // A refusal returns the service's explanation. + other := &ServiceCall{Mod: "other", Service: "Drills", Method: "ListDrills"} + if _, err := hyperline.CallService(t.Context(), other); err == nil || err.Error() != "this account cannot call that service" { + t.Errorf("refused call: %v", err) + } + + // Another origin is refused before any session is read. + if _, err := (&Hyperline{Origin: "http://example.com", SessionFile: sessionFile}).CallService(t.Context(), call); err == nil { + t.Error("a plain http origin was used") + } +} diff --git a/publish/publish.pb.go b/publish/publish.pb.go index 645397ef..52be9389 100644 --- a/publish/publish.pb.go +++ b/publish/publish.pb.go @@ -544,6 +544,74 @@ func (x *DevLobbyHost) GetSecret() uint64 { return 0 } +// ServiceCall is one call a mod in a local session makes to a service its +// mod.json names, which the signed-in developer forwards to the service. +type ServiceCall struct { + unknownFields []byte + // Mod is the calling mod's slug. + Mod string `protobuf:"bytes,1,opt,name=mod,proto3" json:"mod,omitempty"` + // Service names the service, as the mod's mod.json does. + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + // Method names the service's method. + Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` + // Payload is the call's bytes, opaque to Modlock. + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *ServiceCall) Reset() { + *x = ServiceCall{} +} + +func (*ServiceCall) ProtoMessage() {} + +func (x *ServiceCall) GetMod() string { + if x != nil { + return x.Mod + } + return "" +} + +func (x *ServiceCall) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *ServiceCall) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *ServiceCall) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// ServiceAnswer is the service's reply to one ServiceCall. +type ServiceAnswer struct { + unknownFields []byte + // Payload is the reply's bytes. + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *ServiceAnswer) Reset() { + *x = ServiceAnswer{} +} + +func (*ServiceAnswer) ProtoMessage() {} + +func (x *ServiceAnswer) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + func (m *SignInExchange) CloneVT() *SignInExchange { if m == nil { return (*SignInExchange)(nil) @@ -786,6 +854,41 @@ func (m *DevLobbyHost) CloneMessageVT() protobuf_go_lite.CloneMessage { return m.CloneVT() } +func (m *ServiceCall) CloneVT() *ServiceCall { + if m == nil { + return (*ServiceCall)(nil) + } + r := new(ServiceCall) + r.Mod = m.Mod + r.Service = m.Service + r.Method = m.Method + r.Payload = protobuf_go_lite.CloneBytes(m.Payload) + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *ServiceCall) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + +func (m *ServiceAnswer) CloneVT() *ServiceAnswer { + if m == nil { + return (*ServiceAnswer)(nil) + } + r := new(ServiceAnswer) + r.Payload = protobuf_go_lite.CloneBytes(m.Payload) + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *ServiceAnswer) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + func (this *SignInExchange) EqualVT(that *SignInExchange) bool { if this == that { return true @@ -1135,6 +1238,55 @@ func (this *DevLobbyHost) EqualMessageVT(thatMsg any) bool { return this.EqualVT(that) } +func (this *ServiceCall) EqualVT(that *ServiceCall) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Mod != that.Mod { + return false + } + if this.Service != that.Service { + return false + } + if this.Method != that.Method { + return false + } + if !protobuf_go_lite.EqualBytes(this.Payload, that.Payload) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ServiceCall) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*ServiceCall) + if !ok { + return false + } + return this.EqualVT(that) +} + +func (this *ServiceAnswer) EqualVT(that *ServiceAnswer) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !protobuf_go_lite.EqualBytes(this.Payload, that.Payload) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ServiceAnswer) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*ServiceAnswer) + if !ok { + return false + } + return this.EqualVT(that) +} + // MarshalProtoJSON marshals the ReviewState to JSON. func (x ReviewState) MarshalProtoJSON(s *json.MarshalState) { s.WriteEnum(int32(x), ReviewState_name) @@ -1910,6 +2062,114 @@ func (x *DevLobbyHost) UnmarshalJSON(b []byte) error { return json.DefaultUnmarshalerConfig.Unmarshal(b, x) } +// MarshalProtoJSON marshals the ServiceCall message to JSON. +func (x *ServiceCall) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Mod != "" || s.HasField("mod") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("mod") + s.WriteString(x.Mod) + } + if x.Service != "" || s.HasField("service") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("service") + s.WriteString(x.Service) + } + if x.Method != "" || s.HasField("method") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("method") + s.WriteString(x.Method) + } + if len(x.Payload) > 0 || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteBytes(x.Payload) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the ServiceCall to JSON. +func (x *ServiceCall) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the ServiceCall message from JSON. +func (x *ServiceCall) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "mod": + s.AddField("mod") + x.Mod = s.ReadString() + case "service": + s.AddField("service") + x.Service = s.ReadString() + case "method": + s.AddField("method") + x.Method = s.ReadString() + case "payload": + s.AddField("payload") + x.Payload = s.ReadBytes() + } + }) +} + +// UnmarshalJSON unmarshals the ServiceCall from JSON. +func (x *ServiceCall) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + +// MarshalProtoJSON marshals the ServiceAnswer message to JSON. +func (x *ServiceAnswer) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if len(x.Payload) > 0 || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteBytes(x.Payload) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the ServiceAnswer to JSON. +func (x *ServiceAnswer) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the ServiceAnswer message from JSON. +func (x *ServiceAnswer) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "payload": + s.AddField("payload") + x.Payload = s.ReadBytes() + } + }) +} + +// UnmarshalJSON unmarshals the ServiceAnswer from JSON. +func (x *ServiceAnswer) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + func (m *SignInExchange) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -2531,6 +2791,95 @@ func (m *DevLobbyHost) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ServiceCall) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceCall) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ServiceCall) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeBytes(dAtA, i, m.Payload) + i-- + dAtA[i] = 0x22 + } + if len(m.Method) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Method) + i-- + dAtA[i] = 0x1a + } + if len(m.Service) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Service) + i-- + dAtA[i] = 0x12 + } + if len(m.Mod) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Mod) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ServiceAnswer) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceAnswer) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ServiceAnswer) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeBytes(dAtA, i, m.Payload) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *SignInExchange) SizeVT() (n int) { if m == nil { return 0 @@ -2724,6 +3073,31 @@ func (m *DevLobbyHost) SizeVT() (n int) { return n } +func (m *ServiceCall) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Mod) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Service) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Method) + n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += len(m.unknownFields) + return n +} + +func (m *ServiceAnswer) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += len(m.unknownFields) + return n +} + func (x ReviewState) MarshalProtoText() string { return x.String() } @@ -3004,6 +3378,46 @@ func (x *DevLobbyHost) String() string { return x.MarshalProtoText() } +func (x *ServiceCall) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "ServiceCall") + if x.Mod != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "mod") + protobuf_go_lite.TextWriteString(&sb, x.Mod) + } + if x.Service != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "service") + protobuf_go_lite.TextWriteString(&sb, x.Service) + } + if x.Method != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "method") + protobuf_go_lite.TextWriteString(&sb, x.Method) + } + if len(x.Payload) != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteBytes(&sb, x.Payload) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *ServiceCall) String() string { + return x.MarshalProtoText() +} + +func (x *ServiceAnswer) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "ServiceAnswer") + if len(x.Payload) != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteBytes(&sb, x.Payload) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *ServiceAnswer) String() string { + return x.MarshalProtoText() +} + func (m *SignInExchange) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3890,3 +4304,135 @@ func (m *DevLobbyHost) UnmarshalVT(dAtA []byte) error { } return nil } + +func (m *ServiceCall) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceCall: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceCall: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mod", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Mod = v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Service = v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Method = v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + m.Payload, iNdEx, err = protobuf_go_lite.DecodeBytesAppend(m.Payload, dAtA, iNdEx) + if err != nil { + return err + } + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *ServiceAnswer) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceAnswer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceAnswer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + m.Payload, iNdEx, err = protobuf_go_lite.DecodeBytesAppend(m.Payload, dAtA, iNdEx) + if err != nil { + return err + } + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/publish/publish.pb.ts b/publish/publish.pb.ts index d5450e95..1f0d5d45 100644 --- a/publish/publish.pb.ts +++ b/publish/publish.pb.ts @@ -855,3 +855,126 @@ export const DevLobbyHost: MessageType = }, }, ) + +/** + * ServiceCall is one call a mod in a local session makes to a service its + * mod.json names, which the signed-in developer forwards to the service. + * + * @generated from message modlock.publish.ServiceCall + */ +export interface ServiceCall { + /** + * Mod is the calling mod's slug. + */ + mod?: string + /** + * Service names the service, as the mod's mod.json does. + */ + service?: string + /** + * Method names the service's method. + */ + method?: string + /** + * Payload is the call's bytes, opaque to Modlock. + */ + payload?: Uint8Array +} + +export const ServiceCall: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.publish.ServiceCall', + () => [ + [1, 'mod', 9], + [2, 'service', 9], + [3, 'method', 9], + [4, 'payload', 12], + ], + { + decode: (r: BinaryReader, end: number, m: ServiceCall): ServiceCall => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.mod = r.string() + break + case 2: + m.service = r.string() + break + case 3: + m.method = r.string() + break + case 4: + m.payload = r.bytes() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: ServiceCall, w: Writer): void => { + { + const v = m.mod + if (v) w.uint32(10).string(v) + } + { + const v = m.service + if (v) w.uint32(18).string(v) + } + { + const v = m.method + if (v) w.uint32(26).string(v) + } + { + const v = m.payload + if (v != null && v.length !== 0) w.uint32(34).bytes(v) + } + }, + }, + ) + +/** + * ServiceAnswer is the service's reply to one ServiceCall. + * + * @generated from message modlock.publish.ServiceAnswer + */ +export interface ServiceAnswer { + /** + * Payload is the reply's bytes. + */ + payload?: Uint8Array +} + +export const ServiceAnswer: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.publish.ServiceAnswer', + () => [[1, 'payload', 12]], + { + decode: ( + r: BinaryReader, + end: number, + m: ServiceAnswer, + ): ServiceAnswer => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.payload = r.bytes() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: ServiceAnswer, w: Writer): void => { + { + const v = m.payload + if (v != null && v.length !== 0) w.uint32(10).bytes(v) + } + }, + }, + ) diff --git a/publish/publish.proto b/publish/publish.proto index 99e36060..dbbb707b 100644 --- a/publish/publish.proto +++ b/publish/publish.proto @@ -178,3 +178,25 @@ message DevLobbyHost { // Secret admits the guest's game to the host session. uint64 secret = 2; } + +// ServiceCall is one call a mod in a local session makes to a service its +// mod.json names, which the signed-in developer forwards to the service. +message ServiceCall { + // Mod is the calling mod's slug. + string mod = 1; + + // Service names the service, as the mod's mod.json does. + string service = 2; + + // Method names the service's method. + string method = 3; + + // Payload is the call's bytes, opaque to Modlock. + bytes payload = 4; +} + +// ServiceAnswer is the service's reply to one ServiceCall. +message ServiceAnswer { + // Payload is the reply's bytes. + bytes payload = 1; +} diff --git a/session/answer_test.go b/session/answer_test.go new file mode 100644 index 00000000..b1e7abf8 --- /dev/null +++ b/session/answer_test.go @@ -0,0 +1,52 @@ +package session + +import ( + "context" + "errors" + "testing" + + "github.com/paralin/modlock/src/host_app/control" +) + +// TestAnswerEndsEachForwardedCall answers the host's forwarded calls with the +// service's reply, its error, or the refusal of a session that forwards none. +func TestAnswerEndsEachForwardedCall(t *testing.T) { + link, err := NewControl() + if err != nil { + t.Fatal(err) + } + defer link.Close() + turns := make(chan struct{}, maxAnswers) + + // The service sees the call as the host sent it. + call := &control.ServiceCall{Id: 7, Mod: "arena", Service: "Drills", Method: "list", Payload: []byte("{}")} + reply := func(_ context.Context, got *control.ServiceCall) ([]byte, error) { + if got.GetMod() != "arena" || got.GetMethod() != "list" || string(got.GetPayload()) != "{}" { + t.Errorf("the service got %v", got) + } + return []byte("[]"), nil + } + failed := func(context.Context, *control.ServiceCall) ([]byte, error) { return nil, errors.New("refused") } + silent := func(context.Context, *control.ServiceCall) ([]byte, error) { return nil, errors.New("") } + + // Each answer carries the call's id and the outcome. + for _, check := range []struct { + name string + fn func(context.Context, *control.ServiceCall) ([]byte, error) + payload, error string + }{ + {"reply", reply, "[]", ""}, + {"error", failed, "", "refused"}, + {"empty error", silent, "", "the service failed"}, + {"no forwarder", nil, "", "this session forwards no services"}, + } { + answer(t.Context(), link, check.fn, turns, call) + ended := (<-link.requests).GetAnswer() + if ended.GetId() != 7 || string(ended.GetPayload()) != check.payload || ended.GetError() != check.error { + t.Errorf("%s: answered %v, want payload %q error %q", check.name, ended, check.payload, check.error) + } + } + if len(turns) != 0 { + t.Errorf("%d turns still held", len(turns)) + } +} diff --git a/session/config.go b/session/config.go index 9b38d404..e6f160c3 100644 --- a/session/config.go +++ b/session/config.go @@ -1,6 +1,7 @@ package session import ( + "context" "io" "github.com/paralin/modlock/src/host_app/control" @@ -28,6 +29,10 @@ type Config struct { // Fixtures is the file of service fixtures the host answers from, a // control.Fixtures message, or empty for none. Fixtures string + // Answer answers each started call of a service the fixtures forward, + // returning the reply or the error that fails the call. A session whose + // fixtures forward nothing needs none. + Answer func(ctx context.Context, call *control.ServiceCall) ([]byte, error) // Launch starts the Deadlock client once the server is ready. Launch bool // HostOutput receives the host's console output. diff --git a/session/control.go b/session/control.go index 37ad22c0..ddd8fccf 100644 --- a/session/control.go +++ b/session/control.go @@ -56,6 +56,11 @@ func (c *Control) SetService(ctx context.Context, reply *control.ServiceReply) e return c.request(ctx, &control.ControlRequest{Body: &control.ControlRequest_Service{Service: reply}}) } +// Answer ends one service call the host forwarded. +func (c *Control) Answer(ctx context.Context, answer *control.ServiceAnswer) error { + return c.request(ctx, &control.ControlRequest{Body: &control.ControlRequest_Answer{Answer: answer}}) +} + // SetRoles replaces the players' roles, which the mods read on each // connection. Requests made before the host connects wait for it. func (c *Control) SetRoles(ctx context.Context, roles *players.RolesTable) error { diff --git a/session/session.go b/session/session.go index f3a26884..9b47291a 100644 --- a/session/session.go +++ b/session/session.go @@ -1,6 +1,7 @@ package session import ( + "cmp" "context" "runtime" "strconv" @@ -128,7 +129,13 @@ func Start(ctx context.Context, config Config) (*Session, error) { // Pass events on, each followed by the frame it changes, launching the // client at the first ready server. frame := NewFrame(config.Version, config.Mods) + answers := make(chan struct{}, maxAnswers) handle := func(event *control.HostEvent) { + // Answer a forwarded call away from the events, which go on. + if call := event.GetServiceCall(); call != nil { + go answer(ctx, link, config.Answer, answers, call) + return + } framed := frame.Follow(event) screens.Handle(event) if event.GetReady() != nil && config.Launch && !session.launched.Swap(true) { @@ -152,6 +159,31 @@ func Start(ctx context.Context, config Config) (*Session, error) { return session, nil } +// maxAnswers bounds the forwarded calls answered at once; later ones wait. +const maxAnswers = 8 + +// answer ends one forwarded call with what fn answers, or with why it could +// not, waiting for a turn among the answers in progress. +func answer(ctx context.Context, link *Control, fn func(context.Context, *control.ServiceCall) ([]byte, error), turns chan struct{}, call *control.ServiceCall) { + // Take a turn, then ask. + ended := &control.ServiceAnswer{Id: call.GetId()} + select { + case turns <- struct{}{}: + defer func() { <-turns }() + if fn == nil { + ended.Error = "this session forwards no services" + } else if payload, err := fn(ctx, call); err != nil { + ended.Error = cmp.Or(err.Error(), "the service failed") + } else { + ended.Payload = payload + } + case <-ctx.Done(): + ended.Error = "the session ended" + } + // Send the answer; a session that ended sends nothing. + _ = link.Answer(ctx, ended) +} + // Reload asks the host to replace the running mod built at path, first // adding the mod's changed content to the mounted package, so the reloaded // mod finds the content its rebuilt addon names. diff --git a/src/host_app/control/control.pb.cc b/src/host_app/control/control.pb.cc index 62cb9683..bc3127cf 100644 --- a/src/host_app/control/control.pb.cc +++ b/src/host_app/control/control.pb.cc @@ -102,6 +102,74 @@ struct ServiceReplyDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceReplyDefaultTypeInternal _ServiceReply_default_instance_; +inline constexpr ServiceCall::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + mod_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + service_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + method_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + payload_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + id_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR ServiceCall::ServiceCall(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(ServiceCall_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ServiceCallDefaultTypeInternal { + PROTOBUF_CONSTEXPR ServiceCallDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ServiceCallDefaultTypeInternal() {} + union { + ServiceCall _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceCallDefaultTypeInternal _ServiceCall_default_instance_; + +inline constexpr ServiceAnswer::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + payload_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + id_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR ServiceAnswer::ServiceAnswer(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(ServiceAnswer_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ServiceAnswerDefaultTypeInternal { + PROTOBUF_CONSTEXPR ServiceAnswerDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ServiceAnswerDefaultTypeInternal() {} + union { + ServiceAnswer _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceAnswerDefaultTypeInternal _ServiceAnswer_default_instance_; + inline constexpr ServerReady::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, @@ -364,6 +432,39 @@ struct ModFailedDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModFailedDefaultTypeInternal _ModFailed_default_instance_; +inline constexpr Forward::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + mod_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + service_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + target_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR Forward::Forward(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(Forward_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ForwardDefaultTypeInternal { + PROTOBUF_CONSTEXPR ForwardDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ForwardDefaultTypeInternal() {} + union { + Forward _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ForwardDefaultTypeInternal _Forward_default_instance_; + inline constexpr Fixture::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, @@ -406,7 +507,8 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT inline constexpr Fixtures::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, - fixtures_{} {} + fixtures_{}, + forwards_{} {} template PROTOBUF_CONSTEXPR Fixtures::Fixtures(::_pbi::ConstantInitialized) @@ -580,6 +682,7 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ControlRequest, _impl_.body_), PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ControlRequest, _impl_.body_), PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ControlRequest, _impl_.body_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ControlRequest, _impl_.body_), 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ReloadRequest, _impl_._has_bits_), 4, // hasbit index offset @@ -600,6 +703,7 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::HostEvent, _impl_.body_), PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::HostEvent, _impl_.body_), PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::HostEvent, _impl_.body_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::HostEvent, _impl_.body_), 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::PlayerChat, _impl_._has_bits_), 6, // hasbit index offset @@ -721,32 +825,68 @@ const ::uint32_t 3, 4, 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Forward, _impl_._has_bits_), + 6, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Forward, _impl_.mod_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Forward, _impl_.service_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Forward, _impl_.target_), + 0, + 1, + 2, + 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixtures, _impl_._has_bits_), - 4, // hasbit index offset + 5, // hasbit index offset PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixtures, _impl_.fixtures_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::Fixtures, _impl_.forwards_), + 0, + 1, + 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceCall, _impl_._has_bits_), + 8, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceCall, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceCall, _impl_.mod_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceCall, _impl_.service_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceCall, _impl_.method_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceCall, _impl_.payload_), + 4, 0, + 1, + 2, + 3, + 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceAnswer, _impl_._has_bits_), + 6, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceAnswer, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceAnswer, _impl_.payload_), + PROTOBUF_FIELD_OFFSET(::modlock::host_app::control::ServiceAnswer, _impl_.error_), + 2, + 0, + 1, }; static const ::_pbi::MigrationSchema schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, sizeof(::modlock::host_app::control::ControlRequest)}, - {6, sizeof(::modlock::host_app::control::ReloadRequest)}, - {11, sizeof(::modlock::host_app::control::HostEvent)}, - {26, sizeof(::modlock::host_app::control::PlayerChat)}, - {35, sizeof(::modlock::host_app::control::ModStarted)}, - {42, sizeof(::modlock::host_app::control::ModLog)}, - {49, sizeof(::modlock::host_app::control::ModFailed)}, - {56, sizeof(::modlock::host_app::control::ModCalls)}, - {63, sizeof(::modlock::host_app::control::ModSlowFrame)}, - {70, sizeof(::modlock::host_app::control::PlayerJoined)}, - {79, sizeof(::modlock::host_app::control::PlayerLeft)}, - {84, sizeof(::modlock::host_app::control::PlayerMessage)}, - {97, sizeof(::modlock::host_app::control::ServerReady)}, - {102, sizeof(::modlock::host_app::control::UiChanged)}, - {111, sizeof(::modlock::host_app::control::ServiceReply)}, - {126, sizeof(::modlock::host_app::control::ServiceResult)}, - {133, sizeof(::modlock::host_app::control::Fixture)}, - {146, sizeof(::modlock::host_app::control::Fixtures)}, + {7, sizeof(::modlock::host_app::control::ReloadRequest)}, + {12, sizeof(::modlock::host_app::control::HostEvent)}, + {28, sizeof(::modlock::host_app::control::PlayerChat)}, + {37, sizeof(::modlock::host_app::control::ModStarted)}, + {44, sizeof(::modlock::host_app::control::ModLog)}, + {51, sizeof(::modlock::host_app::control::ModFailed)}, + {58, sizeof(::modlock::host_app::control::ModCalls)}, + {65, sizeof(::modlock::host_app::control::ModSlowFrame)}, + {72, sizeof(::modlock::host_app::control::PlayerJoined)}, + {81, sizeof(::modlock::host_app::control::PlayerLeft)}, + {86, sizeof(::modlock::host_app::control::PlayerMessage)}, + {99, sizeof(::modlock::host_app::control::ServerReady)}, + {104, sizeof(::modlock::host_app::control::UiChanged)}, + {113, sizeof(::modlock::host_app::control::ServiceReply)}, + {128, sizeof(::modlock::host_app::control::ServiceResult)}, + {135, sizeof(::modlock::host_app::control::Fixture)}, + {148, sizeof(::modlock::host_app::control::Forward)}, + {157, sizeof(::modlock::host_app::control::Fixtures)}, + {164, sizeof(::modlock::host_app::control::ServiceCall)}, + {177, sizeof(::modlock::host_app::control::ServiceAnswer)}, }; static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::modlock::host_app::control::_ControlRequest_default_instance_._instance, @@ -766,7 +906,10 @@ static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::modlock::host_app::control::_ServiceReply_default_instance_._instance, &::modlock::host_app::control::_ServiceResult_default_instance_._instance, &::modlock::host_app::control::_Fixture_default_instance_._instance, + &::modlock::host_app::control::_Forward_default_instance_._instance, &::modlock::host_app::control::_Fixtures_default_instance_._instance, + &::modlock::host_app::control::_ServiceCall_default_instance_._instance, + &::modlock::host_app::control::_ServiceAnswer_default_instance_._instance, }; const char descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { @@ -776,58 +919,68 @@ const char descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fho "c/wasm/players/players.proto\0329github.com" "/paralin/modlock/src/wasm/profile/profil" "e.proto\032/github.com/paralin/modlock/src/" - "wasm/ui/ui.proto\"\301\001\n\016ControlRequest\0229\n\006r" + "wasm/ui/ui.proto\"\374\001\n\016ControlRequest\0229\n\006r" "eload\030\001 \001(\0132\'.modlock.host_app.control.R" "eloadRequestH\000\0221\n\005roles\030\002 \001(\0132 .modlock." "wasm.players.RolesTableH\000\0229\n\007service\030\003 \001" "(\0132&.modlock.host_app.control.ServiceRep" - "lyH\000B\006\n\004body\"\035\n\rReloadRequest\022\014\n\004path\030\001 " - "\001(\t\"\270\005\n\tHostEvent\0227\n\007started\030\001 \001(\0132$.mod" - "lock.host_app.control.ModStartedH\000\022/\n\003lo" - "g\030\002 \001(\0132 .modlock.host_app.control.ModLo" - "gH\000\0225\n\006failed\030\003 \001(\0132#.modlock.host_app.c" - "ontrol.ModFailedH\000\0228\n\006joined\030\004 \001(\0132&.mod" - "lock.host_app.control.PlayerJoinedH\000\0226\n\005" - "ready\030\005 \001(\0132%.modlock.host_app.control.S" - "erverReadyH\000\0221\n\002ui\030\006 \001(\0132#.modlock.host_" - "app.control.UiChangedH\000\0224\n\004left\030\007 \001(\0132$." - "modlock.host_app.control.PlayerLeftH\000\022:\n" - "\007message\030\010 \001(\0132\'.modlock.host_app.contro" - "l.PlayerMessageH\000\0224\n\004chat\030\t \001(\0132$.modloc" - "k.host_app.control.PlayerChatH\000\0223\n\005calls" - "\030\n \001(\0132\".modlock.host_app.control.ModCal" - "lsH\000\022<\n\nslow_frame\030\013 \001(\0132&.modlock.host_" - "app.control.ModSlowFrameH\000\022B\n\017service_ap" - "plied\030\014 \001(\0132\'.modlock.host_app.control.S" - "erviceResultH\000B\006\n\004body\"6\n\nPlayerChat\022\014\n\004" - "slot\030\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\014\n\004text\030\003 \001(\t\"+" - "\n\nModStarted\022\013\n\003mod\030\001 \001(\t\022\020\n\010reloaded\030\002 " - "\001(\010\"#\n\006ModLog\022\013\n\003mod\030\001 \001(\t\022\014\n\004text\030\002 \001(\t" - "\"\'\n\tModFailed\022\013\n\003mod\030\001 \001(\t\022\r\n\005error\030\002 \001(" - "\t\"K\n\010ModCalls\022\013\n\003mod\030\001 \001(\t\0222\n\007profile\030\002 " - "\001(\0132!.modlock.wasm.profile.CallProfile\"L" - "\n\014ModSlowFrame\022\013\n\003mod\030\001 \001(\t\022/\n\006report\030\002 " - "\001(\0132\037.modlock.wasm.profile.SlowFrame\"<\n\014" - "PlayerJoined\022\014\n\004slot\030\001 \001(\005\022\014\n\004name\030\002 \001(\t" - "\022\020\n\010steam_id\030\003 \001(\006\"\032\n\nPlayerLeft\022\014\n\004slot" - "\030\001 \001(\005\"|\n\rPlayerMessage\022\013\n\003mod\030\001 \001(\t\022\014\n\004" - "slot\030\002 \001(\005\0223\n\004kind\030\003 \001(\0162%.modlock.host_" - "app.control.MessageKind\022\r\n\005title\030\004 \001(\t\022\014" - "\n\004text\030\005 \001(\t\"\032\n\013ServerReady\022\013\n\003map\030\001 \001(\t" - "\"O\n\tUiChanged\022\013\n\003mod\030\001 \001(\t\022\014\n\004slot\030\002 \001(\005" - "\022\'\n\006change\030\003 \001(\0132\027.modlock.wasm.ui.Chang" - "e\"g\n\014ServiceReply\022\013\n\003mod\030\001 \001(\t\022\017\n\007servic" - "e\030\002 \001(\t\022\016\n\006method\030\003 \001(\t\022\017\n\007payload\030\004 \001(\014" - "\022\014\n\004path\030\005 \001(\t\022\n\n\002id\030\006 \001(\t\"*\n\rServiceRes" - "ult\022\n\n\002id\030\001 \001(\t\022\r\n\005error\030\002 \001(\t\"X\n\007Fixtur" - "e\022\013\n\003mod\030\001 \001(\t\022\017\n\007service\030\002 \001(\t\022\016\n\006metho" - "d\030\003 \001(\t\022\017\n\007payload\030\004 \001(\014\022\016\n\006source\030\005 \001(\t" - "\"\?\n\010Fixtures\0223\n\010fixtures\030\001 \003(\0132!.modlock" - ".host_app.control.Fixture*\\\n\013MessageKind" - "\022\025\n\021MESSAGE_KIND_CHAT\020\000\022\027\n\023MESSAGE_KIND_" - "CENTER\020\001\022\035\n\031MESSAGE_KIND_ANNOUNCEMENT\020\002B" - "9Z7github.com/paralin/modlock/src/host_a" - "pp/control;controlb\006proto3" + "lyH\000\0229\n\006answer\030\004 \001(\0132\'.modlock.host_app." + "control.ServiceAnswerH\000B\006\n\004body\"\035\n\rReloa" + "dRequest\022\014\n\004path\030\001 \001(\t\"\367\005\n\tHostEvent\0227\n\007" + "started\030\001 \001(\0132$.modlock.host_app.control" + ".ModStartedH\000\022/\n\003log\030\002 \001(\0132 .modlock.hos" + "t_app.control.ModLogH\000\0225\n\006failed\030\003 \001(\0132#" + ".modlock.host_app.control.ModFailedH\000\0228\n" + "\006joined\030\004 \001(\0132&.modlock.host_app.control" + ".PlayerJoinedH\000\0226\n\005ready\030\005 \001(\0132%.modlock" + ".host_app.control.ServerReadyH\000\0221\n\002ui\030\006 " + "\001(\0132#.modlock.host_app.control.UiChanged" + "H\000\0224\n\004left\030\007 \001(\0132$.modlock.host_app.cont" + "rol.PlayerLeftH\000\022:\n\007message\030\010 \001(\0132\'.modl" + "ock.host_app.control.PlayerMessageH\000\0224\n\004" + "chat\030\t \001(\0132$.modlock.host_app.control.Pl" + "ayerChatH\000\0223\n\005calls\030\n \001(\0132\".modlock.host" + "_app.control.ModCallsH\000\022<\n\nslow_frame\030\013 " + "\001(\0132&.modlock.host_app.control.ModSlowFr" + "ameH\000\022B\n\017service_applied\030\014 \001(\0132\'.modlock" + ".host_app.control.ServiceResultH\000\022=\n\014ser" + "vice_call\030\r \001(\0132%.modlock.host_app.contr" + "ol.ServiceCallH\000B\006\n\004body\"6\n\nPlayerChat\022\014" + "\n\004slot\030\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\014\n\004text\030\003 \001(\t" + "\"+\n\nModStarted\022\013\n\003mod\030\001 \001(\t\022\020\n\010reloaded\030" + "\002 \001(\010\"#\n\006ModLog\022\013\n\003mod\030\001 \001(\t\022\014\n\004text\030\002 \001" + "(\t\"\'\n\tModFailed\022\013\n\003mod\030\001 \001(\t\022\r\n\005error\030\002 " + "\001(\t\"K\n\010ModCalls\022\013\n\003mod\030\001 \001(\t\0222\n\007profile\030" + "\002 \001(\0132!.modlock.wasm.profile.CallProfile" + "\"L\n\014ModSlowFrame\022\013\n\003mod\030\001 \001(\t\022/\n\006report\030" + "\002 \001(\0132\037.modlock.wasm.profile.SlowFrame\"<" + "\n\014PlayerJoined\022\014\n\004slot\030\001 \001(\005\022\014\n\004name\030\002 \001" + "(\t\022\020\n\010steam_id\030\003 \001(\006\"\032\n\nPlayerLeft\022\014\n\004sl" + "ot\030\001 \001(\005\"|\n\rPlayerMessage\022\013\n\003mod\030\001 \001(\t\022\014" + "\n\004slot\030\002 \001(\005\0223\n\004kind\030\003 \001(\0162%.modlock.hos" + "t_app.control.MessageKind\022\r\n\005title\030\004 \001(\t" + "\022\014\n\004text\030\005 \001(\t\"\032\n\013ServerReady\022\013\n\003map\030\001 \001" + "(\t\"O\n\tUiChanged\022\013\n\003mod\030\001 \001(\t\022\014\n\004slot\030\002 \001" + "(\005\022\'\n\006change\030\003 \001(\0132\027.modlock.wasm.ui.Cha" + "nge\"g\n\014ServiceReply\022\013\n\003mod\030\001 \001(\t\022\017\n\007serv" + "ice\030\002 \001(\t\022\016\n\006method\030\003 \001(\t\022\017\n\007payload\030\004 \001" + "(\014\022\014\n\004path\030\005 \001(\t\022\n\n\002id\030\006 \001(\t\"*\n\rServiceR" + "esult\022\n\n\002id\030\001 \001(\t\022\r\n\005error\030\002 \001(\t\"X\n\007Fixt" + "ure\022\013\n\003mod\030\001 \001(\t\022\017\n\007service\030\002 \001(\t\022\016\n\006met" + "hod\030\003 \001(\t\022\017\n\007payload\030\004 \001(\014\022\016\n\006source\030\005 \001" + "(\t\"7\n\007Forward\022\013\n\003mod\030\001 \001(\t\022\017\n\007service\030\002 " + "\001(\t\022\016\n\006target\030\003 \001(\t\"t\n\010Fixtures\0223\n\010fixtu" + "res\030\001 \003(\0132!.modlock.host_app.control.Fix" + "ture\0223\n\010forwards\030\002 \003(\0132!.modlock.host_ap" + "p.control.Forward\"X\n\013ServiceCall\022\n\n\002id\030\001" + " \001(\004\022\013\n\003mod\030\002 \001(\t\022\017\n\007service\030\003 \001(\t\022\016\n\006me" + "thod\030\004 \001(\t\022\017\n\007payload\030\005 \001(\014\";\n\rServiceAn" + "swer\022\n\n\002id\030\001 \001(\004\022\017\n\007payload\030\002 \001(\014\022\r\n\005err" + "or\030\003 \001(\t*\\\n\013MessageKind\022\025\n\021MESSAGE_KIND_" + "CHAT\020\000\022\027\n\023MESSAGE_KIND_CENTER\020\001\022\035\n\031MESSA" + "GE_KIND_ANNOUNCEMENT\020\002B9Z7github.com/par" + "alin/modlock/src/host_app/control;contro" + "lb\006proto3" }; static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto_deps[3] = { @@ -839,13 +992,13 @@ static ::absl::once_flag descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto = { false, false, - 2306, + 2689, descriptor_table_protodef_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto, "github.com/paralin/modlock/src/host_app/control/control.proto", &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto_once, descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto_deps, 3, - 18, + 21, schemas, file_default_instances, TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto::offsets, @@ -919,6 +1072,19 @@ void ControlRequest::set_allocated_service(::modlock::host_app::control::Service } // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ControlRequest.service) } +void ControlRequest::set_allocated_answer(::modlock::host_app::control::ServiceAnswer* PROTOBUF_NULLABLE answer) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_body(); + if (answer) { + ::google::protobuf::Arena* submessage_arena = answer->GetArena(); + if (message_arena != submessage_arena) { + answer = ::google::protobuf::internal::GetOwnedMessage(message_arena, answer, submessage_arena); + } + set_has_answer(); + _impl_.body_.answer_ = answer; + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ControlRequest.answer) +} ControlRequest::ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) : ::google::protobuf::Message(arena, ControlRequest_class_data_.base()) { @@ -961,6 +1127,9 @@ ControlRequest::ControlRequest( case kService: _impl_.body_.service_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.body_.service_); break; + case kAnswer: + _impl_.body_.answer_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.body_.answer_); + break; } // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.ControlRequest) @@ -1020,6 +1189,14 @@ void ControlRequest::clear_body() { } break; } + case kAnswer: { + if (GetArena() == nullptr) { + delete _impl_.body_.answer_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.answer_); + } + break; + } case BODY_NOT_SET: { break; } @@ -1071,17 +1248,17 @@ ControlRequest::GetClassData() const { return ControlRequest_class_data_.base(); } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 3, 3, 0, 2> +const ::_pbi::TcParseTable<0, 4, 4, 0, 2> ControlRequest::_table_ = { { 0, // no _has_bits_ 0, // no _extensions_ - 3, 0, // max_field_number, fast_idx_mask + 4, 0, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap + 4294967280, // skipmap offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 3, // num_aux_entries + 4, // num_field_entries + 4, // num_aux_entries offsetof(decltype(_table_), aux_entries), ControlRequest_class_data_.base(), nullptr, // post_loop_handler @@ -1100,11 +1277,14 @@ ControlRequest::_table_ = { {PROTOBUF_FIELD_OFFSET(ControlRequest, _impl_.body_.roles_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .modlock.host_app.control.ServiceReply service = 3; {PROTOBUF_FIELD_OFFSET(ControlRequest, _impl_.body_.service_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .modlock.host_app.control.ServiceAnswer answer = 4; + {PROTOBUF_FIELD_OFFSET(ControlRequest, _impl_.body_.answer_), _Internal::kOneofCaseOffset + 0, 3, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ {::_pbi::TcParser::GetTable<::modlock::host_app::control::ReloadRequest>()}, {::_pbi::TcParser::GetTable<::modlock::wasm::players::RolesTable>()}, {::_pbi::TcParser::GetTable<::modlock::host_app::control::ServiceReply>()}, + {::_pbi::TcParser::GetTable<::modlock::host_app::control::ServiceAnswer>()}, }}, {{ }}, @@ -1157,6 +1337,12 @@ ::uint8_t* PROTOBUF_NONNULL ControlRequest::_InternalSerialize( stream); break; } + case kAnswer: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.body_.answer_, this_._impl_.body_.answer_->GetCachedSize(), target, + stream); + break; + } default: break; } @@ -1202,6 +1388,12 @@ ::size_t ControlRequest::ByteSizeLong() const { ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.body_.service_); break; } + // .modlock.host_app.control.ServiceAnswer answer = 4; + case kAnswer: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.body_.answer_); + break; + } case BODY_NOT_SET: { break; } @@ -1260,6 +1452,14 @@ void ControlRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, } break; } + case kAnswer: { + if (oneof_needs_init) { + _this->_impl_.body_.answer_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.body_.answer_); + } else { + _this->_impl_.body_.answer_->MergeFrom(*from._impl_.body_.answer_); + } + break; + } case BODY_NOT_SET: break; } @@ -1725,6 +1925,19 @@ void HostEvent::set_allocated_service_applied(::modlock::host_app::control::Serv } // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.HostEvent.service_applied) } +void HostEvent::set_allocated_service_call(::modlock::host_app::control::ServiceCall* PROTOBUF_NULLABLE service_call) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_body(); + if (service_call) { + ::google::protobuf::Arena* submessage_arena = service_call->GetArena(); + if (message_arena != submessage_arena) { + service_call = ::google::protobuf::internal::GetOwnedMessage(message_arena, service_call, submessage_arena); + } + set_has_service_call(); + _impl_.body_.service_call_ = service_call; + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.HostEvent.service_call) +} HostEvent::HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) : ::google::protobuf::Message(arena, HostEvent_class_data_.base()) { @@ -1794,6 +2007,9 @@ HostEvent::HostEvent( case kServiceApplied: _impl_.body_.service_applied_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.body_.service_applied_); break; + case kServiceCall: + _impl_.body_.service_call_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.body_.service_call_); + break; } // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.HostEvent) @@ -1925,6 +2141,14 @@ void HostEvent::clear_body() { } break; } + case kServiceCall: { + if (GetArena() == nullptr) { + delete _impl_.body_.service_call_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_call_); + } + break; + } case BODY_NOT_SET: { break; } @@ -1976,17 +2200,17 @@ HostEvent::GetClassData() const { return HostEvent_class_data_.base(); } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 12, 12, 0, 2> +const ::_pbi::TcParseTable<0, 13, 13, 0, 2> HostEvent::_table_ = { { 0, // no _has_bits_ 0, // no _extensions_ - 12, 0, // max_field_number, fast_idx_mask + 13, 0, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294963200, // skipmap + 4294959104, // skipmap offsetof(decltype(_table_), field_entries), - 12, // num_field_entries - 12, // num_aux_entries + 13, // num_field_entries + 13, // num_aux_entries offsetof(decltype(_table_), aux_entries), HostEvent_class_data_.base(), nullptr, // post_loop_handler @@ -2023,6 +2247,8 @@ HostEvent::_table_ = { {PROTOBUF_FIELD_OFFSET(HostEvent, _impl_.body_.slow_frame_), _Internal::kOneofCaseOffset + 0, 10, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .modlock.host_app.control.ServiceResult service_applied = 12; {PROTOBUF_FIELD_OFFSET(HostEvent, _impl_.body_.service_applied_), _Internal::kOneofCaseOffset + 0, 11, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .modlock.host_app.control.ServiceCall service_call = 13; + {PROTOBUF_FIELD_OFFSET(HostEvent, _impl_.body_.service_call_), _Internal::kOneofCaseOffset + 0, 12, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ {::_pbi::TcParser::GetTable<::modlock::host_app::control::ModStarted>()}, @@ -2037,6 +2263,7 @@ HostEvent::_table_ = { {::_pbi::TcParser::GetTable<::modlock::host_app::control::ModCalls>()}, {::_pbi::TcParser::GetTable<::modlock::host_app::control::ModSlowFrame>()}, {::_pbi::TcParser::GetTable<::modlock::host_app::control::ServiceResult>()}, + {::_pbi::TcParser::GetTable<::modlock::host_app::control::ServiceCall>()}, }}, {{ }}, @@ -2143,6 +2370,12 @@ ::uint8_t* PROTOBUF_NONNULL HostEvent::_InternalSerialize( stream); break; } + case kServiceCall: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 13, *this_._impl_.body_.service_call_, this_._impl_.body_.service_call_->GetCachedSize(), target, + stream); + break; + } default: break; } @@ -2242,6 +2475,12 @@ ::size_t HostEvent::ByteSizeLong() const { ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.body_.service_applied_); break; } + // .modlock.host_app.control.ServiceCall service_call = 13; + case kServiceCall: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.body_.service_call_); + break; + } case BODY_NOT_SET: { break; } @@ -2372,6 +2611,14 @@ void HostEvent::MergeImpl(::google::protobuf::MessageLite& to_msg, } break; } + case kServiceCall: { + if (oneof_needs_init) { + _this->_impl_.body_.service_call_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.body_.service_call_); + } else { + _this->_impl_.body_.service_call_->MergeFrom(*from._impl_.body_.service_call_); + } + break; + } case BODY_NOT_SET: break; } @@ -7277,195 +7524,574 @@ ::google::protobuf::Metadata Fixture::GetMetadata() const { } // =================================================================== -class Fixtures::_Internal { +class Forward::_Internal { public: using HasBits = - decltype(::std::declval()._impl_._has_bits_); + decltype(::std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._has_bits_); + 8 * PROTOBUF_FIELD_OFFSET(Forward, _impl_._has_bits_); }; -Fixtures::Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +Forward::Forward(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Fixtures_class_data_.base()) { + : ::google::protobuf::Message(arena, Forward_class_data_.base()) { #else // PROTOBUF_CUSTOM_VTABLE : ::google::protobuf::Message(arena) { #endif // PROTOBUF_CUSTOM_VTABLE SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:modlock.host_app.control.Fixtures) + // @@protoc_insertion_point(arena_constructor:modlock.host_app.control.Forward) } -PROTOBUF_NDEBUG_INLINE Fixtures::Impl_::Impl_( +PROTOBUF_NDEBUG_INLINE Forward::Impl_::Impl_( [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::modlock::host_app::control::Fixtures& from_msg) + [[maybe_unused]] const ::modlock::host_app::control::Forward& from_msg) : _has_bits_{from._has_bits_}, _cached_size_{0}, - fixtures_{visibility, arena, from.fixtures_} {} + mod_(arena, from.mod_), + service_(arena, from.service_), + target_(arena, from.target_) {} -Fixtures::Fixtures( +Forward::Forward( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const Fixtures& from) + const Forward& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Fixtures_class_data_.base()) { + : ::google::protobuf::Message(arena, Forward_class_data_.base()) { #else // PROTOBUF_CUSTOM_VTABLE : ::google::protobuf::Message(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - Fixtures* const _this = this; + Forward* const _this = this; (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.Fixtures) + // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.Forward) } -PROTOBUF_NDEBUG_INLINE Fixtures::Impl_::Impl_( +PROTOBUF_NDEBUG_INLINE Forward::Impl_::Impl_( [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) : _cached_size_{0}, - fixtures_{visibility, arena} {} + mod_(arena), + service_(arena), + target_(arena) {} -inline void Fixtures::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { +inline void Forward::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { new (&_impl_) Impl_(internal_visibility(), arena); } -Fixtures::~Fixtures() { - // @@protoc_insertion_point(destructor:modlock.host_app.control.Fixtures) +Forward::~Forward() { + // @@protoc_insertion_point(destructor:modlock.host_app.control.Forward) SharedDtor(*this); } -inline void Fixtures::SharedDtor(MessageLite& self) { - Fixtures& this_ = static_cast(self); +inline void Forward::SharedDtor(MessageLite& self) { + Forward& this_ = static_cast(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); } this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.mod_.Destroy(); + this_._impl_.service_.Destroy(); + this_._impl_.target_.Destroy(); this_._impl_.~Impl_(); } -inline void* PROTOBUF_NONNULL Fixtures::PlacementNew_( +inline void* PROTOBUF_NONNULL Forward::PlacementNew_( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) Fixtures(arena); + return ::new (mem) Forward(arena); } -constexpr auto Fixtures::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_) + - decltype(Fixtures::_impl_.fixtures_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(Fixtures), alignof(Fixtures), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&Fixtures::PlacementNew_, - sizeof(Fixtures), - alignof(Fixtures)); - } +constexpr auto Forward::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Forward), + alignof(Forward)); } -constexpr auto Fixtures::InternalGenerateClassData_() { +constexpr auto Forward::InternalGenerateClassData_() { return ::google::protobuf::internal::ClassDataFull{ ::google::protobuf::internal::ClassData{ - &_Fixtures_default_instance_._instance, + &_Forward_default_instance_._instance, &_table_.header, nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized - &Fixtures::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), + &Forward::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Fixtures::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &Fixtures::ByteSizeLong, - &Fixtures::_InternalSerialize, + &Forward::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &Forward::ByteSizeLong, + &Forward::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._cached_size_), + PROTOBUF_FIELD_OFFSET(Forward, _impl_._cached_size_), false, }, - &Fixtures::kDescriptorMethods, + &Forward::kDescriptorMethods, &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto, nullptr, // tracker }; } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull Fixtures_class_data_ = - Fixtures::InternalGenerateClassData_(); + ::google::protobuf::internal::ClassDataFull Forward_class_data_ = + Forward::InternalGenerateClassData_(); PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -Fixtures::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&Fixtures_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(Fixtures_class_data_.tc_table); - return Fixtures_class_data_.base(); +Forward::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&Forward_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(Forward_class_data_.tc_table); + return Forward_class_data_.base(); } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 1, 0, 2> -Fixtures::_table_ = { +const ::_pbi::TcParseTable<2, 3, 0, 57, 2> +Forward::_table_ = { { - PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(Forward, _impl_._has_bits_), 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask + 3, 24, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap + 4294967288, // skipmap offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - Fixtures_class_data_.base(), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + Forward_class_data_.base(), nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::modlock::host_app::control::Fixtures>(), // to_prefetch + ::_pbi::TcParser::GetTable<::modlock::host_app::control::Forward>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // repeated .modlock.host_app.control.Fixture fixtures = 1; - {::_pbi::TcParser::FastMtR1, + {::_pbi::TcParser::MiniParse, {}}, + // string mod = 1; + {::_pbi::TcParser::FastUS1, {10, 0, 0, - PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_)}}, + PROTOBUF_FIELD_OFFSET(Forward, _impl_.mod_)}}, + // string service = 2; + {::_pbi::TcParser::FastUS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(Forward, _impl_.service_)}}, + // string target = 3; + {::_pbi::TcParser::FastUS1, + {26, 2, 0, + PROTOBUF_FIELD_OFFSET(Forward, _impl_.target_)}}, }}, {{ 65535, 65535 }}, {{ - // repeated .modlock.host_app.control.Fixture fixtures = 1; - {PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::modlock::host_app::control::Fixture>()}, + // string mod = 1; + {PROTOBUF_FIELD_OFFSET(Forward, _impl_.mod_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string service = 2; + {PROTOBUF_FIELD_OFFSET(Forward, _impl_.service_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string target = 3; + {PROTOBUF_FIELD_OFFSET(Forward, _impl_.target_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, }}, + // no aux_entries {{ + "\40\3\7\6\0\0\0\0" + "modlock.host_app.control.Forward" + "mod" + "service" + "target" }}, }; -PROTOBUF_NOINLINE void Fixtures::Clear() { -// @@protoc_insertion_point(message_clear_start:modlock.host_app.control.Fixtures) +PROTOBUF_NOINLINE void Forward::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.host_app.control.Forward) ::google::protobuf::internal::TSanWrite(&_impl_); ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; - if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { - _impl_.fixtures_.Clear(); + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.mod_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.service_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.target_.ClearNonDefaultToEmpty(); + } } _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } #if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL Fixtures::_InternalSerialize( +::uint8_t* PROTOBUF_NONNULL Forward::_InternalSerialize( const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const Fixtures& this_ = static_cast(base); + const Forward& this_ = static_cast(base); #else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL Fixtures::_InternalSerialize( +::uint8_t* PROTOBUF_NONNULL Forward::_InternalSerialize( ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const Fixtures& this_ = *this; + const Forward& this_ = *this; #endif // PROTOBUF_CUSTOM_VTABLE if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); } - // @@protoc_insertion_point(serialize_to_array_start:modlock.host_app.control.Fixtures) + // @@protoc_insertion_point(serialize_to_array_start:modlock.host_app.control.Forward) ::uint32_t cached_has_bits = 0; (void)cached_has_bits; cached_has_bits = this_._impl_._has_bits_[0]; - // repeated .modlock.host_app.control.Fixture fixtures = 1; + // string mod = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_mod().empty()) { + const ::std::string& _s = this_._internal_mod(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.Forward.mod"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // string service = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_service().empty()) { + const ::std::string& _s = this_._internal_service(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.Forward.service"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + // string target = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_target().empty()) { + const ::std::string& _s = this_._internal_target(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.Forward.target"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.host_app.control.Forward) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t Forward::ByteSizeLong(const MessageLite& base) { + const Forward& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t Forward::ByteSizeLong() const { + const Forward& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.host_app.control.Forward) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // string mod = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_mod().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_mod()); + } + } + // string service = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_service().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_service()); + } + } + // string target = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_target().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_target()); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void Forward::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.host_app.control.Forward) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_mod().empty()) { + _this->_internal_set_mod(from._internal_mod()); + } else { + if (_this->_impl_.mod_.IsDefault()) { + _this->_internal_set_mod(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_service().empty()) { + _this->_internal_set_service(from._internal_service()); + } else { + if (_this->_impl_.service_.IsDefault()) { + _this->_internal_set_service(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_target().empty()) { + _this->_internal_set_target(from._internal_target()); + } else { + if (_this->_impl_.target_.IsDefault()) { + _this->_internal_set_target(""); + } + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void Forward::CopyFrom(const Forward& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.host_app.control.Forward) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Forward::InternalSwap(Forward* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.mod_, &other->_impl_.mod_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.service_, &other->_impl_.service_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.target_, &other->_impl_.target_, arena); +} + +::google::protobuf::Metadata Forward::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Fixtures::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._has_bits_); +}; + +Fixtures::Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, Fixtures_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.host_app.control.Fixtures) +} +PROTOBUF_NDEBUG_INLINE Fixtures::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::modlock::host_app::control::Fixtures& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + fixtures_{visibility, arena, from.fixtures_}, + forwards_{visibility, arena, from.forwards_} {} + +Fixtures::Fixtures( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const Fixtures& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, Fixtures_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + Fixtures* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.Fixtures) +} +PROTOBUF_NDEBUG_INLINE Fixtures::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + fixtures_{visibility, arena}, + forwards_{visibility, arena} {} + +inline void Fixtures::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Fixtures::~Fixtures() { + // @@protoc_insertion_point(destructor:modlock.host_app.control.Fixtures) + SharedDtor(*this); +} +inline void Fixtures::SharedDtor(MessageLite& self) { + Fixtures& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL Fixtures::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) Fixtures(arena); +} +constexpr auto Fixtures::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_) + + decltype(Fixtures::_impl_.fixtures_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.forwards_) + + decltype(Fixtures::_impl_.forwards_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(Fixtures), alignof(Fixtures), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&Fixtures::PlacementNew_, + sizeof(Fixtures), + alignof(Fixtures)); + } +} +constexpr auto Fixtures::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_Fixtures_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &Fixtures::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &Fixtures::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &Fixtures::ByteSizeLong, + &Fixtures::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._cached_size_), + false, + }, + &Fixtures::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull Fixtures_class_data_ = + Fixtures::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +Fixtures::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&Fixtures_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(Fixtures_class_data_.tc_table); + return Fixtures_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +Fixtures::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + Fixtures_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::host_app::control::Fixtures>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .modlock.host_app.control.Forward forwards = 2; + {::_pbi::TcParser::FastMtR1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.forwards_)}}, + // repeated .modlock.host_app.control.Fixture fixtures = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .modlock.host_app.control.Fixture fixtures = 1; + {PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.fixtures_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .modlock.host_app.control.Forward forwards = 2; + {PROTOBUF_FIELD_OFFSET(Fixtures, _impl_.forwards_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::modlock::host_app::control::Fixture>()}, + {::_pbi::TcParser::GetTable<::modlock::host_app::control::Forward>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void Fixtures::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.host_app.control.Fixtures) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.fixtures_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.forwards_.Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL Fixtures::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const Fixtures& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL Fixtures::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const Fixtures& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.host_app.control.Fixtures) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .modlock.host_app.control.Fixture fixtures = 1; if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { for (unsigned i = 0, n = static_cast( this_._internal_fixtures_size()); @@ -7478,23 +8104,794 @@ ::uint8_t* PROTOBUF_NONNULL Fixtures::_InternalSerialize( } } + // repeated .modlock.host_app.control.Forward forwards = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_forwards_size()); + i < n; i++) { + const auto& repfield = this_._internal_forwards().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.host_app.control.Fixtures) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t Fixtures::ByteSizeLong(const MessageLite& base) { + const Fixtures& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t Fixtures::ByteSizeLong() const { + const Fixtures& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.host_app.control.Fixtures) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .modlock.host_app.control.Fixture fixtures = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_fixtures_size(); + for (const auto& msg : this_._internal_fixtures()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .modlock.host_app.control.Forward forwards = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_forwards_size(); + for (const auto& msg : this_._internal_forwards()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void Fixtures::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.host_app.control.Fixtures) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_fixtures()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_fixtures()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_forwards()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_forwards()); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void Fixtures::CopyFrom(const Fixtures& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.host_app.control.Fixtures) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Fixtures::InternalSwap(Fixtures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.fixtures_.InternalSwap(&other->_impl_.fixtures_); + _impl_.forwards_.InternalSwap(&other->_impl_.forwards_); +} + +::google::protobuf::Metadata Fixtures::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class ServiceCall::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_._has_bits_); +}; + +ServiceCall::ServiceCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServiceCall_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.host_app.control.ServiceCall) +} +PROTOBUF_NDEBUG_INLINE ServiceCall::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::modlock::host_app::control::ServiceCall& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + mod_(arena, from.mod_), + service_(arena, from.service_), + method_(arena, from.method_), + payload_(arena, from.payload_) {} + +ServiceCall::ServiceCall( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const ServiceCall& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServiceCall_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ServiceCall* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.id_ = from._impl_.id_; + + // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.ServiceCall) +} +PROTOBUF_NDEBUG_INLINE ServiceCall::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + mod_(arena), + service_(arena), + method_(arena), + payload_(arena) {} + +inline void ServiceCall::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.id_ = {}; +} +ServiceCall::~ServiceCall() { + // @@protoc_insertion_point(destructor:modlock.host_app.control.ServiceCall) + SharedDtor(*this); +} +inline void ServiceCall::SharedDtor(MessageLite& self) { + ServiceCall& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.mod_.Destroy(); + this_._impl_.service_.Destroy(); + this_._impl_.method_.Destroy(); + this_._impl_.payload_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL ServiceCall::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ServiceCall(arena); +} +constexpr auto ServiceCall::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ServiceCall), + alignof(ServiceCall)); +} +constexpr auto ServiceCall::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_ServiceCall_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ServiceCall::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ServiceCall::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &ServiceCall::ByteSizeLong, + &ServiceCall::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_._cached_size_), + false, + }, + &ServiceCall::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull ServiceCall_class_data_ = + ServiceCall::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ServiceCall::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&ServiceCall_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(ServiceCall_class_data_.tc_table); + return ServiceCall_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 0, 61, 2> +ServiceCall::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ServiceCall_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::host_app::control::ServiceCall>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(ServiceCall, _impl_.id_), 4>(), + {8, 4, 0, + PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.id_)}}, + // string mod = 2; + {::_pbi::TcParser::FastUS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.mod_)}}, + // string service = 3; + {::_pbi::TcParser::FastUS1, + {26, 1, 0, + PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.service_)}}, + // string method = 4; + {::_pbi::TcParser::FastUS1, + {34, 2, 0, + PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.method_)}}, + // bytes payload = 5; + {::_pbi::TcParser::FastBS1, + {42, 3, 0, + PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.payload_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.id_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // string mod = 2; + {PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.mod_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string service = 3; + {PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.service_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string method = 4; + {PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.method_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes payload = 5; + {PROTOBUF_FIELD_OFFSET(ServiceCall, _impl_.payload_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\44\0\3\7\6\0\0\0" + "modlock.host_app.control.ServiceCall" + "mod" + "service" + "method" + }}, +}; +PROTOBUF_NOINLINE void ServiceCall::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.host_app.control.ServiceCall) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.mod_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.service_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.method_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + _impl_.payload_.ClearNonDefaultToEmpty(); + } + } + _impl_.id_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL ServiceCall::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const ServiceCall& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL ServiceCall::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const ServiceCall& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.host_app.control.ServiceCall) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 id = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_id(), target); + } + } + + // string mod = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_mod().empty()) { + const ::std::string& _s = this_._internal_mod(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.ServiceCall.mod"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + // string service = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_service().empty()) { + const ::std::string& _s = this_._internal_service(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.ServiceCall.service"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + } + + // string method = 4; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_method().empty()) { + const ::std::string& _s = this_._internal_method(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.ServiceCall.method"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + } + + // bytes payload = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_payload().empty()) { + const ::std::string& _s = this_._internal_payload(); + target = stream->WriteBytesMaybeAliased(5, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:modlock.host_app.control.ServiceCall) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t ServiceCall::ByteSizeLong(const MessageLite& base) { + const ServiceCall& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t ServiceCall::ByteSizeLong() const { + const ServiceCall& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:modlock.host_app.control.ServiceCall) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // string mod = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_mod().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_mod()); + } + } + // string service = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_service().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_service()); + } + } + // string method = 4; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_method().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_method()); + } + } + // bytes payload = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_payload().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_payload()); + } + } + // uint64 id = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_id()); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void ServiceCall::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.host_app.control.ServiceCall) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_mod().empty()) { + _this->_internal_set_mod(from._internal_mod()); + } else { + if (_this->_impl_.mod_.IsDefault()) { + _this->_internal_set_mod(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_service().empty()) { + _this->_internal_set_service(from._internal_service()); + } else { + if (_this->_impl_.service_.IsDefault()) { + _this->_internal_set_service(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_method().empty()) { + _this->_internal_set_method(from._internal_method()); + } else { + if (_this->_impl_.method_.IsDefault()) { + _this->_internal_set_method(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!from._internal_payload().empty()) { + _this->_internal_set_payload(from._internal_payload()); + } else { + if (_this->_impl_.payload_.IsDefault()) { + _this->_internal_set_payload(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_id() != 0) { + _this->_impl_.id_ = from._impl_.id_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void ServiceCall::CopyFrom(const ServiceCall& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.host_app.control.ServiceCall) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ServiceCall::InternalSwap(ServiceCall* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.mod_, &other->_impl_.mod_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.service_, &other->_impl_.service_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.method_, &other->_impl_.method_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.payload_, &other->_impl_.payload_, arena); + swap(_impl_.id_, other->_impl_.id_); +} + +::google::protobuf::Metadata ServiceCall::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class ServiceAnswer::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_._has_bits_); +}; + +ServiceAnswer::ServiceAnswer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServiceAnswer_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:modlock.host_app.control.ServiceAnswer) +} +PROTOBUF_NDEBUG_INLINE ServiceAnswer::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::modlock::host_app::control::ServiceAnswer& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + payload_(arena, from.payload_), + error_(arena, from.error_) {} + +ServiceAnswer::ServiceAnswer( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const ServiceAnswer& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServiceAnswer_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ServiceAnswer* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.id_ = from._impl_.id_; + + // @@protoc_insertion_point(copy_constructor:modlock.host_app.control.ServiceAnswer) +} +PROTOBUF_NDEBUG_INLINE ServiceAnswer::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + payload_(arena), + error_(arena) {} + +inline void ServiceAnswer::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.id_ = {}; +} +ServiceAnswer::~ServiceAnswer() { + // @@protoc_insertion_point(destructor:modlock.host_app.control.ServiceAnswer) + SharedDtor(*this); +} +inline void ServiceAnswer::SharedDtor(MessageLite& self) { + ServiceAnswer& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.payload_.Destroy(); + this_._impl_.error_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL ServiceAnswer::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ServiceAnswer(arena); +} +constexpr auto ServiceAnswer::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ServiceAnswer), + alignof(ServiceAnswer)); +} +constexpr auto ServiceAnswer::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_ServiceAnswer_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ServiceAnswer::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ServiceAnswer::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &ServiceAnswer::ByteSizeLong, + &ServiceAnswer::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_._cached_size_), + false, + }, + &ServiceAnswer::kDescriptorMethods, + &descriptor_table_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull ServiceAnswer_class_data_ = + ServiceAnswer::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ServiceAnswer::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&ServiceAnswer_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(ServiceAnswer_class_data_.tc_table); + return ServiceAnswer_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 0, 52, 2> +ServiceAnswer::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ServiceAnswer_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::modlock::host_app::control::ServiceAnswer>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(ServiceAnswer, _impl_.id_), 2>(), + {8, 2, 0, + PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_.id_)}}, + // bytes payload = 2; + {::_pbi::TcParser::FastBS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_.payload_)}}, + // string error = 3; + {::_pbi::TcParser::FastUS1, + {26, 1, 0, + PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_.error_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_.id_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // bytes payload = 2; + {PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_.payload_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // string error = 3; + {PROTOBUF_FIELD_OFFSET(ServiceAnswer, _impl_.error_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\46\0\0\5\0\0\0\0" + "modlock.host_app.control.ServiceAnswer" + "error" + }}, +}; +PROTOBUF_NOINLINE void ServiceAnswer::Clear() { +// @@protoc_insertion_point(message_clear_start:modlock.host_app.control.ServiceAnswer) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.payload_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.error_.ClearNonDefaultToEmpty(); + } + } + _impl_.id_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL ServiceAnswer::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const ServiceAnswer& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL ServiceAnswer::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const ServiceAnswer& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:modlock.host_app.control.ServiceAnswer) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 id = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_id(), target); + } + } + + // bytes payload = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_payload().empty()) { + const ::std::string& _s = this_._internal_payload(); + target = stream->WriteBytesMaybeAliased(2, _s, target); + } + } + + // string error = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_error().empty()) { + const ::std::string& _s = this_._internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "modlock.host_app.control.ServiceAnswer.error"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:modlock.host_app.control.Fixtures) + // @@protoc_insertion_point(serialize_to_array_end:modlock.host_app.control.ServiceAnswer) return target; } #if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t Fixtures::ByteSizeLong(const MessageLite& base) { - const Fixtures& this_ = static_cast(base); +::size_t ServiceAnswer::ByteSizeLong(const MessageLite& base) { + const ServiceAnswer& this_ = static_cast(base); #else // PROTOBUF_CUSTOM_VTABLE -::size_t Fixtures::ByteSizeLong() const { - const Fixtures& this_ = *this; +::size_t ServiceAnswer::ByteSizeLong() const { + const ServiceAnswer& this_ = *this; #endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:modlock.host_app.control.Fixtures) + // @@protoc_insertion_point(message_byte_size_start:modlock.host_app.control.ServiceAnswer) ::size_t total_size = 0; ::uint32_t cached_has_bits = 0; @@ -7502,13 +8899,27 @@ ::size_t Fixtures::ByteSizeLong() const { (void)cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated .modlock.host_app.control.Fixture fixtures = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { - total_size += 1UL * this_._internal_fixtures_size(); - for (const auto& msg : this_._internal_fixtures()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // bytes payload = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_payload().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_payload()); + } + } + // string error = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_error().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_error()); + } + } + // uint64 id = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_id()); } } } @@ -7516,47 +8927,70 @@ ::size_t Fixtures::ByteSizeLong() const { &this_._impl_._cached_size_); } -void Fixtures::MergeImpl(::google::protobuf::MessageLite& to_msg, +void ServiceAnswer::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = - static_cast(&to_msg); - auto& from = static_cast(from_msg); + static_cast(&to_msg); + auto& from = static_cast(from_msg); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { from.CheckHasBitConsistency(); } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:modlock.host_app.control.Fixtures) + // @@protoc_insertion_point(class_specific_merge_from_start:modlock.host_app.control.ServiceAnswer) ABSL_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void)cached_has_bits; cached_has_bits = from._impl_._has_bits_[0]; - if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { - _this->_internal_mutable_fixtures()->InternalMergeFromWithArena( - ::google::protobuf::MessageLite::internal_visibility(), arena, - from._internal_fixtures()); + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_payload().empty()) { + _this->_internal_set_payload(from._internal_payload()); + } else { + if (_this->_impl_.payload_.IsDefault()) { + _this->_internal_set_payload(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_error().empty()) { + _this->_internal_set_error(from._internal_error()); + } else { + if (_this->_impl_.error_.IsDefault()) { + _this->_internal_set_error(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_id() != 0) { + _this->_impl_.id_ = from._impl_.id_; + } + } } _this->_impl_._has_bits_[0] |= cached_has_bits; _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); } -void Fixtures::CopyFrom(const Fixtures& from) { - // @@protoc_insertion_point(class_specific_copy_from_start:modlock.host_app.control.Fixtures) +void ServiceAnswer::CopyFrom(const ServiceAnswer& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:modlock.host_app.control.ServiceAnswer) if (&from == this) return; Clear(); MergeFrom(from); } -void Fixtures::InternalSwap(Fixtures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void ServiceAnswer::InternalSwap(ServiceAnswer* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.fixtures_.InternalSwap(&other->_impl_.fixtures_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.payload_, &other->_impl_.payload_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); + swap(_impl_.id_, other->_impl_.id_); } -::google::protobuf::Metadata Fixtures::GetMetadata() const { +::google::protobuf::Metadata ServiceAnswer::GetMetadata() const { return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); } // @@protoc_insertion_point(namespace_scope) diff --git a/src/host_app/control/control.pb.go b/src/host_app/control/control.pb.go index 7e3beda9..bc440527 100644 --- a/src/host_app/control/control.pb.go +++ b/src/host_app/control/control.pb.go @@ -66,6 +66,7 @@ type ControlRequest struct { // *ControlRequest_Reload // *ControlRequest_Roles // *ControlRequest_Service + // *ControlRequest_Answer Body isControlRequest_Body `protobuf_oneof:"body"` } @@ -103,6 +104,13 @@ func (x *ControlRequest) GetService() *ServiceReply { return nil } +func (x *ControlRequest) GetAnswer() *ServiceAnswer { + if x, ok := x.GetBody().(*ControlRequest_Answer); ok { + return x.Answer + } + return nil +} + type isControlRequest_Body interface { isControlRequest_Body() } @@ -122,12 +130,19 @@ type ControlRequest_Service struct { Service *ServiceReply `protobuf:"bytes,3,opt,name=service,proto3,oneof"` } +type ControlRequest_Answer struct { + // Answer ends one ServiceCall the host forwarded. + Answer *ServiceAnswer `protobuf:"bytes,4,opt,name=answer,proto3,oneof"` +} + func (*ControlRequest_Reload) isControlRequest_Body() {} func (*ControlRequest_Roles) isControlRequest_Body() {} func (*ControlRequest_Service) isControlRequest_Body() {} +func (*ControlRequest_Answer) isControlRequest_Body() {} + // ReloadRequest replaces one mod in place. The mod keeps its place among the // host's plugins; its old instance stops and the new build starts. type ReloadRequest struct { @@ -168,6 +183,7 @@ type HostEvent struct { // *HostEvent_Calls // *HostEvent_SlowFrame // *HostEvent_ServiceApplied + // *HostEvent_ServiceCall Body isHostEvent_Body `protobuf_oneof:"body"` } @@ -268,6 +284,13 @@ func (x *HostEvent) GetServiceApplied() *ServiceResult { return nil } +func (x *HostEvent) GetServiceCall() *ServiceCall { + if x, ok := x.GetBody().(*HostEvent_ServiceCall); ok { + return x.ServiceCall + } + return nil +} + type isHostEvent_Body interface { isHostEvent_Body() } @@ -337,6 +360,12 @@ type HostEvent_ServiceApplied struct { ServiceApplied *ServiceResult `protobuf:"bytes,12,opt,name=service_applied,json=serviceApplied,proto3,oneof"` } +type HostEvent_ServiceCall struct { + // ServiceCall asks the controller to answer a mod's started call to a + // service the fixtures forward; an Answer with its id ends it. + ServiceCall *ServiceCall `protobuf:"bytes,13,opt,name=service_call,json=serviceCall,proto3,oneof"` +} + func (*HostEvent_Started) isHostEvent_Body() {} func (*HostEvent_Log) isHostEvent_Body() {} @@ -361,6 +390,8 @@ func (*HostEvent_SlowFrame) isHostEvent_Body() {} func (*HostEvent_ServiceApplied) isHostEvent_Body() {} +func (*HostEvent_ServiceCall) isHostEvent_Body() {} + // PlayerChat is a line a player said in chat, to everyone or to their team. type PlayerChat struct { unknownFields []byte @@ -869,11 +900,51 @@ func (x *Fixture) GetSource() string { return "" } +// Forward hands one mod's started calls of a service to the controller over +// the control link, in place of a fixture. +type Forward struct { + unknownFields []byte + // Mod is the slug of the mod whose calls go to the controller. + Mod string `protobuf:"bytes,1,opt,name=mod,proto3" json:"mod,omitempty"` + // Service names the service forwarded. + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + // Target names where the controller sends the calls, for the host's log. + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` +} + +func (x *Forward) Reset() { + *x = Forward{} +} + +func (*Forward) ProtoMessage() {} + +func (x *Forward) GetMod() string { + if x != nil { + return x.Mod + } + return "" +} + +func (x *Forward) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *Forward) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + // Fixtures is the file --fixtures names: every fixture reply of the mods the -// host loads. +// host loads, and the services the controller answers instead. type Fixtures struct { unknownFields []byte Fixtures []*Fixture `protobuf:"bytes,1,rep,name=fixtures,proto3" json:"fixtures,omitempty"` + Forwards []*Forward `protobuf:"bytes,2,rep,name=forwards,proto3" json:"forwards,omitempty"` } func (x *Fixtures) Reset() { @@ -889,6 +960,107 @@ func (x *Fixtures) GetFixtures() []*Fixture { return nil } +func (x *Fixtures) GetForwards() []*Forward { + if x != nil { + return x.Forwards + } + return nil +} + +// ServiceCall is one started call of a forwarded service, for the controller +// to answer. +type ServiceCall struct { + unknownFields []byte + // Id names the call in the Answer that ends it. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Mod is the slug of the calling mod. + Mod string `protobuf:"bytes,2,opt,name=mod,proto3" json:"mod,omitempty"` + // Service and Method select the call. + Service string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"` + Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"` + // Payload is the call's bytes, opaque to Modlock. + Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *ServiceCall) Reset() { + *x = ServiceCall{} +} + +func (*ServiceCall) ProtoMessage() {} + +func (x *ServiceCall) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ServiceCall) GetMod() string { + if x != nil { + return x.Mod + } + return "" +} + +func (x *ServiceCall) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *ServiceCall) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *ServiceCall) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// ServiceAnswer ends one forwarded ServiceCall with its reply or an error. +type ServiceAnswer struct { + unknownFields []byte + // Id matches the ServiceCall it ends. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Payload is the reply's bytes when Error is empty. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + // Error, when set, fails the call with this text. + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *ServiceAnswer) Reset() { + *x = ServiceAnswer{} +} + +func (*ServiceAnswer) ProtoMessage() {} + +func (x *ServiceAnswer) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ServiceAnswer) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *ServiceAnswer) GetError() string { + if x != nil { + return x.Error + } + return "" +} + func (m *ControlRequest) CloneVT() *ControlRequest { if m == nil { return (*ControlRequest)(nil) @@ -946,6 +1118,19 @@ func (m *ControlRequest_Service) CloneOneofVT() isControlRequest_Body { return m.CloneVT() } +func (m *ControlRequest_Answer) CloneVT() *ControlRequest_Answer { + if m == nil { + return (*ControlRequest_Answer)(nil) + } + r := new(ControlRequest_Answer) + r.Answer = protobuf_go_lite.CloneVTValue(m.Answer) + return r +} + +func (m *ControlRequest_Answer) CloneOneofVT() isControlRequest_Body { + return m.CloneVT() +} + func (m *ReloadRequest) CloneVT() *ReloadRequest { if m == nil { return (*ReloadRequest)(nil) @@ -1136,6 +1321,19 @@ func (m *HostEvent_ServiceApplied) CloneOneofVT() isHostEvent_Body { return m.CloneVT() } +func (m *HostEvent_ServiceCall) CloneVT() *HostEvent_ServiceCall { + if m == nil { + return (*HostEvent_ServiceCall)(nil) + } + r := new(HostEvent_ServiceCall) + r.ServiceCall = protobuf_go_lite.CloneVTValue(m.ServiceCall) + return r +} + +func (m *HostEvent_ServiceCall) CloneOneofVT() isHostEvent_Body { + return m.CloneVT() +} + func (m *PlayerChat) CloneVT() *PlayerChat { if m == nil { return (*PlayerChat)(nil) @@ -1385,12 +1583,31 @@ func (m *Fixture) CloneMessageVT() protobuf_go_lite.CloneMessage { return m.CloneVT() } +func (m *Forward) CloneVT() *Forward { + if m == nil { + return (*Forward)(nil) + } + r := new(Forward) + r.Mod = m.Mod + r.Service = m.Service + r.Target = m.Target + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *Forward) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + func (m *Fixtures) CloneVT() *Fixtures { if m == nil { return (*Fixtures)(nil) } r := new(Fixtures) r.Fixtures = protobuf_go_lite.CloneVTSlice(m.Fixtures) + r.Forwards = protobuf_go_lite.CloneVTSlice(m.Forwards) if len(m.unknownFields) > 0 { r.unknownFields = slices.Clone(m.unknownFields) } @@ -1401,6 +1618,44 @@ func (m *Fixtures) CloneMessageVT() protobuf_go_lite.CloneMessage { return m.CloneVT() } +func (m *ServiceCall) CloneVT() *ServiceCall { + if m == nil { + return (*ServiceCall)(nil) + } + r := new(ServiceCall) + r.Id = m.Id + r.Mod = m.Mod + r.Service = m.Service + r.Method = m.Method + r.Payload = protobuf_go_lite.CloneBytes(m.Payload) + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *ServiceCall) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + +func (m *ServiceAnswer) CloneVT() *ServiceAnswer { + if m == nil { + return (*ServiceAnswer)(nil) + } + r := new(ServiceAnswer) + r.Id = m.Id + r.Error = m.Error + r.Payload = protobuf_go_lite.CloneBytes(m.Payload) + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *ServiceAnswer) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + func (this *ControlRequest) EqualVT(that *ControlRequest) bool { if this == that { return true @@ -1481,6 +1736,23 @@ func (this *ControlRequest_Service) EqualVT(thatIface isControlRequest_Body) boo return true } +func (this *ControlRequest_Answer) EqualVT(thatIface isControlRequest_Body) bool { + that, ok := thatIface.(*ControlRequest_Answer) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if !protobuf_go_lite.EqualVTImplicit(this.Answer, that.Answer, func() *ServiceAnswer { return &ServiceAnswer{} }) { + return false + } + return true +} + func (this *ReloadRequest) EqualVT(that *ReloadRequest) bool { if this == that { return true @@ -1732,6 +2004,23 @@ func (this *HostEvent_ServiceApplied) EqualVT(thatIface isHostEvent_Body) bool { return true } +func (this *HostEvent_ServiceCall) EqualVT(thatIface isHostEvent_Body) bool { + that, ok := thatIface.(*HostEvent_ServiceCall) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if !protobuf_go_lite.EqualVTImplicit(this.ServiceCall, that.ServiceCall, func() *ServiceCall { return &ServiceCall{} }) { + return false + } + return true +} + func (this *PlayerChat) EqualVT(that *PlayerChat) bool { if this == that { return true @@ -2087,6 +2376,32 @@ func (this *Fixture) EqualMessageVT(thatMsg any) bool { return this.EqualVT(that) } +func (this *Forward) EqualVT(that *Forward) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Mod != that.Mod { + return false + } + if this.Service != that.Service { + return false + } + if this.Target != that.Target { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Forward) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*Forward) + if !ok { + return false + } + return this.EqualVT(that) +} + func (this *Fixtures) EqualVT(that *Fixtures) bool { if this == that { return true @@ -2096,6 +2411,9 @@ func (this *Fixtures) EqualVT(that *Fixtures) bool { if !protobuf_go_lite.EqualVTSliceImplicit(this.Fixtures, that.Fixtures, func() *Fixture { return &Fixture{} }) { return false } + if !protobuf_go_lite.EqualVTSliceImplicit(this.Forwards, that.Forwards, func() *Forward { return &Forward{} }) { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -2107,26 +2425,84 @@ func (this *Fixtures) EqualMessageVT(thatMsg any) bool { return this.EqualVT(that) } -// MarshalProtoJSON marshals the MessageKind to JSON. -func (x MessageKind) MarshalProtoJSON(s *json.MarshalState) { - s.WriteEnum(int32(x), MessageKind_name) -} - -// MarshalText marshals the MessageKind to text. -func (x MessageKind) MarshalText() ([]byte, error) { - return []byte(json.GetEnumString(int32(x), MessageKind_name)), nil +func (this *ServiceCall) EqualVT(that *ServiceCall) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Id != that.Id { + return false + } + if this.Mod != that.Mod { + return false + } + if this.Service != that.Service { + return false + } + if this.Method != that.Method { + return false + } + if !protobuf_go_lite.EqualBytes(this.Payload, that.Payload) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) } -// MarshalJSON marshals the MessageKind to JSON. -func (x MessageKind) MarshalJSON() ([]byte, error) { - return json.DefaultMarshalerConfig.Marshal(x) +func (this *ServiceCall) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*ServiceCall) + if !ok { + return false + } + return this.EqualVT(that) } -// UnmarshalProtoJSON unmarshals the MessageKind from JSON. -func (x *MessageKind) UnmarshalProtoJSON(s *json.UnmarshalState) { - v := s.ReadEnum(MessageKind_value) - if err := s.Err(); err != nil { - s.SetErrorf("could not read MessageKind enum: %v", err) +func (this *ServiceAnswer) EqualVT(that *ServiceAnswer) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Id != that.Id { + return false + } + if !protobuf_go_lite.EqualBytes(this.Payload, that.Payload) { + return false + } + if this.Error != that.Error { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ServiceAnswer) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*ServiceAnswer) + if !ok { + return false + } + return this.EqualVT(that) +} + +// MarshalProtoJSON marshals the MessageKind to JSON. +func (x MessageKind) MarshalProtoJSON(s *json.MarshalState) { + s.WriteEnum(int32(x), MessageKind_name) +} + +// MarshalText marshals the MessageKind to text. +func (x MessageKind) MarshalText() ([]byte, error) { + return []byte(json.GetEnumString(int32(x), MessageKind_name)), nil +} + +// MarshalJSON marshals the MessageKind to JSON. +func (x MessageKind) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the MessageKind from JSON. +func (x *MessageKind) UnmarshalProtoJSON(s *json.UnmarshalState) { + v := s.ReadEnum(MessageKind_value) + if err := s.Err(); err != nil { + s.SetErrorf("could not read MessageKind enum: %v", err) return } *x = MessageKind(v) @@ -2169,6 +2545,10 @@ func (x *ControlRequest) MarshalProtoJSON(s *json.MarshalState) { s.WriteMoreIf(&wroteField) s.WriteObjectField("service") ov.Service.MarshalProtoJSON(s.WithField("service")) + case *ControlRequest_Answer: + s.WriteMoreIf(&wroteField) + s.WriteObjectField("answer") + ov.Answer.MarshalProtoJSON(s.WithField("answer")) } } s.WriteObjectEnd() @@ -2215,6 +2595,15 @@ func (x *ControlRequest) UnmarshalProtoJSON(s *json.UnmarshalState) { } ov.Service = &ServiceReply{} ov.Service.UnmarshalProtoJSON(s.WithField("service", true)) + case "answer": + ov := &ControlRequest_Answer{} + x.Body = ov + if s.ReadNil() { + ov.Answer = nil + return + } + ov.Answer = &ServiceAnswer{} + ov.Answer.UnmarshalProtoJSON(s.WithField("answer", true)) } }) } @@ -2324,6 +2713,10 @@ func (x *HostEvent) MarshalProtoJSON(s *json.MarshalState) { s.WriteMoreIf(&wroteField) s.WriteObjectField("serviceApplied") ov.ServiceApplied.MarshalProtoJSON(s.WithField("serviceApplied")) + case *HostEvent_ServiceCall: + s.WriteMoreIf(&wroteField) + s.WriteObjectField("serviceCall") + ov.ServiceCall.MarshalProtoJSON(s.WithField("serviceCall")) } } s.WriteObjectEnd() @@ -2451,6 +2844,15 @@ func (x *HostEvent) UnmarshalProtoJSON(s *json.UnmarshalState) { } ov.ServiceApplied = &ServiceResult{} ov.ServiceApplied.UnmarshalProtoJSON(s.WithField("service_applied", true)) + case "service_call", "serviceCall": + ov := &HostEvent_ServiceCall{} + x.Body = ov + if s.ReadNil() { + ov.ServiceCall = nil + return + } + ov.ServiceCall = &ServiceCall{} + ov.ServiceCall.UnmarshalProtoJSON(s.WithField("service_call", true)) } }) } @@ -3260,6 +3662,64 @@ func (x *Fixture) UnmarshalJSON(b []byte) error { return json.DefaultUnmarshalerConfig.Unmarshal(b, x) } +// MarshalProtoJSON marshals the Forward message to JSON. +func (x *Forward) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Mod != "" || s.HasField("mod") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("mod") + s.WriteString(x.Mod) + } + if x.Service != "" || s.HasField("service") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("service") + s.WriteString(x.Service) + } + if x.Target != "" || s.HasField("target") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("target") + s.WriteString(x.Target) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the Forward to JSON. +func (x *Forward) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the Forward message from JSON. +func (x *Forward) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "mod": + s.AddField("mod") + x.Mod = s.ReadString() + case "service": + s.AddField("service") + x.Service = s.ReadString() + case "target": + s.AddField("target") + x.Target = s.ReadString() + } + }) +} + +// UnmarshalJSON unmarshals the Forward from JSON. +func (x *Forward) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + // MarshalProtoJSON marshals the Fixtures message to JSON. func (x *Fixtures) MarshalProtoJSON(s *json.MarshalState) { if x == nil { @@ -3279,6 +3739,17 @@ func (x *Fixtures) MarshalProtoJSON(s *json.MarshalState) { } s.WriteArrayEnd() } + if len(x.Forwards) > 0 || s.HasField("forwards") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("forwards") + s.WriteArrayStart() + var wroteElement bool + for _, element := range x.Forwards { + s.WriteMoreIf(&wroteElement) + element.MarshalProtoJSON(s.WithField("forwards")) + } + s.WriteArrayEnd() + } s.WriteObjectEnd() } @@ -3314,6 +3785,24 @@ func (x *Fixtures) UnmarshalProtoJSON(s *json.UnmarshalState) { } x.Fixtures = append(x.Fixtures, v) }) + case "forwards": + s.AddField("forwards") + if s.ReadNil() { + x.Forwards = nil + return + } + s.ReadArray(func() { + if s.ReadNil() { + x.Forwards = append(x.Forwards, nil) + return + } + v := &Forward{} + v.UnmarshalProtoJSON(s.WithField("forwards", false)) + if s.Err() != nil { + return + } + x.Forwards = append(x.Forwards, v) + }) } }) } @@ -3323,6 +3812,138 @@ func (x *Fixtures) UnmarshalJSON(b []byte) error { return json.DefaultUnmarshalerConfig.Unmarshal(b, x) } +// MarshalProtoJSON marshals the ServiceCall message to JSON. +func (x *ServiceCall) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Id != 0 || s.HasField("id") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("id") + s.WriteUint64(x.Id) + } + if x.Mod != "" || s.HasField("mod") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("mod") + s.WriteString(x.Mod) + } + if x.Service != "" || s.HasField("service") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("service") + s.WriteString(x.Service) + } + if x.Method != "" || s.HasField("method") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("method") + s.WriteString(x.Method) + } + if len(x.Payload) > 0 || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteBytes(x.Payload) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the ServiceCall to JSON. +func (x *ServiceCall) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the ServiceCall message from JSON. +func (x *ServiceCall) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "id": + s.AddField("id") + x.Id = s.ReadUint64() + case "mod": + s.AddField("mod") + x.Mod = s.ReadString() + case "service": + s.AddField("service") + x.Service = s.ReadString() + case "method": + s.AddField("method") + x.Method = s.ReadString() + case "payload": + s.AddField("payload") + x.Payload = s.ReadBytes() + } + }) +} + +// UnmarshalJSON unmarshals the ServiceCall from JSON. +func (x *ServiceCall) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + +// MarshalProtoJSON marshals the ServiceAnswer message to JSON. +func (x *ServiceAnswer) MarshalProtoJSON(s *json.MarshalState) { + if x == nil { + s.WriteNil() + return + } + s.WriteObjectStart() + var wroteField bool + if x.Id != 0 || s.HasField("id") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("id") + s.WriteUint64(x.Id) + } + if len(x.Payload) > 0 || s.HasField("payload") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("payload") + s.WriteBytes(x.Payload) + } + if x.Error != "" || s.HasField("error") { + s.WriteMoreIf(&wroteField) + s.WriteObjectField("error") + s.WriteString(x.Error) + } + s.WriteObjectEnd() +} + +// MarshalJSON marshals the ServiceAnswer to JSON. +func (x *ServiceAnswer) MarshalJSON() ([]byte, error) { + return json.DefaultMarshalerConfig.Marshal(x) +} + +// UnmarshalProtoJSON unmarshals the ServiceAnswer message from JSON. +func (x *ServiceAnswer) UnmarshalProtoJSON(s *json.UnmarshalState) { + if s.ReadNil() { + return + } + s.ReadObject(func(key string) { + switch key { + default: + s.Skip() // ignore unknown field + case "id": + s.AddField("id") + x.Id = s.ReadUint64() + case "payload": + s.AddField("payload") + x.Payload = s.ReadBytes() + case "error": + s.AddField("error") + x.Error = s.ReadString() + } + }) +} + +// UnmarshalJSON unmarshals the ServiceAnswer from JSON. +func (x *ServiceAnswer) UnmarshalJSON(b []byte) error { + return json.DefaultUnmarshalerConfig.Unmarshal(b, x) +} + func (m *ControlRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -3436,6 +4057,30 @@ func (m *ControlRequest_Service) MarshalToSizedBufferVT(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *ControlRequest_Answer) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ControlRequest_Answer) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Answer != nil { + size, err := m.Answer.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} + func (m *ReloadRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -3802,17 +4447,41 @@ func (m *HostEvent_ServiceApplied) MarshalToSizedBufferVT(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *PlayerChat) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } +func (m *HostEvent_ServiceCall) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *HostEvent_ServiceCall) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ServiceCall != nil { + size, err := m.ServiceCall.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x6a + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x6a + } + return len(dAtA) - i, nil +} + +func (m *PlayerChat) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } func (m *PlayerChat) MarshalToVT(dAtA []byte) (int, error) { @@ -4460,6 +5129,53 @@ func (m *Fixture) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Forward) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Forward) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Forward) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if len(m.Target) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Target) + i-- + dAtA[i] = 0x1a + } + if len(m.Service) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Service) + i-- + dAtA[i] = 0x12 + } + if len(m.Mod) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Mod) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Fixtures) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -4489,6 +5205,18 @@ func (m *Fixtures) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m.unknownFields != nil { i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) } + if len(m.Forwards) > 0 { + for iNdEx := len(m.Forwards) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Forwards[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } if len(m.Fixtures) > 0 { for iNdEx := len(m.Fixtures) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Fixtures[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) @@ -4504,6 +5232,110 @@ func (m *Fixtures) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ServiceCall) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceCall) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ServiceCall) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeBytes(dAtA, i, m.Payload) + i-- + dAtA[i] = 0x2a + } + if len(m.Method) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Method) + i-- + dAtA[i] = 0x22 + } + if len(m.Service) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Service) + i-- + dAtA[i] = 0x1a + } + if len(m.Mod) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Mod) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ServiceAnswer) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceAnswer) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ServiceAnswer) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i = protobuf_go_lite.EncodeRawBytes(dAtA, i, m.unknownFields) + } + if len(m.Error) > 0 { + i = protobuf_go_lite.EncodeString(dAtA, i, m.Error) + i-- + dAtA[i] = 0x1a + } + if len(m.Payload) > 0 { + i = protobuf_go_lite.EncodeBytes(dAtA, i, m.Payload) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *ControlRequest) SizeVT() (n int) { if m == nil { return 0 @@ -4562,6 +5394,21 @@ func (m *ControlRequest_Service) SizeVT() (n int) { return n } +func (m *ControlRequest_Answer) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Answer != nil { + l = m.Answer.SizeVT() + n += protobuf_go_lite.SizeMessage(1, l) + } else { + n += 2 + } + return n +} + func (m *ReloadRequest) SizeVT() (n int) { if m == nil { return 0 @@ -4766,6 +5613,21 @@ func (m *HostEvent_ServiceApplied) SizeVT() (n int) { return n } +func (m *HostEvent_ServiceCall) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ServiceCall != nil { + l = m.ServiceCall.SizeVT() + n += protobuf_go_lite.SizeMessage(1, l) + } else { + n += 2 + } + return n +} + func (m *PlayerChat) SizeVT() (n int) { if m == nil { return 0 @@ -4954,6 +5816,19 @@ func (m *Fixture) SizeVT() (n int) { return n } +func (m *Forward) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Mod) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Service) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Target) + n += len(m.unknownFields) + return n +} + func (m *Fixtures) SizeVT() (n int) { if m == nil { return 0 @@ -4964,6 +5839,38 @@ func (m *Fixtures) SizeVT() (n int) { l = e.SizeVT() n += protobuf_go_lite.SizeMessage(1, l) } + for _, e := range m.Forwards { + l = e.SizeVT() + n += protobuf_go_lite.SizeMessage(1, l) + } + n += len(m.unknownFields) + return n +} + +func (m *ServiceCall) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeVarintNonZero(1, m.Id) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Mod) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Service) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Method) + n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += len(m.unknownFields) + return n +} + +func (m *ServiceAnswer) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += protobuf_go_lite.SizeVarintNonZero(1, m.Id) + n += protobuf_go_lite.SizeBytesNonEmpty(1, m.Payload) + n += protobuf_go_lite.SizeStringNonEmpty(1, m.Error) n += len(m.unknownFields) return n } @@ -4997,6 +5904,13 @@ func (x *ControlRequest) MarshalProtoText() string { } else { protobuf_go_lite.TextWriteTextMarshaler(&sb, body.Service) } + case *ControlRequest_Answer: + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "answer") + if body.Answer == nil { + protobuf_go_lite.TextWriteTextMarshaler(&sb, &ServiceAnswer{}) + } else { + protobuf_go_lite.TextWriteTextMarshaler(&sb, body.Answer) + } } return protobuf_go_lite.TextFinishMessage(&sb) } @@ -5107,6 +6021,13 @@ func (x *HostEvent) MarshalProtoText() string { } else { protobuf_go_lite.TextWriteTextMarshaler(&sb, body.ServiceApplied) } + case *HostEvent_ServiceCall: + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "service_call") + if body.ServiceCall == nil { + protobuf_go_lite.TextWriteTextMarshaler(&sb, &ServiceCall{}) + } else { + protobuf_go_lite.TextWriteTextMarshaler(&sb, body.ServiceCall) + } } return protobuf_go_lite.TextFinishMessage(&sb) } @@ -5411,6 +6332,28 @@ func (x *Fixture) String() string { return x.MarshalProtoText() } +func (x *Forward) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "Forward") + if x.Mod != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "mod") + protobuf_go_lite.TextWriteString(&sb, x.Mod) + } + if x.Service != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "service") + protobuf_go_lite.TextWriteString(&sb, x.Service) + } + if x.Target != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "target") + protobuf_go_lite.TextWriteString(&sb, x.Target) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *Forward) String() string { + return x.MarshalProtoText() +} + func (x *Fixtures) MarshalProtoText() string { var sb protobuf_go_lite.TextBuilder initialLen := protobuf_go_lite.TextStartMessage(&sb, "Fixtures") @@ -5426,13 +6369,77 @@ func (x *Fixtures) MarshalProtoText() string { } protobuf_go_lite.TextWriteListEnd(&sb) } - return protobuf_go_lite.TextFinishMessage(&sb) -} - + if len(x.Forwards) > 0 { + protobuf_go_lite.TextWriteListStart(&sb, initialLen, "forwards") + for i, v := range x.Forwards { + protobuf_go_lite.TextWriteListSeparator(&sb, i) + if v == nil { + protobuf_go_lite.TextWriteTextMarshaler(&sb, &Forward{}) + } else { + protobuf_go_lite.TextWriteTextMarshaler(&sb, v) + } + } + protobuf_go_lite.TextWriteListEnd(&sb) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + func (x *Fixtures) String() string { return x.MarshalProtoText() } +func (x *ServiceCall) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "ServiceCall") + if x.Id != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "id") + protobuf_go_lite.TextWriteUint(&sb, x.Id) + } + if x.Mod != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "mod") + protobuf_go_lite.TextWriteString(&sb, x.Mod) + } + if x.Service != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "service") + protobuf_go_lite.TextWriteString(&sb, x.Service) + } + if x.Method != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "method") + protobuf_go_lite.TextWriteString(&sb, x.Method) + } + if len(x.Payload) != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteBytes(&sb, x.Payload) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *ServiceCall) String() string { + return x.MarshalProtoText() +} + +func (x *ServiceAnswer) MarshalProtoText() string { + var sb protobuf_go_lite.TextBuilder + initialLen := protobuf_go_lite.TextStartMessage(&sb, "ServiceAnswer") + if x.Id != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "id") + protobuf_go_lite.TextWriteUint(&sb, x.Id) + } + if len(x.Payload) != 0 { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "payload") + protobuf_go_lite.TextWriteBytes(&sb, x.Payload) + } + if x.Error != "" { + protobuf_go_lite.TextWriteFieldPrefix(&sb, initialLen, "error") + protobuf_go_lite.TextWriteString(&sb, x.Error) + } + return protobuf_go_lite.TextFinishMessage(&sb) +} + +func (x *ServiceAnswer) String() string { + return x.MarshalProtoText() +} + func (m *ControlRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5513,6 +6520,26 @@ func (m *ControlRequest) UnmarshalVT(dAtA []byte) error { m.Body = &ControlRequest_Service{Service: v} } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Answer", wireType) + } + msgStart, postIndex, err := protobuf_go_lite.DecodeLengthDelimited(dAtA, iNdEx) + if err != nil { + return err + } + if oneof, ok := m.Body.(*ControlRequest_Answer); ok { + if err := oneof.Answer.UnmarshalVT(dAtA[msgStart:postIndex]); err != nil { + return err + } + } else { + v := &ServiceAnswer{} + if err := v.UnmarshalVT(dAtA[msgStart:postIndex]); err != nil { + return err + } + m.Body = &ControlRequest_Answer{Answer: v} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) @@ -5849,6 +6876,26 @@ func (m *HostEvent) UnmarshalVT(dAtA []byte) error { m.Body = &HostEvent_ServiceApplied{ServiceApplied: v} } iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceCall", wireType) + } + msgStart, postIndex, err := protobuf_go_lite.DecodeLengthDelimited(dAtA, iNdEx) + if err != nil { + return err + } + if oneof, ok := m.Body.(*HostEvent_ServiceCall); ok { + if err := oneof.ServiceCall.UnmarshalVT(dAtA[msgStart:postIndex]); err != nil { + return err + } + } else { + v := &ServiceCall{} + if err := v.UnmarshalVT(dAtA[msgStart:postIndex]); err != nil { + return err + } + m.Body = &HostEvent_ServiceCall{ServiceCall: v} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) @@ -6872,6 +7919,79 @@ func (m *Fixture) UnmarshalVT(dAtA []byte) error { return nil } +func (m *Forward) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Forward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Forward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mod", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Mod = v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Service = v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Target = v + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + func (m *Fixtures) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6905,6 +8025,179 @@ func (m *Fixtures) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Forwards", wireType) + } + msgStart, postIndex, err := protobuf_go_lite.DecodeLengthDelimited(dAtA, iNdEx) + if err != nil { + return err + } + m.Forwards = append(m.Forwards, &Forward{}) + if err := m.Forwards[len(m.Forwards)-1].UnmarshalVT(dAtA[msgStart:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *ServiceCall) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceCall: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceCall: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + m.Id, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mod", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Mod = v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Service = v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Method = v + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + m.Payload, iNdEx, err = protobuf_go_lite.DecodeBytesAppend(m.Payload, dAtA, iNdEx) + if err != nil { + return err + } + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *ServiceAnswer) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceAnswer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceAnswer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + m.Id, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + m.Payload, iNdEx, err = protobuf_go_lite.DecodeBytesAppend(m.Payload, dAtA, iNdEx) + if err != nil { + return err + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var v string + v, iNdEx, err = protobuf_go_lite.DecodeString(dAtA, iNdEx) + if err != nil { + return err + } + m.Error = v default: iNdEx = preIndex skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) diff --git a/src/host_app/control/control.pb.h b/src/host_app/control/control.pb.h index fcb0f61a..34541353 100644 --- a/src/host_app/control/control.pb.h +++ b/src/host_app/control/control.pb.h @@ -75,6 +75,10 @@ class Fixtures; struct FixturesDefaultTypeInternal; extern FixturesDefaultTypeInternal _Fixtures_default_instance_; extern const ::google::protobuf::internal::ClassDataFull Fixtures_class_data_; +class Forward; +struct ForwardDefaultTypeInternal; +extern ForwardDefaultTypeInternal _Forward_default_instance_; +extern const ::google::protobuf::internal::ClassDataFull Forward_class_data_; class HostEvent; struct HostEventDefaultTypeInternal; extern HostEventDefaultTypeInternal _HostEvent_default_instance_; @@ -123,6 +127,14 @@ class ServerReady; struct ServerReadyDefaultTypeInternal; extern ServerReadyDefaultTypeInternal _ServerReady_default_instance_; extern const ::google::protobuf::internal::ClassDataFull ServerReady_class_data_; +class ServiceAnswer; +struct ServiceAnswerDefaultTypeInternal; +extern ServiceAnswerDefaultTypeInternal _ServiceAnswer_default_instance_; +extern const ::google::protobuf::internal::ClassDataFull ServiceAnswer_class_data_; +class ServiceCall; +struct ServiceCallDefaultTypeInternal; +extern ServiceCallDefaultTypeInternal _ServiceCall_default_instance_; +extern const ::google::protobuf::internal::ClassDataFull ServiceCall_class_data_; class ServiceReply; struct ServiceReplyDefaultTypeInternal; extern ServiceReplyDefaultTypeInternal _ServiceReply_default_instance_; @@ -684,30 +696,30 @@ class ServiceReply final : public ::google::protobuf::Message extern const ::google::protobuf::internal::ClassDataFull ServiceReply_class_data_; // ------------------------------------------------------------------- -class ServerReady final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ServerReady) */ { +class ServiceCall final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ServiceCall) */ { public: - inline ServerReady() : ServerReady(nullptr) {} - ~ServerReady() PROTOBUF_FINAL; + inline ServiceCall() : ServiceCall(nullptr) {} + ~ServiceCall() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ServerReady* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ServiceCall* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ServerReady)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ServiceCall)); } #endif template - explicit PROTOBUF_CONSTEXPR ServerReady(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ServiceCall(::google::protobuf::internal::ConstantInitialized); - inline ServerReady(const ServerReady& from) : ServerReady(nullptr, from) {} - inline ServerReady(ServerReady&& from) noexcept - : ServerReady(nullptr, ::std::move(from)) {} - inline ServerReady& operator=(const ServerReady& from) { + inline ServiceCall(const ServiceCall& from) : ServiceCall(nullptr, from) {} + inline ServiceCall(ServiceCall&& from) noexcept + : ServiceCall(nullptr, ::std::move(from)) {} + inline ServiceCall& operator=(const ServiceCall& from) { CopyFrom(from); return *this; } - inline ServerReady& operator=(ServerReady&& from) noexcept { + inline ServiceCall& operator=(ServiceCall&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -735,13 +747,13 @@ class ServerReady final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ServerReady& default_instance() { - return *reinterpret_cast( - &_ServerReady_default_instance_); + static const ServiceCall& default_instance() { + return *reinterpret_cast( + &_ServiceCall_default_instance_); } - static constexpr int kIndexInFileMessages = 12; - friend void swap(ServerReady& a, ServerReady& b) { a.Swap(&b); } - inline void Swap(ServerReady* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 19; + friend void swap(ServiceCall& a, ServiceCall& b) { a.Swap(&b); } + inline void Swap(ServiceCall* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -749,7 +761,7 @@ class ServerReady final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ServerReady* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ServiceCall* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -757,13 +769,13 @@ class ServerReady final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ServerReady* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ServiceCall* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ServerReady& from); + void CopyFrom(const ServiceCall& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ServerReady& from) { ServerReady::MergeImpl(*this, from); } + void MergeFrom(const ServiceCall& from) { ServiceCall::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -799,17 +811,17 @@ class ServerReady final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ServerReady* PROTOBUF_NONNULL other); + void InternalSwap(ServiceCall* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ServerReady"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ServiceCall"; } - explicit ServerReady(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ServerReady(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServerReady& from); - ServerReady( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServerReady&& from) noexcept - : ServerReady(arena) { + explicit ServiceCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ServiceCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServiceCall& from); + ServiceCall( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServiceCall&& from) noexcept + : ServiceCall(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -826,29 +838,88 @@ class ServerReady final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kMapFieldNumber = 1, + kModFieldNumber = 2, + kServiceFieldNumber = 3, + kMethodFieldNumber = 4, + kPayloadFieldNumber = 5, + kIdFieldNumber = 1, }; - // string map = 1; - void clear_map() ; - const ::std::string& map() const; + // string mod = 2; + void clear_mod() ; + const ::std::string& mod() const; template - void set_map(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_map(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_map(); - void set_allocated_map(::std::string* PROTOBUF_NULLABLE value); + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); private: - const ::std::string& _internal_map() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_map(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_map(); + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ServerReady) + // string service = 3; + void clear_service() ; + const ::std::string& service() const; + template + void set_service(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_service(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_service(); + void set_allocated_service(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_service() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_service(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_service(); + + public: + // string method = 4; + void clear_method() ; + const ::std::string& method() const; + template + void set_method(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_method(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_method(); + void set_allocated_method(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_method() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_method(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_method(); + + public: + // bytes payload = 5; + void clear_payload() ; + const ::std::string& payload() const; + template + void set_payload(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_payload(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_payload(); + void set_allocated_payload(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_payload() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_payload(); + + public: + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); + + private: + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ServiceCall) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 48, + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 61, 2> _table_; @@ -866,43 +937,47 @@ class ServerReady final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ServerReady& from_msg); + const ServiceCall& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr map_; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::google::protobuf::internal::ArenaStringPtr service_; + ::google::protobuf::internal::ArenaStringPtr method_; + ::google::protobuf::internal::ArenaStringPtr payload_; + ::uint64_t id_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ServerReady_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ServiceCall_class_data_; // ------------------------------------------------------------------- -class ReloadRequest final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ReloadRequest) */ { +class ServiceAnswer final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ServiceAnswer) */ { public: - inline ReloadRequest() : ReloadRequest(nullptr) {} - ~ReloadRequest() PROTOBUF_FINAL; + inline ServiceAnswer() : ServiceAnswer(nullptr) {} + ~ServiceAnswer() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ReloadRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ServiceAnswer* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ReloadRequest)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ServiceAnswer)); } #endif template - explicit PROTOBUF_CONSTEXPR ReloadRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ServiceAnswer(::google::protobuf::internal::ConstantInitialized); - inline ReloadRequest(const ReloadRequest& from) : ReloadRequest(nullptr, from) {} - inline ReloadRequest(ReloadRequest&& from) noexcept - : ReloadRequest(nullptr, ::std::move(from)) {} - inline ReloadRequest& operator=(const ReloadRequest& from) { + inline ServiceAnswer(const ServiceAnswer& from) : ServiceAnswer(nullptr, from) {} + inline ServiceAnswer(ServiceAnswer&& from) noexcept + : ServiceAnswer(nullptr, ::std::move(from)) {} + inline ServiceAnswer& operator=(const ServiceAnswer& from) { CopyFrom(from); return *this; } - inline ReloadRequest& operator=(ReloadRequest&& from) noexcept { + inline ServiceAnswer& operator=(ServiceAnswer&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -930,13 +1005,13 @@ class ReloadRequest final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ReloadRequest& default_instance() { - return *reinterpret_cast( - &_ReloadRequest_default_instance_); + static const ServiceAnswer& default_instance() { + return *reinterpret_cast( + &_ServiceAnswer_default_instance_); } - static constexpr int kIndexInFileMessages = 1; - friend void swap(ReloadRequest& a, ReloadRequest& b) { a.Swap(&b); } - inline void Swap(ReloadRequest* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 20; + friend void swap(ServiceAnswer& a, ServiceAnswer& b) { a.Swap(&b); } + inline void Swap(ServiceAnswer* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -944,7 +1019,7 @@ class ReloadRequest final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ReloadRequest* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ServiceAnswer* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -952,13 +1027,13 @@ class ReloadRequest final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ReloadRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ServiceAnswer* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ReloadRequest& from); + void CopyFrom(const ServiceAnswer& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ReloadRequest& from) { ReloadRequest::MergeImpl(*this, from); } + void MergeFrom(const ServiceAnswer& from) { ServiceAnswer::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -994,17 +1069,17 @@ class ReloadRequest final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ReloadRequest* PROTOBUF_NONNULL other); + void InternalSwap(ServiceAnswer* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ReloadRequest"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ServiceAnswer"; } - explicit ReloadRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ReloadRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ReloadRequest& from); - ReloadRequest( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ReloadRequest&& from) noexcept - : ReloadRequest(arena) { + explicit ServiceAnswer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ServiceAnswer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServiceAnswer& from); + ServiceAnswer( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServiceAnswer&& from) noexcept + : ServiceAnswer(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -1021,29 +1096,56 @@ class ReloadRequest final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kPathFieldNumber = 1, + kPayloadFieldNumber = 2, + kErrorFieldNumber = 3, + kIdFieldNumber = 1, }; - // string path = 1; - void clear_path() ; - const ::std::string& path() const; + // bytes payload = 2; + void clear_payload() ; + const ::std::string& payload() const; template - void set_path(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_path(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_path(); - void set_allocated_path(::std::string* PROTOBUF_NULLABLE value); + void set_payload(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_payload(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_payload(); + void set_allocated_payload(::std::string* PROTOBUF_NULLABLE value); private: - const ::std::string& _internal_path() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_path(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_path(); + const ::std::string& _internal_payload() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_payload(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ReloadRequest) + // string error = 3; + void clear_error() ; + const ::std::string& error() const; + template + void set_error(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_error(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_error(); + void set_allocated_error(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_error() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_error(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_error(); + + public: + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); + + private: + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ServiceAnswer) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 51, + static const ::google::protobuf::internal::TcParseTable<2, 3, + 0, 52, 2> _table_; @@ -1061,43 +1163,45 @@ class ReloadRequest final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ReloadRequest& from_msg); + const ServiceAnswer& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr path_; + ::google::protobuf::internal::ArenaStringPtr payload_; + ::google::protobuf::internal::ArenaStringPtr error_; + ::uint64_t id_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ReloadRequest_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ServiceAnswer_class_data_; // ------------------------------------------------------------------- -class PlayerMessage final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.PlayerMessage) */ { +class ServerReady final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ServerReady) */ { public: - inline PlayerMessage() : PlayerMessage(nullptr) {} - ~PlayerMessage() PROTOBUF_FINAL; + inline ServerReady() : ServerReady(nullptr) {} + ~ServerReady() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(PlayerMessage* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ServerReady* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(PlayerMessage)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ServerReady)); } #endif template - explicit PROTOBUF_CONSTEXPR PlayerMessage(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ServerReady(::google::protobuf::internal::ConstantInitialized); - inline PlayerMessage(const PlayerMessage& from) : PlayerMessage(nullptr, from) {} - inline PlayerMessage(PlayerMessage&& from) noexcept - : PlayerMessage(nullptr, ::std::move(from)) {} - inline PlayerMessage& operator=(const PlayerMessage& from) { + inline ServerReady(const ServerReady& from) : ServerReady(nullptr, from) {} + inline ServerReady(ServerReady&& from) noexcept + : ServerReady(nullptr, ::std::move(from)) {} + inline ServerReady& operator=(const ServerReady& from) { CopyFrom(from); return *this; } - inline PlayerMessage& operator=(PlayerMessage&& from) noexcept { + inline ServerReady& operator=(ServerReady&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -1125,13 +1229,13 @@ class PlayerMessage final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const PlayerMessage& default_instance() { - return *reinterpret_cast( - &_PlayerMessage_default_instance_); + static const ServerReady& default_instance() { + return *reinterpret_cast( + &_ServerReady_default_instance_); } - static constexpr int kIndexInFileMessages = 11; - friend void swap(PlayerMessage& a, PlayerMessage& b) { a.Swap(&b); } - inline void Swap(PlayerMessage* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 12; + friend void swap(ServerReady& a, ServerReady& b) { a.Swap(&b); } + inline void Swap(ServerReady* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -1139,7 +1243,7 @@ class PlayerMessage final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(PlayerMessage* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ServerReady* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1147,13 +1251,13 @@ class PlayerMessage final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - PlayerMessage* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ServerReady* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const PlayerMessage& from); + void CopyFrom(const ServerReady& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const PlayerMessage& from) { PlayerMessage::MergeImpl(*this, from); } + void MergeFrom(const ServerReady& from) { ServerReady::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -1189,17 +1293,17 @@ class PlayerMessage final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(PlayerMessage* PROTOBUF_NONNULL other); + void InternalSwap(ServerReady* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.PlayerMessage"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ServerReady"; } - explicit PlayerMessage(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - PlayerMessage(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PlayerMessage& from); - PlayerMessage( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PlayerMessage&& from) noexcept - : PlayerMessage(arena) { + explicit ServerReady(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ServerReady(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServerReady& from); + ServerReady( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServerReady&& from) noexcept + : ServerReady(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -1216,83 +1320,29 @@ class PlayerMessage final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kModFieldNumber = 1, - kTitleFieldNumber = 4, - kTextFieldNumber = 5, - kSlotFieldNumber = 2, - kKindFieldNumber = 3, + kMapFieldNumber = 1, }; - // string mod = 1; - void clear_mod() ; - const ::std::string& mod() const; - template - void set_mod(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_mod(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); - void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_mod() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); - - public: - // string title = 4; - void clear_title() ; - const ::std::string& title() const; - template - void set_title(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_title(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_title(); - void set_allocated_title(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_title() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_title(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_title(); - - public: - // string text = 5; - void clear_text() ; - const ::std::string& text() const; + // string map = 1; + void clear_map() ; + const ::std::string& map() const; template - void set_text(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_text(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_text(); - void set_allocated_text(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_text() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_text(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_text(); - - public: - // int32 slot = 2; - void clear_slot() ; - ::int32_t slot() const; - void set_slot(::int32_t value); - - private: - ::int32_t _internal_slot() const; - void _internal_set_slot(::int32_t value); - - public: - // .modlock.host_app.control.MessageKind kind = 3; - void clear_kind() ; - ::modlock::host_app::control::MessageKind kind() const; - void set_kind(::modlock::host_app::control::MessageKind value); + void set_map(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_map(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_map(); + void set_allocated_map(::std::string* PROTOBUF_NULLABLE value); private: - ::modlock::host_app::control::MessageKind _internal_kind() const; - void _internal_set_kind(::modlock::host_app::control::MessageKind value); + const ::std::string& _internal_map() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_map(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_map(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.PlayerMessage) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ServerReady) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 5, - 0, 59, + static const ::google::protobuf::internal::TcParseTable<0, 1, + 0, 48, 2> _table_; @@ -1310,47 +1360,43 @@ class PlayerMessage final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const PlayerMessage& from_msg); + const ServerReady& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr mod_; - ::google::protobuf::internal::ArenaStringPtr title_; - ::google::protobuf::internal::ArenaStringPtr text_; - ::int32_t slot_; - int kind_; + ::google::protobuf::internal::ArenaStringPtr map_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull PlayerMessage_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ServerReady_class_data_; // ------------------------------------------------------------------- -class PlayerLeft final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.PlayerLeft) */ { +class ReloadRequest final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ReloadRequest) */ { public: - inline PlayerLeft() : PlayerLeft(nullptr) {} - ~PlayerLeft() PROTOBUF_FINAL; + inline ReloadRequest() : ReloadRequest(nullptr) {} + ~ReloadRequest() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(PlayerLeft* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ReloadRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(PlayerLeft)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ReloadRequest)); } #endif template - explicit PROTOBUF_CONSTEXPR PlayerLeft(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ReloadRequest(::google::protobuf::internal::ConstantInitialized); - inline PlayerLeft(const PlayerLeft& from) : PlayerLeft(nullptr, from) {} - inline PlayerLeft(PlayerLeft&& from) noexcept - : PlayerLeft(nullptr, ::std::move(from)) {} - inline PlayerLeft& operator=(const PlayerLeft& from) { + inline ReloadRequest(const ReloadRequest& from) : ReloadRequest(nullptr, from) {} + inline ReloadRequest(ReloadRequest&& from) noexcept + : ReloadRequest(nullptr, ::std::move(from)) {} + inline ReloadRequest& operator=(const ReloadRequest& from) { CopyFrom(from); return *this; } - inline PlayerLeft& operator=(PlayerLeft&& from) noexcept { + inline ReloadRequest& operator=(ReloadRequest&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -1378,13 +1424,13 @@ class PlayerLeft final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const PlayerLeft& default_instance() { - return *reinterpret_cast( - &_PlayerLeft_default_instance_); + static const ReloadRequest& default_instance() { + return *reinterpret_cast( + &_ReloadRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 10; - friend void swap(PlayerLeft& a, PlayerLeft& b) { a.Swap(&b); } - inline void Swap(PlayerLeft* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 1; + friend void swap(ReloadRequest& a, ReloadRequest& b) { a.Swap(&b); } + inline void Swap(ReloadRequest* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -1392,7 +1438,7 @@ class PlayerLeft final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(PlayerLeft* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ReloadRequest* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1400,13 +1446,13 @@ class PlayerLeft final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - PlayerLeft* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ReloadRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const PlayerLeft& from); + void CopyFrom(const ReloadRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const PlayerLeft& from) { PlayerLeft::MergeImpl(*this, from); } + void MergeFrom(const ReloadRequest& from) { ReloadRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -1442,17 +1488,17 @@ class PlayerLeft final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(PlayerLeft* PROTOBUF_NONNULL other); + void InternalSwap(ReloadRequest* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.PlayerLeft"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ReloadRequest"; } - explicit PlayerLeft(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - PlayerLeft(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PlayerLeft& from); - PlayerLeft( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PlayerLeft&& from) noexcept - : PlayerLeft(arena) { + explicit ReloadRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ReloadRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ReloadRequest& from); + ReloadRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ReloadRequest&& from) noexcept + : ReloadRequest(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -1469,24 +1515,29 @@ class PlayerLeft final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kSlotFieldNumber = 1, + kPathFieldNumber = 1, }; - // int32 slot = 1; - void clear_slot() ; - ::int32_t slot() const; - void set_slot(::int32_t value); + // string path = 1; + void clear_path() ; + const ::std::string& path() const; + template + void set_path(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_path(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_path(); + void set_allocated_path(::std::string* PROTOBUF_NULLABLE value); private: - ::int32_t _internal_slot() const; - void _internal_set_slot(::int32_t value); + const ::std::string& _internal_path() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_path(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_path(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.PlayerLeft) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ReloadRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, + 0, 51, 2> _table_; @@ -1504,43 +1555,43 @@ class PlayerLeft final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const PlayerLeft& from_msg); + const ReloadRequest& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::int32_t slot_; + ::google::protobuf::internal::ArenaStringPtr path_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull PlayerLeft_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ReloadRequest_class_data_; // ------------------------------------------------------------------- -class PlayerJoined final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.PlayerJoined) */ { +class PlayerMessage final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.PlayerMessage) */ { public: - inline PlayerJoined() : PlayerJoined(nullptr) {} - ~PlayerJoined() PROTOBUF_FINAL; + inline PlayerMessage() : PlayerMessage(nullptr) {} + ~PlayerMessage() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(PlayerJoined* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(PlayerMessage* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(PlayerJoined)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(PlayerMessage)); } #endif template - explicit PROTOBUF_CONSTEXPR PlayerJoined(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR PlayerMessage(::google::protobuf::internal::ConstantInitialized); - inline PlayerJoined(const PlayerJoined& from) : PlayerJoined(nullptr, from) {} - inline PlayerJoined(PlayerJoined&& from) noexcept - : PlayerJoined(nullptr, ::std::move(from)) {} - inline PlayerJoined& operator=(const PlayerJoined& from) { + inline PlayerMessage(const PlayerMessage& from) : PlayerMessage(nullptr, from) {} + inline PlayerMessage(PlayerMessage&& from) noexcept + : PlayerMessage(nullptr, ::std::move(from)) {} + inline PlayerMessage& operator=(const PlayerMessage& from) { CopyFrom(from); return *this; } - inline PlayerJoined& operator=(PlayerJoined&& from) noexcept { + inline PlayerMessage& operator=(PlayerMessage&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -1568,13 +1619,13 @@ class PlayerJoined final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const PlayerJoined& default_instance() { - return *reinterpret_cast( - &_PlayerJoined_default_instance_); + static const PlayerMessage& default_instance() { + return *reinterpret_cast( + &_PlayerMessage_default_instance_); } - static constexpr int kIndexInFileMessages = 9; - friend void swap(PlayerJoined& a, PlayerJoined& b) { a.Swap(&b); } - inline void Swap(PlayerJoined* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 11; + friend void swap(PlayerMessage& a, PlayerMessage& b) { a.Swap(&b); } + inline void Swap(PlayerMessage* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -1582,7 +1633,7 @@ class PlayerJoined final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(PlayerJoined* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(PlayerMessage* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1590,13 +1641,13 @@ class PlayerJoined final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - PlayerJoined* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + PlayerMessage* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const PlayerJoined& from); + void CopyFrom(const PlayerMessage& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const PlayerJoined& from) { PlayerJoined::MergeImpl(*this, from); } + void MergeFrom(const PlayerMessage& from) { PlayerMessage::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -1632,17 +1683,17 @@ class PlayerJoined final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(PlayerJoined* PROTOBUF_NONNULL other); + void InternalSwap(PlayerMessage* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.PlayerJoined"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.PlayerMessage"; } - explicit PlayerJoined(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - PlayerJoined(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PlayerJoined& from); - PlayerJoined( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PlayerJoined&& from) noexcept - : PlayerJoined(arena) { + explicit PlayerMessage(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + PlayerMessage(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PlayerMessage& from); + PlayerMessage( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PlayerMessage&& from) noexcept + : PlayerMessage(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -1659,36 +1710,58 @@ class PlayerJoined final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kNameFieldNumber = 2, - kSteamIdFieldNumber = 3, - kSlotFieldNumber = 1, + kModFieldNumber = 1, + kTitleFieldNumber = 4, + kTextFieldNumber = 5, + kSlotFieldNumber = 2, + kKindFieldNumber = 3, }; - // string name = 2; - void clear_name() ; - const ::std::string& name() const; + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; template - void set_name(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_name(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); - void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_name() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - // fixed64 steam_id = 3; - void clear_steam_id() ; - ::uint64_t steam_id() const; - void set_steam_id(::uint64_t value); + // string title = 4; + void clear_title() ; + const ::std::string& title() const; + template + void set_title(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_title(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_title(); + void set_allocated_title(::std::string* PROTOBUF_NULLABLE value); private: - ::uint64_t _internal_steam_id() const; - void _internal_set_steam_id(::uint64_t value); + const ::std::string& _internal_title() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_title(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_title(); public: - // int32 slot = 1; + // string text = 5; + void clear_text() ; + const ::std::string& text() const; + template + void set_text(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_text(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_text(); + void set_allocated_text(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_text() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_text(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_text(); + + public: + // int32 slot = 2; void clear_slot() ; ::int32_t slot() const; void set_slot(::int32_t value); @@ -1698,12 +1771,22 @@ class PlayerJoined final : public ::google::protobuf::Message void _internal_set_slot(::int32_t value); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.PlayerJoined) + // .modlock.host_app.control.MessageKind kind = 3; + void clear_kind() ; + ::modlock::host_app::control::MessageKind kind() const; + void set_kind(::modlock::host_app::control::MessageKind value); + + private: + ::modlock::host_app::control::MessageKind _internal_kind() const; + void _internal_set_kind(::modlock::host_app::control::MessageKind value); + + public: + // @@protoc_insertion_point(class_scope:modlock.host_app.control.PlayerMessage) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 50, + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 59, 2> _table_; @@ -1721,45 +1804,47 @@ class PlayerJoined final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const PlayerJoined& from_msg); + const PlayerMessage& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::uint64_t steam_id_; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::google::protobuf::internal::ArenaStringPtr title_; + ::google::protobuf::internal::ArenaStringPtr text_; ::int32_t slot_; + int kind_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull PlayerJoined_class_data_; +extern const ::google::protobuf::internal::ClassDataFull PlayerMessage_class_data_; // ------------------------------------------------------------------- -class PlayerChat final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.PlayerChat) */ { +class PlayerLeft final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.PlayerLeft) */ { public: - inline PlayerChat() : PlayerChat(nullptr) {} - ~PlayerChat() PROTOBUF_FINAL; + inline PlayerLeft() : PlayerLeft(nullptr) {} + ~PlayerLeft() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(PlayerChat* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(PlayerLeft* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(PlayerChat)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(PlayerLeft)); } #endif template - explicit PROTOBUF_CONSTEXPR PlayerChat(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR PlayerLeft(::google::protobuf::internal::ConstantInitialized); - inline PlayerChat(const PlayerChat& from) : PlayerChat(nullptr, from) {} - inline PlayerChat(PlayerChat&& from) noexcept - : PlayerChat(nullptr, ::std::move(from)) {} - inline PlayerChat& operator=(const PlayerChat& from) { + inline PlayerLeft(const PlayerLeft& from) : PlayerLeft(nullptr, from) {} + inline PlayerLeft(PlayerLeft&& from) noexcept + : PlayerLeft(nullptr, ::std::move(from)) {} + inline PlayerLeft& operator=(const PlayerLeft& from) { CopyFrom(from); return *this; } - inline PlayerChat& operator=(PlayerChat&& from) noexcept { + inline PlayerLeft& operator=(PlayerLeft&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -1787,13 +1872,13 @@ class PlayerChat final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const PlayerChat& default_instance() { - return *reinterpret_cast( - &_PlayerChat_default_instance_); + static const PlayerLeft& default_instance() { + return *reinterpret_cast( + &_PlayerLeft_default_instance_); } - static constexpr int kIndexInFileMessages = 3; - friend void swap(PlayerChat& a, PlayerChat& b) { a.Swap(&b); } - inline void Swap(PlayerChat* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 10; + friend void swap(PlayerLeft& a, PlayerLeft& b) { a.Swap(&b); } + inline void Swap(PlayerLeft* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -1801,7 +1886,7 @@ class PlayerChat final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(PlayerChat* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(PlayerLeft* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1809,13 +1894,13 @@ class PlayerChat final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - PlayerChat* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + PlayerLeft* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const PlayerChat& from); + void CopyFrom(const PlayerLeft& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const PlayerChat& from) { PlayerChat::MergeImpl(*this, from); } + void MergeFrom(const PlayerLeft& from) { PlayerLeft::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -1851,17 +1936,17 @@ class PlayerChat final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(PlayerChat* PROTOBUF_NONNULL other); + void InternalSwap(PlayerLeft* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.PlayerChat"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.PlayerLeft"; } - explicit PlayerChat(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - PlayerChat(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PlayerChat& from); - PlayerChat( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PlayerChat&& from) noexcept - : PlayerChat(arena) { + explicit PlayerLeft(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + PlayerLeft(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PlayerLeft& from); + PlayerLeft( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PlayerLeft&& from) noexcept + : PlayerLeft(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -1878,40 +1963,8 @@ class PlayerChat final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kNameFieldNumber = 2, - kTextFieldNumber = 3, kSlotFieldNumber = 1, }; - // string name = 2; - void clear_name() ; - const ::std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_name(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); - void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_name() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); - - public: - // string text = 3; - void clear_text() ; - const ::std::string& text() const; - template - void set_text(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_text(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_text(); - void set_allocated_text(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_text() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_text(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_text(); - - public: // int32 slot = 1; void clear_slot() ; ::int32_t slot() const; @@ -1922,12 +1975,12 @@ class PlayerChat final : public ::google::protobuf::Message void _internal_set_slot(::int32_t value); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.PlayerChat) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.PlayerLeft) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 52, + static const ::google::protobuf::internal::TcParseTable<0, 1, + 0, 0, 2> _table_; @@ -1945,11 +1998,9 @@ class PlayerChat final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const PlayerChat& from_msg); + const PlayerLeft& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr text_; ::int32_t slot_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -1957,33 +2008,33 @@ class PlayerChat final : public ::google::protobuf::Message friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull PlayerChat_class_data_; +extern const ::google::protobuf::internal::ClassDataFull PlayerLeft_class_data_; // ------------------------------------------------------------------- -class ModStarted final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModStarted) */ { +class PlayerJoined final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.PlayerJoined) */ { public: - inline ModStarted() : ModStarted(nullptr) {} - ~ModStarted() PROTOBUF_FINAL; + inline PlayerJoined() : PlayerJoined(nullptr) {} + ~PlayerJoined() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ModStarted* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(PlayerJoined* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ModStarted)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(PlayerJoined)); } #endif template - explicit PROTOBUF_CONSTEXPR ModStarted(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR PlayerJoined(::google::protobuf::internal::ConstantInitialized); - inline ModStarted(const ModStarted& from) : ModStarted(nullptr, from) {} - inline ModStarted(ModStarted&& from) noexcept - : ModStarted(nullptr, ::std::move(from)) {} - inline ModStarted& operator=(const ModStarted& from) { + inline PlayerJoined(const PlayerJoined& from) : PlayerJoined(nullptr, from) {} + inline PlayerJoined(PlayerJoined&& from) noexcept + : PlayerJoined(nullptr, ::std::move(from)) {} + inline PlayerJoined& operator=(const PlayerJoined& from) { CopyFrom(from); return *this; } - inline ModStarted& operator=(ModStarted&& from) noexcept { + inline PlayerJoined& operator=(PlayerJoined&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -2011,13 +2062,13 @@ class ModStarted final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ModStarted& default_instance() { - return *reinterpret_cast( - &_ModStarted_default_instance_); + static const PlayerJoined& default_instance() { + return *reinterpret_cast( + &_PlayerJoined_default_instance_); } - static constexpr int kIndexInFileMessages = 4; - friend void swap(ModStarted& a, ModStarted& b) { a.Swap(&b); } - inline void Swap(ModStarted* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 9; + friend void swap(PlayerJoined& a, PlayerJoined& b) { a.Swap(&b); } + inline void Swap(PlayerJoined* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -2025,7 +2076,7 @@ class ModStarted final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ModStarted* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(PlayerJoined* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2033,13 +2084,13 @@ class ModStarted final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ModStarted* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + PlayerJoined* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ModStarted& from); + void CopyFrom(const PlayerJoined& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ModStarted& from) { ModStarted::MergeImpl(*this, from); } + void MergeFrom(const PlayerJoined& from) { PlayerJoined::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -2075,17 +2126,17 @@ class ModStarted final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ModStarted* PROTOBUF_NONNULL other); + void InternalSwap(PlayerJoined* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModStarted"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.PlayerJoined"; } - explicit ModStarted(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ModStarted(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModStarted& from); - ModStarted( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModStarted&& from) noexcept - : ModStarted(arena) { + explicit PlayerJoined(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + PlayerJoined(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PlayerJoined& from); + PlayerJoined( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PlayerJoined&& from) noexcept + : PlayerJoined(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -2102,40 +2153,51 @@ class ModStarted final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kModFieldNumber = 1, - kReloadedFieldNumber = 2, + kNameFieldNumber = 2, + kSteamIdFieldNumber = 3, + kSlotFieldNumber = 1, }; - // string mod = 1; - void clear_mod() ; - const ::std::string& mod() const; + // string name = 2; + void clear_name() ; + const ::std::string& name() const; template - void set_mod(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_mod(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); - void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); + void set_name(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_name(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); + void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); private: - const ::std::string& _internal_mod() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); + const ::std::string& _internal_name() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); public: - // bool reloaded = 2; - void clear_reloaded() ; - bool reloaded() const; - void set_reloaded(bool value); + // fixed64 steam_id = 3; + void clear_steam_id() ; + ::uint64_t steam_id() const; + void set_steam_id(::uint64_t value); private: - bool _internal_reloaded() const; - void _internal_set_reloaded(bool value); + ::uint64_t _internal_steam_id() const; + void _internal_set_steam_id(::uint64_t value); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModStarted) + // int32 slot = 1; + void clear_slot() ; + ::int32_t slot() const; + void set_slot(::int32_t value); + + private: + ::int32_t _internal_slot() const; + void _internal_set_slot(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:modlock.host_app.control.PlayerJoined) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 47, + static const ::google::protobuf::internal::TcParseTable<2, 3, + 0, 50, 2> _table_; @@ -2153,44 +2215,45 @@ class ModStarted final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ModStarted& from_msg); + const PlayerJoined& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr mod_; - bool reloaded_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::uint64_t steam_id_; + ::int32_t slot_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ModStarted_class_data_; +extern const ::google::protobuf::internal::ClassDataFull PlayerJoined_class_data_; // ------------------------------------------------------------------- -class ModLog final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModLog) */ { +class PlayerChat final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.PlayerChat) */ { public: - inline ModLog() : ModLog(nullptr) {} - ~ModLog() PROTOBUF_FINAL; + inline PlayerChat() : PlayerChat(nullptr) {} + ~PlayerChat() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ModLog* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(PlayerChat* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ModLog)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(PlayerChat)); } #endif template - explicit PROTOBUF_CONSTEXPR ModLog(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR PlayerChat(::google::protobuf::internal::ConstantInitialized); - inline ModLog(const ModLog& from) : ModLog(nullptr, from) {} - inline ModLog(ModLog&& from) noexcept - : ModLog(nullptr, ::std::move(from)) {} - inline ModLog& operator=(const ModLog& from) { + inline PlayerChat(const PlayerChat& from) : PlayerChat(nullptr, from) {} + inline PlayerChat(PlayerChat&& from) noexcept + : PlayerChat(nullptr, ::std::move(from)) {} + inline PlayerChat& operator=(const PlayerChat& from) { CopyFrom(from); return *this; } - inline ModLog& operator=(ModLog&& from) noexcept { + inline PlayerChat& operator=(PlayerChat&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -2218,13 +2281,13 @@ class ModLog final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ModLog& default_instance() { - return *reinterpret_cast( - &_ModLog_default_instance_); + static const PlayerChat& default_instance() { + return *reinterpret_cast( + &_PlayerChat_default_instance_); } - static constexpr int kIndexInFileMessages = 5; - friend void swap(ModLog& a, ModLog& b) { a.Swap(&b); } - inline void Swap(ModLog* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 3; + friend void swap(PlayerChat& a, PlayerChat& b) { a.Swap(&b); } + inline void Swap(PlayerChat* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -2232,7 +2295,7 @@ class ModLog final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ModLog* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(PlayerChat* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2240,13 +2303,13 @@ class ModLog final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ModLog* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + PlayerChat* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ModLog& from); + void CopyFrom(const PlayerChat& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ModLog& from) { ModLog::MergeImpl(*this, from); } + void MergeFrom(const PlayerChat& from) { PlayerChat::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -2282,17 +2345,17 @@ class ModLog final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ModLog* PROTOBUF_NONNULL other); + void InternalSwap(PlayerChat* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModLog"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.PlayerChat"; } - explicit ModLog(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ModLog(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModLog& from); - ModLog( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModLog&& from) noexcept - : ModLog(arena) { + explicit PlayerChat(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + PlayerChat(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PlayerChat& from); + PlayerChat( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PlayerChat&& from) noexcept + : PlayerChat(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -2309,25 +2372,26 @@ class ModLog final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kModFieldNumber = 1, - kTextFieldNumber = 2, + kNameFieldNumber = 2, + kTextFieldNumber = 3, + kSlotFieldNumber = 1, }; - // string mod = 1; - void clear_mod() ; - const ::std::string& mod() const; + // string name = 2; + void clear_name() ; + const ::std::string& name() const; template - void set_mod(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_mod(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); - void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); + void set_name(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_name(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); + void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); private: - const ::std::string& _internal_mod() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); + const ::std::string& _internal_name() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); public: - // string text = 2; + // string text = 3; void clear_text() ; const ::std::string& text() const; template @@ -2342,12 +2406,22 @@ class ModLog final : public ::google::protobuf::Message ::std::string* PROTOBUF_NONNULL _internal_mutable_text(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModLog) + // int32 slot = 1; + void clear_slot() ; + ::int32_t slot() const; + void set_slot(::int32_t value); + + private: + ::int32_t _internal_slot() const; + void _internal_set_slot(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:modlock.host_app.control.PlayerChat) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 47, + static const ::google::protobuf::internal::TcParseTable<2, 3, + 0, 52, 2> _table_; @@ -2365,44 +2439,45 @@ class ModLog final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ModLog& from_msg); + const PlayerChat& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr mod_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr text_; + ::int32_t slot_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ModLog_class_data_; +extern const ::google::protobuf::internal::ClassDataFull PlayerChat_class_data_; // ------------------------------------------------------------------- -class ModFailed final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModFailed) */ { +class ModStarted final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModStarted) */ { public: - inline ModFailed() : ModFailed(nullptr) {} - ~ModFailed() PROTOBUF_FINAL; + inline ModStarted() : ModStarted(nullptr) {} + ~ModStarted() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ModFailed* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ModStarted* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ModFailed)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ModStarted)); } #endif template - explicit PROTOBUF_CONSTEXPR ModFailed(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ModStarted(::google::protobuf::internal::ConstantInitialized); - inline ModFailed(const ModFailed& from) : ModFailed(nullptr, from) {} - inline ModFailed(ModFailed&& from) noexcept - : ModFailed(nullptr, ::std::move(from)) {} - inline ModFailed& operator=(const ModFailed& from) { + inline ModStarted(const ModStarted& from) : ModStarted(nullptr, from) {} + inline ModStarted(ModStarted&& from) noexcept + : ModStarted(nullptr, ::std::move(from)) {} + inline ModStarted& operator=(const ModStarted& from) { CopyFrom(from); return *this; } - inline ModFailed& operator=(ModFailed&& from) noexcept { + inline ModStarted& operator=(ModStarted&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -2430,13 +2505,13 @@ class ModFailed final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ModFailed& default_instance() { - return *reinterpret_cast( - &_ModFailed_default_instance_); + static const ModStarted& default_instance() { + return *reinterpret_cast( + &_ModStarted_default_instance_); } - static constexpr int kIndexInFileMessages = 6; - friend void swap(ModFailed& a, ModFailed& b) { a.Swap(&b); } - inline void Swap(ModFailed* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 4; + friend void swap(ModStarted& a, ModStarted& b) { a.Swap(&b); } + inline void Swap(ModStarted* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -2444,7 +2519,7 @@ class ModFailed final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ModFailed* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ModStarted* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2452,13 +2527,13 @@ class ModFailed final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ModFailed* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ModStarted* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ModFailed& from); + void CopyFrom(const ModStarted& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ModFailed& from) { ModFailed::MergeImpl(*this, from); } + void MergeFrom(const ModStarted& from) { ModStarted::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -2494,17 +2569,17 @@ class ModFailed final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ModFailed* PROTOBUF_NONNULL other); + void InternalSwap(ModStarted* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModFailed"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModStarted"; } - explicit ModFailed(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ModFailed(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModFailed& from); - ModFailed( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModFailed&& from) noexcept - : ModFailed(arena) { + explicit ModStarted(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ModStarted(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModStarted& from); + ModStarted( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModStarted&& from) noexcept + : ModStarted(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -2522,7 +2597,7 @@ class ModFailed final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { kModFieldNumber = 1, - kErrorFieldNumber = 2, + kReloadedFieldNumber = 2, }; // string mod = 1; void clear_mod() ; @@ -2539,27 +2614,22 @@ class ModFailed final : public ::google::protobuf::Message ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - // string error = 2; - void clear_error() ; - const ::std::string& error() const; - template - void set_error(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_error(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_error(); - void set_allocated_error(::std::string* PROTOBUF_NULLABLE value); + // bool reloaded = 2; + void clear_reloaded() ; + bool reloaded() const; + void set_reloaded(bool value); private: - const ::std::string& _internal_error() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_error(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_error(); + bool _internal_reloaded() const; + void _internal_set_reloaded(bool value); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModFailed) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModStarted) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 51, + 0, 47, 2> _table_; @@ -2577,44 +2647,44 @@ class ModFailed final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ModFailed& from_msg); + const ModStarted& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr mod_; - ::google::protobuf::internal::ArenaStringPtr error_; + bool reloaded_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ModFailed_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ModStarted_class_data_; // ------------------------------------------------------------------- -class Fixture final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.Fixture) */ { +class ModLog final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModLog) */ { public: - inline Fixture() : Fixture(nullptr) {} - ~Fixture() PROTOBUF_FINAL; + inline ModLog() : ModLog(nullptr) {} + ~ModLog() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Fixture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ModLog* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Fixture)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ModLog)); } #endif template - explicit PROTOBUF_CONSTEXPR Fixture(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ModLog(::google::protobuf::internal::ConstantInitialized); - inline Fixture(const Fixture& from) : Fixture(nullptr, from) {} - inline Fixture(Fixture&& from) noexcept - : Fixture(nullptr, ::std::move(from)) {} - inline Fixture& operator=(const Fixture& from) { + inline ModLog(const ModLog& from) : ModLog(nullptr, from) {} + inline ModLog(ModLog&& from) noexcept + : ModLog(nullptr, ::std::move(from)) {} + inline ModLog& operator=(const ModLog& from) { CopyFrom(from); return *this; } - inline Fixture& operator=(Fixture&& from) noexcept { + inline ModLog& operator=(ModLog&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -2642,13 +2712,13 @@ class Fixture final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const Fixture& default_instance() { - return *reinterpret_cast( - &_Fixture_default_instance_); + static const ModLog& default_instance() { + return *reinterpret_cast( + &_ModLog_default_instance_); } - static constexpr int kIndexInFileMessages = 16; - friend void swap(Fixture& a, Fixture& b) { a.Swap(&b); } - inline void Swap(Fixture* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 5; + friend void swap(ModLog& a, ModLog& b) { a.Swap(&b); } + inline void Swap(ModLog* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -2656,7 +2726,7 @@ class Fixture final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Fixture* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ModLog* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2664,13 +2734,13 @@ class Fixture final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Fixture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ModLog* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Fixture& from); + void CopyFrom(const ModLog& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Fixture& from) { Fixture::MergeImpl(*this, from); } + void MergeFrom(const ModLog& from) { ModLog::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -2706,17 +2776,17 @@ class Fixture final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(Fixture* PROTOBUF_NONNULL other); + void InternalSwap(ModLog* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.Fixture"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModLog"; } - explicit Fixture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Fixture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Fixture& from); - Fixture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Fixture&& from) noexcept - : Fixture(arena) { + explicit ModLog(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ModLog(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModLog& from); + ModLog( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModLog&& from) noexcept + : ModLog(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -2734,10 +2804,7 @@ class Fixture final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { kModFieldNumber = 1, - kServiceFieldNumber = 2, - kMethodFieldNumber = 3, - kPayloadFieldNumber = 4, - kSourceFieldNumber = 5, + kTextFieldNumber = 2, }; // string mod = 1; void clear_mod() ; @@ -2754,72 +2821,27 @@ class Fixture final : public ::google::protobuf::Message ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - // string service = 2; - void clear_service() ; - const ::std::string& service() const; - template - void set_service(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_service(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_service(); - void set_allocated_service(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_service() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_service(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_service(); - - public: - // string method = 3; - void clear_method() ; - const ::std::string& method() const; - template - void set_method(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_method(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_method(); - void set_allocated_method(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_method() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_method(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_method(); - - public: - // bytes payload = 4; - void clear_payload() ; - const ::std::string& payload() const; - template - void set_payload(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_payload(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_payload(); - void set_allocated_payload(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_payload() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_payload(); - - public: - // string source = 5; - void clear_source() ; - const ::std::string& source() const; + // string text = 2; + void clear_text() ; + const ::std::string& text() const; template - void set_source(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_source(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_source(); - void set_allocated_source(::std::string* PROTOBUF_NULLABLE value); + void set_text(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_text(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_text(); + void set_allocated_text(::std::string* PROTOBUF_NULLABLE value); private: - const ::std::string& _internal_source() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_source(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_source(); + const ::std::string& _internal_text() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_text(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_text(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.Fixture) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModLog) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 5, - 0, 63, + static const ::google::protobuf::internal::TcParseTable<1, 2, + 0, 47, 2> _table_; @@ -2837,47 +2859,44 @@ class Fixture final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Fixture& from_msg); + const ModLog& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr mod_; - ::google::protobuf::internal::ArenaStringPtr service_; - ::google::protobuf::internal::ArenaStringPtr method_; - ::google::protobuf::internal::ArenaStringPtr payload_; - ::google::protobuf::internal::ArenaStringPtr source_; + ::google::protobuf::internal::ArenaStringPtr text_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull Fixture_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ModLog_class_data_; // ------------------------------------------------------------------- -class Fixtures final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.Fixtures) */ { +class ModFailed final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModFailed) */ { public: - inline Fixtures() : Fixtures(nullptr) {} - ~Fixtures() PROTOBUF_FINAL; + inline ModFailed() : ModFailed(nullptr) {} + ~ModFailed() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Fixtures* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ModFailed* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Fixtures)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ModFailed)); } #endif template - explicit PROTOBUF_CONSTEXPR Fixtures(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ModFailed(::google::protobuf::internal::ConstantInitialized); - inline Fixtures(const Fixtures& from) : Fixtures(nullptr, from) {} - inline Fixtures(Fixtures&& from) noexcept - : Fixtures(nullptr, ::std::move(from)) {} - inline Fixtures& operator=(const Fixtures& from) { + inline ModFailed(const ModFailed& from) : ModFailed(nullptr, from) {} + inline ModFailed(ModFailed&& from) noexcept + : ModFailed(nullptr, ::std::move(from)) {} + inline ModFailed& operator=(const ModFailed& from) { CopyFrom(from); return *this; } - inline Fixtures& operator=(Fixtures&& from) noexcept { + inline ModFailed& operator=(ModFailed&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -2905,13 +2924,13 @@ class Fixtures final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const Fixtures& default_instance() { - return *reinterpret_cast( - &_Fixtures_default_instance_); + static const ModFailed& default_instance() { + return *reinterpret_cast( + &_ModFailed_default_instance_); } - static constexpr int kIndexInFileMessages = 17; - friend void swap(Fixtures& a, Fixtures& b) { a.Swap(&b); } - inline void Swap(Fixtures* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 6; + friend void swap(ModFailed& a, ModFailed& b) { a.Swap(&b); } + inline void Swap(ModFailed* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -2919,7 +2938,7 @@ class Fixtures final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Fixtures* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ModFailed* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2927,13 +2946,13 @@ class Fixtures final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Fixtures* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ModFailed* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Fixtures& from); + void CopyFrom(const ModFailed& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Fixtures& from) { Fixtures::MergeImpl(*this, from); } + void MergeFrom(const ModFailed& from) { ModFailed::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -2969,17 +2988,17 @@ class Fixtures final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(Fixtures* PROTOBUF_NONNULL other); + void InternalSwap(ModFailed* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.Fixtures"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModFailed"; } - explicit Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Fixtures& from); - Fixtures( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Fixtures&& from) noexcept - : Fixtures(arena) { + explicit ModFailed(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ModFailed(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModFailed& from); + ModFailed( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModFailed&& from) noexcept + : ModFailed(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -2996,31 +3015,45 @@ class Fixtures final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kFixturesFieldNumber = 1, + kModFieldNumber = 1, + kErrorFieldNumber = 2, }; - // repeated .modlock.host_app.control.Fixture fixtures = 1; - int fixtures_size() const; + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; + template + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); + private: - int _internal_fixtures_size() const; + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - void clear_fixtures() ; - ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL mutable_fixtures(int index); - ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL mutable_fixtures(); + // string error = 2; + void clear_error() ; + const ::std::string& error() const; + template + void set_error(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_error(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_error(); + void set_allocated_error(::std::string* PROTOBUF_NULLABLE value); private: - const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& _internal_fixtures() const; - ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL _internal_mutable_fixtures(); + const ::std::string& _internal_error() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_error(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_error(); + public: - const ::modlock::host_app::control::Fixture& fixtures(int index) const; - ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL add_fixtures(); - const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& fixtures() const; - // @@protoc_insertion_point(class_scope:modlock.host_app.control.Fixtures) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModFailed) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 1, 0, + static const ::google::protobuf::internal::TcParseTable<1, 2, + 0, 51, 2> _table_; @@ -3038,43 +3071,44 @@ class Fixtures final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Fixtures& from_msg); + const ModFailed& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::modlock::host_app::control::Fixture > fixtures_; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::google::protobuf::internal::ArenaStringPtr error_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull Fixtures_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ModFailed_class_data_; // ------------------------------------------------------------------- -class ControlRequest final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ControlRequest) */ { +class Forward final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.Forward) */ { public: - inline ControlRequest() : ControlRequest(nullptr) {} - ~ControlRequest() PROTOBUF_FINAL; + inline Forward() : Forward(nullptr) {} + ~Forward() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ControlRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(Forward* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ControlRequest)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Forward)); } #endif template - explicit PROTOBUF_CONSTEXPR ControlRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Forward(::google::protobuf::internal::ConstantInitialized); - inline ControlRequest(const ControlRequest& from) : ControlRequest(nullptr, from) {} - inline ControlRequest(ControlRequest&& from) noexcept - : ControlRequest(nullptr, ::std::move(from)) {} - inline ControlRequest& operator=(const ControlRequest& from) { + inline Forward(const Forward& from) : Forward(nullptr, from) {} + inline Forward(Forward&& from) noexcept + : Forward(nullptr, ::std::move(from)) {} + inline Forward& operator=(const Forward& from) { CopyFrom(from); return *this; } - inline ControlRequest& operator=(ControlRequest&& from) noexcept { + inline Forward& operator=(Forward&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -3102,19 +3136,13 @@ class ControlRequest final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ControlRequest& default_instance() { - return *reinterpret_cast( - &_ControlRequest_default_instance_); + static const Forward& default_instance() { + return *reinterpret_cast( + &_Forward_default_instance_); } - enum BodyCase { - kReload = 1, - kRoles = 2, - kService = 3, - BODY_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 0; - friend void swap(ControlRequest& a, ControlRequest& b) { a.Swap(&b); } - inline void Swap(ControlRequest* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 17; + friend void swap(Forward& a, Forward& b) { a.Swap(&b); } + inline void Swap(Forward* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -3122,7 +3150,7 @@ class ControlRequest final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ControlRequest* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(Forward* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3130,13 +3158,13 @@ class ControlRequest final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ControlRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + Forward* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ControlRequest& from); + void CopyFrom(const Forward& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ControlRequest& from) { ControlRequest::MergeImpl(*this, from); } + void MergeFrom(const Forward& from) { Forward::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -3172,17 +3200,17 @@ class ControlRequest final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ControlRequest* PROTOBUF_NONNULL other); + void InternalSwap(Forward* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ControlRequest"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.Forward"; } - explicit ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ControlRequest& from); - ControlRequest( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ControlRequest&& from) noexcept - : ControlRequest(arena) { + explicit Forward(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + Forward(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Forward& from); + Forward( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Forward&& from) noexcept + : Forward(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -3199,80 +3227,61 @@ class ControlRequest final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kReloadFieldNumber = 1, - kRolesFieldNumber = 2, - kServiceFieldNumber = 3, + kModFieldNumber = 1, + kServiceFieldNumber = 2, + kTargetFieldNumber = 3, }; - // .modlock.host_app.control.ReloadRequest reload = 1; - bool has_reload() const; - private: - bool _internal_has_reload() const; - - public: - void clear_reload() ; - const ::modlock::host_app::control::ReloadRequest& reload() const; - [[nodiscard]] ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE release_reload(); - ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL mutable_reload(); - void set_allocated_reload(::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_reload(::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE unsafe_arena_release_reload(); - - private: - const ::modlock::host_app::control::ReloadRequest& _internal_reload() const; - ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL _internal_mutable_reload(); + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; + template + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); - public: - // .modlock.wasm.players.RolesTable roles = 2; - bool has_roles() const; private: - bool _internal_has_roles() const; + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - void clear_roles() ; - const ::modlock::wasm::players::RolesTable& roles() const; - [[nodiscard]] ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE release_roles(); - ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL mutable_roles(); - void set_allocated_roles(::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_roles(::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value); - ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE unsafe_arena_release_roles(); - - private: - const ::modlock::wasm::players::RolesTable& _internal_roles() const; - ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL _internal_mutable_roles(); + // string service = 2; + void clear_service() ; + const ::std::string& service() const; + template + void set_service(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_service(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_service(); + void set_allocated_service(::std::string* PROTOBUF_NULLABLE value); - public: - // .modlock.host_app.control.ServiceReply service = 3; - bool has_service() const; private: - bool _internal_has_service() const; + const ::std::string& _internal_service() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_service(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_service(); public: - void clear_service() ; - const ::modlock::host_app::control::ServiceReply& service() const; - [[nodiscard]] ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE release_service(); - ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL mutable_service(); - void set_allocated_service(::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_service(::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE unsafe_arena_release_service(); + // string target = 3; + void clear_target() ; + const ::std::string& target() const; + template + void set_target(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_target(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_target(); + void set_allocated_target(::std::string* PROTOBUF_NULLABLE value); private: - const ::modlock::host_app::control::ServiceReply& _internal_service() const; - ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL _internal_mutable_service(); + const ::std::string& _internal_target() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_target(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_target(); public: - void clear_body(); - BodyCase body_case() const; - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ControlRequest) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.Forward) private: class _Internal; - void set_has_reload(); - void set_has_roles(); - void set_has_service(); - inline bool has_body() const; - inline void clear_has_body(); friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 3, - 3, 0, + static const ::google::protobuf::internal::TcParseTable<2, 3, + 0, 57, 2> _table_; @@ -3290,49 +3299,45 @@ class ControlRequest final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ControlRequest& from_msg); - union BodyUnion { - constexpr BodyUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - ::google::protobuf::Message* PROTOBUF_NULLABLE reload_; - ::google::protobuf::Message* PROTOBUF_NULLABLE roles_; - ::google::protobuf::Message* PROTOBUF_NULLABLE service_; - } body_; + const Forward& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::google::protobuf::internal::ArenaStringPtr service_; + ::google::protobuf::internal::ArenaStringPtr target_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ControlRequest_class_data_; +extern const ::google::protobuf::internal::ClassDataFull Forward_class_data_; // ------------------------------------------------------------------- -class ModCalls final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModCalls) */ { +class Fixture final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.Fixture) */ { public: - inline ModCalls() : ModCalls(nullptr) {} - ~ModCalls() PROTOBUF_FINAL; + inline Fixture() : Fixture(nullptr) {} + ~Fixture() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ModCalls* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(Fixture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ModCalls)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Fixture)); } #endif template - explicit PROTOBUF_CONSTEXPR ModCalls(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Fixture(::google::protobuf::internal::ConstantInitialized); - inline ModCalls(const ModCalls& from) : ModCalls(nullptr, from) {} - inline ModCalls(ModCalls&& from) noexcept - : ModCalls(nullptr, ::std::move(from)) {} - inline ModCalls& operator=(const ModCalls& from) { + inline Fixture(const Fixture& from) : Fixture(nullptr, from) {} + inline Fixture(Fixture&& from) noexcept + : Fixture(nullptr, ::std::move(from)) {} + inline Fixture& operator=(const Fixture& from) { CopyFrom(from); return *this; } - inline ModCalls& operator=(ModCalls&& from) noexcept { + inline Fixture& operator=(Fixture&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -3360,13 +3365,13 @@ class ModCalls final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ModCalls& default_instance() { - return *reinterpret_cast( - &_ModCalls_default_instance_); + static const Fixture& default_instance() { + return *reinterpret_cast( + &_Fixture_default_instance_); } - static constexpr int kIndexInFileMessages = 7; - friend void swap(ModCalls& a, ModCalls& b) { a.Swap(&b); } - inline void Swap(ModCalls* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 16; + friend void swap(Fixture& a, Fixture& b) { a.Swap(&b); } + inline void Swap(Fixture* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -3374,7 +3379,7 @@ class ModCalls final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ModCalls* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(Fixture* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3382,13 +3387,13 @@ class ModCalls final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ModCalls* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + Fixture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ModCalls& from); + void CopyFrom(const Fixture& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ModCalls& from) { ModCalls::MergeImpl(*this, from); } + void MergeFrom(const Fixture& from) { Fixture::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -3424,17 +3429,17 @@ class ModCalls final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ModCalls* PROTOBUF_NONNULL other); + void InternalSwap(Fixture* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModCalls"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.Fixture"; } - explicit ModCalls(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ModCalls(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModCalls& from); - ModCalls( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModCalls&& from) noexcept - : ModCalls(arena) { + explicit Fixture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + Fixture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Fixture& from); + Fixture( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Fixture&& from) noexcept + : Fixture(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -3452,7 +3457,10 @@ class ModCalls final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { kModFieldNumber = 1, - kProfileFieldNumber = 2, + kServiceFieldNumber = 2, + kMethodFieldNumber = 3, + kPayloadFieldNumber = 4, + kSourceFieldNumber = 5, }; // string mod = 1; void clear_mod() ; @@ -3469,27 +3477,72 @@ class ModCalls final : public ::google::protobuf::Message ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - // .modlock.wasm.profile.CallProfile profile = 2; - bool has_profile() const; - void clear_profile() ; - const ::modlock::wasm::profile::CallProfile& profile() const; - [[nodiscard]] ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE release_profile(); - ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL mutable_profile(); - void set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value); - ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE unsafe_arena_release_profile(); + // string service = 2; + void clear_service() ; + const ::std::string& service() const; + template + void set_service(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_service(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_service(); + void set_allocated_service(::std::string* PROTOBUF_NULLABLE value); private: - const ::modlock::wasm::profile::CallProfile& _internal_profile() const; - ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL _internal_mutable_profile(); + const ::std::string& _internal_service() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_service(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_service(); public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModCalls) + // string method = 3; + void clear_method() ; + const ::std::string& method() const; + template + void set_method(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_method(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_method(); + void set_allocated_method(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_method() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_method(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_method(); + + public: + // bytes payload = 4; + void clear_payload() ; + const ::std::string& payload() const; + template + void set_payload(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_payload(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_payload(); + void set_allocated_payload(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_payload() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_payload(); + + public: + // string source = 5; + void clear_source() ; + const ::std::string& source() const; + template + void set_source(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_source(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_source(); + void set_allocated_source(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_source() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_source(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_source(); + + public: + // @@protoc_insertion_point(class_scope:modlock.host_app.control.Fixture) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 1, 45, + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 63, 2> _table_; @@ -3507,44 +3560,47 @@ class ModCalls final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ModCalls& from_msg); + const Fixture& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr mod_; - ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE profile_; + ::google::protobuf::internal::ArenaStringPtr service_; + ::google::protobuf::internal::ArenaStringPtr method_; + ::google::protobuf::internal::ArenaStringPtr payload_; + ::google::protobuf::internal::ArenaStringPtr source_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ModCalls_class_data_; +extern const ::google::protobuf::internal::ClassDataFull Fixture_class_data_; // ------------------------------------------------------------------- -class ModSlowFrame final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModSlowFrame) */ { +class Fixtures final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.Fixtures) */ { public: - inline ModSlowFrame() : ModSlowFrame(nullptr) {} - ~ModSlowFrame() PROTOBUF_FINAL; + inline Fixtures() : Fixtures(nullptr) {} + ~Fixtures() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ModSlowFrame* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(Fixtures* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ModSlowFrame)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Fixtures)); } #endif template - explicit PROTOBUF_CONSTEXPR ModSlowFrame(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Fixtures(::google::protobuf::internal::ConstantInitialized); - inline ModSlowFrame(const ModSlowFrame& from) : ModSlowFrame(nullptr, from) {} - inline ModSlowFrame(ModSlowFrame&& from) noexcept - : ModSlowFrame(nullptr, ::std::move(from)) {} - inline ModSlowFrame& operator=(const ModSlowFrame& from) { + inline Fixtures(const Fixtures& from) : Fixtures(nullptr, from) {} + inline Fixtures(Fixtures&& from) noexcept + : Fixtures(nullptr, ::std::move(from)) {} + inline Fixtures& operator=(const Fixtures& from) { CopyFrom(from); return *this; } - inline ModSlowFrame& operator=(ModSlowFrame&& from) noexcept { + inline Fixtures& operator=(Fixtures&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -3572,13 +3628,13 @@ class ModSlowFrame final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const ModSlowFrame& default_instance() { - return *reinterpret_cast( - &_ModSlowFrame_default_instance_); + static const Fixtures& default_instance() { + return *reinterpret_cast( + &_Fixtures_default_instance_); } - static constexpr int kIndexInFileMessages = 8; - friend void swap(ModSlowFrame& a, ModSlowFrame& b) { a.Swap(&b); } - inline void Swap(ModSlowFrame* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 18; + friend void swap(Fixtures& a, Fixtures& b) { a.Swap(&b); } + inline void Swap(Fixtures* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -3586,7 +3642,7 @@ class ModSlowFrame final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ModSlowFrame* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(Fixtures* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3594,13 +3650,13 @@ class ModSlowFrame final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ModSlowFrame* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + Fixtures* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ModSlowFrame& from); + void CopyFrom(const Fixtures& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ModSlowFrame& from) { ModSlowFrame::MergeImpl(*this, from); } + void MergeFrom(const Fixtures& from) { Fixtures::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -3636,17 +3692,17 @@ class ModSlowFrame final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(ModSlowFrame* PROTOBUF_NONNULL other); + void InternalSwap(Fixtures* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModSlowFrame"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.Fixtures"; } - explicit ModSlowFrame(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ModSlowFrame(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModSlowFrame& from); - ModSlowFrame( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModSlowFrame&& from) noexcept - : ModSlowFrame(arena) { + explicit Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + Fixtures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Fixtures& from); + Fixtures( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Fixtures&& from) noexcept + : Fixtures(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -3663,45 +3719,49 @@ class ModSlowFrame final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kModFieldNumber = 1, - kReportFieldNumber = 2, + kFixturesFieldNumber = 1, + kForwardsFieldNumber = 2, }; - // string mod = 1; - void clear_mod() ; - const ::std::string& mod() const; - template - void set_mod(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_mod(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); - void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); - + // repeated .modlock.host_app.control.Fixture fixtures = 1; + int fixtures_size() const; private: - const ::std::string& _internal_mod() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); + int _internal_fixtures_size() const; public: - // .modlock.wasm.profile.SlowFrame report = 2; - bool has_report() const; - void clear_report() ; - const ::modlock::wasm::profile::SlowFrame& report() const; - [[nodiscard]] ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE release_report(); - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL mutable_report(); - void set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value); - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE unsafe_arena_release_report(); + void clear_fixtures() ; + ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL mutable_fixtures(int index); + ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL mutable_fixtures(); private: - const ::modlock::wasm::profile::SlowFrame& _internal_report() const; - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL _internal_mutable_report(); + const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& _internal_fixtures() const; + ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL _internal_mutable_fixtures(); + public: + const ::modlock::host_app::control::Fixture& fixtures(int index) const; + ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL add_fixtures(); + const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& fixtures() const; + // repeated .modlock.host_app.control.Forward forwards = 2; + int forwards_size() const; + private: + int _internal_forwards_size() const; public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModSlowFrame) + void clear_forwards() ; + ::modlock::host_app::control::Forward* PROTOBUF_NONNULL mutable_forwards(int index); + ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Forward>* PROTOBUF_NONNULL mutable_forwards(); + + private: + const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Forward>& _internal_forwards() const; + ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Forward>* PROTOBUF_NONNULL _internal_mutable_forwards(); + public: + const ::modlock::host_app::control::Forward& forwards(int index) const; + ::modlock::host_app::control::Forward* PROTOBUF_NONNULL add_forwards(); + const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Forward>& forwards() const; + // @@protoc_insertion_point(class_scope:modlock.host_app.control.Fixtures) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable<1, 2, - 1, 49, + 2, 0, 2> _table_; @@ -3719,44 +3779,44 @@ class ModSlowFrame final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ModSlowFrame& from_msg); + const Fixtures& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr mod_; - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE report_; + ::google::protobuf::RepeatedPtrField< ::modlock::host_app::control::Fixture > fixtures_; + ::google::protobuf::RepeatedPtrField< ::modlock::host_app::control::Forward > forwards_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull ModSlowFrame_class_data_; +extern const ::google::protobuf::internal::ClassDataFull Fixtures_class_data_; // ------------------------------------------------------------------- -class UiChanged final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.UiChanged) */ { +class ControlRequest final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ControlRequest) */ { public: - inline UiChanged() : UiChanged(nullptr) {} - ~UiChanged() PROTOBUF_FINAL; + inline ControlRequest() : ControlRequest(nullptr) {} + ~ControlRequest() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(UiChanged* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ControlRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(UiChanged)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ControlRequest)); } #endif template - explicit PROTOBUF_CONSTEXPR UiChanged(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ControlRequest(::google::protobuf::internal::ConstantInitialized); - inline UiChanged(const UiChanged& from) : UiChanged(nullptr, from) {} - inline UiChanged(UiChanged&& from) noexcept - : UiChanged(nullptr, ::std::move(from)) {} - inline UiChanged& operator=(const UiChanged& from) { + inline ControlRequest(const ControlRequest& from) : ControlRequest(nullptr, from) {} + inline ControlRequest(ControlRequest&& from) noexcept + : ControlRequest(nullptr, ::std::move(from)) {} + inline ControlRequest& operator=(const ControlRequest& from) { CopyFrom(from); return *this; } - inline UiChanged& operator=(UiChanged&& from) noexcept { + inline ControlRequest& operator=(ControlRequest&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -3784,13 +3844,20 @@ class UiChanged final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const UiChanged& default_instance() { - return *reinterpret_cast( - &_UiChanged_default_instance_); + static const ControlRequest& default_instance() { + return *reinterpret_cast( + &_ControlRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 13; - friend void swap(UiChanged& a, UiChanged& b) { a.Swap(&b); } - inline void Swap(UiChanged* PROTOBUF_NONNULL other) { + enum BodyCase { + kReload = 1, + kRoles = 2, + kService = 3, + kAnswer = 4, + BODY_NOT_SET = 0, + }; + static constexpr int kIndexInFileMessages = 0; + friend void swap(ControlRequest& a, ControlRequest& b) { a.Swap(&b); } + inline void Swap(ControlRequest* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -3798,7 +3865,7 @@ class UiChanged final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(UiChanged* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ControlRequest* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3806,13 +3873,13 @@ class UiChanged final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - UiChanged* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ControlRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const UiChanged& from); + void CopyFrom(const ControlRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const UiChanged& from) { UiChanged::MergeImpl(*this, from); } + void MergeFrom(const ControlRequest& from) { ControlRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -3848,17 +3915,17 @@ class UiChanged final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(UiChanged* PROTOBUF_NONNULL other); + void InternalSwap(ControlRequest* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.UiChanged"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ControlRequest"; } - explicit UiChanged(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - UiChanged(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const UiChanged& from); - UiChanged( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, UiChanged&& from) noexcept - : UiChanged(arena) { + explicit ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ControlRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ControlRequest& from); + ControlRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ControlRequest&& from) noexcept + : ControlRequest(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -3875,66 +3942,111 @@ class UiChanged final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kModFieldNumber = 1, - kChangeFieldNumber = 3, - kSlotFieldNumber = 2, + kReloadFieldNumber = 1, + kRolesFieldNumber = 2, + kServiceFieldNumber = 3, + kAnswerFieldNumber = 4, }; - // string mod = 1; - void clear_mod() ; - const ::std::string& mod() const; - template - void set_mod(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_mod(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); - void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); - + // .modlock.host_app.control.ReloadRequest reload = 1; + bool has_reload() const; private: - const ::std::string& _internal_mod() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); + bool _internal_has_reload() const; public: - // .modlock.wasm.ui.Change change = 3; - bool has_change() const; - void clear_change() ; - const ::modlock::wasm::ui::Change& change() const; - [[nodiscard]] ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE release_change(); - ::modlock::wasm::ui::Change* PROTOBUF_NONNULL mutable_change(); - void set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value); - ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE unsafe_arena_release_change(); + void clear_reload() ; + const ::modlock::host_app::control::ReloadRequest& reload() const; + [[nodiscard]] ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE release_reload(); + ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL mutable_reload(); + void set_allocated_reload(::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_reload(::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE unsafe_arena_release_reload(); private: - const ::modlock::wasm::ui::Change& _internal_change() const; - ::modlock::wasm::ui::Change* PROTOBUF_NONNULL _internal_mutable_change(); + const ::modlock::host_app::control::ReloadRequest& _internal_reload() const; + ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL _internal_mutable_reload(); public: - // int32 slot = 2; - void clear_slot() ; - ::int32_t slot() const; - void set_slot(::int32_t value); - + // .modlock.wasm.players.RolesTable roles = 2; + bool has_roles() const; private: - ::int32_t _internal_slot() const; - void _internal_set_slot(::int32_t value); + bool _internal_has_roles() const; public: - // @@protoc_insertion_point(class_scope:modlock.host_app.control.UiChanged) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 1, 46, - 2> - _table_; + void clear_roles() ; + const ::modlock::wasm::players::RolesTable& roles() const; + [[nodiscard]] ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE release_roles(); + ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL mutable_roles(); + void set_allocated_roles(::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_roles(::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value); + ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE unsafe_arena_release_roles(); - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { + private: + const ::modlock::wasm::players::RolesTable& _internal_roles() const; + ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL _internal_mutable_roles(); + + public: + // .modlock.host_app.control.ServiceReply service = 3; + bool has_service() const; + private: + bool _internal_has_service() const; + + public: + void clear_service() ; + const ::modlock::host_app::control::ServiceReply& service() const; + [[nodiscard]] ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE release_service(); + ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL mutable_service(); + void set_allocated_service(::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_service(::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE unsafe_arena_release_service(); + + private: + const ::modlock::host_app::control::ServiceReply& _internal_service() const; + ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL _internal_mutable_service(); + + public: + // .modlock.host_app.control.ServiceAnswer answer = 4; + bool has_answer() const; + private: + bool _internal_has_answer() const; + + public: + void clear_answer() ; + const ::modlock::host_app::control::ServiceAnswer& answer() const; + [[nodiscard]] ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NULLABLE release_answer(); + ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NONNULL mutable_answer(); + void set_allocated_answer(::modlock::host_app::control::ServiceAnswer* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_answer(::modlock::host_app::control::ServiceAnswer* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NULLABLE unsafe_arena_release_answer(); + + private: + const ::modlock::host_app::control::ServiceAnswer& _internal_answer() const; + ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NONNULL _internal_mutable_answer(); + + public: + void clear_body(); + BodyCase body_case() const; + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ControlRequest) + private: + class _Internal; + void set_has_reload(); + void set_has_roles(); + void set_has_service(); + void set_has_answer(); + inline bool has_body() const; + inline void clear_has_body(); + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 4, + 4, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, @@ -3942,45 +4054,50 @@ class UiChanged final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const UiChanged& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; + const ControlRequest& from_msg); + union BodyUnion { + constexpr BodyUnion() : _constinit_{} {} + ::google::protobuf::internal::ConstantInitialized _constinit_; + ::google::protobuf::Message* PROTOBUF_NULLABLE reload_; + ::google::protobuf::Message* PROTOBUF_NULLABLE roles_; + ::google::protobuf::Message* PROTOBUF_NULLABLE service_; + ::google::protobuf::Message* PROTOBUF_NULLABLE answer_; + } body_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr mod_; - ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE change_; - ::int32_t slot_; + ::uint32_t _oneof_case_[1]; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull UiChanged_class_data_; +extern const ::google::protobuf::internal::ClassDataFull ControlRequest_class_data_; // ------------------------------------------------------------------- -class HostEvent final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:modlock.host_app.control.HostEvent) */ { +class ModCalls final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModCalls) */ { public: - inline HostEvent() : HostEvent(nullptr) {} - ~HostEvent() PROTOBUF_FINAL; + inline ModCalls() : ModCalls(nullptr) {} + ~ModCalls() PROTOBUF_FINAL; #if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(HostEvent* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + void operator delete(ModCalls* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(HostEvent)); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ModCalls)); } #endif template - explicit PROTOBUF_CONSTEXPR HostEvent(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ModCalls(::google::protobuf::internal::ConstantInitialized); - inline HostEvent(const HostEvent& from) : HostEvent(nullptr, from) {} - inline HostEvent(HostEvent&& from) noexcept - : HostEvent(nullptr, ::std::move(from)) {} - inline HostEvent& operator=(const HostEvent& from) { + inline ModCalls(const ModCalls& from) : ModCalls(nullptr, from) {} + inline ModCalls(ModCalls&& from) noexcept + : ModCalls(nullptr, ::std::move(from)) {} + inline ModCalls& operator=(const ModCalls& from) { CopyFrom(from); return *this; } - inline HostEvent& operator=(HostEvent&& from) noexcept { + inline ModCalls& operator=(ModCalls&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); @@ -4008,28 +4125,13 @@ class HostEvent final : public ::google::protobuf::Message static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { return default_instance().GetMetadata().reflection; } - static const HostEvent& default_instance() { - return *reinterpret_cast( - &_HostEvent_default_instance_); + static const ModCalls& default_instance() { + return *reinterpret_cast( + &_ModCalls_default_instance_); } - enum BodyCase { - kStarted = 1, - kLog = 2, - kFailed = 3, - kJoined = 4, - kReady = 5, - kUi = 6, - kLeft = 7, - kMessage = 8, - kChat = 9, - kCalls = 10, - kSlowFrame = 11, - kServiceApplied = 12, - BODY_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 2; - friend void swap(HostEvent& a, HostEvent& b) { a.Swap(&b); } - inline void Swap(HostEvent* PROTOBUF_NONNULL other) { + static constexpr int kIndexInFileMessages = 7; + friend void swap(ModCalls& a, ModCalls& b) { a.Swap(&b); } + inline void Swap(ModCalls* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { InternalSwap(other); @@ -4037,7 +4139,7 @@ class HostEvent final : public ::google::protobuf::Message ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(HostEvent* PROTOBUF_NONNULL other) { + void UnsafeArenaSwap(ModCalls* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -4045,13 +4147,13 @@ class HostEvent final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - HostEvent* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); + ModCalls* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const HostEvent& from); + void CopyFrom(const ModCalls& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const HostEvent& from) { HostEvent::MergeImpl(*this, from); } + void MergeFrom(const ModCalls& from) { ModCalls::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::MessageLite& to_msg, @@ -4087,17 +4189,17 @@ class HostEvent final : public ::google::protobuf::Message private: void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); static void SharedDtor(MessageLite& self); - void InternalSwap(HostEvent* PROTOBUF_NONNULL other); + void InternalSwap(ModCalls* PROTOBUF_NONNULL other); private: template friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "modlock.host_app.control.HostEvent"; } + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModCalls"; } - explicit HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HostEvent& from); - HostEvent( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, HostEvent&& from) noexcept - : HostEvent(arena) { + explicit ModCalls(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ModCalls(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModCalls& from); + ModCalls( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModCalls&& from) noexcept + : ModCalls(arena) { *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; @@ -4114,269 +4216,480 @@ class HostEvent final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { - kStartedFieldNumber = 1, - kLogFieldNumber = 2, - kFailedFieldNumber = 3, - kJoinedFieldNumber = 4, - kReadyFieldNumber = 5, - kUiFieldNumber = 6, - kLeftFieldNumber = 7, - kMessageFieldNumber = 8, - kChatFieldNumber = 9, - kCallsFieldNumber = 10, - kSlowFrameFieldNumber = 11, - kServiceAppliedFieldNumber = 12, + kModFieldNumber = 1, + kProfileFieldNumber = 2, }; - // .modlock.host_app.control.ModStarted started = 1; - bool has_started() const; + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; + template + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); + private: - bool _internal_has_started() const; + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - void clear_started() ; - const ::modlock::host_app::control::ModStarted& started() const; - [[nodiscard]] ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE release_started(); - ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL mutable_started(); - void set_allocated_started(::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_started(::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE unsafe_arena_release_started(); + // .modlock.wasm.profile.CallProfile profile = 2; + bool has_profile() const; + void clear_profile() ; + const ::modlock::wasm::profile::CallProfile& profile() const; + [[nodiscard]] ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE release_profile(); + ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL mutable_profile(); + void set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value); + ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE unsafe_arena_release_profile(); private: - const ::modlock::host_app::control::ModStarted& _internal_started() const; - ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL _internal_mutable_started(); + const ::modlock::wasm::profile::CallProfile& _internal_profile() const; + ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL _internal_mutable_profile(); public: - // .modlock.host_app.control.ModLog log = 2; - bool has_log() const; - private: - bool _internal_has_log() const; + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModCalls) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 45, + 2> + _table_; - public: - void clear_log() ; - const ::modlock::host_app::control::ModLog& log() const; - [[nodiscard]] ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE release_log(); - ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL mutable_log(); - void set_allocated_log(::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_log(::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE unsafe_arena_release_log(); + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ModCalls& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE profile_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; +}; - private: - const ::modlock::host_app::control::ModLog& _internal_log() const; - ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL _internal_mutable_log(); +extern const ::google::protobuf::internal::ClassDataFull ModCalls_class_data_; +// ------------------------------------------------------------------- - public: - // .modlock.host_app.control.ModFailed failed = 3; - bool has_failed() const; - private: - bool _internal_has_failed() const; +class ModSlowFrame final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.ModSlowFrame) */ { + public: + inline ModSlowFrame() : ModSlowFrame(nullptr) {} + ~ModSlowFrame() PROTOBUF_FINAL; - public: - void clear_failed() ; - const ::modlock::host_app::control::ModFailed& failed() const; - [[nodiscard]] ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE release_failed(); - ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL mutable_failed(); - void set_allocated_failed(::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_failed(::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE unsafe_arena_release_failed(); +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ModSlowFrame* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ModSlowFrame)); + } +#endif - private: - const ::modlock::host_app::control::ModFailed& _internal_failed() const; - ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL _internal_mutable_failed(); + template + explicit PROTOBUF_CONSTEXPR ModSlowFrame(::google::protobuf::internal::ConstantInitialized); - public: - // .modlock.host_app.control.PlayerJoined joined = 4; - bool has_joined() const; - private: - bool _internal_has_joined() const; + inline ModSlowFrame(const ModSlowFrame& from) : ModSlowFrame(nullptr, from) {} + inline ModSlowFrame(ModSlowFrame&& from) noexcept + : ModSlowFrame(nullptr, ::std::move(from)) {} + inline ModSlowFrame& operator=(const ModSlowFrame& from) { + CopyFrom(from); + return *this; + } + inline ModSlowFrame& operator=(ModSlowFrame&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } - public: - void clear_joined() ; - const ::modlock::host_app::control::PlayerJoined& joined() const; - [[nodiscard]] ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE release_joined(); - ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL mutable_joined(); - void set_allocated_joined(::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_joined(::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE unsafe_arena_release_joined(); + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } - private: - const ::modlock::host_app::control::PlayerJoined& _internal_joined() const; - ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL _internal_mutable_joined(); + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ModSlowFrame& default_instance() { + return *reinterpret_cast( + &_ModSlowFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = 8; + friend void swap(ModSlowFrame& a, ModSlowFrame& b) { a.Swap(&b); } + inline void Swap(ModSlowFrame* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ModSlowFrame* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } - public: - // .modlock.host_app.control.ServerReady ready = 5; - bool has_ready() const; - private: - bool _internal_has_ready() const; + // implements Message ---------------------------------------------- - public: - void clear_ready() ; - const ::modlock::host_app::control::ServerReady& ready() const; - [[nodiscard]] ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE release_ready(); - ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL mutable_ready(); - void set_allocated_ready(::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_ready(::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE unsafe_arena_release_ready(); + ModSlowFrame* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ModSlowFrame& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const ModSlowFrame& from) { ModSlowFrame::MergeImpl(*this, from); } private: - const ::modlock::host_app::control::ServerReady& _internal_ready() const; - ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL _internal_mutable_ready(); + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); public: - // .modlock.host_app.control.UiChanged ui = 6; - bool has_ui() const; + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) private: - bool _internal_has_ui() const; + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); public: - void clear_ui() ; - const ::modlock::host_app::control::UiChanged& ui() const; - [[nodiscard]] ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE release_ui(); - ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL mutable_ui(); - void set_allocated_ui(::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_ui(::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE unsafe_arena_release_ui(); - - private: - const ::modlock::host_app::control::UiChanged& _internal_ui() const; - ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL _internal_mutable_ui(); + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } - public: - // .modlock.host_app.control.PlayerLeft left = 7; - bool has_left() const; private: - bool _internal_has_left() const; - - public: - void clear_left() ; - const ::modlock::host_app::control::PlayerLeft& left() const; - [[nodiscard]] ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE release_left(); - ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL mutable_left(); - void set_allocated_left(::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_left(::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE unsafe_arena_release_left(); + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ModSlowFrame* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.ModSlowFrame"; } - private: - const ::modlock::host_app::control::PlayerLeft& _internal_left() const; - ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL _internal_mutable_left(); + explicit ModSlowFrame(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ModSlowFrame(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ModSlowFrame& from); + ModSlowFrame( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ModSlowFrame&& from) noexcept + : ModSlowFrame(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); - public: - // .modlock.host_app.control.PlayerMessage message = 8; - bool has_message() const; - private: - bool _internal_has_message() const; + public: + static constexpr auto InternalGenerateClassData_(); - public: - void clear_message() ; - const ::modlock::host_app::control::PlayerMessage& message() const; - [[nodiscard]] ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE release_message(); - ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL mutable_message(); - void set_allocated_message(::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_message(::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE unsafe_arena_release_message(); + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- - private: - const ::modlock::host_app::control::PlayerMessage& _internal_message() const; - ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL _internal_mutable_message(); + // accessors ------------------------------------------------------- + enum : int { + kModFieldNumber = 1, + kReportFieldNumber = 2, + }; + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; + template + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); - public: - // .modlock.host_app.control.PlayerChat chat = 9; - bool has_chat() const; private: - bool _internal_has_chat() const; + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - void clear_chat() ; - const ::modlock::host_app::control::PlayerChat& chat() const; - [[nodiscard]] ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE release_chat(); - ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL mutable_chat(); - void set_allocated_chat(::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_chat(::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE unsafe_arena_release_chat(); + // .modlock.wasm.profile.SlowFrame report = 2; + bool has_report() const; + void clear_report() ; + const ::modlock::wasm::profile::SlowFrame& report() const; + [[nodiscard]] ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE release_report(); + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL mutable_report(); + void set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value); + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE unsafe_arena_release_report(); private: - const ::modlock::host_app::control::PlayerChat& _internal_chat() const; - ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL _internal_mutable_chat(); + const ::modlock::wasm::profile::SlowFrame& _internal_report() const; + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL _internal_mutable_report(); public: - // .modlock.host_app.control.ModCalls calls = 10; - bool has_calls() const; - private: - bool _internal_has_calls() const; + // @@protoc_insertion_point(class_scope:modlock.host_app.control.ModSlowFrame) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 49, + 2> + _table_; - public: - void clear_calls() ; - const ::modlock::host_app::control::ModCalls& calls() const; - [[nodiscard]] ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE release_calls(); - ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL mutable_calls(); - void set_allocated_calls(::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_calls(::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE unsafe_arena_release_calls(); + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ModSlowFrame& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE report_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataFull ModSlowFrame_class_data_; +// ------------------------------------------------------------------- + +class UiChanged final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.UiChanged) */ { + public: + inline UiChanged() : UiChanged(nullptr) {} + ~UiChanged() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(UiChanged* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(UiChanged)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR UiChanged(::google::protobuf::internal::ConstantInitialized); + + inline UiChanged(const UiChanged& from) : UiChanged(nullptr, from) {} + inline UiChanged(UiChanged&& from) noexcept + : UiChanged(nullptr, ::std::move(from)) {} + inline UiChanged& operator=(const UiChanged& from) { + CopyFrom(from); + return *this; + } + inline UiChanged& operator=(UiChanged&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UiChanged& default_instance() { + return *reinterpret_cast( + &_UiChanged_default_instance_); + } + static constexpr int kIndexInFileMessages = 13; + friend void swap(UiChanged& a, UiChanged& b) { a.Swap(&b); } + inline void Swap(UiChanged* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UiChanged* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UiChanged* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const UiChanged& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const UiChanged& from) { UiChanged::MergeImpl(*this, from); } private: - const ::modlock::host_app::control::ModCalls& _internal_calls() const; - ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL _internal_mutable_calls(); + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); public: - // .modlock.host_app.control.ModSlowFrame slow_frame = 11; - bool has_slow_frame() const; + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) private: - bool _internal_has_slow_frame() const; + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); public: - void clear_slow_frame() ; - const ::modlock::host_app::control::ModSlowFrame& slow_frame() const; - [[nodiscard]] ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE release_slow_frame(); - ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL mutable_slow_frame(); - void set_allocated_slow_frame(::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_slow_frame(::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE unsafe_arena_release_slow_frame(); + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - const ::modlock::host_app::control::ModSlowFrame& _internal_slow_frame() const; - ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL _internal_mutable_slow_frame(); + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(UiChanged* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.UiChanged"; } + + explicit UiChanged(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + UiChanged(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const UiChanged& from); + UiChanged( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, UiChanged&& from) noexcept + : UiChanged(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kModFieldNumber = 1, + kChangeFieldNumber = 3, + kSlotFieldNumber = 2, + }; + // string mod = 1; + void clear_mod() ; + const ::std::string& mod() const; + template + void set_mod(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_mod(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_mod(); + void set_allocated_mod(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_mod() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_mod(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_mod(); public: - // .modlock.host_app.control.ServiceResult service_applied = 12; - bool has_service_applied() const; + // .modlock.wasm.ui.Change change = 3; + bool has_change() const; + void clear_change() ; + const ::modlock::wasm::ui::Change& change() const; + [[nodiscard]] ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE release_change(); + ::modlock::wasm::ui::Change* PROTOBUF_NONNULL mutable_change(); + void set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value); + ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE unsafe_arena_release_change(); + private: - bool _internal_has_service_applied() const; + const ::modlock::wasm::ui::Change& _internal_change() const; + ::modlock::wasm::ui::Change* PROTOBUF_NONNULL _internal_mutable_change(); public: - void clear_service_applied() ; - const ::modlock::host_app::control::ServiceResult& service_applied() const; - [[nodiscard]] ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE release_service_applied(); - ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL mutable_service_applied(); - void set_allocated_service_applied(::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_service_applied(::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value); - ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE unsafe_arena_release_service_applied(); + // int32 slot = 2; + void clear_slot() ; + ::int32_t slot() const; + void set_slot(::int32_t value); private: - const ::modlock::host_app::control::ServiceResult& _internal_service_applied() const; - ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL _internal_mutable_service_applied(); + ::int32_t _internal_slot() const; + void _internal_set_slot(::int32_t value); public: - void clear_body(); - BodyCase body_case() const; - // @@protoc_insertion_point(class_scope:modlock.host_app.control.HostEvent) + // @@protoc_insertion_point(class_scope:modlock.host_app.control.UiChanged) private: class _Internal; - void set_has_started(); - void set_has_log(); - void set_has_failed(); - void set_has_joined(); - void set_has_ready(); - void set_has_ui(); - void set_has_left(); - void set_has_message(); - void set_has_chat(); - void set_has_calls(); - void set_has_slow_frame(); - void set_has_service_applied(); - inline bool has_body() const; - inline void clear_has_body(); friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 12, - 12, 0, + static const ::google::protobuf::internal::TcParseTable<2, 3, + 1, 46, 2> _table_; @@ -4394,1657 +4707,3036 @@ class HostEvent final : public ::google::protobuf::Message inline explicit Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const HostEvent& from_msg); - union BodyUnion { - constexpr BodyUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - ::google::protobuf::Message* PROTOBUF_NULLABLE started_; - ::google::protobuf::Message* PROTOBUF_NULLABLE log_; - ::google::protobuf::Message* PROTOBUF_NULLABLE failed_; - ::google::protobuf::Message* PROTOBUF_NULLABLE joined_; - ::google::protobuf::Message* PROTOBUF_NULLABLE ready_; - ::google::protobuf::Message* PROTOBUF_NULLABLE ui_; - ::google::protobuf::Message* PROTOBUF_NULLABLE left_; - ::google::protobuf::Message* PROTOBUF_NULLABLE message_; - ::google::protobuf::Message* PROTOBUF_NULLABLE chat_; - ::google::protobuf::Message* PROTOBUF_NULLABLE calls_; - ::google::protobuf::Message* PROTOBUF_NULLABLE slow_frame_; - ::google::protobuf::Message* PROTOBUF_NULLABLE service_applied_; - } body_; + const UiChanged& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; + ::google::protobuf::internal::ArenaStringPtr mod_; + ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE change_; + ::int32_t slot_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; }; -extern const ::google::protobuf::internal::ClassDataFull HostEvent_class_data_; +extern const ::google::protobuf::internal::ClassDataFull UiChanged_class_data_; +// ------------------------------------------------------------------- -// =================================================================== +class HostEvent final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:modlock.host_app.control.HostEvent) */ { + public: + inline HostEvent() : HostEvent(nullptr) {} + ~HostEvent() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(HostEvent* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(HostEvent)); + } +#endif + template + explicit PROTOBUF_CONSTEXPR HostEvent(::google::protobuf::internal::ConstantInitialized); + inline HostEvent(const HostEvent& from) : HostEvent(nullptr, from) {} + inline HostEvent(HostEvent&& from) noexcept + : HostEvent(nullptr, ::std::move(from)) {} + inline HostEvent& operator=(const HostEvent& from) { + CopyFrom(from); + return *this; + } + inline HostEvent& operator=(HostEvent&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } -// =================================================================== + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HostEvent& default_instance() { + return *reinterpret_cast( + &_HostEvent_default_instance_); + } + enum BodyCase { + kStarted = 1, + kLog = 2, + kFailed = 3, + kJoined = 4, + kReady = 5, + kUi = 6, + kLeft = 7, + kMessage = 8, + kChat = 9, + kCalls = 10, + kSlowFrame = 11, + kServiceApplied = 12, + kServiceCall = 13, + BODY_NOT_SET = 0, + }; + static constexpr int kIndexInFileMessages = 2; + friend void swap(HostEvent& a, HostEvent& b) { a.Swap(&b); } + inline void Swap(HostEvent* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HostEvent* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + // implements Message ---------------------------------------------- -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- + HostEvent* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const HostEvent& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const HostEvent& from) { HostEvent::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(HostEvent* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "modlock.host_app.control.HostEvent"; } + + explicit HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + HostEvent(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HostEvent& from); + HostEvent( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, HostEvent&& from) noexcept + : HostEvent(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kStartedFieldNumber = 1, + kLogFieldNumber = 2, + kFailedFieldNumber = 3, + kJoinedFieldNumber = 4, + kReadyFieldNumber = 5, + kUiFieldNumber = 6, + kLeftFieldNumber = 7, + kMessageFieldNumber = 8, + kChatFieldNumber = 9, + kCallsFieldNumber = 10, + kSlowFrameFieldNumber = 11, + kServiceAppliedFieldNumber = 12, + kServiceCallFieldNumber = 13, + }; + // .modlock.host_app.control.ModStarted started = 1; + bool has_started() const; + private: + bool _internal_has_started() const; + + public: + void clear_started() ; + const ::modlock::host_app::control::ModStarted& started() const; + [[nodiscard]] ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE release_started(); + ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL mutable_started(); + void set_allocated_started(::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_started(::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE unsafe_arena_release_started(); + + private: + const ::modlock::host_app::control::ModStarted& _internal_started() const; + ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL _internal_mutable_started(); + + public: + // .modlock.host_app.control.ModLog log = 2; + bool has_log() const; + private: + bool _internal_has_log() const; + + public: + void clear_log() ; + const ::modlock::host_app::control::ModLog& log() const; + [[nodiscard]] ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE release_log(); + ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL mutable_log(); + void set_allocated_log(::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_log(::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE unsafe_arena_release_log(); + + private: + const ::modlock::host_app::control::ModLog& _internal_log() const; + ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL _internal_mutable_log(); + + public: + // .modlock.host_app.control.ModFailed failed = 3; + bool has_failed() const; + private: + bool _internal_has_failed() const; + + public: + void clear_failed() ; + const ::modlock::host_app::control::ModFailed& failed() const; + [[nodiscard]] ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE release_failed(); + ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL mutable_failed(); + void set_allocated_failed(::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_failed(::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE unsafe_arena_release_failed(); + + private: + const ::modlock::host_app::control::ModFailed& _internal_failed() const; + ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL _internal_mutable_failed(); + + public: + // .modlock.host_app.control.PlayerJoined joined = 4; + bool has_joined() const; + private: + bool _internal_has_joined() const; + + public: + void clear_joined() ; + const ::modlock::host_app::control::PlayerJoined& joined() const; + [[nodiscard]] ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE release_joined(); + ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL mutable_joined(); + void set_allocated_joined(::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_joined(::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE unsafe_arena_release_joined(); + + private: + const ::modlock::host_app::control::PlayerJoined& _internal_joined() const; + ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL _internal_mutable_joined(); + + public: + // .modlock.host_app.control.ServerReady ready = 5; + bool has_ready() const; + private: + bool _internal_has_ready() const; + + public: + void clear_ready() ; + const ::modlock::host_app::control::ServerReady& ready() const; + [[nodiscard]] ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE release_ready(); + ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL mutable_ready(); + void set_allocated_ready(::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_ready(::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE unsafe_arena_release_ready(); + + private: + const ::modlock::host_app::control::ServerReady& _internal_ready() const; + ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL _internal_mutable_ready(); + + public: + // .modlock.host_app.control.UiChanged ui = 6; + bool has_ui() const; + private: + bool _internal_has_ui() const; + + public: + void clear_ui() ; + const ::modlock::host_app::control::UiChanged& ui() const; + [[nodiscard]] ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE release_ui(); + ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL mutable_ui(); + void set_allocated_ui(::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_ui(::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE unsafe_arena_release_ui(); + + private: + const ::modlock::host_app::control::UiChanged& _internal_ui() const; + ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL _internal_mutable_ui(); + + public: + // .modlock.host_app.control.PlayerLeft left = 7; + bool has_left() const; + private: + bool _internal_has_left() const; + + public: + void clear_left() ; + const ::modlock::host_app::control::PlayerLeft& left() const; + [[nodiscard]] ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE release_left(); + ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL mutable_left(); + void set_allocated_left(::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_left(::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE unsafe_arena_release_left(); + + private: + const ::modlock::host_app::control::PlayerLeft& _internal_left() const; + ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL _internal_mutable_left(); + + public: + // .modlock.host_app.control.PlayerMessage message = 8; + bool has_message() const; + private: + bool _internal_has_message() const; + + public: + void clear_message() ; + const ::modlock::host_app::control::PlayerMessage& message() const; + [[nodiscard]] ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE release_message(); + ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL mutable_message(); + void set_allocated_message(::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_message(::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE unsafe_arena_release_message(); + + private: + const ::modlock::host_app::control::PlayerMessage& _internal_message() const; + ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL _internal_mutable_message(); + + public: + // .modlock.host_app.control.PlayerChat chat = 9; + bool has_chat() const; + private: + bool _internal_has_chat() const; + + public: + void clear_chat() ; + const ::modlock::host_app::control::PlayerChat& chat() const; + [[nodiscard]] ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE release_chat(); + ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL mutable_chat(); + void set_allocated_chat(::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_chat(::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE unsafe_arena_release_chat(); + + private: + const ::modlock::host_app::control::PlayerChat& _internal_chat() const; + ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL _internal_mutable_chat(); + + public: + // .modlock.host_app.control.ModCalls calls = 10; + bool has_calls() const; + private: + bool _internal_has_calls() const; + + public: + void clear_calls() ; + const ::modlock::host_app::control::ModCalls& calls() const; + [[nodiscard]] ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE release_calls(); + ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL mutable_calls(); + void set_allocated_calls(::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_calls(::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE unsafe_arena_release_calls(); + + private: + const ::modlock::host_app::control::ModCalls& _internal_calls() const; + ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL _internal_mutable_calls(); + + public: + // .modlock.host_app.control.ModSlowFrame slow_frame = 11; + bool has_slow_frame() const; + private: + bool _internal_has_slow_frame() const; + + public: + void clear_slow_frame() ; + const ::modlock::host_app::control::ModSlowFrame& slow_frame() const; + [[nodiscard]] ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE release_slow_frame(); + ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL mutable_slow_frame(); + void set_allocated_slow_frame(::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_slow_frame(::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE unsafe_arena_release_slow_frame(); + + private: + const ::modlock::host_app::control::ModSlowFrame& _internal_slow_frame() const; + ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL _internal_mutable_slow_frame(); + + public: + // .modlock.host_app.control.ServiceResult service_applied = 12; + bool has_service_applied() const; + private: + bool _internal_has_service_applied() const; + + public: + void clear_service_applied() ; + const ::modlock::host_app::control::ServiceResult& service_applied() const; + [[nodiscard]] ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE release_service_applied(); + ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL mutable_service_applied(); + void set_allocated_service_applied(::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_service_applied(::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE unsafe_arena_release_service_applied(); + + private: + const ::modlock::host_app::control::ServiceResult& _internal_service_applied() const; + ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL _internal_mutable_service_applied(); + + public: + // .modlock.host_app.control.ServiceCall service_call = 13; + bool has_service_call() const; + private: + bool _internal_has_service_call() const; + + public: + void clear_service_call() ; + const ::modlock::host_app::control::ServiceCall& service_call() const; + [[nodiscard]] ::modlock::host_app::control::ServiceCall* PROTOBUF_NULLABLE release_service_call(); + ::modlock::host_app::control::ServiceCall* PROTOBUF_NONNULL mutable_service_call(); + void set_allocated_service_call(::modlock::host_app::control::ServiceCall* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_service_call(::modlock::host_app::control::ServiceCall* PROTOBUF_NULLABLE value); + ::modlock::host_app::control::ServiceCall* PROTOBUF_NULLABLE unsafe_arena_release_service_call(); + + private: + const ::modlock::host_app::control::ServiceCall& _internal_service_call() const; + ::modlock::host_app::control::ServiceCall* PROTOBUF_NONNULL _internal_mutable_service_call(); + + public: + void clear_body(); + BodyCase body_case() const; + // @@protoc_insertion_point(class_scope:modlock.host_app.control.HostEvent) + private: + class _Internal; + void set_has_started(); + void set_has_log(); + void set_has_failed(); + void set_has_joined(); + void set_has_ready(); + void set_has_ui(); + void set_has_left(); + void set_has_message(); + void set_has_chat(); + void set_has_calls(); + void set_has_slow_frame(); + void set_has_service_applied(); + void set_has_service_call(); + inline bool has_body() const; + inline void clear_has_body(); + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 13, + 13, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const HostEvent& from_msg); + union BodyUnion { + constexpr BodyUnion() : _constinit_{} {} + ::google::protobuf::internal::ConstantInitialized _constinit_; + ::google::protobuf::Message* PROTOBUF_NULLABLE started_; + ::google::protobuf::Message* PROTOBUF_NULLABLE log_; + ::google::protobuf::Message* PROTOBUF_NULLABLE failed_; + ::google::protobuf::Message* PROTOBUF_NULLABLE joined_; + ::google::protobuf::Message* PROTOBUF_NULLABLE ready_; + ::google::protobuf::Message* PROTOBUF_NULLABLE ui_; + ::google::protobuf::Message* PROTOBUF_NULLABLE left_; + ::google::protobuf::Message* PROTOBUF_NULLABLE message_; + ::google::protobuf::Message* PROTOBUF_NULLABLE chat_; + ::google::protobuf::Message* PROTOBUF_NULLABLE calls_; + ::google::protobuf::Message* PROTOBUF_NULLABLE slow_frame_; + ::google::protobuf::Message* PROTOBUF_NULLABLE service_applied_; + ::google::protobuf::Message* PROTOBUF_NULLABLE service_call_; + } body_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t _oneof_case_[1]; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_github_2ecom_2fparalin_2fmodlock_2fsrc_2fhost_5fapp_2fcontrol_2fcontrol_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataFull HostEvent_class_data_; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ControlRequest + +// .modlock.host_app.control.ReloadRequest reload = 1; +inline bool ControlRequest::has_reload() const { + return body_case() == kReload; +} +inline bool ControlRequest::_internal_has_reload() const { + return body_case() == kReload; +} +inline void ControlRequest::set_has_reload() { + _impl_._oneof_case_[0] = kReload; +} +inline void ControlRequest::clear_reload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kReload) { + if (GetArena() == nullptr) { + delete _impl_.body_.reload_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.reload_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE ControlRequest::release_reload() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.reload) + if (body_case() == kReload) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.reload_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ReloadRequest& ControlRequest::_internal_reload() const { + return body_case() == kReload ? static_cast(*reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_)) + : reinterpret_cast(::modlock::host_app::control::_ReloadRequest_default_instance_); +} +inline const ::modlock::host_app::control::ReloadRequest& ControlRequest::reload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.reload) + return _internal_reload(); +} +inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_reload() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.reload) + if (body_case() == kReload) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); + _impl_.body_.reload_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlRequest::unsafe_arena_set_allocated_reload( + ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_reload(); + _impl_.body_.reload_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.reload) +} +inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL ControlRequest::_internal_mutable_reload() { + if (body_case() != kReload) { + clear_body(); + set_has_reload(); + _impl_.body_.reload_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ReloadRequest>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); +} +inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL ControlRequest::mutable_reload() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ReloadRequest* _msg = _internal_mutable_reload(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.reload) + return _msg; +} + +// .modlock.wasm.players.RolesTable roles = 2; +inline bool ControlRequest::has_roles() const { + return body_case() == kRoles; +} +inline bool ControlRequest::_internal_has_roles() const { + return body_case() == kRoles; +} +inline void ControlRequest::set_has_roles() { + _impl_._oneof_case_[0] = kRoles; +} +inline ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE ControlRequest::release_roles() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.roles) + if (body_case() == kRoles) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.roles_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::wasm::players::RolesTable& ControlRequest::_internal_roles() const { + return body_case() == kRoles ? static_cast(*reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_)) + : reinterpret_cast(::modlock::wasm::players::_RolesTable_default_instance_); +} +inline const ::modlock::wasm::players::RolesTable& ControlRequest::roles() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.roles) + return _internal_roles(); +} +inline ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_roles() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.roles) + if (body_case() == kRoles) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); + _impl_.body_.roles_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlRequest::unsafe_arena_set_allocated_roles( + ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_roles(); + _impl_.body_.roles_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.roles) +} +inline ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL ControlRequest::_internal_mutable_roles() { + if (body_case() != kRoles) { + clear_body(); + set_has_roles(); + _impl_.body_.roles_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::players::RolesTable>(GetArena())); + } + return reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); +} +inline ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL ControlRequest::mutable_roles() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::wasm::players::RolesTable* _msg = _internal_mutable_roles(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.roles) + return _msg; +} + +// .modlock.host_app.control.ServiceReply service = 3; +inline bool ControlRequest::has_service() const { + return body_case() == kService; +} +inline bool ControlRequest::_internal_has_service() const { + return body_case() == kService; +} +inline void ControlRequest::set_has_service() { + _impl_._oneof_case_[0] = kService; +} +inline void ControlRequest::clear_service() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kService) { + if (GetArena() == nullptr) { + delete _impl_.body_.service_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE ControlRequest::release_service() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.service) + if (body_case() == kService) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.service_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ServiceReply& ControlRequest::_internal_service() const { + return body_case() == kService ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_)) + : reinterpret_cast(::modlock::host_app::control::_ServiceReply_default_instance_); +} +inline const ::modlock::host_app::control::ServiceReply& ControlRequest::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.service) + return _internal_service(); +} +inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_service() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.service) + if (body_case() == kService) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); + _impl_.body_.service_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlRequest::unsafe_arena_set_allocated_service( + ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_service(); + _impl_.body_.service_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.service) +} +inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL ControlRequest::_internal_mutable_service() { + if (body_case() != kService) { + clear_body(); + set_has_service(); + _impl_.body_.service_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceReply>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); +} +inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL ControlRequest::mutable_service() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ServiceReply* _msg = _internal_mutable_service(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.service) + return _msg; +} + +// .modlock.host_app.control.ServiceAnswer answer = 4; +inline bool ControlRequest::has_answer() const { + return body_case() == kAnswer; +} +inline bool ControlRequest::_internal_has_answer() const { + return body_case() == kAnswer; +} +inline void ControlRequest::set_has_answer() { + _impl_._oneof_case_[0] = kAnswer; +} +inline void ControlRequest::clear_answer() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kAnswer) { + if (GetArena() == nullptr) { + delete _impl_.body_.answer_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.answer_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NULLABLE ControlRequest::release_answer() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.answer) + if (body_case() == kAnswer) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceAnswer*>(_impl_.body_.answer_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.answer_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ServiceAnswer& ControlRequest::_internal_answer() const { + return body_case() == kAnswer ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceAnswer*>(_impl_.body_.answer_)) + : reinterpret_cast(::modlock::host_app::control::_ServiceAnswer_default_instance_); +} +inline const ::modlock::host_app::control::ServiceAnswer& ControlRequest::answer() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.answer) + return _internal_answer(); +} +inline ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_answer() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.answer) + if (body_case() == kAnswer) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceAnswer*>(_impl_.body_.answer_); + _impl_.body_.answer_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlRequest::unsafe_arena_set_allocated_answer( + ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_answer(); + _impl_.body_.answer_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.answer) +} +inline ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NONNULL ControlRequest::_internal_mutable_answer() { + if (body_case() != kAnswer) { + clear_body(); + set_has_answer(); + _impl_.body_.answer_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceAnswer>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ServiceAnswer*>(_impl_.body_.answer_); +} +inline ::modlock::host_app::control::ServiceAnswer* PROTOBUF_NONNULL ControlRequest::mutable_answer() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ServiceAnswer* _msg = _internal_mutable_answer(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.answer) + return _msg; +} + +inline bool ControlRequest::has_body() const { + return body_case() != BODY_NOT_SET; +} +inline void ControlRequest::clear_has_body() { + _impl_._oneof_case_[0] = BODY_NOT_SET; +} +inline ControlRequest::BodyCase ControlRequest::body_case() const { + return ControlRequest::BodyCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// ReloadRequest + +// string path = 1; +inline void ReloadRequest::clear_path() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.path_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ReloadRequest::path() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ReloadRequest.path) + return _internal_path(); +} +template +PROTOBUF_ALWAYS_INLINE void ReloadRequest::set_path(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.path_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ReloadRequest.path) +} +inline ::std::string* PROTOBUF_NONNULL ReloadRequest::mutable_path() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_path(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ReloadRequest.path) + return _s; +} +inline const ::std::string& ReloadRequest::_internal_path() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.path_.Get(); +} +inline void ReloadRequest::_internal_set_path(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.path_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ReloadRequest::_internal_mutable_path() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.path_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ReloadRequest::release_path() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ReloadRequest.path) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.path_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.path_.Set("", GetArena()); + } + return released; +} +inline void ReloadRequest::set_allocated_path(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.path_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.path_.IsDefault()) { + _impl_.path_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ReloadRequest.path) +} + +// ------------------------------------------------------------------- + +// HostEvent + +// .modlock.host_app.control.ModStarted started = 1; +inline bool HostEvent::has_started() const { + return body_case() == kStarted; +} +inline bool HostEvent::_internal_has_started() const { + return body_case() == kStarted; +} +inline void HostEvent::set_has_started() { + _impl_._oneof_case_[0] = kStarted; +} +inline void HostEvent::clear_started() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kStarted) { + if (GetArena() == nullptr) { + delete _impl_.body_.started_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.started_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE HostEvent::release_started() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.started) + if (body_case() == kStarted) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.started_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ModStarted& HostEvent::_internal_started() const { + return body_case() == kStarted ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_)) + : reinterpret_cast(::modlock::host_app::control::_ModStarted_default_instance_); +} +inline const ::modlock::host_app::control::ModStarted& HostEvent::started() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.started) + return _internal_started(); +} +inline ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_started() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.started) + if (body_case() == kStarted) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); + _impl_.body_.started_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void HostEvent::unsafe_arena_set_allocated_started( + ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_started(); + _impl_.body_.started_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.started) +} +inline ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL HostEvent::_internal_mutable_started() { + if (body_case() != kStarted) { + clear_body(); + set_has_started(); + _impl_.body_.started_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModStarted>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); +} +inline ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL HostEvent::mutable_started() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ModStarted* _msg = _internal_mutable_started(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.started) + return _msg; +} -// ControlRequest +// .modlock.host_app.control.ModLog log = 2; +inline bool HostEvent::has_log() const { + return body_case() == kLog; +} +inline bool HostEvent::_internal_has_log() const { + return body_case() == kLog; +} +inline void HostEvent::set_has_log() { + _impl_._oneof_case_[0] = kLog; +} +inline void HostEvent::clear_log() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kLog) { + if (GetArena() == nullptr) { + delete _impl_.body_.log_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.log_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE HostEvent::release_log() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.log) + if (body_case() == kLog) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.log_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::modlock::host_app::control::ModLog& HostEvent::_internal_log() const { + return body_case() == kLog ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_)) + : reinterpret_cast(::modlock::host_app::control::_ModLog_default_instance_); +} +inline const ::modlock::host_app::control::ModLog& HostEvent::log() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.log) + return _internal_log(); +} +inline ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_log() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.log) + if (body_case() == kLog) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); + _impl_.body_.log_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void HostEvent::unsafe_arena_set_allocated_log( + ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_log(); + _impl_.body_.log_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.log) +} +inline ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL HostEvent::_internal_mutable_log() { + if (body_case() != kLog) { + clear_body(); + set_has_log(); + _impl_.body_.log_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModLog>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); +} +inline ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL HostEvent::mutable_log() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ModLog* _msg = _internal_mutable_log(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.log) + return _msg; +} -// .modlock.host_app.control.ReloadRequest reload = 1; -inline bool ControlRequest::has_reload() const { - return body_case() == kReload; +// .modlock.host_app.control.ModFailed failed = 3; +inline bool HostEvent::has_failed() const { + return body_case() == kFailed; } -inline bool ControlRequest::_internal_has_reload() const { - return body_case() == kReload; +inline bool HostEvent::_internal_has_failed() const { + return body_case() == kFailed; } -inline void ControlRequest::set_has_reload() { - _impl_._oneof_case_[0] = kReload; +inline void HostEvent::set_has_failed() { + _impl_._oneof_case_[0] = kFailed; } -inline void ControlRequest::clear_reload() { +inline void HostEvent::clear_failed() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kReload) { + if (body_case() == kFailed) { if (GetArena() == nullptr) { - delete _impl_.body_.reload_; + delete _impl_.body_.failed_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.reload_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.failed_); } clear_has_body(); } } -inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE ControlRequest::release_reload() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.reload) - if (body_case() == kReload) { +inline ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE HostEvent::release_failed() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.failed) + if (body_case() == kFailed) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.reload_ = nullptr; + _impl_.body_.failed_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ReloadRequest& ControlRequest::_internal_reload() const { - return body_case() == kReload ? static_cast(*reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_)) - : reinterpret_cast(::modlock::host_app::control::_ReloadRequest_default_instance_); +inline const ::modlock::host_app::control::ModFailed& HostEvent::_internal_failed() const { + return body_case() == kFailed ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_)) + : reinterpret_cast(::modlock::host_app::control::_ModFailed_default_instance_); +} +inline const ::modlock::host_app::control::ModFailed& HostEvent::failed() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.failed) + return _internal_failed(); +} +inline ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_failed() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.failed) + if (body_case() == kFailed) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); + _impl_.body_.failed_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void HostEvent::unsafe_arena_set_allocated_failed( + ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_failed(); + _impl_.body_.failed_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.failed) +} +inline ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL HostEvent::_internal_mutable_failed() { + if (body_case() != kFailed) { + clear_body(); + set_has_failed(); + _impl_.body_.failed_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModFailed>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); +} +inline ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL HostEvent::mutable_failed() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::ModFailed* _msg = _internal_mutable_failed(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.failed) + return _msg; +} + +// .modlock.host_app.control.PlayerJoined joined = 4; +inline bool HostEvent::has_joined() const { + return body_case() == kJoined; +} +inline bool HostEvent::_internal_has_joined() const { + return body_case() == kJoined; +} +inline void HostEvent::set_has_joined() { + _impl_._oneof_case_[0] = kJoined; +} +inline void HostEvent::clear_joined() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kJoined) { + if (GetArena() == nullptr) { + delete _impl_.body_.joined_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.joined_); + } + clear_has_body(); + } +} +inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE HostEvent::release_joined() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.joined) + if (body_case() == kJoined) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.joined_ = nullptr; + return temp; + } else { + return nullptr; + } } -inline const ::modlock::host_app::control::ReloadRequest& ControlRequest::reload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.reload) - return _internal_reload(); +inline const ::modlock::host_app::control::PlayerJoined& HostEvent::_internal_joined() const { + return body_case() == kJoined ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_)) + : reinterpret_cast(::modlock::host_app::control::_PlayerJoined_default_instance_); } -inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_reload() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.reload) - if (body_case() == kReload) { +inline const ::modlock::host_app::control::PlayerJoined& HostEvent::joined() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.joined) + return _internal_joined(); +} +inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_joined() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.joined) + if (body_case() == kJoined) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); - _impl_.body_.reload_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); + _impl_.body_.joined_ = nullptr; return temp; } else { return nullptr; } } -inline void ControlRequest::unsafe_arena_set_allocated_reload( - ::modlock::host_app::control::ReloadRequest* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_joined( + ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_reload(); - _impl_.body_.reload_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_joined(); + _impl_.body_.joined_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.reload) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.joined) } -inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL ControlRequest::_internal_mutable_reload() { - if (body_case() != kReload) { +inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL HostEvent::_internal_mutable_joined() { + if (body_case() != kJoined) { clear_body(); - set_has_reload(); - _impl_.body_.reload_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ReloadRequest>(GetArena())); + set_has_joined(); + _impl_.body_.joined_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerJoined>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ReloadRequest*>(_impl_.body_.reload_); + return reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); } -inline ::modlock::host_app::control::ReloadRequest* PROTOBUF_NONNULL ControlRequest::mutable_reload() +inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL HostEvent::mutable_joined() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ReloadRequest* _msg = _internal_mutable_reload(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.reload) + ::modlock::host_app::control::PlayerJoined* _msg = _internal_mutable_joined(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.joined) return _msg; } -// .modlock.wasm.players.RolesTable roles = 2; -inline bool ControlRequest::has_roles() const { - return body_case() == kRoles; +// .modlock.host_app.control.ServerReady ready = 5; +inline bool HostEvent::has_ready() const { + return body_case() == kReady; } -inline bool ControlRequest::_internal_has_roles() const { - return body_case() == kRoles; +inline bool HostEvent::_internal_has_ready() const { + return body_case() == kReady; } -inline void ControlRequest::set_has_roles() { - _impl_._oneof_case_[0] = kRoles; +inline void HostEvent::set_has_ready() { + _impl_._oneof_case_[0] = kReady; } -inline ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE ControlRequest::release_roles() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.roles) - if (body_case() == kRoles) { +inline void HostEvent::clear_ready() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (body_case() == kReady) { + if (GetArena() == nullptr) { + delete _impl_.body_.ready_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.ready_); + } clear_has_body(); - auto* temp = reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); + } +} +inline ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE HostEvent::release_ready() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.ready) + if (body_case() == kReady) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.roles_ = nullptr; + _impl_.body_.ready_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::wasm::players::RolesTable& ControlRequest::_internal_roles() const { - return body_case() == kRoles ? static_cast(*reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_)) - : reinterpret_cast(::modlock::wasm::players::_RolesTable_default_instance_); +inline const ::modlock::host_app::control::ServerReady& HostEvent::_internal_ready() const { + return body_case() == kReady ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_)) + : reinterpret_cast(::modlock::host_app::control::_ServerReady_default_instance_); } -inline const ::modlock::wasm::players::RolesTable& ControlRequest::roles() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.roles) - return _internal_roles(); +inline const ::modlock::host_app::control::ServerReady& HostEvent::ready() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.ready) + return _internal_ready(); } -inline ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_roles() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.roles) - if (body_case() == kRoles) { +inline ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_ready() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.ready) + if (body_case() == kReady) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); - _impl_.body_.roles_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); + _impl_.body_.ready_ = nullptr; return temp; } else { return nullptr; } } -inline void ControlRequest::unsafe_arena_set_allocated_roles( - ::modlock::wasm::players::RolesTable* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_ready( + ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_roles(); - _impl_.body_.roles_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_ready(); + _impl_.body_.ready_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.roles) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.ready) } -inline ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL ControlRequest::_internal_mutable_roles() { - if (body_case() != kRoles) { +inline ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL HostEvent::_internal_mutable_ready() { + if (body_case() != kReady) { clear_body(); - set_has_roles(); - _impl_.body_.roles_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::players::RolesTable>(GetArena())); + set_has_ready(); + _impl_.body_.ready_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServerReady>(GetArena())); } - return reinterpret_cast<::modlock::wasm::players::RolesTable*>(_impl_.body_.roles_); + return reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); } -inline ::modlock::wasm::players::RolesTable* PROTOBUF_NONNULL ControlRequest::mutable_roles() +inline ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL HostEvent::mutable_ready() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::wasm::players::RolesTable* _msg = _internal_mutable_roles(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.roles) + ::modlock::host_app::control::ServerReady* _msg = _internal_mutable_ready(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.ready) return _msg; } -// .modlock.host_app.control.ServiceReply service = 3; -inline bool ControlRequest::has_service() const { - return body_case() == kService; +// .modlock.host_app.control.UiChanged ui = 6; +inline bool HostEvent::has_ui() const { + return body_case() == kUi; } -inline bool ControlRequest::_internal_has_service() const { - return body_case() == kService; +inline bool HostEvent::_internal_has_ui() const { + return body_case() == kUi; } -inline void ControlRequest::set_has_service() { - _impl_._oneof_case_[0] = kService; +inline void HostEvent::set_has_ui() { + _impl_._oneof_case_[0] = kUi; } -inline void ControlRequest::clear_service() { +inline void HostEvent::clear_ui() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kService) { + if (body_case() == kUi) { if (GetArena() == nullptr) { - delete _impl_.body_.service_; + delete _impl_.body_.ui_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.ui_); } clear_has_body(); } } -inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE ControlRequest::release_service() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.ControlRequest.service) - if (body_case() == kService) { +inline ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE HostEvent::release_ui() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.ui) + if (body_case() == kUi) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); + auto* temp = reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.service_ = nullptr; + _impl_.body_.ui_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ServiceReply& ControlRequest::_internal_service() const { - return body_case() == kService ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_)) - : reinterpret_cast(::modlock::host_app::control::_ServiceReply_default_instance_); +inline const ::modlock::host_app::control::UiChanged& HostEvent::_internal_ui() const { + return body_case() == kUi ? static_cast(*reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_)) + : reinterpret_cast(::modlock::host_app::control::_UiChanged_default_instance_); } -inline const ::modlock::host_app::control::ServiceReply& ControlRequest::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ControlRequest.service) - return _internal_service(); +inline const ::modlock::host_app::control::UiChanged& HostEvent::ui() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.ui) + return _internal_ui(); } -inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE ControlRequest::unsafe_arena_release_service() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.ControlRequest.service) - if (body_case() == kService) { +inline ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_ui() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.ui) + if (body_case() == kUi) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); - _impl_.body_.service_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); + _impl_.body_.ui_ = nullptr; return temp; } else { return nullptr; } } -inline void ControlRequest::unsafe_arena_set_allocated_service( - ::modlock::host_app::control::ServiceReply* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_ui( + ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_service(); - _impl_.body_.service_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_ui(); + _impl_.body_.ui_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ControlRequest.service) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.ui) } -inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL ControlRequest::_internal_mutable_service() { - if (body_case() != kService) { +inline ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL HostEvent::_internal_mutable_ui() { + if (body_case() != kUi) { clear_body(); - set_has_service(); - _impl_.body_.service_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceReply>(GetArena())); + set_has_ui(); + _impl_.body_.ui_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::UiChanged>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ServiceReply*>(_impl_.body_.service_); + return reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); } -inline ::modlock::host_app::control::ServiceReply* PROTOBUF_NONNULL ControlRequest::mutable_service() +inline ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL HostEvent::mutable_ui() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ServiceReply* _msg = _internal_mutable_service(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ControlRequest.service) + ::modlock::host_app::control::UiChanged* _msg = _internal_mutable_ui(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.ui) return _msg; } -inline bool ControlRequest::has_body() const { - return body_case() != BODY_NOT_SET; -} -inline void ControlRequest::clear_has_body() { - _impl_._oneof_case_[0] = BODY_NOT_SET; -} -inline ControlRequest::BodyCase ControlRequest::body_case() const { - return ControlRequest::BodyCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// ReloadRequest - -// string path = 1; -inline void ReloadRequest::clear_path() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.path_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); -} -inline const ::std::string& ReloadRequest::path() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ReloadRequest.path) - return _internal_path(); -} -template -PROTOBUF_ALWAYS_INLINE void ReloadRequest::set_path(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.path_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ReloadRequest.path) -} -inline ::std::string* PROTOBUF_NONNULL ReloadRequest::mutable_path() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_path(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ReloadRequest.path) - return _s; +// .modlock.host_app.control.PlayerLeft left = 7; +inline bool HostEvent::has_left() const { + return body_case() == kLeft; } -inline const ::std::string& ReloadRequest::_internal_path() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.path_.Get(); +inline bool HostEvent::_internal_has_left() const { + return body_case() == kLeft; } -inline void ReloadRequest::_internal_set_path(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.path_.Set(value, GetArena()); +inline void HostEvent::set_has_left() { + _impl_._oneof_case_[0] = kLeft; } -inline ::std::string* PROTOBUF_NONNULL ReloadRequest::_internal_mutable_path() { +inline void HostEvent::clear_left() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.path_.Mutable( GetArena()); + if (body_case() == kLeft) { + if (GetArena() == nullptr) { + delete _impl_.body_.left_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.left_); + } + clear_has_body(); + } } -inline ::std::string* PROTOBUF_NULLABLE ReloadRequest::release_path() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ReloadRequest.path) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { +inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE HostEvent::release_left() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.left) + if (body_case() == kLeft) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.left_ = nullptr; + return temp; + } else { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.path_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.path_.Set("", GetArena()); - } - return released; } -inline void ReloadRequest::set_allocated_path(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); +inline const ::modlock::host_app::control::PlayerLeft& HostEvent::_internal_left() const { + return body_case() == kLeft ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_)) + : reinterpret_cast(::modlock::host_app::control::_PlayerLeft_default_instance_); +} +inline const ::modlock::host_app::control::PlayerLeft& HostEvent::left() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.left) + return _internal_left(); +} +inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_left() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.left) + if (body_case() == kLeft) { + clear_has_body(); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); + _impl_.body_.left_ = nullptr; + return temp; } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + return nullptr; } - _impl_.path_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.path_.IsDefault()) { - _impl_.path_.Set("", GetArena()); +} +inline void HostEvent::unsafe_arena_set_allocated_left( + ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_body(); + if (value) { + set_has_left(); + _impl_.body_.left_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ReloadRequest.path) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.left) +} +inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL HostEvent::_internal_mutable_left() { + if (body_case() != kLeft) { + clear_body(); + set_has_left(); + _impl_.body_.left_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerLeft>(GetArena())); + } + return reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); +} +inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL HostEvent::mutable_left() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::modlock::host_app::control::PlayerLeft* _msg = _internal_mutable_left(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.left) + return _msg; } -// ------------------------------------------------------------------- - -// HostEvent - -// .modlock.host_app.control.ModStarted started = 1; -inline bool HostEvent::has_started() const { - return body_case() == kStarted; +// .modlock.host_app.control.PlayerMessage message = 8; +inline bool HostEvent::has_message() const { + return body_case() == kMessage; } -inline bool HostEvent::_internal_has_started() const { - return body_case() == kStarted; +inline bool HostEvent::_internal_has_message() const { + return body_case() == kMessage; } -inline void HostEvent::set_has_started() { - _impl_._oneof_case_[0] = kStarted; +inline void HostEvent::set_has_message() { + _impl_._oneof_case_[0] = kMessage; } -inline void HostEvent::clear_started() { +inline void HostEvent::clear_message() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kStarted) { + if (body_case() == kMessage) { if (GetArena() == nullptr) { - delete _impl_.body_.started_; + delete _impl_.body_.message_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.started_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.message_); } clear_has_body(); } } -inline ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE HostEvent::release_started() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.started) - if (body_case() == kStarted) { +inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE HostEvent::release_message() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.message) + if (body_case() == kMessage) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.started_ = nullptr; + _impl_.body_.message_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ModStarted& HostEvent::_internal_started() const { - return body_case() == kStarted ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_)) - : reinterpret_cast(::modlock::host_app::control::_ModStarted_default_instance_); +inline const ::modlock::host_app::control::PlayerMessage& HostEvent::_internal_message() const { + return body_case() == kMessage ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_)) + : reinterpret_cast(::modlock::host_app::control::_PlayerMessage_default_instance_); } -inline const ::modlock::host_app::control::ModStarted& HostEvent::started() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.started) - return _internal_started(); +inline const ::modlock::host_app::control::PlayerMessage& HostEvent::message() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.message) + return _internal_message(); } -inline ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_started() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.started) - if (body_case() == kStarted) { +inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.message) + if (body_case() == kMessage) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); - _impl_.body_.started_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); + _impl_.body_.message_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_started( - ::modlock::host_app::control::ModStarted* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_message( + ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_started(); - _impl_.body_.started_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_message(); + _impl_.body_.message_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.started) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.message) } -inline ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL HostEvent::_internal_mutable_started() { - if (body_case() != kStarted) { +inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL HostEvent::_internal_mutable_message() { + if (body_case() != kMessage) { clear_body(); - set_has_started(); - _impl_.body_.started_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModStarted>(GetArena())); + set_has_message(); + _impl_.body_.message_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerMessage>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ModStarted*>(_impl_.body_.started_); + return reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); } -inline ::modlock::host_app::control::ModStarted* PROTOBUF_NONNULL HostEvent::mutable_started() +inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL HostEvent::mutable_message() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModStarted* _msg = _internal_mutable_started(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.started) + ::modlock::host_app::control::PlayerMessage* _msg = _internal_mutable_message(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.message) return _msg; } -// .modlock.host_app.control.ModLog log = 2; -inline bool HostEvent::has_log() const { - return body_case() == kLog; +// .modlock.host_app.control.PlayerChat chat = 9; +inline bool HostEvent::has_chat() const { + return body_case() == kChat; } -inline bool HostEvent::_internal_has_log() const { - return body_case() == kLog; +inline bool HostEvent::_internal_has_chat() const { + return body_case() == kChat; } -inline void HostEvent::set_has_log() { - _impl_._oneof_case_[0] = kLog; +inline void HostEvent::set_has_chat() { + _impl_._oneof_case_[0] = kChat; } -inline void HostEvent::clear_log() { +inline void HostEvent::clear_chat() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kLog) { + if (body_case() == kChat) { if (GetArena() == nullptr) { - delete _impl_.body_.log_; + delete _impl_.body_.chat_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.log_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.chat_); } clear_has_body(); } } -inline ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE HostEvent::release_log() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.log) - if (body_case() == kLog) { +inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE HostEvent::release_chat() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.chat) + if (body_case() == kChat) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.log_ = nullptr; + _impl_.body_.chat_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ModLog& HostEvent::_internal_log() const { - return body_case() == kLog ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_)) - : reinterpret_cast(::modlock::host_app::control::_ModLog_default_instance_); +inline const ::modlock::host_app::control::PlayerChat& HostEvent::_internal_chat() const { + return body_case() == kChat ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_)) + : reinterpret_cast(::modlock::host_app::control::_PlayerChat_default_instance_); } -inline const ::modlock::host_app::control::ModLog& HostEvent::log() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.log) - return _internal_log(); +inline const ::modlock::host_app::control::PlayerChat& HostEvent::chat() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.chat) + return _internal_chat(); } -inline ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_log() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.log) - if (body_case() == kLog) { +inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_chat() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.chat) + if (body_case() == kChat) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); - _impl_.body_.log_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); + _impl_.body_.chat_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_log( - ::modlock::host_app::control::ModLog* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_chat( + ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_log(); - _impl_.body_.log_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_chat(); + _impl_.body_.chat_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.log) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.chat) } -inline ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL HostEvent::_internal_mutable_log() { - if (body_case() != kLog) { +inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL HostEvent::_internal_mutable_chat() { + if (body_case() != kChat) { clear_body(); - set_has_log(); - _impl_.body_.log_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModLog>(GetArena())); + set_has_chat(); + _impl_.body_.chat_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerChat>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ModLog*>(_impl_.body_.log_); + return reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); } -inline ::modlock::host_app::control::ModLog* PROTOBUF_NONNULL HostEvent::mutable_log() +inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL HostEvent::mutable_chat() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModLog* _msg = _internal_mutable_log(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.log) + ::modlock::host_app::control::PlayerChat* _msg = _internal_mutable_chat(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.chat) return _msg; } -// .modlock.host_app.control.ModFailed failed = 3; -inline bool HostEvent::has_failed() const { - return body_case() == kFailed; +// .modlock.host_app.control.ModCalls calls = 10; +inline bool HostEvent::has_calls() const { + return body_case() == kCalls; } -inline bool HostEvent::_internal_has_failed() const { - return body_case() == kFailed; +inline bool HostEvent::_internal_has_calls() const { + return body_case() == kCalls; } -inline void HostEvent::set_has_failed() { - _impl_._oneof_case_[0] = kFailed; +inline void HostEvent::set_has_calls() { + _impl_._oneof_case_[0] = kCalls; } -inline void HostEvent::clear_failed() { +inline void HostEvent::clear_calls() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kFailed) { + if (body_case() == kCalls) { if (GetArena() == nullptr) { - delete _impl_.body_.failed_; + delete _impl_.body_.calls_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.failed_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.calls_); } clear_has_body(); } } -inline ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE HostEvent::release_failed() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.failed) - if (body_case() == kFailed) { +inline ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE HostEvent::release_calls() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.calls) + if (body_case() == kCalls) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.failed_ = nullptr; + _impl_.body_.calls_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ModFailed& HostEvent::_internal_failed() const { - return body_case() == kFailed ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_)) - : reinterpret_cast(::modlock::host_app::control::_ModFailed_default_instance_); +inline const ::modlock::host_app::control::ModCalls& HostEvent::_internal_calls() const { + return body_case() == kCalls ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_)) + : reinterpret_cast(::modlock::host_app::control::_ModCalls_default_instance_); } -inline const ::modlock::host_app::control::ModFailed& HostEvent::failed() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.failed) - return _internal_failed(); +inline const ::modlock::host_app::control::ModCalls& HostEvent::calls() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.calls) + return _internal_calls(); } -inline ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_failed() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.failed) - if (body_case() == kFailed) { +inline ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_calls() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.calls) + if (body_case() == kCalls) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); - _impl_.body_.failed_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); + _impl_.body_.calls_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_failed( - ::modlock::host_app::control::ModFailed* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_calls( + ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_failed(); - _impl_.body_.failed_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_calls(); + _impl_.body_.calls_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.failed) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.calls) } -inline ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL HostEvent::_internal_mutable_failed() { - if (body_case() != kFailed) { +inline ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL HostEvent::_internal_mutable_calls() { + if (body_case() != kCalls) { clear_body(); - set_has_failed(); - _impl_.body_.failed_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModFailed>(GetArena())); + set_has_calls(); + _impl_.body_.calls_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModCalls>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ModFailed*>(_impl_.body_.failed_); + return reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); } -inline ::modlock::host_app::control::ModFailed* PROTOBUF_NONNULL HostEvent::mutable_failed() +inline ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL HostEvent::mutable_calls() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModFailed* _msg = _internal_mutable_failed(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.failed) + ::modlock::host_app::control::ModCalls* _msg = _internal_mutable_calls(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.calls) return _msg; } -// .modlock.host_app.control.PlayerJoined joined = 4; -inline bool HostEvent::has_joined() const { - return body_case() == kJoined; +// .modlock.host_app.control.ModSlowFrame slow_frame = 11; +inline bool HostEvent::has_slow_frame() const { + return body_case() == kSlowFrame; } -inline bool HostEvent::_internal_has_joined() const { - return body_case() == kJoined; +inline bool HostEvent::_internal_has_slow_frame() const { + return body_case() == kSlowFrame; } -inline void HostEvent::set_has_joined() { - _impl_._oneof_case_[0] = kJoined; +inline void HostEvent::set_has_slow_frame() { + _impl_._oneof_case_[0] = kSlowFrame; } -inline void HostEvent::clear_joined() { +inline void HostEvent::clear_slow_frame() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kJoined) { + if (body_case() == kSlowFrame) { if (GetArena() == nullptr) { - delete _impl_.body_.joined_; + delete _impl_.body_.slow_frame_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.joined_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.slow_frame_); } clear_has_body(); } } -inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE HostEvent::release_joined() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.joined) - if (body_case() == kJoined) { +inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE HostEvent::release_slow_frame() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.slow_frame) + if (body_case() == kSlowFrame) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.joined_ = nullptr; + _impl_.body_.slow_frame_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::PlayerJoined& HostEvent::_internal_joined() const { - return body_case() == kJoined ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_)) - : reinterpret_cast(::modlock::host_app::control::_PlayerJoined_default_instance_); +inline const ::modlock::host_app::control::ModSlowFrame& HostEvent::_internal_slow_frame() const { + return body_case() == kSlowFrame ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_)) + : reinterpret_cast(::modlock::host_app::control::_ModSlowFrame_default_instance_); } -inline const ::modlock::host_app::control::PlayerJoined& HostEvent::joined() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.joined) - return _internal_joined(); +inline const ::modlock::host_app::control::ModSlowFrame& HostEvent::slow_frame() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.slow_frame) + return _internal_slow_frame(); } -inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_joined() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.joined) - if (body_case() == kJoined) { +inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_slow_frame() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.slow_frame) + if (body_case() == kSlowFrame) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); - _impl_.body_.joined_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); + _impl_.body_.slow_frame_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_joined( - ::modlock::host_app::control::PlayerJoined* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_slow_frame( + ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_joined(); - _impl_.body_.joined_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_slow_frame(); + _impl_.body_.slow_frame_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.joined) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.slow_frame) } -inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL HostEvent::_internal_mutable_joined() { - if (body_case() != kJoined) { +inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL HostEvent::_internal_mutable_slow_frame() { + if (body_case() != kSlowFrame) { clear_body(); - set_has_joined(); - _impl_.body_.joined_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerJoined>(GetArena())); + set_has_slow_frame(); + _impl_.body_.slow_frame_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModSlowFrame>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::PlayerJoined*>(_impl_.body_.joined_); + return reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); } -inline ::modlock::host_app::control::PlayerJoined* PROTOBUF_NONNULL HostEvent::mutable_joined() +inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL HostEvent::mutable_slow_frame() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::PlayerJoined* _msg = _internal_mutable_joined(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.joined) + ::modlock::host_app::control::ModSlowFrame* _msg = _internal_mutable_slow_frame(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.slow_frame) return _msg; } -// .modlock.host_app.control.ServerReady ready = 5; -inline bool HostEvent::has_ready() const { - return body_case() == kReady; +// .modlock.host_app.control.ServiceResult service_applied = 12; +inline bool HostEvent::has_service_applied() const { + return body_case() == kServiceApplied; } -inline bool HostEvent::_internal_has_ready() const { - return body_case() == kReady; +inline bool HostEvent::_internal_has_service_applied() const { + return body_case() == kServiceApplied; } -inline void HostEvent::set_has_ready() { - _impl_._oneof_case_[0] = kReady; +inline void HostEvent::set_has_service_applied() { + _impl_._oneof_case_[0] = kServiceApplied; } -inline void HostEvent::clear_ready() { +inline void HostEvent::clear_service_applied() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kReady) { + if (body_case() == kServiceApplied) { if (GetArena() == nullptr) { - delete _impl_.body_.ready_; + delete _impl_.body_.service_applied_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.ready_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_applied_); } clear_has_body(); } } -inline ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE HostEvent::release_ready() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.ready) - if (body_case() == kReady) { +inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE HostEvent::release_service_applied() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.service_applied) + if (body_case() == kServiceApplied) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.ready_ = nullptr; + _impl_.body_.service_applied_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::ServerReady& HostEvent::_internal_ready() const { - return body_case() == kReady ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_)) - : reinterpret_cast(::modlock::host_app::control::_ServerReady_default_instance_); +inline const ::modlock::host_app::control::ServiceResult& HostEvent::_internal_service_applied() const { + return body_case() == kServiceApplied ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_)) + : reinterpret_cast(::modlock::host_app::control::_ServiceResult_default_instance_); } -inline const ::modlock::host_app::control::ServerReady& HostEvent::ready() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.ready) - return _internal_ready(); +inline const ::modlock::host_app::control::ServiceResult& HostEvent::service_applied() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.service_applied) + return _internal_service_applied(); } -inline ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_ready() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.ready) - if (body_case() == kReady) { +inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_service_applied() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.service_applied) + if (body_case() == kServiceApplied) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); - _impl_.body_.ready_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); + _impl_.body_.service_applied_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_ready( - ::modlock::host_app::control::ServerReady* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_service_applied( + ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_ready(); - _impl_.body_.ready_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_service_applied(); + _impl_.body_.service_applied_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.ready) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.service_applied) } -inline ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL HostEvent::_internal_mutable_ready() { - if (body_case() != kReady) { +inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL HostEvent::_internal_mutable_service_applied() { + if (body_case() != kServiceApplied) { clear_body(); - set_has_ready(); - _impl_.body_.ready_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServerReady>(GetArena())); + set_has_service_applied(); + _impl_.body_.service_applied_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceResult>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::ServerReady*>(_impl_.body_.ready_); + return reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); } -inline ::modlock::host_app::control::ServerReady* PROTOBUF_NONNULL HostEvent::mutable_ready() +inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL HostEvent::mutable_service_applied() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ServerReady* _msg = _internal_mutable_ready(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.ready) + ::modlock::host_app::control::ServiceResult* _msg = _internal_mutable_service_applied(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.service_applied) return _msg; } - -// .modlock.host_app.control.UiChanged ui = 6; -inline bool HostEvent::has_ui() const { - return body_case() == kUi; -} -inline bool HostEvent::_internal_has_ui() const { - return body_case() == kUi; + +// .modlock.host_app.control.ServiceCall service_call = 13; +inline bool HostEvent::has_service_call() const { + return body_case() == kServiceCall; } -inline void HostEvent::set_has_ui() { - _impl_._oneof_case_[0] = kUi; +inline bool HostEvent::_internal_has_service_call() const { + return body_case() == kServiceCall; } -inline void HostEvent::clear_ui() { +inline void HostEvent::set_has_service_call() { + _impl_._oneof_case_[0] = kServiceCall; +} +inline void HostEvent::clear_service_call() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kUi) { + if (body_case() == kServiceCall) { if (GetArena() == nullptr) { - delete _impl_.body_.ui_; + delete _impl_.body_.service_call_; } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.ui_); + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_call_); } clear_has_body(); } } -inline ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE HostEvent::release_ui() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.ui) - if (body_case() == kUi) { +inline ::modlock::host_app::control::ServiceCall* PROTOBUF_NULLABLE HostEvent::release_service_call() { + // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.service_call) + if (body_case() == kServiceCall) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceCall*>(_impl_.body_.service_call_); if (GetArena() != nullptr) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } - _impl_.body_.ui_ = nullptr; + _impl_.body_.service_call_ = nullptr; return temp; } else { return nullptr; } } -inline const ::modlock::host_app::control::UiChanged& HostEvent::_internal_ui() const { - return body_case() == kUi ? static_cast(*reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_)) - : reinterpret_cast(::modlock::host_app::control::_UiChanged_default_instance_); +inline const ::modlock::host_app::control::ServiceCall& HostEvent::_internal_service_call() const { + return body_case() == kServiceCall ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceCall*>(_impl_.body_.service_call_)) + : reinterpret_cast(::modlock::host_app::control::_ServiceCall_default_instance_); } -inline const ::modlock::host_app::control::UiChanged& HostEvent::ui() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.ui) - return _internal_ui(); +inline const ::modlock::host_app::control::ServiceCall& HostEvent::service_call() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.service_call) + return _internal_service_call(); } -inline ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_ui() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.ui) - if (body_case() == kUi) { +inline ::modlock::host_app::control::ServiceCall* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_service_call() { + // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.service_call) + if (body_case() == kServiceCall) { clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); - _impl_.body_.ui_ = nullptr; + auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceCall*>(_impl_.body_.service_call_); + _impl_.body_.service_call_ = nullptr; return temp; } else { return nullptr; } } -inline void HostEvent::unsafe_arena_set_allocated_ui( - ::modlock::host_app::control::UiChanged* PROTOBUF_NULLABLE value) { +inline void HostEvent::unsafe_arena_set_allocated_service_call( + ::modlock::host_app::control::ServiceCall* PROTOBUF_NULLABLE value) { // We rely on the oneof clear method to free the earlier contents // of this oneof. We can directly use the pointer we're given to // set the new value. clear_body(); if (value) { - set_has_ui(); - _impl_.body_.ui_ = reinterpret_cast<::google::protobuf::Message*>(value); + set_has_service_call(); + _impl_.body_.service_call_ = reinterpret_cast<::google::protobuf::Message*>(value); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.ui) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.service_call) } -inline ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL HostEvent::_internal_mutable_ui() { - if (body_case() != kUi) { +inline ::modlock::host_app::control::ServiceCall* PROTOBUF_NONNULL HostEvent::_internal_mutable_service_call() { + if (body_case() != kServiceCall) { clear_body(); - set_has_ui(); - _impl_.body_.ui_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::UiChanged>(GetArena())); + set_has_service_call(); + _impl_.body_.service_call_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceCall>(GetArena())); } - return reinterpret_cast<::modlock::host_app::control::UiChanged*>(_impl_.body_.ui_); + return reinterpret_cast<::modlock::host_app::control::ServiceCall*>(_impl_.body_.service_call_); } -inline ::modlock::host_app::control::UiChanged* PROTOBUF_NONNULL HostEvent::mutable_ui() +inline ::modlock::host_app::control::ServiceCall* PROTOBUF_NONNULL HostEvent::mutable_service_call() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::UiChanged* _msg = _internal_mutable_ui(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.ui) + ::modlock::host_app::control::ServiceCall* _msg = _internal_mutable_service_call(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.service_call) return _msg; } -// .modlock.host_app.control.PlayerLeft left = 7; -inline bool HostEvent::has_left() const { - return body_case() == kLeft; +inline bool HostEvent::has_body() const { + return body_case() != BODY_NOT_SET; } -inline bool HostEvent::_internal_has_left() const { - return body_case() == kLeft; +inline void HostEvent::clear_has_body() { + _impl_._oneof_case_[0] = BODY_NOT_SET; } -inline void HostEvent::set_has_left() { - _impl_._oneof_case_[0] = kLeft; +inline HostEvent::BodyCase HostEvent::body_case() const { + return HostEvent::BodyCase(_impl_._oneof_case_[0]); } -inline void HostEvent::clear_left() { +// ------------------------------------------------------------------- + +// PlayerChat + +// int32 slot = 1; +inline void PlayerChat::clear_slot() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kLeft) { - if (GetArena() == nullptr) { - delete _impl_.body_.left_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.left_); - } - clear_has_body(); + _impl_.slot_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t PlayerChat::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.slot) + return _internal_slot(); +} +inline void PlayerChat::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.slot) +} +inline ::int32_t PlayerChat::_internal_slot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slot_; +} +inline void PlayerChat::_internal_set_slot(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = value; +} + +// string name = 2; +inline void PlayerChat::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& PlayerChat::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.name) + return _internal_name(); +} +template +PROTOBUF_ALWAYS_INLINE void PlayerChat::set_name(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.name) +} +inline ::std::string* PROTOBUF_NONNULL PlayerChat::mutable_name() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerChat.name) + return _s; +} +inline const ::std::string& PlayerChat::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void PlayerChat::_internal_set_name(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL PlayerChat::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.name_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE PlayerChat::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerChat.name) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); } + return released; } -inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE HostEvent::release_left() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.left) - if (body_case() == kLeft) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.left_ = nullptr; - return temp; +inline void PlayerChat::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerChat.name) +} + +// string text = 3; +inline void PlayerChat::clear_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.text_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& PlayerChat::text() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.text) + return _internal_text(); +} +template +PROTOBUF_ALWAYS_INLINE void PlayerChat::set_text(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.text_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.text) +} +inline ::std::string* PROTOBUF_NONNULL PlayerChat::mutable_text() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_text(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerChat.text) + return _s; +} +inline const ::std::string& PlayerChat::_internal_text() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.text_.Get(); +} +inline void PlayerChat::_internal_set_text(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.text_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL PlayerChat::_internal_mutable_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.text_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE PlayerChat::release_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerChat.text) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.text_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.text_.Set("", GetArena()); + } + return released; +} +inline void PlayerChat::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.text_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { + _impl_.text_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerChat.text) +} + +// ------------------------------------------------------------------- + +// ModStarted + +// string mod = 1; +inline void ModStarted::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ModStarted::mod() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModStarted.mod) + return _internal_mod(); +} +template +PROTOBUF_ALWAYS_INLINE void ModStarted::set_mod(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModStarted.mod) +} +inline ::std::string* PROTOBUF_NONNULL ModStarted::mutable_mod() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModStarted.mod) + return _s; +} +inline const ::std::string& ModStarted::_internal_mod() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.mod_.Get(); } -inline const ::modlock::host_app::control::PlayerLeft& HostEvent::_internal_left() const { - return body_case() == kLeft ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_)) - : reinterpret_cast(::modlock::host_app::control::_PlayerLeft_default_instance_); +inline void ModStarted::_internal_set_mod(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.Set(value, GetArena()); } -inline const ::modlock::host_app::control::PlayerLeft& HostEvent::left() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.left) - return _internal_left(); +inline ::std::string* PROTOBUF_NONNULL ModStarted::_internal_mutable_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.mod_.Mutable( GetArena()); } -inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_left() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.left) - if (body_case() == kLeft) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); - _impl_.body_.left_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NULLABLE ModStarted::release_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModStarted.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } -} -inline void HostEvent::unsafe_arena_set_allocated_left( - ::modlock::host_app::control::PlayerLeft* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_left(); - _impl_.body_.left_ = reinterpret_cast<::google::protobuf::Message*>(value); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.left) + return released; } -inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL HostEvent::_internal_mutable_left() { - if (body_case() != kLeft) { - clear_body(); - set_has_left(); - _impl_.body_.left_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerLeft>(GetArena())); +inline void ModStarted::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - return reinterpret_cast<::modlock::host_app::control::PlayerLeft*>(_impl_.body_.left_); -} -inline ::modlock::host_app::control::PlayerLeft* PROTOBUF_NONNULL HostEvent::mutable_left() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::PlayerLeft* _msg = _internal_mutable_left(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.left) - return _msg; + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModStarted.mod) } -// .modlock.host_app.control.PlayerMessage message = 8; -inline bool HostEvent::has_message() const { - return body_case() == kMessage; +// bool reloaded = 2; +inline void ModStarted::clear_reloaded() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reloaded_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); } -inline bool HostEvent::_internal_has_message() const { - return body_case() == kMessage; +inline bool ModStarted::reloaded() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModStarted.reloaded) + return _internal_reloaded(); } -inline void HostEvent::set_has_message() { - _impl_._oneof_case_[0] = kMessage; +inline void ModStarted::set_reloaded(bool value) { + _internal_set_reloaded(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModStarted.reloaded) } -inline void HostEvent::clear_message() { +inline bool ModStarted::_internal_reloaded() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.reloaded_; +} +inline void ModStarted::_internal_set_reloaded(bool value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kMessage) { - if (GetArena() == nullptr) { - delete _impl_.body_.message_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.message_); - } - clear_has_body(); - } + _impl_.reloaded_ = value; } -inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE HostEvent::release_message() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.message) - if (body_case() == kMessage) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.message_ = nullptr; - return temp; - } else { - return nullptr; - } + +// ------------------------------------------------------------------- + +// ModLog + +// string mod = 1; +inline void ModLog::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); } -inline const ::modlock::host_app::control::PlayerMessage& HostEvent::_internal_message() const { - return body_case() == kMessage ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_)) - : reinterpret_cast(::modlock::host_app::control::_PlayerMessage_default_instance_); +inline const ::std::string& ModLog::mod() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModLog.mod) + return _internal_mod(); } -inline const ::modlock::host_app::control::PlayerMessage& HostEvent::message() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.message) - return _internal_message(); +template +PROTOBUF_ALWAYS_INLINE void ModLog::set_mod(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModLog.mod) } -inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.message) - if (body_case() == kMessage) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); - _impl_.body_.message_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NONNULL ModLog::mutable_mod() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModLog.mod) + return _s; +} +inline const ::std::string& ModLog::_internal_mod() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.mod_.Get(); +} +inline void ModLog::_internal_set_mod(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ModLog::_internal_mutable_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.mod_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ModLog::release_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModLog.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } -} -inline void HostEvent::unsafe_arena_set_allocated_message( - ::modlock::host_app::control::PlayerMessage* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_message(); - _impl_.body_.message_ = reinterpret_cast<::google::protobuf::Message*>(value); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.message) + return released; } -inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL HostEvent::_internal_mutable_message() { - if (body_case() != kMessage) { - clear_body(); - set_has_message(); - _impl_.body_.message_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerMessage>(GetArena())); +inline void ModLog::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - return reinterpret_cast<::modlock::host_app::control::PlayerMessage*>(_impl_.body_.message_); -} -inline ::modlock::host_app::control::PlayerMessage* PROTOBUF_NONNULL HostEvent::mutable_message() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::PlayerMessage* _msg = _internal_mutable_message(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.message) - return _msg; + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModLog.mod) } -// .modlock.host_app.control.PlayerChat chat = 9; -inline bool HostEvent::has_chat() const { - return body_case() == kChat; -} -inline bool HostEvent::_internal_has_chat() const { - return body_case() == kChat; +// string text = 2; +inline void ModLog::clear_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.text_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); } -inline void HostEvent::set_has_chat() { - _impl_._oneof_case_[0] = kChat; +inline const ::std::string& ModLog::text() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModLog.text) + return _internal_text(); } -inline void HostEvent::clear_chat() { +template +PROTOBUF_ALWAYS_INLINE void ModLog::set_text(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kChat) { - if (GetArena() == nullptr) { - delete _impl_.body_.chat_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.chat_); - } - clear_has_body(); - } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.text_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModLog.text) } -inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE HostEvent::release_chat() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.chat) - if (body_case() == kChat) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.chat_ = nullptr; - return temp; - } else { - return nullptr; - } +inline ::std::string* PROTOBUF_NONNULL ModLog::mutable_text() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_text(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModLog.text) + return _s; } -inline const ::modlock::host_app::control::PlayerChat& HostEvent::_internal_chat() const { - return body_case() == kChat ? static_cast(*reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_)) - : reinterpret_cast(::modlock::host_app::control::_PlayerChat_default_instance_); +inline const ::std::string& ModLog::_internal_text() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.text_.Get(); } -inline const ::modlock::host_app::control::PlayerChat& HostEvent::chat() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.chat) - return _internal_chat(); +inline void ModLog::_internal_set_text(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.text_.Set(value, GetArena()); } -inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_chat() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.chat) - if (body_case() == kChat) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); - _impl_.body_.chat_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NONNULL ModLog::_internal_mutable_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.text_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ModLog::release_text() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModLog.text) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } -} -inline void HostEvent::unsafe_arena_set_allocated_chat( - ::modlock::host_app::control::PlayerChat* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_chat(); - _impl_.body_.chat_ = reinterpret_cast<::google::protobuf::Message*>(value); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.text_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.text_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.chat) + return released; } -inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL HostEvent::_internal_mutable_chat() { - if (body_case() != kChat) { - clear_body(); - set_has_chat(); - _impl_.body_.chat_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::PlayerChat>(GetArena())); +inline void ModLog::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - return reinterpret_cast<::modlock::host_app::control::PlayerChat*>(_impl_.body_.chat_); + _impl_.text_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { + _impl_.text_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModLog.text) } -inline ::modlock::host_app::control::PlayerChat* PROTOBUF_NONNULL HostEvent::mutable_chat() + +// ------------------------------------------------------------------- + +// ModFailed + +// string mod = 1; +inline void ModFailed::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ModFailed::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::PlayerChat* _msg = _internal_mutable_chat(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.chat) - return _msg; + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModFailed.mod) + return _internal_mod(); } - -// .modlock.host_app.control.ModCalls calls = 10; -inline bool HostEvent::has_calls() const { - return body_case() == kCalls; +template +PROTOBUF_ALWAYS_INLINE void ModFailed::set_mod(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModFailed.mod) } -inline bool HostEvent::_internal_has_calls() const { - return body_case() == kCalls; +inline ::std::string* PROTOBUF_NONNULL ModFailed::mutable_mod() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModFailed.mod) + return _s; } -inline void HostEvent::set_has_calls() { - _impl_._oneof_case_[0] = kCalls; +inline const ::std::string& ModFailed::_internal_mod() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.mod_.Get(); } -inline void HostEvent::clear_calls() { +inline void ModFailed::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kCalls) { - if (GetArena() == nullptr) { - delete _impl_.body_.calls_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.calls_); - } - clear_has_body(); - } + _impl_.mod_.Set(value, GetArena()); } -inline ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE HostEvent::release_calls() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.calls) - if (body_case() == kCalls) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.calls_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NONNULL ModFailed::_internal_mutable_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.mod_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ModFailed::release_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModFailed.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.mod_.Set("", GetArena()); + } + return released; } -inline const ::modlock::host_app::control::ModCalls& HostEvent::_internal_calls() const { - return body_case() == kCalls ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_)) - : reinterpret_cast(::modlock::host_app::control::_ModCalls_default_instance_); -} -inline const ::modlock::host_app::control::ModCalls& HostEvent::calls() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.calls) - return _internal_calls(); -} -inline ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_calls() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.calls) - if (body_case() == kCalls) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); - _impl_.body_.calls_ = nullptr; - return temp; +inline void ModFailed::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { - return nullptr; + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -} -inline void HostEvent::unsafe_arena_set_allocated_calls( - ::modlock::host_app::control::ModCalls* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_calls(); - _impl_.body_.calls_ = reinterpret_cast<::google::protobuf::Message*>(value); + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.calls) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModFailed.mod) } -inline ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL HostEvent::_internal_mutable_calls() { - if (body_case() != kCalls) { - clear_body(); - set_has_calls(); - _impl_.body_.calls_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModCalls>(GetArena())); - } - return reinterpret_cast<::modlock::host_app::control::ModCalls*>(_impl_.body_.calls_); + +// string error = 2; +inline void ModFailed::clear_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.error_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); } -inline ::modlock::host_app::control::ModCalls* PROTOBUF_NONNULL HostEvent::mutable_calls() +inline const ::std::string& ModFailed::error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModCalls* _msg = _internal_mutable_calls(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.calls) - return _msg; + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModFailed.error) + return _internal_error(); } - -// .modlock.host_app.control.ModSlowFrame slow_frame = 11; -inline bool HostEvent::has_slow_frame() const { - return body_case() == kSlowFrame; +template +PROTOBUF_ALWAYS_INLINE void ModFailed::set_error(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.error_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModFailed.error) } -inline bool HostEvent::_internal_has_slow_frame() const { - return body_case() == kSlowFrame; +inline ::std::string* PROTOBUF_NONNULL ModFailed::mutable_error() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_error(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModFailed.error) + return _s; } -inline void HostEvent::set_has_slow_frame() { - _impl_._oneof_case_[0] = kSlowFrame; +inline const ::std::string& ModFailed::_internal_error() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.error_.Get(); } -inline void HostEvent::clear_slow_frame() { +inline void ModFailed::_internal_set_error(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kSlowFrame) { - if (GetArena() == nullptr) { - delete _impl_.body_.slow_frame_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.slow_frame_); - } - clear_has_body(); - } + _impl_.error_.Set(value, GetArena()); } -inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE HostEvent::release_slow_frame() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.slow_frame) - if (body_case() == kSlowFrame) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.slow_frame_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NONNULL ModFailed::_internal_mutable_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.error_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ModFailed::release_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModFailed.error) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.error_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.error_.Set("", GetArena()); + } + return released; } -inline const ::modlock::host_app::control::ModSlowFrame& HostEvent::_internal_slow_frame() const { - return body_case() == kSlowFrame ? static_cast(*reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_)) - : reinterpret_cast(::modlock::host_app::control::_ModSlowFrame_default_instance_); -} -inline const ::modlock::host_app::control::ModSlowFrame& HostEvent::slow_frame() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.slow_frame) - return _internal_slow_frame(); -} -inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_slow_frame() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.slow_frame) - if (body_case() == kSlowFrame) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); - _impl_.body_.slow_frame_ = nullptr; - return temp; +inline void ModFailed::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - return nullptr; + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -} -inline void HostEvent::unsafe_arena_set_allocated_slow_frame( - ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_slow_frame(); - _impl_.body_.slow_frame_ = reinterpret_cast<::google::protobuf::Message*>(value); + _impl_.error_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.slow_frame) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModFailed.error) } -inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL HostEvent::_internal_mutable_slow_frame() { - if (body_case() != kSlowFrame) { - clear_body(); - set_has_slow_frame(); - _impl_.body_.slow_frame_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ModSlowFrame>(GetArena())); - } - return reinterpret_cast<::modlock::host_app::control::ModSlowFrame*>(_impl_.body_.slow_frame_); + +// ------------------------------------------------------------------- + +// ModCalls + +// string mod = 1; +inline void ModCalls::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); } -inline ::modlock::host_app::control::ModSlowFrame* PROTOBUF_NONNULL HostEvent::mutable_slow_frame() +inline const ::std::string& ModCalls::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ModSlowFrame* _msg = _internal_mutable_slow_frame(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.slow_frame) - return _msg; + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModCalls.mod) + return _internal_mod(); } - -// .modlock.host_app.control.ServiceResult service_applied = 12; -inline bool HostEvent::has_service_applied() const { - return body_case() == kServiceApplied; +template +PROTOBUF_ALWAYS_INLINE void ModCalls::set_mod(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModCalls.mod) } -inline bool HostEvent::_internal_has_service_applied() const { - return body_case() == kServiceApplied; +inline ::std::string* PROTOBUF_NONNULL ModCalls::mutable_mod() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModCalls.mod) + return _s; } -inline void HostEvent::set_has_service_applied() { - _impl_._oneof_case_[0] = kServiceApplied; +inline const ::std::string& ModCalls::_internal_mod() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.mod_.Get(); } -inline void HostEvent::clear_service_applied() { +inline void ModCalls::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (body_case() == kServiceApplied) { - if (GetArena() == nullptr) { - delete _impl_.body_.service_applied_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.body_.service_applied_); - } - clear_has_body(); - } -} -inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE HostEvent::release_service_applied() { - // @@protoc_insertion_point(field_release:modlock.host_app.control.HostEvent.service_applied) - if (body_case() == kServiceApplied) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.body_.service_applied_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::modlock::host_app::control::ServiceResult& HostEvent::_internal_service_applied() const { - return body_case() == kServiceApplied ? static_cast(*reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_)) - : reinterpret_cast(::modlock::host_app::control::_ServiceResult_default_instance_); + _impl_.mod_.Set(value, GetArena()); } -inline const ::modlock::host_app::control::ServiceResult& HostEvent::service_applied() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.HostEvent.service_applied) - return _internal_service_applied(); +inline ::std::string* PROTOBUF_NONNULL ModCalls::_internal_mutable_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.mod_.Mutable( GetArena()); } -inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE HostEvent::unsafe_arena_release_service_applied() { - // @@protoc_insertion_point(field_unsafe_arena_release:modlock.host_app.control.HostEvent.service_applied) - if (body_case() == kServiceApplied) { - clear_has_body(); - auto* temp = reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); - _impl_.body_.service_applied_ = nullptr; - return temp; - } else { +inline ::std::string* PROTOBUF_NULLABLE ModCalls::release_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModCalls.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } -} -inline void HostEvent::unsafe_arena_set_allocated_service_applied( - ::modlock::host_app::control::ServiceResult* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_body(); - if (value) { - set_has_service_applied(); - _impl_.body_.service_applied_ = reinterpret_cast<::google::protobuf::Message*>(value); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.HostEvent.service_applied) + return released; } -inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL HostEvent::_internal_mutable_service_applied() { - if (body_case() != kServiceApplied) { - clear_body(); - set_has_service_applied(); - _impl_.body_.service_applied_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::modlock::host_app::control::ServiceResult>(GetArena())); +inline void ModCalls::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - return reinterpret_cast<::modlock::host_app::control::ServiceResult*>(_impl_.body_.service_applied_); -} -inline ::modlock::host_app::control::ServiceResult* PROTOBUF_NONNULL HostEvent::mutable_service_applied() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::modlock::host_app::control::ServiceResult* _msg = _internal_mutable_service_applied(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.HostEvent.service_applied) - return _msg; + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModCalls.mod) } -inline bool HostEvent::has_body() const { - return body_case() != BODY_NOT_SET; +// .modlock.wasm.profile.CallProfile profile = 2; +inline bool ModCalls::has_profile() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.profile_ != nullptr); + return value; } -inline void HostEvent::clear_has_body() { - _impl_._oneof_case_[0] = BODY_NOT_SET; +inline const ::modlock::wasm::profile::CallProfile& ModCalls::_internal_profile() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::modlock::wasm::profile::CallProfile* p = _impl_.profile_; + return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::profile::_CallProfile_default_instance_); } -inline HostEvent::BodyCase HostEvent::body_case() const { - return HostEvent::BodyCase(_impl_._oneof_case_[0]); +inline const ::modlock::wasm::profile::CallProfile& ModCalls::profile() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModCalls.profile) + return _internal_profile(); } -// ------------------------------------------------------------------- - -// PlayerChat - -// int32 slot = 1; -inline void PlayerChat::clear_slot() { +inline void ModCalls::unsafe_arena_set_allocated_profile( + ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; - ClearHasBit(_impl_._has_bits_[0], - 0x00000004U); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.profile_); + } + _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ModCalls.profile) } -inline ::int32_t PlayerChat::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.slot) - return _internal_slot(); +inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE ModCalls::release_profile() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::CallProfile* released = _impl_.profile_; + _impl_.profile_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; } -inline void PlayerChat::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.slot) +inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE ModCalls::unsafe_arena_release_profile() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModCalls.profile) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::CallProfile* temp = _impl_.profile_; + _impl_.profile_ = nullptr; + return temp; +} +inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL ModCalls::_internal_mutable_profile() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.profile_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::profile::CallProfile>(GetArena()); + _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(p); + } + return _impl_.profile_; } -inline ::int32_t PlayerChat::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; +inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL ModCalls::mutable_profile() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::CallProfile* _msg = _internal_mutable_profile(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModCalls.profile) + return _msg; } -inline void PlayerChat::_internal_set_slot(::int32_t value) { +inline void ModCalls::set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.profile_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(value); + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModCalls.profile) } -// string name = 2; -inline void PlayerChat::clear_name() { +// ------------------------------------------------------------------- + +// ModSlowFrame + +// string mod = 1; +inline void ModSlowFrame::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); + _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& PlayerChat::name() const +inline const ::std::string& ModSlowFrame::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.name) - return _internal_name(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModSlowFrame.mod) + return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void PlayerChat::set_name(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ModSlowFrame::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.name) + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ModSlowFrame.mod) } -inline ::std::string* PROTOBUF_NONNULL PlayerChat::mutable_name() +inline ::std::string* PROTOBUF_NONNULL ModSlowFrame::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerChat.name) + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModSlowFrame.mod) return _s; } -inline const ::std::string& PlayerChat::_internal_name() const { +inline const ::std::string& ModSlowFrame::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); + return _impl_.mod_.Get(); } -inline void PlayerChat::_internal_set_name(const ::std::string& value) { +inline void ModSlowFrame::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.Set(value, GetArena()); + _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerChat::_internal_mutable_name() { +inline ::std::string* PROTOBUF_NONNULL ModSlowFrame::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); + return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerChat::release_name() { +inline ::std::string* PROTOBUF_NULLABLE ModSlowFrame::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerChat.name) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModSlowFrame.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.name_.Release(); + auto* released = _impl_.mod_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); + _impl_.mod_.Set("", GetArena()); } return released; } -inline void PlayerChat::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { +inline void ModSlowFrame::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerChat.name) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModSlowFrame.mod) } -// string text = 3; -inline void PlayerChat::clear_text() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); -} -inline const ::std::string& PlayerChat::text() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerChat.text) - return _internal_text(); -} -template -PROTOBUF_ALWAYS_INLINE void PlayerChat::set_text(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.text_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerChat.text) -} -inline ::std::string* PROTOBUF_NONNULL PlayerChat::mutable_text() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_text(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerChat.text) - return _s; +// .modlock.wasm.profile.SlowFrame report = 2; +inline bool ModSlowFrame::has_report() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.report_ != nullptr); + return value; } -inline const ::std::string& PlayerChat::_internal_text() const { +inline const ::modlock::wasm::profile::SlowFrame& ModSlowFrame::_internal_report() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.text_.Get(); + const ::modlock::wasm::profile::SlowFrame* p = _impl_.report_; + return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::profile::_SlowFrame_default_instance_); } -inline void PlayerChat::_internal_set_text(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.Set(value, GetArena()); +inline const ::modlock::wasm::profile::SlowFrame& ModSlowFrame::report() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ModSlowFrame.report) + return _internal_report(); } -inline ::std::string* PROTOBUF_NONNULL PlayerChat::_internal_mutable_text() { +inline void ModSlowFrame::unsafe_arena_set_allocated_report( + ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.text_.Mutable( GetArena()); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.report_); + } + _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ModSlowFrame.report) } -inline ::std::string* PROTOBUF_NULLABLE PlayerChat::release_text() { +inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::release_report() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerChat.text) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { - return nullptr; - } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.text_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.text_.Set("", GetArena()); + ::modlock::wasm::profile::SlowFrame* released = _impl_.report_; + _impl_.report_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } } return released; } -inline void PlayerChat::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { +inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::unsafe_arena_release_report() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ModSlowFrame.report) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::SlowFrame* temp = _impl_.report_; + _impl_.report_ = nullptr; + return temp; +} +inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL ModSlowFrame::_internal_mutable_report() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.report_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::profile::SlowFrame>(GetArena()); + _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(p); + } + return _impl_.report_; +} +inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL ModSlowFrame::mutable_report() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::modlock::wasm::profile::SlowFrame* _msg = _internal_mutable_report(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModSlowFrame.report) + return _msg; +} +inline void ModSlowFrame::set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.report_); + } + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - _impl_.text_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { - _impl_.text_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerChat.text) + + _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(value); + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModSlowFrame.report) } // ------------------------------------------------------------------- -// ModStarted +// PlayerJoined -// string mod = 1; -inline void ModStarted::clear_mod() { +// int32 slot = 1; +inline void PlayerJoined::clear_slot() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.slot_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t PlayerJoined::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.slot) + return _internal_slot(); +} +inline void PlayerJoined::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.slot) +} +inline ::int32_t PlayerJoined::_internal_slot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slot_; +} +inline void PlayerJoined::_internal_set_slot(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = value; +} + +// string name = 2; +inline void PlayerJoined::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ModStarted::mod() const +inline const ::std::string& PlayerJoined::name() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModStarted.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.name) + return _internal_name(); } template -PROTOBUF_ALWAYS_INLINE void ModStarted::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void PlayerJoined::set_name(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModStarted.mod) + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.name) } -inline ::std::string* PROTOBUF_NONNULL ModStarted::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL PlayerJoined::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModStarted.mod) + ::std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerJoined.name) return _s; } -inline const ::std::string& ModStarted::_internal_mod() const { +inline const ::std::string& PlayerJoined::_internal_name() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.name_.Get(); } -inline void ModStarted::_internal_set_mod(const ::std::string& value) { +inline void PlayerJoined::_internal_set_name(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.name_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModStarted::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL PlayerJoined::_internal_mutable_name() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.name_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModStarted::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE PlayerJoined::release_name() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModStarted.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerJoined.name) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + auto* released = _impl_.name_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.name_.Set("", GetArena()); } return released; } -inline void ModStarted::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerJoined::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModStarted.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerJoined.name) } -// bool reloaded = 2; -inline void ModStarted::clear_reloaded() { +// fixed64 steam_id = 3; +inline void PlayerJoined::clear_steam_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.reloaded_ = false; + _impl_.steam_id_ = ::uint64_t{0u}; ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -inline bool ModStarted::reloaded() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModStarted.reloaded) - return _internal_reloaded(); +inline ::uint64_t PlayerJoined::steam_id() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.steam_id) + return _internal_steam_id(); } -inline void ModStarted::set_reloaded(bool value) { - _internal_set_reloaded(value); +inline void PlayerJoined::set_steam_id(::uint64_t value) { + _internal_set_steam_id(value); SetHasBit(_impl_._has_bits_[0], 0x00000002U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModStarted.reloaded) + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.steam_id) } -inline bool ModStarted::_internal_reloaded() const { +inline ::uint64_t PlayerJoined::_internal_steam_id() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.reloaded_; + return _impl_.steam_id_; } -inline void ModStarted::_internal_set_reloaded(bool value) { +inline void PlayerJoined::_internal_set_steam_id(::uint64_t value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.reloaded_ = value; + _impl_.steam_id_ = value; } // ------------------------------------------------------------------- -// ModLog +// PlayerLeft + +// int32 slot = 1; +inline void PlayerLeft::clear_slot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t PlayerLeft::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerLeft.slot) + return _internal_slot(); +} +inline void PlayerLeft::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerLeft.slot) +} +inline ::int32_t PlayerLeft::_internal_slot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slot_; +} +inline void PlayerLeft::_internal_set_slot(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = value; +} + +// ------------------------------------------------------------------- + +// PlayerMessage // string mod = 1; -inline void ModLog::clear_mod() { +inline void PlayerMessage::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ModLog::mod() const +inline const ::std::string& PlayerMessage::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.mod) return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void ModLog::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.mod) } -inline ::std::string* PROTOBUF_NONNULL ModLog::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.mod) return _s; } -inline const ::std::string& ModLog::_internal_mod() const { +inline const ::std::string& PlayerMessage::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.mod_.Get(); } -inline void ModLog::_internal_set_mod(const ::std::string& value) { +inline void PlayerMessage::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModLog::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModLog::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -6055,7 +7747,7 @@ inline ::std::string* PROTOBUF_NULLABLE ModLog::release_mod() { } return released; } -inline void ModLog::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerMessage::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -6066,415 +7758,303 @@ inline void ModLog::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModLog.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.mod) } -// string text = 2; -inline void ModLog::clear_text() { +// int32 slot = 2; +inline void PlayerMessage::clear_slot() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.ClearToEmpty(); + _impl_.slot_ = 0; ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); -} -inline const ::std::string& ModLog::text() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModLog.text) - return _internal_text(); + 0x00000008U); } -template -PROTOBUF_ALWAYS_INLINE void ModLog::set_text(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.text_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModLog.text) +inline ::int32_t PlayerMessage::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.slot) + return _internal_slot(); } -inline ::std::string* PROTOBUF_NONNULL ModLog::mutable_text() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_text(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModLog.text) - return _s; +inline void PlayerMessage::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.slot) } -inline const ::std::string& ModLog::_internal_text() const { +inline ::int32_t PlayerMessage::_internal_slot() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.text_.Get(); + return _impl_.slot_; } -inline void ModLog::_internal_set_text(const ::std::string& value) { +inline void PlayerMessage::_internal_set_slot(::int32_t value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.Set(value, GetArena()); + _impl_.slot_ = value; } -inline ::std::string* PROTOBUF_NONNULL ModLog::_internal_mutable_text() { + +// .modlock.host_app.control.MessageKind kind = 3; +inline void PlayerMessage::clear_kind() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.text_.Mutable( GetArena()); + _impl_.kind_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); } -inline ::std::string* PROTOBUF_NULLABLE ModLog::release_text() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModLog.text) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { - return nullptr; - } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.text_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.text_.Set("", GetArena()); - } - return released; +inline ::modlock::host_app::control::MessageKind PlayerMessage::kind() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.kind) + return _internal_kind(); } -inline void ModLog::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerMessage::set_kind(::modlock::host_app::control::MessageKind value) { + _internal_set_kind(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.kind) +} +inline ::modlock::host_app::control::MessageKind PlayerMessage::_internal_kind() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::modlock::host_app::control::MessageKind>(_impl_.kind_); +} +inline void PlayerMessage::_internal_set_kind(::modlock::host_app::control::MessageKind value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - } - _impl_.text_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { - _impl_.text_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModLog.text) + _impl_.kind_ = value; } -// ------------------------------------------------------------------- - -// ModFailed - -// string mod = 1; -inline void ModFailed::clear_mod() { +// string title = 4; +inline void PlayerMessage::clear_title() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.title_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); + 0x00000002U); } -inline const ::std::string& ModFailed::mod() const +inline const ::std::string& PlayerMessage::title() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModFailed.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.title) + return _internal_title(); } template -PROTOBUF_ALWAYS_INLINE void ModFailed::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_title(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModFailed.mod) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.title_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.title) } -inline ::std::string* PROTOBUF_NONNULL ModFailed::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_title() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModFailed.mod) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_title(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.title) return _s; } -inline const ::std::string& ModFailed::_internal_mod() const { +inline const ::std::string& PlayerMessage::_internal_title() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.title_.Get(); } -inline void ModFailed::_internal_set_mod(const ::std::string& value) { +inline void PlayerMessage::_internal_set_title(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.title_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModFailed::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_title() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.title_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModFailed::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_title() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModFailed.mod) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.title) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.title_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.title_.Set("", GetArena()); } return released; } -inline void ModFailed::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerMessage::set_allocated_title(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); + _impl_.title_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.title_.IsDefault()) { + _impl_.title_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModFailed.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.title) } -// string error = 2; -inline void ModFailed::clear_error() { +// string text = 5; +inline void PlayerMessage::clear_text() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.error_.ClearToEmpty(); + _impl_.text_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); + 0x00000004U); } -inline const ::std::string& ModFailed::error() const +inline const ::std::string& PlayerMessage::text() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModFailed.error) - return _internal_error(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.text) + return _internal_text(); } template -PROTOBUF_ALWAYS_INLINE void ModFailed::set_error(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_text(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.error_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModFailed.error) + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.text_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.text) } -inline ::std::string* PROTOBUF_NONNULL ModFailed::mutable_error() +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_text() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_error(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModFailed.error) + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_text(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.text) return _s; } -inline const ::std::string& ModFailed::_internal_error() const { +inline const ::std::string& PlayerMessage::_internal_text() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.error_.Get(); + return _impl_.text_.Get(); } -inline void ModFailed::_internal_set_error(const ::std::string& value) { +inline void PlayerMessage::_internal_set_text(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.error_.Set(value, GetArena()); + _impl_.text_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModFailed::_internal_mutable_error() { +inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_text() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.error_.Mutable( GetArena()); + return _impl_.text_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModFailed::release_error() { +inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_text() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModFailed.error) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.text) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.error_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.text_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.error_.Set("", GetArena()); + _impl_.text_.Set("", GetArena()); } return released; } -inline void ModFailed::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { +inline void PlayerMessage::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } - _impl_.error_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArena()); + _impl_.text_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { + _impl_.text_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModFailed.error) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.text) } // ------------------------------------------------------------------- -// ModCalls +// ServerReady -// string mod = 1; -inline void ModCalls::clear_mod() { +// string map = 1; +inline void ServerReady::clear_map() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.map_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ModCalls::mod() const +inline const ::std::string& ServerReady::map() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModCalls.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServerReady.map) + return _internal_map(); } template -PROTOBUF_ALWAYS_INLINE void ModCalls::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServerReady::set_map(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModCalls.mod) + _impl_.map_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServerReady.map) } -inline ::std::string* PROTOBUF_NONNULL ModCalls::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL ServerReady::mutable_map() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModCalls.mod) + ::std::string* _s = _internal_mutable_map(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServerReady.map) return _s; } -inline const ::std::string& ModCalls::_internal_mod() const { +inline const ::std::string& ServerReady::_internal_map() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.map_.Get(); } -inline void ModCalls::_internal_set_mod(const ::std::string& value) { +inline void ServerReady::_internal_set_map(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.map_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModCalls::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL ServerReady::_internal_mutable_map() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.map_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModCalls::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE ServerReady::release_map() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModCalls.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServerReady.map) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + auto* released = _impl_.map_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.map_.Set("", GetArena()); } return released; } -inline void ModCalls::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void ServerReady::set_allocated_map(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModCalls.mod) -} - -// .modlock.wasm.profile.CallProfile profile = 2; -inline bool ModCalls::has_profile() const { - bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); - PROTOBUF_ASSUME(!value || _impl_.profile_ != nullptr); - return value; -} -inline const ::modlock::wasm::profile::CallProfile& ModCalls::_internal_profile() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::modlock::wasm::profile::CallProfile* p = _impl_.profile_; - return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::profile::_CallProfile_default_instance_); -} -inline const ::modlock::wasm::profile::CallProfile& ModCalls::profile() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModCalls.profile) - return _internal_profile(); -} -inline void ModCalls::unsafe_arena_set_allocated_profile( - ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.profile_); - } - _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(value); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ModCalls.profile) -} -inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE ModCalls::release_profile() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::CallProfile* released = _impl_.profile_; - _impl_.profile_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE ModCalls::unsafe_arena_release_profile() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModCalls.profile) - - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::CallProfile* temp = _impl_.profile_; - _impl_.profile_ = nullptr; - return temp; -} -inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL ModCalls::_internal_mutable_profile() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.profile_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::profile::CallProfile>(GetArena()); - _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(p); - } - return _impl_.profile_; -} -inline ::modlock::wasm::profile::CallProfile* PROTOBUF_NONNULL ModCalls::mutable_profile() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::CallProfile* _msg = _internal_mutable_profile(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModCalls.profile) - return _msg; -} -inline void ModCalls::set_allocated_profile(::modlock::wasm::profile::CallProfile* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.profile_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.map_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.map_.IsDefault()) { + _impl_.map_.Set("", GetArena()); } - - _impl_.profile_ = reinterpret_cast<::modlock::wasm::profile::CallProfile*>(value); - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModCalls.profile) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServerReady.map) } // ------------------------------------------------------------------- -// ModSlowFrame +// UiChanged // string mod = 1; -inline void ModSlowFrame::clear_mod() { +inline void UiChanged::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ModSlowFrame::mod() const +inline const ::std::string& UiChanged::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.mod) return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void ModSlowFrame::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void UiChanged::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_set:modlock.host_app.control.UiChanged.mod) } -inline ::std::string* PROTOBUF_NONNULL ModSlowFrame::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL UiChanged::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.UiChanged.mod) return _s; } -inline const ::std::string& ModSlowFrame::_internal_mod() const { +inline const ::std::string& UiChanged::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.mod_.Get(); } -inline void ModSlowFrame::_internal_set_mod(const ::std::string& value) { +inline void UiChanged::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ModSlowFrame::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL UiChanged::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ModSlowFrame::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE UiChanged::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.UiChanged.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -6485,7 +8065,7 @@ inline ::std::string* PROTOBUF_NULLABLE ModSlowFrame::release_mod() { } return released; } -inline void ModSlowFrame::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void UiChanged::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -6496,44 +8076,69 @@ inline void ModSlowFrame::set_allocated_mod(::std::string* PROTOBUF_NULLABLE val if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModSlowFrame.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.UiChanged.mod) } -// .modlock.wasm.profile.SlowFrame report = 2; -inline bool ModSlowFrame::has_report() const { +// int32 slot = 2; +inline void UiChanged::clear_slot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t UiChanged::slot() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.slot) + return _internal_slot(); +} +inline void UiChanged::set_slot(::int32_t value) { + _internal_set_slot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.UiChanged.slot) +} +inline ::int32_t UiChanged::_internal_slot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slot_; +} +inline void UiChanged::_internal_set_slot(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slot_ = value; +} + +// .modlock.wasm.ui.Change change = 3; +inline bool UiChanged::has_change() const { bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); - PROTOBUF_ASSUME(!value || _impl_.report_ != nullptr); + PROTOBUF_ASSUME(!value || _impl_.change_ != nullptr); return value; } -inline const ::modlock::wasm::profile::SlowFrame& ModSlowFrame::_internal_report() const { +inline const ::modlock::wasm::ui::Change& UiChanged::_internal_change() const { ::google::protobuf::internal::TSanRead(&_impl_); - const ::modlock::wasm::profile::SlowFrame* p = _impl_.report_; - return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::profile::_SlowFrame_default_instance_); + const ::modlock::wasm::ui::Change* p = _impl_.change_; + return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::ui::_Change_default_instance_); } -inline const ::modlock::wasm::profile::SlowFrame& ModSlowFrame::report() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ModSlowFrame.report) - return _internal_report(); +inline const ::modlock::wasm::ui::Change& UiChanged::change() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.change) + return _internal_change(); } -inline void ModSlowFrame::unsafe_arena_set_allocated_report( - ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value) { +inline void UiChanged::unsafe_arena_set_allocated_change( + ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.report_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.change_); } - _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(value); + _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(value); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.ModSlowFrame.report) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.UiChanged.change) } -inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::release_report() { +inline ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE UiChanged::release_change() { ::google::protobuf::internal::TSanWrite(&_impl_); ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::SlowFrame* released = _impl_.report_; - _impl_.report_ = nullptr; + ::modlock::wasm::ui::Change* released = _impl_.change_; + _impl_.change_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); released = ::google::protobuf::internal::DuplicateIfNonNull(released); @@ -6547,35 +8152,35 @@ inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::rele } return released; } -inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE ModSlowFrame::unsafe_arena_release_report() { +inline ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE UiChanged::unsafe_arena_release_change() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ModSlowFrame.report) + // @@protoc_insertion_point(field_release:modlock.host_app.control.UiChanged.change) ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::SlowFrame* temp = _impl_.report_; - _impl_.report_ = nullptr; + ::modlock::wasm::ui::Change* temp = _impl_.change_; + _impl_.change_ = nullptr; return temp; } -inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL ModSlowFrame::_internal_mutable_report() { +inline ::modlock::wasm::ui::Change* PROTOBUF_NONNULL UiChanged::_internal_mutable_change() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.report_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::profile::SlowFrame>(GetArena()); - _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(p); + if (_impl_.change_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::ui::Change>(GetArena()); + _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(p); } - return _impl_.report_; + return _impl_.change_; } -inline ::modlock::wasm::profile::SlowFrame* PROTOBUF_NONNULL ModSlowFrame::mutable_report() +inline ::modlock::wasm::ui::Change* PROTOBUF_NONNULL UiChanged::mutable_change() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::profile::SlowFrame* _msg = _internal_mutable_report(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ModSlowFrame.report) + ::modlock::wasm::ui::Change* _msg = _internal_mutable_change(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.UiChanged.change) return _msg; } -inline void ModSlowFrame::set_allocated_report(::modlock::wasm::profile::SlowFrame* PROTOBUF_NULLABLE value) { +inline void UiChanged::set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value) { ::google::protobuf::Arena* message_arena = GetArena(); ::google::protobuf::internal::TSanWrite(&_impl_); if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.report_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.change_); } if (value != nullptr) { @@ -6588,708 +8193,583 @@ inline void ModSlowFrame::set_allocated_report(::modlock::wasm::profile::SlowFra ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - _impl_.report_ = reinterpret_cast<::modlock::wasm::profile::SlowFrame*>(value); - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ModSlowFrame.report) + _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(value); + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.UiChanged.change) } // ------------------------------------------------------------------- -// PlayerJoined - -// int32 slot = 1; -inline void PlayerJoined::clear_slot() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; - ClearHasBit(_impl_._has_bits_[0], - 0x00000004U); -} -inline ::int32_t PlayerJoined::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.slot) - return _internal_slot(); -} -inline void PlayerJoined::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.slot) -} -inline ::int32_t PlayerJoined::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; -} -inline void PlayerJoined::_internal_set_slot(::int32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; -} +// ServiceReply -// string name = 2; -inline void PlayerJoined::clear_name() { +// string mod = 1; +inline void ServiceReply::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); + _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& PlayerJoined::name() const +inline const ::std::string& ServiceReply::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.name) - return _internal_name(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.mod) + return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void PlayerJoined::set_name(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.name) + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.mod) } -inline ::std::string* PROTOBUF_NONNULL PlayerJoined::mutable_name() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerJoined.name) + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.mod) return _s; } -inline const ::std::string& PlayerJoined::_internal_name() const { +inline const ::std::string& ServiceReply::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); + return _impl_.mod_.Get(); } -inline void PlayerJoined::_internal_set_name(const ::std::string& value) { +inline void ServiceReply::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.Set(value, GetArena()); + _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerJoined::_internal_mutable_name() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); + return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerJoined::release_name() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerJoined.name) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.name_.Release(); + auto* released = _impl_.mod_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); + _impl_.mod_.Set("", GetArena()); } return released; } -inline void PlayerJoined::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerJoined.name) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.mod) } -// fixed64 steam_id = 3; -inline void PlayerJoined::clear_steam_id() { +// string service = 2; +inline void ServiceReply::clear_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.steam_id_ = ::uint64_t{0u}; + _impl_.service_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -inline ::uint64_t PlayerJoined::steam_id() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerJoined.steam_id) - return _internal_steam_id(); -} -inline void PlayerJoined::set_steam_id(::uint64_t value) { - _internal_set_steam_id(value); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerJoined.steam_id) -} -inline ::uint64_t PlayerJoined::_internal_steam_id() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.steam_id_; -} -inline void PlayerJoined::_internal_set_steam_id(::uint64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.steam_id_ = value; -} - -// ------------------------------------------------------------------- - -// PlayerLeft - -// int32 slot = 1; -inline void PlayerLeft::clear_slot() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; - ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); -} -inline ::int32_t PlayerLeft::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerLeft.slot) - return _internal_slot(); -} -inline void PlayerLeft::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerLeft.slot) -} -inline ::int32_t PlayerLeft::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; -} -inline void PlayerLeft::_internal_set_slot(::int32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; -} - -// ------------------------------------------------------------------- - -// PlayerMessage - -// string mod = 1; -inline void PlayerMessage::clear_mod() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); -} -inline const ::std::string& PlayerMessage::mod() const +inline const ::std::string& ServiceReply::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.service) + return _internal_service(); } template -PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_service(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.mod) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.service_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.service) } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_service() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.mod) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_service(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.service) return _s; } -inline const ::std::string& PlayerMessage::_internal_mod() const { +inline const ::std::string& ServiceReply::_internal_service() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.service_.Get(); } -inline void PlayerMessage::_internal_set_mod(const ::std::string& value) { +inline void ServiceReply::_internal_set_service(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.service_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.service_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.mod) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.service) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.service_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.service_.Set("", GetArena()); } return released; } -inline void PlayerMessage::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); + _impl_.service_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.service_.IsDefault()) { + _impl_.service_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.service) } -// int32 slot = 2; -inline void PlayerMessage::clear_slot() { +// string method = 3; +inline void ServiceReply::clear_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; + _impl_.method_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000008U); + 0x00000004U); } -inline ::int32_t PlayerMessage::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.slot) - return _internal_slot(); +inline const ::std::string& ServiceReply::method() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.method) + return _internal_method(); } -inline void PlayerMessage::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000008U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.slot) +template +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_method(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.method_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.method) } -inline ::int32_t PlayerMessage::_internal_slot() const { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_method() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_method(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.method) + return _s; +} +inline const ::std::string& ServiceReply::_internal_method() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; + return _impl_.method_.Get(); } -inline void PlayerMessage::_internal_set_slot(::int32_t value) { +inline void ServiceReply::_internal_set_method(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; + _impl_.method_.Set(value, GetArena()); } - -// .modlock.host_app.control.MessageKind kind = 3; -inline void PlayerMessage::clear_kind() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.kind_ = 0; - ClearHasBit(_impl_._has_bits_[0], - 0x00000010U); -} -inline ::modlock::host_app::control::MessageKind PlayerMessage::kind() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.kind) - return _internal_kind(); -} -inline void PlayerMessage::set_kind(::modlock::host_app::control::MessageKind value) { - _internal_set_kind(value); - SetHasBit(_impl_._has_bits_[0], 0x00000010U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.kind) + return _impl_.method_.Mutable( GetArena()); } -inline ::modlock::host_app::control::MessageKind PlayerMessage::_internal_kind() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::modlock::host_app::control::MessageKind>(_impl_.kind_); +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_method() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.method) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.method_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.method_.Set("", GetArena()); + } + return released; } -inline void PlayerMessage::_internal_set_kind(::modlock::host_app::control::MessageKind value) { +inline void ServiceReply::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.kind_ = value; + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.method_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.method_.IsDefault()) { + _impl_.method_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.method) } -// string title = 4; -inline void PlayerMessage::clear_title() { +// bytes payload = 4; +inline void ServiceReply::clear_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.title_.ClearToEmpty(); + _impl_.payload_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000002U); + 0x00000008U); } -inline const ::std::string& PlayerMessage::title() const +inline const ::std::string& ServiceReply::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.title) - return _internal_title(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.payload) + return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_title(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.title_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.title) + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.payload) } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_title() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_payload() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_title(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.title) + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.payload) return _s; } -inline const ::std::string& PlayerMessage::_internal_title() const { +inline const ::std::string& ServiceReply::_internal_payload() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.title_.Get(); + return _impl_.payload_.Get(); } -inline void PlayerMessage::_internal_set_title(const ::std::string& value) { +inline void ServiceReply::_internal_set_payload(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.title_.Set(value, GetArena()); + _impl_.payload_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_title() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.title_.Mutable( GetArena()); + return _impl_.payload_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_title() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.title) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.payload) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.title_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + auto* released = _impl_.payload_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.title_.Set("", GetArena()); + _impl_.payload_.Set("", GetArena()); } return released; } -inline void PlayerMessage::set_allocated_title(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } - _impl_.title_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.title_.IsDefault()) { - _impl_.title_.Set("", GetArena()); + _impl_.payload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { + _impl_.payload_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.title) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.payload) } -// string text = 5; -inline void PlayerMessage::clear_text() { +// string path = 5; +inline void ServiceReply::clear_path() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.ClearToEmpty(); + _impl_.path_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000004U); + 0x00000010U); } -inline const ::std::string& PlayerMessage::text() const +inline const ::std::string& ServiceReply::path() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.PlayerMessage.text) - return _internal_text(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.path) + return _internal_path(); } template -PROTOBUF_ALWAYS_INLINE void PlayerMessage::set_text(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_path(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - _impl_.text_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.PlayerMessage.text) + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + _impl_.path_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.path) } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::mutable_text() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_path() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - ::std::string* _s = _internal_mutable_text(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.PlayerMessage.text) + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::std::string* _s = _internal_mutable_path(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.path) return _s; } -inline const ::std::string& PlayerMessage::_internal_text() const { +inline const ::std::string& ServiceReply::_internal_path() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.text_.Get(); + return _impl_.path_.Get(); } -inline void PlayerMessage::_internal_set_text(const ::std::string& value) { +inline void ServiceReply::_internal_set_path(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.text_.Set(value, GetArena()); + _impl_.path_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL PlayerMessage::_internal_mutable_text() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_path() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.text_.Mutable( GetArena()); + return _impl_.path_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE PlayerMessage::release_text() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_path() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.PlayerMessage.text) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.path) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000010U)) { return nullptr; - } - ClearHasBit(_impl_._has_bits_[0], 0x00000004U); - auto* released = _impl_.text_.Release(); + } + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + auto* released = _impl_.path_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.text_.Set("", GetArena()); + _impl_.path_.Set("", GetArena()); } return released; } -inline void PlayerMessage::set_allocated_text(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_path(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000004U); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); } - _impl_.text_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.text_.IsDefault()) { - _impl_.text_.Set("", GetArena()); + _impl_.path_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.path_.IsDefault()) { + _impl_.path_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.PlayerMessage.text) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.path) } -// ------------------------------------------------------------------- - -// ServerReady - -// string map = 1; -inline void ServerReady::clear_map() { +// string id = 6; +inline void ServiceReply::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.map_.ClearToEmpty(); + _impl_.id_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000001U); + 0x00000020U); } -inline const ::std::string& ServerReady::map() const +inline const ::std::string& ServiceReply::id() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServerReady.map) - return _internal_map(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.id) + return _internal_id(); } template -PROTOBUF_ALWAYS_INLINE void ServerReady::set_map(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceReply::set_id(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.map_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServerReady.map) + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + _impl_.id_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.id) } -inline ::std::string* PROTOBUF_NONNULL ServerReady::mutable_map() +inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_id() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_map(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServerReady.map) + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + ::std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.id) return _s; } -inline const ::std::string& ServerReady::_internal_map() const { +inline const ::std::string& ServiceReply::_internal_id() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.map_.Get(); + return _impl_.id_.Get(); } -inline void ServerReady::_internal_set_map(const ::std::string& value) { +inline void ServiceReply::_internal_set_id(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.map_.Set(value, GetArena()); + _impl_.id_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServerReady::_internal_mutable_map() { +inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.map_.Mutable( GetArena()); + return _impl_.id_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServerReady::release_map() { +inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServerReady.map) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.id) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000020U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.map_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + auto* released = _impl_.id_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.map_.Set("", GetArena()); + _impl_.id_.Set("", GetArena()); } return released; } -inline void ServerReady::set_allocated_map(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceReply::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); } - _impl_.map_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.map_.IsDefault()) { - _impl_.map_.Set("", GetArena()); + _impl_.id_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServerReady.map) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.id) } // ------------------------------------------------------------------- -// UiChanged +// ServiceResult -// string mod = 1; -inline void UiChanged::clear_mod() { +// string id = 1; +inline void ServiceResult::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.ClearToEmpty(); + _impl_.id_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& UiChanged::mod() const +inline const ::std::string& ServiceResult::id() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.mod) - return _internal_mod(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceResult.id) + return _internal_id(); } template -PROTOBUF_ALWAYS_INLINE void UiChanged::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceResult::set_id(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.UiChanged.mod) + _impl_.id_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceResult.id) } -inline ::std::string* PROTOBUF_NONNULL UiChanged::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL ServiceResult::mutable_id() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.UiChanged.mod) + ::std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceResult.id) return _s; } -inline const ::std::string& UiChanged::_internal_mod() const { +inline const ::std::string& ServiceResult::_internal_id() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.mod_.Get(); + return _impl_.id_.Get(); } -inline void UiChanged::_internal_set_mod(const ::std::string& value) { +inline void ServiceResult::_internal_set_id(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.mod_.Set(value, GetArena()); + _impl_.id_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL UiChanged::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL ServiceResult::_internal_mutable_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.mod_.Mutable( GetArena()); + return _impl_.id_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE UiChanged::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE ServiceResult::release_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.UiChanged.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceResult.id) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.mod_.Release(); + auto* released = _impl_.id_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.mod_.Set("", GetArena()); + _impl_.id_.Set("", GetArena()); } return released; } -inline void UiChanged::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceResult::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.mod_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { - _impl_.mod_.Set("", GetArena()); + _impl_.id_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.UiChanged.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceResult.id) } -// int32 slot = 2; -inline void UiChanged::clear_slot() { +// string error = 2; +inline void ServiceResult::clear_error() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = 0; + _impl_.error_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000004U); -} -inline ::int32_t UiChanged::slot() const { - // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.slot) - return _internal_slot(); -} -inline void UiChanged::set_slot(::int32_t value) { - _internal_set_slot(value); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); - // @@protoc_insertion_point(field_set:modlock.host_app.control.UiChanged.slot) + 0x00000002U); } -inline ::int32_t UiChanged::_internal_slot() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.slot_; +inline const ::std::string& ServiceResult::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceResult.error) + return _internal_error(); } -inline void UiChanged::_internal_set_slot(::int32_t value) { +template +PROTOBUF_ALWAYS_INLINE void ServiceResult::set_error(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.slot_ = value; + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.error_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceResult.error) } - -// .modlock.wasm.ui.Change change = 3; -inline bool UiChanged::has_change() const { - bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); - PROTOBUF_ASSUME(!value || _impl_.change_ != nullptr); - return value; +inline ::std::string* PROTOBUF_NONNULL ServiceResult::mutable_error() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_error(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceResult.error) + return _s; } -inline const ::modlock::wasm::ui::Change& UiChanged::_internal_change() const { +inline const ::std::string& ServiceResult::_internal_error() const { ::google::protobuf::internal::TSanRead(&_impl_); - const ::modlock::wasm::ui::Change* p = _impl_.change_; - return p != nullptr ? *p : reinterpret_cast(::modlock::wasm::ui::_Change_default_instance_); -} -inline const ::modlock::wasm::ui::Change& UiChanged::change() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.UiChanged.change) - return _internal_change(); -} -inline void UiChanged::unsafe_arena_set_allocated_change( - ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.change_); - } - _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(value); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:modlock.host_app.control.UiChanged.change) -} -inline ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE UiChanged::release_change() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::ui::Change* released = _impl_.change_; - _impl_.change_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::modlock::wasm::ui::Change* PROTOBUF_NULLABLE UiChanged::unsafe_arena_release_change() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.UiChanged.change) - - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::ui::Change* temp = _impl_.change_; - _impl_.change_ = nullptr; - return temp; + return _impl_.error_.Get(); } -inline ::modlock::wasm::ui::Change* PROTOBUF_NONNULL UiChanged::_internal_mutable_change() { +inline void ServiceResult::_internal_set_error(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.change_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::modlock::wasm::ui::Change>(GetArena()); - _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(p); - } - return _impl_.change_; -} -inline ::modlock::wasm::ui::Change* PROTOBUF_NONNULL UiChanged::mutable_change() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::modlock::wasm::ui::Change* _msg = _internal_mutable_change(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.UiChanged.change) - return _msg; + _impl_.error_.Set(value, GetArena()); } -inline void UiChanged::set_allocated_change(::modlock::wasm::ui::Change* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); +inline ::std::string* PROTOBUF_NONNULL ServiceResult::_internal_mutable_error() { ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.change_); + return _impl_.error_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ServiceResult::release_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceResult.error) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; } - + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.error_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.error_.Set("", GetArena()); + } + return released; +} +inline void ServiceResult::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - - _impl_.change_ = reinterpret_cast<::modlock::wasm::ui::Change*>(value); - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.UiChanged.change) + _impl_.error_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceResult.error) } // ------------------------------------------------------------------- -// ServiceReply +// Fixture // string mod = 1; -inline void ServiceReply::clear_mod() { +inline void Fixture::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ServiceReply::mod() const +inline const ::std::string& Fixture::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.mod) return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.mod) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.mod) return _s; } -inline const ::std::string& ServiceReply::_internal_mod() const { +inline const ::std::string& Fixture::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.mod_.Get(); } -inline void ServiceReply::_internal_set_mod(const ::std::string& value) { +inline void Fixture::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -7300,7 +8780,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_mod() { } return released; } -inline void ServiceReply::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void Fixture::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -7311,50 +8791,50 @@ inline void ServiceReply::set_allocated_mod(::std::string* PROTOBUF_NULLABLE val if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.mod) } // string service = 2; -inline void ServiceReply::clear_service() { +inline void Fixture::clear_service() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.service_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -inline const ::std::string& ServiceReply::service() const +inline const ::std::string& Fixture::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.service) return _internal_service(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_service(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_service(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000002U); _impl_.service_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.service) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_service() +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_service() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000002U); ::std::string* _s = _internal_mutable_service(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.service) return _s; } -inline const ::std::string& ServiceReply::_internal_service() const { +inline const ::std::string& Fixture::_internal_service() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.service_.Get(); } -inline void ServiceReply::_internal_set_service(const ::std::string& value) { +inline void Fixture::_internal_set_service(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.service_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_service() { +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_service() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.service_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_service() { +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.service) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } @@ -7365,7 +8845,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_service() { } return released; } -inline void ServiceReply::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { +inline void Fixture::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000002U); @@ -7376,50 +8856,50 @@ inline void ServiceReply::set_allocated_service(::std::string* PROTOBUF_NULLABLE if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.service_.IsDefault()) { _impl_.service_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.service) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.service) } // string method = 3; -inline void ServiceReply::clear_method() { +inline void Fixture::clear_method() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.method_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } -inline const ::std::string& ServiceReply::method() const +inline const ::std::string& Fixture::method() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.method) return _internal_method(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_method(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_method(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000004U); _impl_.method_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.method) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_method() +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_method() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000004U); ::std::string* _s = _internal_mutable_method(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.method) return _s; } -inline const ::std::string& ServiceReply::_internal_method() const { +inline const ::std::string& Fixture::_internal_method() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.method_.Get(); } -inline void ServiceReply::_internal_set_method(const ::std::string& value) { +inline void Fixture::_internal_set_method(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.method_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_method() { +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_method() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.method_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_method() { +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.method) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { return nullptr; } @@ -7430,7 +8910,7 @@ inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_method() { } return released; } -inline void ServiceReply::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { +inline void Fixture::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000004U); @@ -7441,383 +8921,524 @@ inline void ServiceReply::set_allocated_method(::std::string* PROTOBUF_NULLABLE if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.method_.IsDefault()) { _impl_.method_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.method) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.method) } // bytes payload = 4; -inline void ServiceReply::clear_payload() { +inline void Fixture::clear_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } -inline const ::std::string& ServiceReply::payload() const +inline const ::std::string& Fixture::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.payload) + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.payload) return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_payload(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Fixture::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000008U); _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.payload) + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.payload) +} +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_payload() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.payload) + return _s; +} +inline const ::std::string& Fixture::_internal_payload() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.payload_.Get(); +} +inline void Fixture::_internal_set_payload(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.payload_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_payload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.payload_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_payload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.payload) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + auto* released = _impl_.payload_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.payload_.Set("", GetArena()); + } + return released; +} +inline void Fixture::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + _impl_.payload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { + _impl_.payload_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.payload) +} + +// string source = 5; +inline void Fixture::clear_source() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.source_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline const ::std::string& Fixture::source() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.source) + return _internal_source(); +} +template +PROTOBUF_ALWAYS_INLINE void Fixture::set_source(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + _impl_.source_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.source) +} +inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_source() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::std::string* _s = _internal_mutable_source(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.source) + return _s; +} +inline const ::std::string& Fixture::_internal_source() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.source_.Get(); +} +inline void Fixture::_internal_set_source(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.source_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_source() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.source_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE Fixture::release_source() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.source) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000010U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + auto* released = _impl_.source_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.source_.Set("", GetArena()); + } + return released; +} +inline void Fixture::set_allocated_source(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + _impl_.source_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.source_.IsDefault()) { + _impl_.source_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.source) +} + +// ------------------------------------------------------------------- + +// Forward + +// string mod = 1; +inline void Forward::clear_mod() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.mod_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& Forward::mod() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:modlock.host_app.control.Forward.mod) + return _internal_mod(); +} +template +PROTOBUF_ALWAYS_INLINE void Forward::set_mod(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.mod_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.Forward.mod) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_payload() +inline ::std::string* PROTOBUF_NONNULL Forward::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000008U); - ::std::string* _s = _internal_mutable_payload(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.payload) + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_mod(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Forward.mod) return _s; } -inline const ::std::string& ServiceReply::_internal_payload() const { +inline const ::std::string& Forward::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.payload_.Get(); + return _impl_.mod_.Get(); } -inline void ServiceReply::_internal_set_payload(const ::std::string& value) { +inline void Forward::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.payload_.Set(value, GetArena()); + _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_payload() { +inline ::std::string* PROTOBUF_NONNULL Forward::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.payload_.Mutable( GetArena()); + return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_payload() { +inline ::std::string* PROTOBUF_NULLABLE Forward::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.payload) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.Forward.mod) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000008U); - auto* released = _impl_.payload_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.mod_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.payload_.Set("", GetArena()); + _impl_.mod_.Set("", GetArena()); } return released; } -inline void ServiceReply::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { +inline void Forward::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000008U); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.payload_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { - _impl_.payload_.Set("", GetArena()); + _impl_.mod_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { + _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.payload) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Forward.mod) } -// string path = 5; -inline void ServiceReply::clear_path() { +// string service = 2; +inline void Forward::clear_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.path_.ClearToEmpty(); + _impl_.service_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000010U); + 0x00000002U); } -inline const ::std::string& ServiceReply::path() const +inline const ::std::string& Forward::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.path) - return _internal_path(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.Forward.service) + return _internal_service(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_path(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Forward::set_service(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000010U); - _impl_.path_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.path) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.service_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.Forward.service) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_path() +inline ::std::string* PROTOBUF_NONNULL Forward::mutable_service() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000010U); - ::std::string* _s = _internal_mutable_path(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.path) + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_service(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Forward.service) return _s; } -inline const ::std::string& ServiceReply::_internal_path() const { +inline const ::std::string& Forward::_internal_service() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.path_.Get(); + return _impl_.service_.Get(); } -inline void ServiceReply::_internal_set_path(const ::std::string& value) { +inline void Forward::_internal_set_service(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.path_.Set(value, GetArena()); + _impl_.service_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_path() { +inline ::std::string* PROTOBUF_NONNULL Forward::_internal_mutable_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.path_.Mutable( GetArena()); + return _impl_.service_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_path() { +inline ::std::string* PROTOBUF_NULLABLE Forward::release_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.path) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000010U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.Forward.service) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); - auto* released = _impl_.path_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.service_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.path_.Set("", GetArena()); + _impl_.service_.Set("", GetArena()); } return released; } -inline void ServiceReply::set_allocated_path(::std::string* PROTOBUF_NULLABLE value) { +inline void Forward::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000010U); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } - _impl_.path_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.path_.IsDefault()) { - _impl_.path_.Set("", GetArena()); + _impl_.service_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.service_.IsDefault()) { + _impl_.service_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.path) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Forward.service) } -// string id = 6; -inline void ServiceReply::clear_id() { +// string target = 3; +inline void Forward::clear_target() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.id_.ClearToEmpty(); + _impl_.target_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], - 0x00000020U); + 0x00000004U); } -inline const ::std::string& ServiceReply::id() const +inline const ::std::string& Forward::target() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceReply.id) - return _internal_id(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.Forward.target) + return _internal_target(); } template -PROTOBUF_ALWAYS_INLINE void ServiceReply::set_id(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void Forward::set_target(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000020U); - _impl_.id_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceReply.id) + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.target_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.Forward.target) } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::mutable_id() +inline ::std::string* PROTOBUF_NONNULL Forward::mutable_target() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000020U); - ::std::string* _s = _internal_mutable_id(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceReply.id) + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_target(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Forward.target) return _s; } -inline const ::std::string& ServiceReply::_internal_id() const { +inline const ::std::string& Forward::_internal_target() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.id_.Get(); + return _impl_.target_.Get(); } -inline void ServiceReply::_internal_set_id(const ::std::string& value) { +inline void Forward::_internal_set_target(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.id_.Set(value, GetArena()); + _impl_.target_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL ServiceReply::_internal_mutable_id() { +inline ::std::string* PROTOBUF_NONNULL Forward::_internal_mutable_target() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.id_.Mutable( GetArena()); + return _impl_.target_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE ServiceReply::release_id() { +inline ::std::string* PROTOBUF_NULLABLE Forward::release_target() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceReply.id) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000020U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.Forward.target) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); - auto* released = _impl_.id_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.target_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.id_.Set("", GetArena()); + _impl_.target_.Set("", GetArena()); } return released; } -inline void ServiceReply::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { +inline void Forward::set_allocated_target(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000020U); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } - _impl_.id_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { - _impl_.id_.Set("", GetArena()); + _impl_.target_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.target_.IsDefault()) { + _impl_.target_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceReply.id) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Forward.target) } // ------------------------------------------------------------------- -// ServiceResult +// Fixtures -// string id = 1; -inline void ServiceResult::clear_id() { +// repeated .modlock.host_app.control.Fixture fixtures = 1; +inline int Fixtures::_internal_fixtures_size() const { + return _internal_fixtures().size(); +} +inline int Fixtures::fixtures_size() const { + return _internal_fixtures_size(); +} +inline void Fixtures::clear_fixtures() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.id_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], + _impl_.fixtures_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& ServiceResult::id() const +inline ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL Fixtures::mutable_fixtures(int index) ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceResult.id) - return _internal_id(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixtures.fixtures) + return _internal_mutable_fixtures()->Mutable(index); } -template -PROTOBUF_ALWAYS_INLINE void ServiceResult::set_id(Arg_&& arg, Args_... args) { +inline ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL Fixtures::mutable_fixtures() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:modlock.host_app.control.Fixtures.fixtures) ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - _impl_.id_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceResult.id) + return _internal_mutable_fixtures(); } -inline ::std::string* PROTOBUF_NONNULL ServiceResult::mutable_id() +inline const ::modlock::host_app::control::Fixture& Fixtures::fixtures(int index) const ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - ::std::string* _s = _internal_mutable_id(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceResult.id) - return _s; -} -inline const ::std::string& ServiceResult::_internal_id() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.id_.Get(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixtures.fixtures) + return _internal_fixtures().Get(index); } -inline void ServiceResult::_internal_set_id(const ::std::string& value) { +inline ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL Fixtures::add_fixtures() + ABSL_ATTRIBUTE_LIFETIME_BOUND { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.id_.Set(value, GetArena()); + ::modlock::host_app::control::Fixture* _add = + _internal_mutable_fixtures()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:modlock.host_app.control.Fixtures.fixtures) + return _add; } -inline ::std::string* PROTOBUF_NONNULL ServiceResult::_internal_mutable_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.id_.Mutable( GetArena()); +inline const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& Fixtures::fixtures() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:modlock.host_app.control.Fixtures.fixtures) + return _internal_fixtures(); } -inline ::std::string* PROTOBUF_NULLABLE ServiceResult::release_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceResult.id) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { - return nullptr; - } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - auto* released = _impl_.id_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.id_.Set("", GetArena()); - } - return released; +inline const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& +Fixtures::_internal_fixtures() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.fixtures_; } -inline void ServiceResult::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); - } - _impl_.id_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { - _impl_.id_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceResult.id) +inline ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL +Fixtures::_internal_mutable_fixtures() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.fixtures_; } -// string error = 2; -inline void ServiceResult::clear_error() { +// repeated .modlock.host_app.control.Forward forwards = 2; +inline int Fixtures::_internal_forwards_size() const { + return _internal_forwards().size(); +} +inline int Fixtures::forwards_size() const { + return _internal_forwards_size(); +} +inline void Fixtures::clear_forwards() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.error_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], + _impl_.forwards_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); } -inline const ::std::string& ServiceResult::error() const +inline ::modlock::host_app::control::Forward* PROTOBUF_NONNULL Fixtures::mutable_forwards(int index) ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceResult.error) - return _internal_error(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixtures.forwards) + return _internal_mutable_forwards()->Mutable(index); } -template -PROTOBUF_ALWAYS_INLINE void ServiceResult::set_error(Arg_&& arg, Args_... args) { +inline ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Forward>* PROTOBUF_NONNULL Fixtures::mutable_forwards() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:modlock.host_app.control.Fixtures.forwards) ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - _impl_.error_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceResult.error) + return _internal_mutable_forwards(); } -inline ::std::string* PROTOBUF_NONNULL ServiceResult::mutable_error() +inline const ::modlock::host_app::control::Forward& Fixtures::forwards(int index) const ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - ::std::string* _s = _internal_mutable_error(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceResult.error) - return _s; + // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixtures.forwards) + return _internal_forwards().Get(index); +} +inline ::modlock::host_app::control::Forward* PROTOBUF_NONNULL Fixtures::add_forwards() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::modlock::host_app::control::Forward* _add = + _internal_mutable_forwards()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:modlock.host_app.control.Fixtures.forwards) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Forward>& Fixtures::forwards() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:modlock.host_app.control.Fixtures.forwards) + return _internal_forwards(); +} +inline const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Forward>& +Fixtures::_internal_forwards() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.forwards_; } -inline const ::std::string& ServiceResult::_internal_error() const { +inline ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Forward>* PROTOBUF_NONNULL +Fixtures::_internal_mutable_forwards() { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.error_.Get(); + return &_impl_.forwards_; } -inline void ServiceResult::_internal_set_error(const ::std::string& value) { + +// ------------------------------------------------------------------- + +// ServiceCall + +// uint64 id = 1; +inline void ServiceCall::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.error_.Set(value, GetArena()); + _impl_.id_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); } -inline ::std::string* PROTOBUF_NONNULL ServiceResult::_internal_mutable_error() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.error_.Mutable( GetArena()); +inline ::uint64_t ServiceCall::id() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceCall.id) + return _internal_id(); } -inline ::std::string* PROTOBUF_NULLABLE ServiceResult::release_error() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceResult.error) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { - return nullptr; - } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - auto* released = _impl_.error_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.error_.Set("", GetArena()); - } - return released; +inline void ServiceCall::set_id(::uint64_t value) { + _internal_set_id(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceCall.id) } -inline void ServiceResult::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { +inline ::uint64_t ServiceCall::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_; +} +inline void ServiceCall::_internal_set_id(::uint64_t value) { ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); - } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); - } - _impl_.error_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceResult.error) + _impl_.id_ = value; } -// ------------------------------------------------------------------- - -// Fixture - -// string mod = 1; -inline void Fixture::clear_mod() { +// string mod = 2; +inline void ServiceCall::clear_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } -inline const ::std::string& Fixture::mod() const +inline const ::std::string& ServiceCall::mod() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.mod) + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceCall.mod) return _internal_mod(); } template -PROTOBUF_ALWAYS_INLINE void Fixture::set_mod(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceCall::set_mod(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.mod_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.mod) + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceCall.mod) } -inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_mod() +inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_mod() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_mod(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.mod) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceCall.mod) return _s; } -inline const ::std::string& Fixture::_internal_mod() const { +inline const ::std::string& ServiceCall::_internal_mod() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.mod_.Get(); } -inline void Fixture::_internal_set_mod(const ::std::string& value) { +inline void ServiceCall::_internal_set_mod(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.mod_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_mod() { +inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.mod_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE Fixture::release_mod() { +inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_mod() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.mod) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceCall.mod) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } @@ -7828,7 +9449,7 @@ inline ::std::string* PROTOBUF_NULLABLE Fixture::release_mod() { } return released; } -inline void Fixture::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceCall::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000001U); @@ -7839,50 +9460,50 @@ inline void Fixture::set_allocated_mod(::std::string* PROTOBUF_NULLABLE value) { if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.mod_.IsDefault()) { _impl_.mod_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.mod) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceCall.mod) } -// string service = 2; -inline void Fixture::clear_service() { +// string service = 3; +inline void ServiceCall::clear_service() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.service_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } -inline const ::std::string& Fixture::service() const +inline const ::std::string& ServiceCall::service() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.service) + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceCall.service) return _internal_service(); } template -PROTOBUF_ALWAYS_INLINE void Fixture::set_service(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceCall::set_service(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000002U); _impl_.service_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.service) + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceCall.service) } -inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_service() +inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_service() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000002U); ::std::string* _s = _internal_mutable_service(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.service) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceCall.service) return _s; } -inline const ::std::string& Fixture::_internal_service() const { +inline const ::std::string& ServiceCall::_internal_service() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.service_.Get(); } -inline void Fixture::_internal_set_service(const ::std::string& value) { +inline void ServiceCall::_internal_set_service(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.service_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_service() { +inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_service() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.service_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE Fixture::release_service() { +inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_service() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.service) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceCall.service) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } @@ -7893,7 +9514,7 @@ inline ::std::string* PROTOBUF_NULLABLE Fixture::release_service() { } return released; } -inline void Fixture::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceCall::set_allocated_service(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000002U); @@ -7904,50 +9525,50 @@ inline void Fixture::set_allocated_service(::std::string* PROTOBUF_NULLABLE valu if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.service_.IsDefault()) { _impl_.service_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.service) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceCall.service) } -// string method = 3; -inline void Fixture::clear_method() { +// string method = 4; +inline void ServiceCall::clear_method() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.method_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } -inline const ::std::string& Fixture::method() const +inline const ::std::string& ServiceCall::method() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.method) + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceCall.method) return _internal_method(); } template -PROTOBUF_ALWAYS_INLINE void Fixture::set_method(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceCall::set_method(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000004U); _impl_.method_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.method) + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceCall.method) } -inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_method() +inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_method() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000004U); ::std::string* _s = _internal_mutable_method(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.method) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceCall.method) return _s; } -inline const ::std::string& Fixture::_internal_method() const { +inline const ::std::string& ServiceCall::_internal_method() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.method_.Get(); } -inline void Fixture::_internal_set_method(const ::std::string& value) { +inline void ServiceCall::_internal_set_method(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.method_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_method() { +inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_method() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.method_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE Fixture::release_method() { +inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_method() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.method) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceCall.method) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { return nullptr; } @@ -7958,7 +9579,7 @@ inline ::std::string* PROTOBUF_NULLABLE Fixture::release_method() { } return released; } -inline void Fixture::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceCall::set_allocated_method(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000004U); @@ -7969,50 +9590,50 @@ inline void Fixture::set_allocated_method(::std::string* PROTOBUF_NULLABLE value if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.method_.IsDefault()) { _impl_.method_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.method) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceCall.method) } -// bytes payload = 4; -inline void Fixture::clear_payload() { +// bytes payload = 5; +inline void ServiceCall::clear_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.ClearToEmpty(); ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } -inline const ::std::string& Fixture::payload() const +inline const ::std::string& ServiceCall::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.payload) + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceCall.payload) return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void Fixture::set_payload(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceCall::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); SetHasBit(_impl_._has_bits_[0], 0x00000008U); _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.payload) + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceCall.payload) } -inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_payload() +inline ::std::string* PROTOBUF_NONNULL ServiceCall::mutable_payload() ABSL_ATTRIBUTE_LIFETIME_BOUND { SetHasBit(_impl_._has_bits_[0], 0x00000008U); ::std::string* _s = _internal_mutable_payload(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.payload) + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceCall.payload) return _s; } -inline const ::std::string& Fixture::_internal_payload() const { +inline const ::std::string& ServiceCall::_internal_payload() const { ::google::protobuf::internal::TSanRead(&_impl_); return _impl_.payload_.Get(); } -inline void Fixture::_internal_set_payload(const ::std::string& value) { +inline void ServiceCall::_internal_set_payload(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.payload_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_payload() { +inline ::std::string* PROTOBUF_NONNULL ServiceCall::_internal_mutable_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); return _impl_.payload_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE Fixture::release_payload() { +inline ::std::string* PROTOBUF_NULLABLE ServiceCall::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.payload) + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceCall.payload) if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { return nullptr; } @@ -8023,7 +9644,7 @@ inline ::std::string* PROTOBUF_NULLABLE Fixture::release_payload() { } return released; } -inline void Fixture::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceCall::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { SetHasBit(_impl_._has_bits_[0], 0x00000008U); @@ -8034,132 +9655,166 @@ inline void Fixture::set_allocated_payload(::std::string* PROTOBUF_NULLABLE valu if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { _impl_.payload_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.payload) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceCall.payload) } -// string source = 5; -inline void Fixture::clear_source() { +// ------------------------------------------------------------------- + +// ServiceAnswer + +// uint64 id = 1; +inline void ServiceAnswer::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.source_.ClearToEmpty(); + _impl_.id_ = ::uint64_t{0u}; ClearHasBit(_impl_._has_bits_[0], - 0x00000010U); + 0x00000004U); } -inline const ::std::string& Fixture::source() const +inline ::uint64_t ServiceAnswer::id() const { + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceAnswer.id) + return _internal_id(); +} +inline void ServiceAnswer::set_id(::uint64_t value) { + _internal_set_id(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceAnswer.id) +} +inline ::uint64_t ServiceAnswer::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_; +} +inline void ServiceAnswer::_internal_set_id(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = value; +} + +// bytes payload = 2; +inline void ServiceAnswer::clear_payload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.payload_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ServiceAnswer::payload() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixture.source) - return _internal_source(); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceAnswer.payload) + return _internal_payload(); } template -PROTOBUF_ALWAYS_INLINE void Fixture::set_source(Arg_&& arg, Args_... args) { +PROTOBUF_ALWAYS_INLINE void ServiceAnswer::set_payload(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000010U); - _impl_.source_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:modlock.host_app.control.Fixture.source) + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.payload_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceAnswer.payload) } -inline ::std::string* PROTOBUF_NONNULL Fixture::mutable_source() +inline ::std::string* PROTOBUF_NONNULL ServiceAnswer::mutable_payload() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000010U); - ::std::string* _s = _internal_mutable_source(); - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixture.source) + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceAnswer.payload) return _s; } -inline const ::std::string& Fixture::_internal_source() const { +inline const ::std::string& ServiceAnswer::_internal_payload() const { ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.source_.Get(); + return _impl_.payload_.Get(); } -inline void Fixture::_internal_set_source(const ::std::string& value) { +inline void ServiceAnswer::_internal_set_payload(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.source_.Set(value, GetArena()); + _impl_.payload_.Set(value, GetArena()); } -inline ::std::string* PROTOBUF_NONNULL Fixture::_internal_mutable_source() { +inline ::std::string* PROTOBUF_NONNULL ServiceAnswer::_internal_mutable_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.source_.Mutable( GetArena()); + return _impl_.payload_.Mutable( GetArena()); } -inline ::std::string* PROTOBUF_NULLABLE Fixture::release_source() { +inline ::std::string* PROTOBUF_NULLABLE ServiceAnswer::release_payload() { ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:modlock.host_app.control.Fixture.source) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000010U)) { + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceAnswer.payload) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); - auto* released = _impl_.source_.Release(); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.payload_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.source_.Set("", GetArena()); + _impl_.payload_.Set("", GetArena()); } return released; } -inline void Fixture::set_allocated_source(::std::string* PROTOBUF_NULLABLE value) { +inline void ServiceAnswer::set_allocated_payload(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000010U); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } - _impl_.source_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.source_.IsDefault()) { - _impl_.source_.Set("", GetArena()); + _impl_.payload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.payload_.IsDefault()) { + _impl_.payload_.Set("", GetArena()); } - // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.Fixture.source) + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceAnswer.payload) } -// ------------------------------------------------------------------- - -// Fixtures - -// repeated .modlock.host_app.control.Fixture fixtures = 1; -inline int Fixtures::_internal_fixtures_size() const { - return _internal_fixtures().size(); -} -inline int Fixtures::fixtures_size() const { - return _internal_fixtures_size(); -} -inline void Fixtures::clear_fixtures() { +// string error = 3; +inline void ServiceAnswer::clear_error() { ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.fixtures_.Clear(); - ClearHasBitForRepeated(_impl_._has_bits_[0], - 0x00000001U); + _impl_.error_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); } -inline ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL Fixtures::mutable_fixtures(int index) +inline const ::std::string& ServiceAnswer::error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:modlock.host_app.control.Fixtures.fixtures) - return _internal_mutable_fixtures()->Mutable(index); + // @@protoc_insertion_point(field_get:modlock.host_app.control.ServiceAnswer.error) + return _internal_error(); } -inline ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL Fixtures::mutable_fixtures() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); - // @@protoc_insertion_point(field_mutable_list:modlock.host_app.control.Fixtures.fixtures) +template +PROTOBUF_ALWAYS_INLINE void ServiceAnswer::set_error(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_fixtures(); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.error_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:modlock.host_app.control.ServiceAnswer.error) } -inline const ::modlock::host_app::control::Fixture& Fixtures::fixtures(int index) const +inline ::std::string* PROTOBUF_NONNULL ServiceAnswer::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:modlock.host_app.control.Fixtures.fixtures) - return _internal_fixtures().Get(index); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_error(); + // @@protoc_insertion_point(field_mutable:modlock.host_app.control.ServiceAnswer.error) + return _s; } -inline ::modlock::host_app::control::Fixture* PROTOBUF_NONNULL Fixtures::add_fixtures() - ABSL_ATTRIBUTE_LIFETIME_BOUND { +inline const ::std::string& ServiceAnswer::_internal_error() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.error_.Get(); +} +inline void ServiceAnswer::_internal_set_error(const ::std::string& value) { ::google::protobuf::internal::TSanWrite(&_impl_); - ::modlock::host_app::control::Fixture* _add = - _internal_mutable_fixtures()->InternalAddWithArena( - ::google::protobuf::MessageLite::internal_visibility(), GetArena()); - SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); - // @@protoc_insertion_point(field_add:modlock.host_app.control.Fixtures.fixtures) - return _add; + _impl_.error_.Set(value, GetArena()); } -inline const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& Fixtures::fixtures() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:modlock.host_app.control.Fixtures.fixtures) - return _internal_fixtures(); +inline ::std::string* PROTOBUF_NONNULL ServiceAnswer::_internal_mutable_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.error_.Mutable( GetArena()); } -inline const ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>& -Fixtures::_internal_fixtures() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.fixtures_; +inline ::std::string* PROTOBUF_NULLABLE ServiceAnswer::release_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:modlock.host_app.control.ServiceAnswer.error) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.error_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.error_.Set("", GetArena()); + } + return released; } -inline ::google::protobuf::RepeatedPtrField<::modlock::host_app::control::Fixture>* PROTOBUF_NONNULL -Fixtures::_internal_mutable_fixtures() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.fixtures_; +inline void ServiceAnswer::set_allocated_error(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.error_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:modlock.host_app.control.ServiceAnswer.error) } #ifdef __GNUC__ diff --git a/src/host_app/control/control.pb.ts b/src/host_app/control/control.pb.ts index dd65ce11..e2416be5 100644 --- a/src/host_app/control/control.pb.ts +++ b/src/host_app/control/control.pb.ts @@ -60,6 +60,7 @@ export interface ControlRequest { | { value: ReloadRequest; case: 'reload' } | { value: RolesTable; case: 'roles' } | { value: ServiceReply; case: 'service' } + | { value: ServiceAnswer; case: 'answer' } } export const ControlRequest: MessageType = @@ -69,6 +70,7 @@ export const ControlRequest: MessageType = [1, 'reload', 11, 0, ReloadRequest.codec, 'body'], [2, 'roles', 11, 0, RolesTable.codec, 'body'], [3, 'service', 11, 0, ServiceReply.codec, 'body'], + [4, 'answer', 11, 0, ServiceAnswer.codec, 'body'], ], { decode: ( @@ -110,6 +112,16 @@ export const ControlRequest: MessageType = ), } break + case 4: + m.body = { + case: 'answer', + value: ServiceAnswer.decode( + r, + r.delimited(), + m.body?.case === 'answer' ? m.body.value : {}, + ), + } + break default: r.skip(t) } @@ -132,6 +144,11 @@ export const ControlRequest: MessageType = if (o?.case === 'service' && o.value != null) ServiceReply.writeField(w, 3, o.value) } + { + const o = m.body + if (o?.case === 'answer' && o.value != null) + ServiceAnswer.writeField(w, 4, o.value) + } }, }, ) @@ -207,6 +224,7 @@ export interface HostEvent { | { value: ModCalls; case: 'calls' } | { value: ModSlowFrame; case: 'slowFrame' } | { value: ServiceResult; case: 'serviceApplied' } + | { value: ServiceCall; case: 'serviceCall' } } export const HostEvent: MessageType = @@ -225,6 +243,7 @@ export const HostEvent: MessageType = [10, 'calls', 11, 0, ModCalls.codec, 'body'], [11, 'slow_frame', 11, 0, ModSlowFrame.codec, 'body'], [12, 'service_applied', 11, 0, ServiceResult.codec, 'body'], + [13, 'service_call', 11, 0, ServiceCall.codec, 'body'], ], { decode: (r: BinaryReader, end: number, m: HostEvent): HostEvent => { @@ -352,6 +371,16 @@ export const HostEvent: MessageType = ), } break + case 13: + m.body = { + case: 'serviceCall', + value: ServiceCall.decode( + r, + r.delimited(), + m.body?.case === 'serviceCall' ? m.body.value : {}, + ), + } + break default: r.skip(t) } @@ -419,6 +448,11 @@ export const HostEvent: MessageType = if (o?.case === 'serviceApplied' && o.value != null) ServiceResult.writeField(w, 12, o.value) } + { + const o = m.body + if (o?.case === 'serviceCall' && o.value != null) + ServiceCall.writeField(w, 13, o.value) + } }, }, ) @@ -1314,20 +1348,91 @@ export const Fixture: MessageType = }, ) +/** + * Forward hands one mod's started calls of a service to the controller over + * the control link, in place of a fixture. + * + * @generated from message modlock.host_app.control.Forward + */ +export interface Forward { + /** + * Mod is the slug of the mod whose calls go to the controller. + */ + mod?: string + /** + * Service names the service forwarded. + */ + service?: string + /** + * Target names where the controller sends the calls, for the host's log. + */ + target?: string +} + +export const Forward: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.host_app.control.Forward', + () => [ + [1, 'mod', 9], + [2, 'service', 9], + [3, 'target', 9], + ], + { + decode: (r: BinaryReader, end: number, m: Forward): Forward => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.mod = r.string() + break + case 2: + m.service = r.string() + break + case 3: + m.target = r.string() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: Forward, w: Writer): void => { + { + const v = m.mod + if (v) w.uint32(10).string(v) + } + { + const v = m.service + if (v) w.uint32(18).string(v) + } + { + const v = m.target + if (v) w.uint32(26).string(v) + } + }, + }, + ) + /** * Fixtures is the file --fixtures names: every fixture reply of the mods the - * host loads. + * host loads, and the services the controller answers instead. * * @generated from message modlock.host_app.control.Fixtures */ export interface Fixtures { fixtures?: Fixture[] + forwards?: Forward[] } export const Fixtures: MessageType = /* @__PURE__ */ createMessageType( 'modlock.host_app.control.Fixtures', - () => [[1, 'fixtures', 11, 1, Fixture.codec]], + () => [ + [1, 'fixtures', 11, 1, Fixture.codec], + [2, 'forwards', 11, 1, Forward.codec], + ], { decode: (r: BinaryReader, end: number, m: Fixtures): Fixtures => { while (r.pos < end) { @@ -1337,6 +1442,9 @@ export const Fixtures: MessageType = case 1: ;(m.fixtures ??= []).push(Fixture.decode(r, r.delimited(), {})) break + case 2: + ;(m.forwards ??= []).push(Forward.decode(r, r.delimited(), {})) + break default: r.skip(t) } @@ -1348,6 +1456,168 @@ export const Fixtures: MessageType = const a = m.fixtures if (a != null) for (const e of a) Fixture.writeField(w, 1, e) } + { + const a = m.forwards + if (a != null) for (const e of a) Forward.writeField(w, 2, e) + } + }, + }, + ) + +/** + * ServiceCall is one started call of a forwarded service, for the controller + * to answer. + * + * @generated from message modlock.host_app.control.ServiceCall + */ +export interface ServiceCall { + /** + * Id names the call in the Answer that ends it. + */ + id?: bigint + /** + * Mod is the slug of the calling mod. + */ + mod?: string + /** + * Service and Method select the call. + */ + service?: string + method?: string + /** + * Payload is the call's bytes, opaque to Modlock. + */ + payload?: Uint8Array +} + +export const ServiceCall: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.host_app.control.ServiceCall', + () => [ + [1, 'id', 4], + [2, 'mod', 9], + [3, 'service', 9], + [4, 'method', 9], + [5, 'payload', 12], + ], + { + decode: (r: BinaryReader, end: number, m: ServiceCall): ServiceCall => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.id = r.uint64() + break + case 2: + m.mod = r.string() + break + case 3: + m.service = r.string() + break + case 4: + m.method = r.string() + break + case 5: + m.payload = r.bytes() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: ServiceCall, w: Writer): void => { + { + const v = m.id + if (v) w.uint32(8).uint64(v) + } + { + const v = m.mod + if (v) w.uint32(18).string(v) + } + { + const v = m.service + if (v) w.uint32(26).string(v) + } + { + const v = m.method + if (v) w.uint32(34).string(v) + } + { + const v = m.payload + if (v != null && v.length !== 0) w.uint32(42).bytes(v) + } + }, + }, + ) + +/** + * ServiceAnswer ends one forwarded ServiceCall with its reply or an error. + * + * @generated from message modlock.host_app.control.ServiceAnswer + */ +export interface ServiceAnswer { + /** + * Id matches the ServiceCall it ends. + */ + id?: bigint + /** + * Payload is the reply's bytes when Error is empty. + */ + payload?: Uint8Array + /** + * Error, when set, fails the call with this text. + */ + error?: string +} + +export const ServiceAnswer: MessageType = + /* @__PURE__ */ createMessageType( + 'modlock.host_app.control.ServiceAnswer', + () => [ + [1, 'id', 4], + [2, 'payload', 12], + [3, 'error', 9], + ], + { + decode: ( + r: BinaryReader, + end: number, + m: ServiceAnswer, + ): ServiceAnswer => { + while (r.pos < end) { + const t = r.tag() + if ((t & 7) === 4) return m + switch (t >>> 3) { + case 1: + m.id = r.uint64() + break + case 2: + m.payload = r.bytes() + break + case 3: + m.error = r.string() + break + default: + r.skip(t) + } + } + return m + }, + encode: (m: ServiceAnswer, w: Writer): void => { + { + const v = m.id + if (v) w.uint32(8).uint64(v) + } + { + const v = m.payload + if (v != null && v.length !== 0) w.uint32(18).bytes(v) + } + { + const v = m.error + if (v) w.uint32(26).string(v) + } }, }, ) diff --git a/src/host_app/control/control.proto b/src/host_app/control/control.proto index 299663dc..c0de0e70 100644 --- a/src/host_app/control/control.proto +++ b/src/host_app/control/control.proto @@ -26,6 +26,9 @@ message ControlRequest { // Service installs a cached service answer and reloads its mod to adopt it. ServiceReply service = 3; + + // Answer ends one ServiceCall the host forwarded. + ServiceAnswer answer = 4; } } @@ -80,6 +83,10 @@ message HostEvent { ModSlowFrame slow_frame = 11; // ServiceApplied confirms whether a controller configuration started. ServiceResult service_applied = 12; + + // ServiceCall asks the controller to answer a mod's started call to a + // service the fixtures forward; an Answer with its id ends it. + ServiceCall service_call = 13; } } @@ -247,8 +254,44 @@ message Fixture { string source = 5; } +// Forward hands one mod's started calls of a service to the controller over +// the control link, in place of a fixture. +message Forward { + // Mod is the slug of the mod whose calls go to the controller. + string mod = 1; + // Service names the service forwarded. + string service = 2; + // Target names where the controller sends the calls, for the host's log. + string target = 3; +} + // Fixtures is the file --fixtures names: every fixture reply of the mods the -// host loads. +// host loads, and the services the controller answers instead. message Fixtures { repeated Fixture fixtures = 1; + repeated Forward forwards = 2; +} + +// ServiceCall is one started call of a forwarded service, for the controller +// to answer. +message ServiceCall { + // Id names the call in the Answer that ends it. + uint64 id = 1; + // Mod is the slug of the calling mod. + string mod = 2; + // Service and Method select the call. + string service = 3; + string method = 4; + // Payload is the call's bytes, opaque to Modlock. + bytes payload = 5; +} + +// ServiceAnswer ends one forwarded ServiceCall with its reply or an error. +message ServiceAnswer { + // Id matches the ServiceCall it ends. + uint64 id = 1; + // Payload is the reply's bytes when Error is empty. + bytes payload = 2; + // Error, when set, fails the call with this text. + string error = 3; } diff --git a/src/host_app/control_link.cc b/src/host_app/control_link.cc index 0d6867a6..7e87c68e 100644 --- a/src/host_app/control_link.cc +++ b/src/host_app/control_link.cc @@ -204,10 +204,12 @@ void ControlLink::RunRequests(WasmHost& mods) { return; } std::vector requests; + bool closed = false; { std::lock_guard lock(mu_); requests.swap(requests_); pending_.store(false, std::memory_order_release); + closed = closed_; } for (const auto& request : requests) { @@ -265,10 +267,59 @@ void ControlLink::RunRequests(WasmHost& mods) { case control::ControlRequest::kRoles: mods.SetRoles(request.roles()); break; + case control::ControlRequest::kAnswer: { + // End the forwarded call the answer names; an unknown id has ended. + const auto& answer = request.answer(); + const auto found = calls_.find(answer.id()); + if (found == calls_.end()) { + break; + } + auto reply = std::move(found->second); + calls_.erase(found); + if (!answer.error().empty()) { + reply(std::unexpected(answer.error())); + } else { + reply(answer.payload()); + } + break; + } default: break; } } + + // Once the controller is gone, no answer comes for the calls it holds. + if (closed) { + auto calls = std::move(calls_); + calls_.clear(); + for (auto& [id, reply] : calls) { + reply(std::unexpected(std::string("the program that answers this service has gone"))); + } + } +} + +void ControlLink::Forward(std::string_view mod, std::string_view service, + std::string_view method, std::string_view payload, WasmReply reply) { + // A call with nobody to answer it ends at once. + { + std::lock_guard lock(mu_); + if (closed_) { + reply(std::unexpected(std::string("the program that answers this service has gone"))); + return; + } + } + + // Keep the reply, then ask the controller. + const auto id = ++next_call_; + calls_.insert_or_assign(id, std::move(reply)); + control::HostEvent event; + auto* call = event.mutable_service_call(); + call->set_id(id); + call->set_mod(std::string(mod)); + call->set_service(std::string(service)); + call->set_method(std::string(method)); + call->set_payload(std::string(payload)); + Push(std::move(event)); } void ControlLink::Started(std::string_view mod, bool reloaded) { @@ -404,8 +455,10 @@ void ControlLink::Read() { pending_.store(true, std::memory_order_release); } { + // Wake the engine thread too, so it ends the calls left unanswered. std::lock_guard lock(mu_); closed_ = true; + pending_.store(true, std::memory_order_release); } wake_.notify_one(); } diff --git a/src/host_app/control_link.h b/src/host_app/control_link.h index f66fb3ee..a973029f 100644 --- a/src/host_app/control_link.h +++ b/src/host_app/control_link.h @@ -25,8 +25,8 @@ namespace modlock::host_app { // ControlLink connects modlock-host to the program that started it, such as // modlock dev, with the framing control.proto describes. The host dials the // controller's loopback address, streams mod starts, logs, failures, server -// readiness, player joins and leaves and mod interfaces, and takes reloads -// and the players' roles. +// readiness, player joins and leaves and mod interfaces, and takes reloads, +// the players' roles and the answers to the service calls it forwards. // Requests run on the engine thread through RunRequests. When the controller // disconnects, events are dropped and the host keeps running. class ControlLink final : public WasmHostObserver, public gameinterop::ConnectionEventSink { @@ -48,6 +48,12 @@ class ControlLink final : public WasmHostObserver, public gameinterop::Connectio // runs on the engine thread. void RunRequests(WasmHost& mods); + // Forward sends one mod's started service call to the controller, and ends + // it with the controller's answer in a later RunRequests, or at once when + // the controller is gone. It runs on the engine thread. + void Forward(std::string_view mod, std::string_view service, std::string_view method, + std::string_view payload, WasmReply reply); + void Started(std::string_view mod, bool reloaded) override; void Logged(std::string_view mod, std::string_view text) override; void Failed(std::string_view mod, std::string_view error) override; @@ -63,6 +69,10 @@ class ControlLink final : public WasmHostObserver, public gameinterop::Connectio // replies_ outlives the control link when a host extension still holds it. // All access runs on the engine thread. std::shared_ptr replies_ = std::make_shared(); + // calls_ holds each forwarded call's reply by id until its answer comes, + // and next_call_ numbers the next. Both are on the engine thread. + std::map calls_; + uint64_t next_call_ = 0; explicit ControlLink(intptr_t socket); diff --git a/src/host_app/fixtures.cc b/src/host_app/fixtures.cc index 8561d033..1d837b9c 100644 --- a/src/host_app/fixtures.cc +++ b/src/host_app/fixtures.cc @@ -10,36 +10,54 @@ namespace modlock::host_app { -std::expected ProvideFixtures(WasmHost& host, std::string_view data) { +std::expected ProvideFixtures(WasmHost& host, std::string_view data, + Forward forward) { // Read the replies. control::Fixtures fixtures; if (!fixtures.ParseFromArray(data.data(), static_cast(data.size()))) { return std::unexpected("the fixtures file is malformed"); } + if (fixtures.forwards_size() > 0 && !forward) { + return std::unexpected("the fixtures forward a service, which needs --control"); + } - // Keep each service's replies by mod and method, and its files by mod. + // Keep each service's replies by mod and method, its files by mod, and the + // mods whose calls it forwards with where to. struct Service { std::map, std::string, std::less<>> replies; std::map> sources; + std::map> forwards; }; std::map> services; - for (const auto& fixture : fixtures.fixtures()) { - auto& service = services[fixture.service()]; + auto named = [&services](const std::string& name) -> Service& { + auto& service = services[name]; if (!service) { service = std::make_shared(); } - service->replies.insert_or_assign({fixture.mod(), fixture.method()}, fixture.payload()); - service->sources.insert_or_assign(fixture.mod(), fixture.source()); + return *service; + }; + for (const auto& fixture : fixtures.fixtures()) { + auto& service = named(fixture.service()); + service.replies.insert_or_assign({fixture.mod(), fixture.method()}, fixture.payload()); + service.sources.insert_or_assign(fixture.mod(), fixture.source()); + } + for (const auto& forwarded : fixtures.forwards()) { + named(forwarded.service()).forwards.insert_or_assign(forwarded.mod(), forwarded.target()); } // Provide each service, answering a mod only from its own fixture. std::string lines; for (auto& [name, service] : services) { for (const auto& [mod, source] : service->sources) { - lines += mod + ": service " + name + ": fixture " + source + "\n"; + if (!service->forwards.contains(mod)) { + lines += mod + ": service " + name + ": fixture " + source + "\n"; + } } - host.Provide(name, [service](std::string_view mod, std::string_view method, - std::string_view) -> std::expected { + for (const auto& [mod, target] : service->forwards) { + lines += mod + ": service " + name + ": forwarded to " + target + "\n"; + } + auto answer = [service](std::string_view mod, + std::string_view method) -> std::expected { const auto source = service->sources.find(mod); if (source == service->sources.end()) { return std::unexpected("this host has no fixture of this service for " + std::string(mod)); @@ -50,6 +68,26 @@ std::expected ProvideFixtures(WasmHost& host, std::str std::string(method)); } return found->second; + }; + + // A service with no forward answers every call at once. + if (service->forwards.empty()) { + host.Provide(name, [answer](std::string_view mod, std::string_view method, + std::string_view) { return answer(mod, method); }); + continue; + } + + // A forwarded service answers started calls: a forwarded mod's in a later + // frame, and any other mod's from its fixture at once. + host.ProvideLater(name, [service, answer, forward, name](std::string_view mod, + std::string_view method, + std::string_view payload, + WasmReply reply) { + if (service->forwards.contains(mod)) { + forward(mod, name, method, payload, std::move(reply)); + return; + } + reply(answer(mod, method)); }); } return lines; diff --git a/src/host_app/fixtures.h b/src/host_app/fixtures.h index 0e7068ce..70c959fa 100644 --- a/src/host_app/fixtures.h +++ b/src/host_app/fixtures.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include @@ -8,12 +9,21 @@ namespace modlock::host_app { +// Forward hands one mod's started call of a service to whoever answers it in +// a later frame, such as the controller. +using Forward = std::function; + // ProvideFixtures provides every service the Fixtures message in data names, // answering each mod's call to a method with that mod's fixture reply. A -// method or a mod the fixtures lack is refused, naming the fixture file. It -// returns one line per service and mod for the host's log, or an error for a -// message that does not parse. +// method or a mod the fixtures lack is refused, naming the fixture file. A +// service the message forwards for a mod takes that mod's started calls and +// hands them to forward. It returns one line per service and mod for the +// host's log, or an error for a message that does not parse or that forwards +// with no forward. [[nodiscard]] std::expected ProvideFixtures(WasmHost& host, - std::string_view data); + std::string_view data, + Forward forward = {}); } // namespace modlock::host_app diff --git a/src/host_app/main.cc b/src/host_app/main.cc index 64349be4..d4e6146d 100644 --- a/src/host_app/main.cc +++ b/src/host_app/main.cc @@ -40,7 +40,8 @@ void Help() { " --files DIRECTORY Keep the files mods write in DIRECTORY, one\n" " directory per mod\n" " --fixtures PATH Answer the services the Fixtures message in PATH names\n" - " with its replies\n" + " with its replies, or over --control where it\n" + " forwards them\n" " --game-data PATH Read signatures and virtual slots from PATH instead\n" " of the game_signatures.txtpb beside the host\n" " --control ADDRESS Report to and take reloads from the controller at\n" @@ -286,22 +287,6 @@ int main(int argc, char** argv) { mods.KeepSettings(&settings.emplace(options.settings_file)); } mods.KeepFiles(options.files_directory); - if (!options.fixtures_file.empty()) { - // The fixtures answer before any mod starts, so a mod that needs one - // starts. - std::ifstream file(options.fixtures_file, std::ios::binary); - if (!file) { - std::cerr << "fixtures: cannot read " << options.fixtures_file.string() << '\n'; - return 1; - } - const std::string data{std::istreambuf_iterator(file), {}}; - auto provided = modlock::host_app::ProvideFixtures(mods, data); - if (!provided) { - std::cerr << "fixtures: " << provided.error() << '\n'; - return 1; - } - std::cout << *provided; - } FailureRecorder failures; mods.Observe(&failures); std::unique_ptr link; @@ -319,6 +304,30 @@ int main(int argc, char** argv) { } } + if (!options.fixtures_file.empty()) { + // The fixtures answer before any mod starts, so a mod that needs one + // starts; a forwarded service goes over the control link. + std::ifstream file(options.fixtures_file, std::ios::binary); + if (!file) { + std::cerr << "fixtures: cannot read " << options.fixtures_file.string() << '\n'; + return 1; + } + const std::string data{std::istreambuf_iterator(file), {}}; + modlock::host_app::Forward forward; + if (link) { + forward = [&link](std::string_view mod, std::string_view service, std::string_view method, + std::string_view payload, modlock::WasmReply reply) { + link->Forward(mod, service, method, payload, std::move(reply)); + }; + } + auto provided = modlock::host_app::ProvideFixtures(mods, data, std::move(forward)); + if (!provided) { + std::cerr << "fixtures: " << provided.error() << '\n'; + return 1; + } + std::cout << *provided; + } + // The host destroys plugin instances and libraries before the mods, the // link and engine resources. modlock::host::PluginHost plugins; diff --git a/tests/host_fixtures_test.cc b/tests/host_fixtures_test.cc index 66d52758..0a3e2aa7 100644 --- a/tests/host_fixtures_test.cc +++ b/tests/host_fixtures_test.cc @@ -1,15 +1,28 @@ // Contract tests for a mod's needed services and the host's fixtures: a mod // whose needed service nobody provides does not start and its failure names -// the service, an optional one starts the mod, and a fixture handed to the -// host at start answers each method with its reply, for its own mod only. +// the service, an optional one starts the mod, a fixture handed to the host +// at start answers each method with its reply, for its own mod only, and a +// forwarded service reaches the controller over the control link and ends +// with its answer. +#ifndef _WIN32 +#include +#include +#include +#endif + +#include +#include #include #include +#include #include #include #include +#include #include #include "gtest/gtest.h" +#include "host_app/control_link.h" #include "host_app/fixtures.h" #include "modlock/wasm_host.h" #include "src/host_app/control/control.pb.h" @@ -126,4 +139,194 @@ TEST(HostFixtures, AFixtureAnswersNoOtherMod) { EXPECT_FALSE(modlock::host_app::ProvideFixtures(host, "\xff\xff\xff")); } +// Forwarded encodes a fixture of shout for arena and a forward of it for +// extension-go. +std::string Forwarded() { + modlock::host_app::control::Fixtures fixtures; + fixtures.ParseFromString(Fixtures("arena")); + auto* forward = fixtures.add_forwards(); + forward->set_mod("extension-go"); + forward->set_service("shout"); + forward->set_target("https://service.test"); + return fixtures.SerializeAsString(); +} + +TEST(HostFixtures, AForwardedServiceTakesItsModsStartedCalls) { + // Forwarding without a forward is refused. + WasmHost host({}); + ASSERT_FALSE(modlock::host_app::ProvideFixtures(host, Forwarded())); + + // The forward takes the mod's started call, and the log names its target. + Build build(R"([{"name":"shout"}])"); + std::vector calls; + std::vector replies; + auto provided = modlock::host_app::ProvideFixtures( + host, Forwarded(), + [&](std::string_view mod, std::string_view service, std::string_view method, + std::string_view payload, modlock::WasmReply reply) { + calls.push_back(std::string(mod) + " " + std::string(service) + " " + + std::string(method) + " " + std::string(payload)); + replies.push_back(std::move(reply)); + }); + ASSERT_TRUE(provided) << provided.error(); + EXPECT_EQ(*provided, + "arena: service shout: fixture services/shout.json\n" + "extension-go: service shout: forwarded to https://service.test\n"); + auto plugin = host.Load(build.Path(), PluginContext{.check_only = true}); + ASSERT_TRUE(plugin) << plugin.error(); + ASSERT_TRUE((*plugin)->Start()); + ASSERT_TRUE(host.Call("extension-go", "later", "start", "shout|say|hi|0")); + ASSERT_EQ(calls, std::vector{"extension-go shout say hi"}); + + // Its answer ends the call in the next frame. + replies[0](std::string("HI")); + (*plugin)->Tick(); + auto ended = host.Call("extension-go", "later", "ended", ""); + ASSERT_TRUE(ended) << ended.error(); + EXPECT_EQ(*ended, "hi HI"); + (*plugin)->Stop(); +} + +#ifndef _WIN32 +// Controller is a loopback controller that one control link dials. +class Controller { + public: + Controller() { + listener_ = ::socket(AF_INET, SOCK_STREAM, 0); + sockaddr_in address{}; + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + socklen_t size = sizeof(address); + ::bind(listener_, reinterpret_cast(&address), size); + ::listen(listener_, 1); + ::getsockname(listener_, reinterpret_cast(&address), &size); + port_ = ntohs(address.sin_port); + } + ~Controller() { + Hangup(); + ::close(listener_); + } + Controller(const Controller&) = delete; + Controller& operator=(const Controller&) = delete; + + std::string Address() const { return "127.0.0.1:" + std::to_string(port_); } + void Accept() { conn_ = ::accept(listener_, nullptr, nullptr); } + void Hangup() { + if (conn_ >= 0) { + ::close(conn_); + conn_ = -1; + } + } + + // Next reads the link's next event. + modlock::host_app::control::HostEvent Next() { + std::array header{}; + Read(reinterpret_cast(header.data()), header.size()); + const uint32_t size = header[0] | header[1] << 8 | header[2] << 16 | header[3] << 24; + std::string data(size, '\0'); + Read(data.data(), data.size()); + modlock::host_app::control::HostEvent event; + event.ParseFromString(data); + return event; + } + + // Send writes one request to the link. + void Send(const modlock::host_app::control::ControlRequest& request) { + const auto data = request.SerializeAsString(); + const auto size = static_cast(data.size()); + const std::array header{static_cast(size), static_cast(size >> 8), + static_cast(size >> 16), static_cast(size >> 24)}; + ::send(conn_, header.data(), header.size(), 0); + ::send(conn_, data.data(), data.size(), 0); + } + + private: + void Read(char* data, size_t size) { + while (size > 0) { + const auto got = ::recv(conn_, data, size, 0); + ASSERT_GT(got, 0); + data += got; + size -= static_cast(got); + } + } + + int listener_ = -1; + int conn_ = -1; + uint16_t port_ = 0; +}; + +// Until runs the link's requests until done reports true, for two seconds at +// most. +bool Until(modlock::host_app::ControlLink& link, WasmHost& host, const std::function& done) { + const auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(2); + while (std::chrono::steady_clock::now() < deadline) { + link.RunRequests(host); + if (done()) { + return true; + } + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + } + return false; +} + +TEST(HostFixtures, TheControlLinkAsksTheControllerAndEndsTheCallWithItsAnswer) { + // Dial a controller. + Controller controller; + auto dialed = modlock::host_app::ControlLink::Dial(controller.Address()); + ASSERT_TRUE(dialed) << dialed.error(); + controller.Accept(); + auto& link = **dialed; + WasmHost host({}); + + // A forwarded call reaches the controller with its id and fields. + std::vector> ended; + const auto keep = [&ended](std::expected answer) { + ended.push_back(std::move(answer)); + }; + link.Forward("drills", "example.drills.v1", "read", R"({"key":"slide"})", keep); + auto event = controller.Next(); + ASSERT_TRUE(event.has_service_call()); + const auto call = event.service_call(); + EXPECT_EQ(call.mod(), "drills"); + EXPECT_EQ(call.service(), "example.drills.v1"); + EXPECT_EQ(call.method(), "read"); + EXPECT_EQ(call.payload(), R"({"key":"slide"})"); + + // An answer for another id does nothing; the call's own answer ends it. + modlock::host_app::control::ControlRequest stray; + stray.mutable_answer()->set_id(call.id() + 7); + controller.Send(stray); + modlock::host_app::control::ControlRequest answer; + answer.mutable_answer()->set_id(call.id()); + answer.mutable_answer()->set_payload(R"({"name":"Slide"})"); + controller.Send(answer); + ASSERT_TRUE(Until(link, host, [&] { return !ended.empty(); })); + ASSERT_EQ(ended.size(), 1u); + ASSERT_TRUE(ended[0]) << ended[0].error(); + EXPECT_EQ(*ended[0], R"({"name":"Slide"})"); + + // An error answer fails the call with its text. + link.Forward("drills", "example.drills.v1", "save", "{}", keep); + const auto second = controller.Next().service_call(); + modlock::host_app::control::ControlRequest refused; + refused.mutable_answer()->set_id(second.id()); + refused.mutable_answer()->set_error("Only the mod's developers may call it"); + controller.Send(refused); + ASSERT_TRUE(Until(link, host, [&] { return ended.size() == 2; })); + ASSERT_FALSE(ended[1]); + EXPECT_EQ(ended[1].error(), "Only the mod's developers may call it"); + + // A call left unanswered when the controller goes ends with that, and so + // does a call made after. + link.Forward("drills", "example.drills.v1", "read", "{}", keep); + controller.Next(); + controller.Hangup(); + ASSERT_TRUE(Until(link, host, [&] { return ended.size() == 3; })); + EXPECT_EQ(ended[2].error(), "the program that answers this service has gone"); + link.Forward("drills", "example.drills.v1", "read", "{}", keep); + ASSERT_EQ(ended.size(), 4u); + EXPECT_EQ(ended[3].error(), "the program that answers this service has gone"); +} +#endif + } // namespace From c13e550bf0aca4b3ee5d8a81b23d23291ea9849c Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Sat, 14 Nov 2026 05:47:09 -0800 Subject: [PATCH 13/15] project: map the well-known protobuf types for scriptc The scriptc configuration mapped @aptre/protobuf-es-lite/* to .ts in the shipped runtime source, but the runtime exports each well-known type as google/protobuf/ from a file named .pb.ts. An import of google/protobuf/timestamp therefore looked for timestamp.ts, found nothing, and scriptc reported the package as unsupported, so any mod whose messages carry a Timestamp, Struct or wrapper fell back to QuickJS. The longer pattern now maps those to their .pb.ts sources. The new test resolves the written paths as TypeScript does, for the well-known types and for message and enum. Signed-off-by: Christian Stewart --- project/scriptc.go | 19 ++++---- project/scriptc_test.go | 98 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 project/scriptc_test.go diff --git a/project/scriptc.go b/project/scriptc.go index 00f2b74d..e0d6ce4f 100644 --- a/project/scriptc.go +++ b/project/scriptc.go @@ -68,7 +68,9 @@ func (p *Project) writeScriptcConfig(dir, library string, own map[string][]strin config.Extends = filepath.ToSlash(project) } - // Map the library and the protobuf runtime to their source. + // Map the library and the protobuf runtime to their source. The runtime + // exports each well-known type as google/protobuf/, from a source + // file named .pb.ts, so those take their own, longer pattern. source := filepath.Join(library, js.Scriptc) index := filepath.Join(source, "js", "src", "index.ts") protobuf := filepath.Join(source, js.ScriptcProtobuf) @@ -78,13 +80,14 @@ func (p *Project) writeScriptcConfig(dir, library string, own map[string][]strin } _, ownLibrary := own["modlock"] for name, targets := range map[string][]string{ - "modlock": {index}, - "modlock/jsx-runtime": {index}, - "modlock/entities": {filepath.Join(source, "js", "src", "entities.ts")}, - "modlock/console": {filepath.Join(source, "js", "src", "console.ts")}, - "modlock/scriptc": {filepath.Join(source, "js", "src", "scriptc.ts")}, - "@aptre/protobuf-es-lite": {filepath.Join(protobuf, "index.ts")}, - "@aptre/protobuf-es-lite/*": {filepath.Join(protobuf, "*.ts")}, + "modlock": {index}, + "modlock/jsx-runtime": {index}, + "modlock/entities": {filepath.Join(source, "js", "src", "entities.ts")}, + "modlock/console": {filepath.Join(source, "js", "src", "console.ts")}, + "modlock/scriptc": {filepath.Join(source, "js", "src", "scriptc.ts")}, + "@aptre/protobuf-es-lite": {filepath.Join(protobuf, "index.ts")}, + "@aptre/protobuf-es-lite/*": {filepath.Join(protobuf, "*.ts")}, + "@aptre/protobuf-es-lite/google/protobuf/*": {filepath.Join(protobuf, "google", "protobuf", "*.pb.ts")}, } { if ownLibrary && isLibrary(name) { continue diff --git a/project/scriptc_test.go b/project/scriptc_test.go new file mode 100644 index 00000000..e014ef09 --- /dev/null +++ b/project/scriptc_test.go @@ -0,0 +1,98 @@ +package project + +import ( + "encoding/json" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/paralin/modlock/js" +) + +// TestScriptcConfigResolvesProtobuf checks that the scriptc configuration +// resolves the protobuf runtime's modules to the shipped source, the +// well-known types under google/protobuf as well as message and enum. +func TestScriptcConfigResolvesProtobuf(t *testing.T) { + // Ship the runtime's source files as the built library lays them out. + library := t.TempDir() + protobuf := filepath.Join(library, js.Scriptc, js.ScriptcProtobuf) + shipped := []string{ + "index.ts", + "message.ts", + "enum.ts", + "google/protobuf/timestamp.pb.ts", + "google/protobuf/struct.pb.ts", + "google/protobuf/wrappers.pb.ts", + } + for _, name := range shipped { + path := filepath.Join(protobuf, filepath.FromSlash(name)) + if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(path, nil, 0o644); err != nil { + t.Fatal(err) + } + } + + // Write the configuration for a project with no tsconfig of its own. + dir := t.TempDir() + p := &Project{Dir: t.TempDir()} + if err := p.writeScriptcConfig(dir, library, nil); err != nil { + t.Fatal(err) + } + data, err := os.ReadFile(filepath.Join(dir, "tsconfig.json")) + if err != nil { + t.Fatal(err) + } + var config scriptcConfig + if err := json.Unmarshal(data, &config); err != nil { + t.Fatal(err) + } + + // Each import the generated messages make lands on a shipped file. + for specifier, want := range map[string]string{ + "@aptre/protobuf-es-lite": "index.ts", + "@aptre/protobuf-es-lite/message": "message.ts", + "@aptre/protobuf-es-lite/enum": "enum.ts", + "@aptre/protobuf-es-lite/google/protobuf/timestamp": "google/protobuf/timestamp.pb.ts", + "@aptre/protobuf-es-lite/google/protobuf/struct": "google/protobuf/struct.pb.ts", + "@aptre/protobuf-es-lite/google/protobuf/wrappers": "google/protobuf/wrappers.pb.ts", + } { + got := resolvePath(config.CompilerOptions.Paths, specifier) + if got != filepath.Join(protobuf, filepath.FromSlash(want)) { + t.Errorf("%s resolves to %q, want %s", specifier, got, want) + continue + } + if _, err := os.Stat(got); err != nil { + t.Errorf("%s resolves to a missing file: %v", specifier, err) + } + } +} + +// resolvePath resolves specifier through paths as TypeScript does: an exact +// key first, then the wildcard key with the longest prefix, taking the first +// target with the wildcard's match substituted. +func resolvePath(paths map[string][]string, specifier string) string { + // Take an exact key. + if targets, ok := paths[specifier]; ok && len(targets) != 0 { + return targets[0] + } + + // Otherwise take the matching wildcard key with the longest prefix. + best, bestPrefix, match := "", "", "" + for key := range paths { + prefix, suffix, ok := strings.Cut(key, "*") + if !ok || !strings.HasPrefix(specifier, prefix) || !strings.HasSuffix(specifier, suffix) { + continue + } + if len(specifier) < len(prefix)+len(suffix) || best != "" && len(prefix) <= len(bestPrefix) { + continue + } + best, bestPrefix, match = key, prefix, specifier[len(prefix):len(specifier)-len(suffix)] + } + if best == "" || len(paths[best]) == 0 { + return "" + } + return strings.Replace(paths[best][0], "*", match, 1) +} From b367e042326e3da2296f3f9eceb181fa60da6394 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Sat, 14 Nov 2026 11:17:06 -0800 Subject: [PATCH 14/15] tests: the Python late service call test bundles the hero table The library imports modlock.heroes since the hero names change, so the test mod that starts two later service calls failed its import at Start and trapped. Bundle heroes.py with it as the Python mod test already does. Signed-off-by: Christian Stewart --- tests/wasm_instance_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/wasm_instance_test.cc b/tests/wasm_instance_test.cc index e02e53ea..5a7bc2d5 100644 --- a/tests/wasm_instance_test.cc +++ b/tests/wasm_instance_test.cc @@ -468,6 +468,7 @@ modlock.call_service_later("example.drills.v1", "List", b"map", ended(7), 2.5) modlock.call_service_later("example.drills.v1", "Get", b"", ended(8)) )"}, {"modlock/__init__.py", Text(library + "/__init__.py")}, + {"modlock/heroes.py", Text(library + "/heroes.py")}, {"modlock/wire.py", Text(library + "/wire.py")}, })); auto started = (*instance)->Deliver(Event("Start", start)); From c904216934e9994b399bc4bf865e464e7e8c8656 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Sun, 15 Nov 2026 04:59:15 -0800 Subject: [PATCH 15/15] panorama: declare DispatchEvent in the layout library's $ Master declared the part of Panorama's $ that layout.ts calls, and this branch's press call added $.DispatchEvent, which the declaration lacked, so oxlint and a vendored compile saw an error typed call. Signed-off-by: Christian Stewart --- panorama/src/layout.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/panorama/src/layout.ts b/panorama/src/layout.ts index e80ce5d8..5fd5226f 100644 --- a/panorama/src/layout.ts +++ b/panorama/src/layout.ts @@ -41,6 +41,7 @@ import { */ declare const $: { Msg(...values: unknown[]): void + DispatchEvent(event: string, ...args: unknown[]): void GetContextPanel(): { GetAttributeString(name: string, fallback: string): string }