using InABox.Clients;
using InABox.Core;

namespace InABox.IPC
{
    public class RPCInfoCommand : IRPCCommand<RPCInfoParameters, RPCInfoResponse> { }
    
    public class RPCInfoParameters : ISerializeBinary
    {

        public void SerializeBinary(CoreBinaryWriter writer)
        {
        }

        public void DeserializeBinary(CoreBinaryReader reader)
        {
        }
    }
    
    public class RPCInfoResponse : ISerializeBinary
    {
        
        public DatabaseInfo? Info { get; set; }

        public void SerializeBinary(CoreBinaryWriter writer)
        {
            writer.WriteBinaryValue(typeof(DatabaseInfo), Info);
        }

        public void DeserializeBinary(CoreBinaryReader reader)
        {
            Info = reader.ReadBinaryValue(typeof(DatabaseInfo)) as DatabaseInfo;
        }
    }
}