You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

308 lines
21 KiB

// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: connection.proto
// </auto-generated>
#pragma warning disable 0414, 1591
#region Designer generated code
using grpc = global::Grpc.Core;
namespace ConnectionService {
/// <summary>
/// Connection utilities to get a client_id
/// </summary>
public static partial class Connection
{
static readonly string __ServiceName = "connection_service.Connection";
static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
{
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
if (message is global::Google.Protobuf.IBufferMessage)
{
context.SetPayloadLength(message.CalculateSize());
global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
context.Complete();
return;
}
#endif
context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
}
static class __Helper_MessageCache<T>
{
public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
}
static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
{
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
if (__Helper_MessageCache<T>.IsBufferMessage)
{
return parser.ParseFrom(context.PayloadAsReadOnlySequence());
}
#endif
return parser.ParseFrom(context.PayloadAsNewBuffer());
}
static readonly grpc::Marshaller<global::Google.Protobuf.WellKnownTypes.Empty> __Marshaller_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser));
static readonly grpc::Marshaller<global::Common.Name> __Marshaller_common_Name = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Common.Name.Parser));
static readonly grpc::Marshaller<global::ConnectionService.UserID> __Marshaller_connection_service_UserID = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ConnectionService.UserID.Parser));
static readonly grpc::Marshaller<global::ConnectionService.LobbyCode> __Marshaller_connection_service_LobbyCode = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ConnectionService.LobbyCode.Parser));
static readonly grpc::Marshaller<global::ConnectionService.LobbyConfig> __Marshaller_connection_service_LobbyConfig = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ConnectionService.LobbyConfig.Parser));
static readonly grpc::Marshaller<global::ConnectionService.Game> __Marshaller_connection_service_Game = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ConnectionService.Game.Parser));
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Common.Name> __Method_name = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Common.Name>(
grpc::MethodType.Unary,
__ServiceName,
"name",
__Marshaller_google_protobuf_Empty,
__Marshaller_common_Name);
static readonly grpc::Method<global::Common.Name, global::ConnectionService.UserID> __Method_connect = new grpc::Method<global::Common.Name, global::ConnectionService.UserID>(
grpc::MethodType.Unary,
__ServiceName,
"connect",
__Marshaller_common_Name,
__Marshaller_connection_service_UserID);
static readonly grpc::Method<global::ConnectionService.LobbyCode, global::Google.Protobuf.WellKnownTypes.Empty> __Method_joinLobbyWithCode = new grpc::Method<global::ConnectionService.LobbyCode, global::Google.Protobuf.WellKnownTypes.Empty>(
grpc::MethodType.Unary,
__ServiceName,
"joinLobbyWithCode",
__Marshaller_connection_service_LobbyCode,
__Marshaller_google_protobuf_Empty);
static readonly grpc::Method<global::ConnectionService.LobbyConfig, global::ConnectionService.LobbyCode> __Method_createLobby = new grpc::Method<global::ConnectionService.LobbyConfig, global::ConnectionService.LobbyCode>(
grpc::MethodType.Unary,
__ServiceName,
"createLobby",
__Marshaller_connection_service_LobbyConfig,
__Marshaller_connection_service_LobbyCode);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::ConnectionService.Game> __Method_getGames = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::ConnectionService.Game>(
grpc::MethodType.ServerStreaming,
__ServiceName,
"getGames",
__Marshaller_google_protobuf_Empty,
__Marshaller_connection_service_Game);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::ConnectionService.LobbyCode> __Method_getPublicLobbies = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::ConnectionService.LobbyCode>(
grpc::MethodType.ServerStreaming,
__ServiceName,
"getPublicLobbies",
__Marshaller_google_protobuf_Empty,
__Marshaller_connection_service_LobbyCode);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty> __Method_disconnect = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty>(
grpc::MethodType.Unary,
__ServiceName,
"disconnect",
__Marshaller_google_protobuf_Empty,
__Marshaller_google_protobuf_Empty);
/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::ConnectionService.ConnectionReflection.Descriptor.Services[0]; }
}
/// <summary>Base class for server-side implementations of Connection</summary>
[grpc::BindServiceMethod(typeof(Connection), "BindService")]
public abstract partial class ConnectionBase
{
public virtual global::System.Threading.Tasks.Task<global::Common.Name> name(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::ConnectionService.UserID> connect(global::Common.Name request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> joinLobbyWithCode(global::ConnectionService.LobbyCode request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::ConnectionService.LobbyCode> createLobby(global::ConnectionService.LobbyConfig request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task getGames(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::IServerStreamWriter<global::ConnectionService.Game> responseStream, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task getPublicLobbies(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::IServerStreamWriter<global::ConnectionService.LobbyCode> responseStream, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> disconnect(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// <summary>Client for Connection</summary>
public partial class ConnectionClient : grpc::ClientBase<ConnectionClient>
{
/// <summary>Creates a new client for Connection</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public ConnectionClient(grpc::ChannelBase channel) : base(channel)
{
}
/// <summary>Creates a new client for Connection that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public ConnectionClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected ConnectionClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected ConnectionClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
public virtual global::Common.Name name(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return name(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Common.Name name(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_name, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Common.Name> nameAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return nameAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Common.Name> nameAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_name, null, options, request);
}
public virtual global::ConnectionService.UserID connect(global::Common.Name request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return connect(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::ConnectionService.UserID connect(global::Common.Name request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_connect, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::ConnectionService.UserID> connectAsync(global::Common.Name request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return connectAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::ConnectionService.UserID> connectAsync(global::Common.Name request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_connect, null, options, request);
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty joinLobbyWithCode(global::ConnectionService.LobbyCode request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return joinLobbyWithCode(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty joinLobbyWithCode(global::ConnectionService.LobbyCode request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_joinLobbyWithCode, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> joinLobbyWithCodeAsync(global::ConnectionService.LobbyCode request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return joinLobbyWithCodeAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> joinLobbyWithCodeAsync(global::ConnectionService.LobbyCode request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_joinLobbyWithCode, null, options, request);
}
public virtual global::ConnectionService.LobbyCode createLobby(global::ConnectionService.LobbyConfig request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return createLobby(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::ConnectionService.LobbyCode createLobby(global::ConnectionService.LobbyConfig request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_createLobby, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::ConnectionService.LobbyCode> createLobbyAsync(global::ConnectionService.LobbyConfig request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return createLobbyAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::ConnectionService.LobbyCode> createLobbyAsync(global::ConnectionService.LobbyConfig request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_createLobby, null, options, request);
}
public virtual grpc::AsyncServerStreamingCall<global::ConnectionService.Game> getGames(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return getGames(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncServerStreamingCall<global::ConnectionService.Game> getGames(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncServerStreamingCall(__Method_getGames, null, options, request);
}
public virtual grpc::AsyncServerStreamingCall<global::ConnectionService.LobbyCode> getPublicLobbies(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return getPublicLobbies(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncServerStreamingCall<global::ConnectionService.LobbyCode> getPublicLobbies(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncServerStreamingCall(__Method_getPublicLobbies, null, options, request);
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty disconnect(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return disconnect(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty disconnect(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_disconnect, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> disconnectAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return disconnectAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> disconnectAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_disconnect, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override ConnectionClient NewInstance(ClientBaseConfiguration configuration)
{
return new ConnectionClient(configuration);
}
}
/// <summary>Creates service definition that can be registered with a server</summary>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static grpc::ServerServiceDefinition BindService(ConnectionBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_name, serviceImpl.name)
.AddMethod(__Method_connect, serviceImpl.connect)
.AddMethod(__Method_joinLobbyWithCode, serviceImpl.joinLobbyWithCode)
.AddMethod(__Method_createLobby, serviceImpl.createLobby)
.AddMethod(__Method_getGames, serviceImpl.getGames)
.AddMethod(__Method_getPublicLobbies, serviceImpl.getPublicLobbies)
.AddMethod(__Method_disconnect, serviceImpl.disconnect).Build();
}
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static void BindService(grpc::ServiceBinderBase serviceBinder, ConnectionBase serviceImpl)
{
serviceBinder.AddMethod(__Method_name, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Common.Name>(serviceImpl.name));
serviceBinder.AddMethod(__Method_connect, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Common.Name, global::ConnectionService.UserID>(serviceImpl.connect));
serviceBinder.AddMethod(__Method_joinLobbyWithCode, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::ConnectionService.LobbyCode, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.joinLobbyWithCode));
serviceBinder.AddMethod(__Method_createLobby, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::ConnectionService.LobbyConfig, global::ConnectionService.LobbyCode>(serviceImpl.createLobby));
serviceBinder.AddMethod(__Method_getGames, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::ConnectionService.Game>(serviceImpl.getGames));
serviceBinder.AddMethod(__Method_getPublicLobbies, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::ConnectionService.LobbyCode>(serviceImpl.getPublicLobbies));
serviceBinder.AddMethod(__Method_disconnect, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.disconnect));
}
}
}
#endregion