コード例 #1
0
        public AddonInfo(string path, string json, RemoteType remoteType)
        {
            try
            {
                this.path = path;
                switch (remoteType)
                {
                    case RemoteType.AVC:
                        this.ParseAvc(json);
                        break;

                    case RemoteType.KerbalStuff:
                        this.ParseKerbalStuff(json);
                        break;
                }
            }
            catch
            {
                this.ParseError = true;
                throw;
            }
            finally
            {
                if (this.ParseError)
                {
                    Logger.Log("Version file contains errors: " + path);
                }
            }
        }
コード例 #2
0
 public RCS_Render_Job_Message(RenderMessage message, Guid concernedRenderJobID, RemoteType remote) : base(remote)
 {
     this.Message = message;
     this.ConcernedRenderJobID = concernedRenderJobID;
 }
コード例 #3
0
 public RCS_Process_List_Response(Process_List processeList, string clientName, RemoteType remote) : base(remote)
 {
     this.ProcesseList = processeList;
     this.ClientName = clientName;
 }
コード例 #4
0
 public Remote_Content_Show_Message(RemoteType remote)
 {
     this.Id = Guid.NewGuid();
     this.Remote = remote;
 }
コード例 #5
0
 public RCS_GetFiles(RemoteType remote) : base(remote)
 {
 }
コード例 #6
0
 public RCS_Process_List_Request(RemoteType remote) : base(remote)
 {
 }
コード例 #7
0
 public RCS_Render_Job_Cancel(CancelRenderJobReason reason, Guid concernedRenderJobID, RemoteType remote) : base(remote)
 {
     this.Reason = reason;
     this.ConcernedRenderJobID = concernedRenderJobID;
 }
コード例 #8
0
 public Remote_Content_Show_Header(MessageCode code, long length, RemoteType remote)
 {
     this.Length = length;
     this.Code = code;
     this.Remote = remote;
 }
コード例 #9
0
 public RCS_Alive(RemoteType remote) : base(remote)
 {
 }
コード例 #10
0
 public RCS_FileDelete(string name, RemoteType remote) : base(remote)
 {
     this.Name = name;
 }
コード例 #11
0
 public RCS_Render_Job_Result(Guid concernedRenderJobID, byte[] picture, RemoteType remote) : base(remote)
 {
     this.ConcernedRenderJobID = concernedRenderJobID;
     this.Picture = picture;
 }
コード例 #12
0
 public RCS_FileAdd(RemoteType remote) : base(remote)
 {
 }
コード例 #13
0
 public RCS_Configuration_Image(byte[] picture, RemoteType remote) : base(remote)
 {
     this.Picture = picture;
 }
コード例 #14
0
 public RCS_FileList(List<FileItem> items, RemoteType remote) : base(remote)
 {
     this.Items = items;
 }
コード例 #15
0
 public RCS_Event_List_Response(Event_List eventList, RemoteType remote) : base(remote)
 {
     this.EventList = eventList;
 }
コード例 #16
0
 public RCS_Job_Cancel(CancelJobReason reason, Guid jobID, RemoteType remote) : base(remote)
 {
     this.Reason = reason;
     this.JobID = jobID;
 }
コード例 #17
0
 public RCS_Job(Job_Configuration configuration, RemoteType remote) : base(remote)
 {
     this.Configuration = configuration;
 }
コード例 #18
0
 public RCS_Event_List_Request(RemoteType remote) : base(remote)
 {
 }
コード例 #19
0
 private IOutputStreamFactory FindMatchedFactory(
     RemoteType remote_type,
     NetworkStream stream,
     out List<byte> header,
     out Guid channel_id,
     out AuthenticationKey auth_key)
 {
     var output_factories = PeerCast.OutputStreamFactories.OrderBy(factory => factory.Priority);
       header = new List<byte>();
       channel_id = Guid.Empty;
       auth_key = null;
       bool eos = false;
       while (!eos && header.Count<=4096) {
     try {
       do {
     var val = stream.ReadByte();
     if (val < 0) {
       eos = true;
     }
     else {
       header.Add((byte)val);
     }
       } while (stream.DataAvailable);
     }
     catch (System.IO.IOException) {
       eos = true;
     }
     var header_ary = header.ToArray();
     foreach (var factory in output_factories) {
       if (remote_type==RemoteType.SiteLocal && (factory.OutputStreamType & this.LocalOutputAccepts )==0) continue;
       if (remote_type==RemoteType.Global    && (factory.OutputStreamType & this.GlobalOutputAccepts)==0) continue;
       var cid = factory.ParseChannelID(header_ary);
       if (cid.HasValue) {
     channel_id = cid.Value;
     switch (remote_type) {
     case RemoteType.Loopback:  auth_key = null; break;
     case RemoteType.SiteLocal: auth_key = LocalAuthorizationRequired  ? AuthenticationKey : null; break;
     case RemoteType.Global:    auth_key = GlobalAuthorizationRequired ? AuthenticationKey : null; break;
     }
     return factory;
       }
     }
       }
       return null;
 }
コード例 #20
0
 public RCS_Render_Job(RenderConfiguration configuration, RemoteType remote) : base(remote)
 {
     this.Configuration = configuration;
 }