Separated view request from delta request and respective responses.
This commit is contained in:
@@ -6,7 +6,8 @@ namespace GameServiceWarden.ClientAPI
|
||||
{
|
||||
Disconnect,
|
||||
Connect,
|
||||
Service,
|
||||
View,
|
||||
Delta,
|
||||
UnexpectedCommunication
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI
|
||||
{
|
||||
public interface ICommunicable
|
||||
{
|
||||
CommunicableType Type { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
namespace GameServiceWarden.ClientAPI.Requests
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Requests
|
||||
{
|
||||
public struct ConnectRequest : ICommunicable
|
||||
public struct ConnectRequest
|
||||
{
|
||||
public string requestedIdentifier;
|
||||
public string programName;
|
||||
public string programAuthor;
|
||||
public string versionNumber;
|
||||
public string details;
|
||||
|
||||
public CommunicableType Type => CommunicableType.Connect;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using GameServiceWarden.ClientAPI.Module;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Requests
|
||||
{
|
||||
public struct ServiceRequest
|
||||
{
|
||||
public ServiceManagerAction serviceManagerAction;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.IO.Pipes;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Requests
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Requests
|
||||
{
|
||||
public static class RequestHeader
|
||||
{
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
using GameServiceWarden.ClientAPI.Module;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Requests
|
||||
{
|
||||
public struct ServiceRequest : ICommunicable
|
||||
{
|
||||
public ServiceManagerAction serviceManagerAction;
|
||||
|
||||
public CommunicableType Type => CommunicableType.Service;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Requests
|
||||
{
|
||||
public struct ViewRequest
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,12 @@
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Responses
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Responses
|
||||
{
|
||||
public struct ConnectResponse : ICommunicable
|
||||
public struct ConnectResponse
|
||||
{
|
||||
public string identifier;
|
||||
public bool nameTaken;
|
||||
public bool invalidName;
|
||||
public string errorMsg;
|
||||
|
||||
public CommunicableType Type => CommunicableType.Connect;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using GameServiceWarden.ClientAPI.Module;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Responses
|
||||
{
|
||||
public struct DeltaResponse
|
||||
{
|
||||
public ServiceManagerTotal gameServiceDelta;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Responses
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Responses
|
||||
{
|
||||
public static class ResponseHeader
|
||||
{
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
using GameServiceWarden.ClientAPI.Module;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Responses
|
||||
{
|
||||
public struct ServiceResponse : ICommunicable
|
||||
{
|
||||
public ServiceManagerState gameServiceDelta;
|
||||
|
||||
public CommunicableType Type => CommunicableType.Service;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
namespace GameServiceWarden.ClientAPI.Responses
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Responses
|
||||
{
|
||||
public struct UnexpectedRequestResponse : ICommunicable
|
||||
public struct UnexpectedRequestResponse
|
||||
{
|
||||
public CommunicableType origin;
|
||||
public string message;
|
||||
|
||||
public CommunicableType Type => CommunicableType.UnexpectedCommunication;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using GameServiceWarden.ClientAPI.Module;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Communicable.Responses
|
||||
{
|
||||
public struct ViewResponse {
|
||||
public ServiceManagerTotal state;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ namespace GameServiceWarden.ClientAPI.Module
|
||||
DeleteService,
|
||||
ExecuteCommand,
|
||||
SetServiceOption,
|
||||
View
|
||||
}
|
||||
|
||||
public string assemblyName;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Module
|
||||
{
|
||||
public struct ServiceManagerDelta
|
||||
{
|
||||
public bool subtract;
|
||||
public string service;
|
||||
public string running;
|
||||
public string modules;
|
||||
public byte[] logs;
|
||||
public string optionName;
|
||||
public string optionValue;
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,8 @@ using System.Collections.Generic;
|
||||
|
||||
namespace GameServiceWarden.ClientAPI.Module
|
||||
{
|
||||
public struct ServiceManagerState
|
||||
public struct ServiceManagerTotal
|
||||
{
|
||||
public bool delta;
|
||||
public bool subtract;
|
||||
public ICollection<string> services;
|
||||
public ICollection<string> running;
|
||||
public ICollection<string> modules;
|
||||
Reference in New Issue
Block a user