| | 1 | | // AUTOGENERATED, DO NOT EDIT |
| | 2 | | // Type definitions for server implementations of ports. |
| | 3 | | // package: decentraland.renderer.renderer_services |
| | 4 | | // file: decentraland/renderer/renderer_services/scene_controller.proto |
| | 5 | | using System.Collections.Generic; |
| | 6 | | using System.Threading; |
| | 7 | | using Cysharp.Threading.Tasks; |
| | 8 | | using Google.Protobuf; |
| | 9 | | using rpc_csharp.protocol; |
| | 10 | | using rpc_csharp; |
| | 11 | | namespace Decentraland.Renderer.RendererServices { |
| | 12 | | public interface IRpcSceneControllerService<Context> |
| | 13 | | { |
| | 14 | |
|
| | 15 | | UniTask<LoadSceneResult> LoadScene(LoadSceneMessage request, Context context, CancellationToken ct); |
| | 16 | |
|
| | 17 | | UniTask<UnloadSceneResult> UnloadScene(UnloadSceneMessage request, Context context, CancellationToken ct); |
| | 18 | |
|
| | 19 | | UniTask<CRDTSceneMessage> SendCrdt(CRDTSceneMessage request, Context context, CancellationToken ct); |
| | 20 | |
|
| | 21 | | UniTask<CRDTSceneCurrentState> GetCurrentState(GetCurrentStateMessage request, Context context, CancellationToken ct); |
| | 22 | |
|
| | 23 | | UniTask<SendBatchResponse> SendBatch(SendBatchRequest request, Context context, CancellationToken ct); |
| | 24 | |
|
| | 25 | | } |
| | 26 | |
|
| | 27 | | public static class RpcSceneControllerServiceCodeGen |
| | 28 | | { |
| | 29 | | public const string ServiceName = "RpcSceneControllerService"; |
| | 30 | |
|
| | 31 | | public static void RegisterService<Context>(RpcServerPort<Context> port, IRpcSceneControllerService<Context> service) |
| | 32 | | { |
| 7 | 33 | | var result = new ServerModuleDefinition<Context>(); |
| | 34 | |
|
| 7 | 35 | | result.definition.Add("LoadScene", async (payload, context, ct) => { var res = await service.LoadScene(LoadSceneMess |
| 7 | 36 | | result.definition.Add("UnloadScene", async (payload, context, ct) => { var res = await service.UnloadScene(UnloadSce |
| 7 | 37 | | result.definition.Add("SendCrdt", async (payload, context, ct) => { var res = await service.SendCrdt(CRDTSceneMessag |
| 7 | 38 | | result.definition.Add("GetCurrentState", async (payload, context, ct) => { var res = await service.GetCurrentState(G |
| 7 | 39 | | result.definition.Add("SendBatch", async (payload, context, ct) => { var res = await service.SendBatch(SendBatchRequ |
| | 40 | |
|
| 7 | 41 | | port.RegisterModule(ServiceName, (port) => UniTask.FromResult(result)); |
| 7 | 42 | | } |
| | 43 | | } |
| | 44 | | } |