Example #1
0
 public static Task RefreshRequest(this IEncodeServer server)
 {
     return(Task.WhenAll(
                server.RequestSetting(),
                server.RequestQueue(),
                server.RequestLog(),
                server.RequestConsole(),
                server.RequestState(),
                server.RequestFreeSpace()));
 }
Example #2
0
        internal void OnRequestReceived(Client client, RPCMethodId methodId, object arg)
        {
            switch (methodId)
            {
            case RPCMethodId.SetSetting:
                server.SetSetting((Setting)arg);
                break;

            case RPCMethodId.AddQueue:
                server.AddQueue((AddQueueDirectory)arg);
                break;

            case RPCMethodId.RemoveQueue:
                server.RemoveQueue((string)arg);
                break;

            case RPCMethodId.PauseEncode:
                server.PauseEncode((bool)arg);
                break;

            case RPCMethodId.RequestSetting:
                server.RequestSetting();
                break;

            case RPCMethodId.RequestQueue:
                server.RequestQueue();
                break;

            case RPCMethodId.RequestLog:
                server.RequestLog();
                break;

            case RPCMethodId.RequestConsole:
                server.RequestConsole();
                break;

            case RPCMethodId.RequestLogFile:
                server.RequestLogFile((LogItem)arg);
                break;

            case RPCMethodId.RequestState:
                server.RequestState();
                break;

            case RPCMethodId.RequestFreeSpace:
                server.RequestFreeSpace();
                break;
            }
        }