| | 1 | | // AUTOGENERATED, DO NOT EDIT |
| | 2 | | // Type definitions for server implementations of ports. |
| | 3 | | // package: decentraland.quests |
| | 4 | | // file: decentraland/renderer/quests/quests.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 | | using Google.Protobuf.WellKnownTypes; |
| | 12 | | namespace Decentraland.Quests { |
| | 13 | | public interface IQuestsService<Context> |
| | 14 | | { |
| | 15 | |
|
| | 16 | | UniTask<StartQuestResponse> StartQuest(StartQuestRequest request, Context context, CancellationToken ct); |
| | 17 | |
|
| | 18 | | UniTask<AbortQuestResponse> AbortQuest(AbortQuestRequest request, Context context, CancellationToken ct); |
| | 19 | |
|
| | 20 | | UniTask<EventResponse> SendEvent(EventRequest request, Context context, CancellationToken ct); |
| | 21 | |
|
| | 22 | | IUniTaskAsyncEnumerable<UserUpdate> Subscribe(Empty request, Context context); |
| | 23 | |
|
| | 24 | | UniTask<GetAllQuestsResponse> GetAllQuests(Empty request, Context context, CancellationToken ct); |
| | 25 | |
|
| | 26 | | UniTask<GetQuestDefinitionResponse> GetQuestDefinition(GetQuestDefinitionRequest request, Context context, Cancellatio |
| | 27 | |
|
| | 28 | | } |
| | 29 | |
|
| | 30 | | public static class QuestsServiceCodeGen |
| | 31 | | { |
| | 32 | | public const string ServiceName = "QuestsService"; |
| | 33 | |
|
| | 34 | | public static void RegisterService<Context>(RpcServerPort<Context> port, IQuestsService<Context> service) |
| | 35 | | { |
| 0 | 36 | | var result = new ServerModuleDefinition<Context>(); |
| | 37 | |
|
| 0 | 38 | | result.definition.Add("StartQuest", async (payload, context, ct) => { var res = await service.StartQuest(StartQuestR |
| 0 | 39 | | result.definition.Add("AbortQuest", async (payload, context, ct) => { var res = await service.AbortQuest(AbortQuestR |
| 0 | 40 | | result.definition.Add("SendEvent", async (payload, context, ct) => { var res = await service.SendEvent(EventRequest. |
| 0 | 41 | | result.serverStreamDefinition.Add("Subscribe", (payload, context) => { return ProtocolHelpers.SerializeMessageEnumer |
| 0 | 42 | | result.definition.Add("GetAllQuests", async (payload, context, ct) => { var res = await service.GetAllQuests(Empty.P |
| 0 | 43 | | result.definition.Add("GetQuestDefinition", async (payload, context, ct) => { var res = await service.GetQuestDefini |
| | 44 | |
|
| 0 | 45 | | port.RegisterModule(ServiceName, (port) => UniTask.FromResult(result)); |
| 0 | 46 | | } |
| | 47 | | } |
| | 48 | | } |