Ejemplo n.º 1
0
 BattlenetRpcErrorCode HandleOnVersionInfoUpdated(VersionInfoNotification request)
 {
     Log.outError(LogFilter.ServiceProtobuf, "{0} Client tried to call not implemented method AuthenticationListener.OnVersionInfoUpdated: {1}",
                  GetCallerInfo(), request.ToString());
     return(BattlenetRpcErrorCode.RpcNotImplemented);
 }
Ejemplo n.º 2
0
        public override void CallServerMethod(uint token, uint methodId, CodedInputStream stream)
        {
            switch (methodId)
            {
            case 1:
            {
                ModuleLoadRequest request = new ModuleLoadRequest();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnModuleLoad(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnModuleLoad(bgs.protocol.authentication.v1.ModuleLoadRequest: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 2:
            {
                ModuleMessageRequest request = new ModuleMessageRequest();
                request.MergeFrom(stream);


                NoData response = new NoData();
                BattlenetRpcErrorCode status = HandleOnModuleMessage(request, response);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnModuleMessage(bgs.protocol.authentication.v1.ModuleMessageRequest: {1}) returned bgs.protocol.NoData: {2} status: {3}.",
                             GetCallerInfo(), request.ToString(), response.ToString(), status);
                if (status == 0)
                {
                    SendResponse(token, response);
                }
                else
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 4:
            {
                ServerStateChangeRequest request = new ServerStateChangeRequest();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnServerStateChange(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnServerStateChange(bgs.protocol.authentication.v1.ServerStateChangeRequest: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 5:
            {
                LogonResult request = new LogonResult();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnLogonComplete(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnLogonComplete(bgs.protocol.authentication.v1.LogonResult: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 6:
            {
                MemModuleLoadRequest request = new MemModuleLoadRequest();
                request.MergeFrom(stream);


                MemModuleLoadResponse response = new MemModuleLoadResponse();
                BattlenetRpcErrorCode status   = HandleOnMemModuleLoad(request, response);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnMemModuleLoad(bgs.protocol.authentication.v1.MemModuleLoadRequest: {1}) returned bgs.protocol.authentication.v1.MemModuleLoadResponse: {2} status: {3}.",
                             GetCallerInfo(), request.ToString(), response.ToString(), status);
                if (status == 0)
                {
                    SendResponse(token, response);
                }
                else
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 10:
            {
                LogonUpdateRequest request = new LogonUpdateRequest();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnLogonUpdate(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnLogonUpdate(bgs.protocol.authentication.v1.LogonUpdateRequest: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 11:
            {
                VersionInfoNotification request = new VersionInfoNotification();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnVersionInfoUpdated(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnVersionInfoUpdated(bgs.protocol.authentication.v1.VersionInfoNotification: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 12:
            {
                LogonQueueUpdateRequest request = new LogonQueueUpdateRequest();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnLogonQueueUpdate(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnLogonQueueUpdate(bgs.protocol.authentication.v1.LogonQueueUpdateRequest: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 13:
            {
                NoData request = new NoData();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnLogonQueueEnd(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnLogonQueueEnd(bgs.protocol.NoData: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 14:
            {
                GameAccountSelectedRequest request = new GameAccountSelectedRequest();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnGameAccountSelected(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationListener.OnGameAccountSelected(bgs.protocol.authentication.v1.GameAccountSelectedRequest: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            default:
                Log.outError(LogFilter.ServiceProtobuf, "Bad method id {0}.", methodId);
                SendResponse(token, BattlenetRpcErrorCode.RpcInvalidMethod);
                break;
            }
        }