C# Client  0.0.0.7
C# Library to interface with Corelink
SenderStreamParams.cs
Go to the documentation of this file.
1 using SimpleJSON;
2 namespace CoreLink
3 {
9  {
10  public string senderID;
11  public string from; // TODO: What is this?
12  SenderStream stream;
13 
14  public SenderStreamParams(string workspace, string type) : this(workspace, type, "udp", JSON.Parse("{}"), false, "", "") { }
15  public SenderStreamParams(string workspace, string type, string proto) : this(workspace, type, proto, JSON.Parse("{}"), false, "", "") { }
16 
17  public SenderStreamParams(string workspace, string type, string proto, JSONNode metadata, bool alert, string senderID, string from) : base(workspace, type, proto, metadata, alert)
18  {
19  this.senderID = senderID;
20  this.from = from;
21  }
26  override public JSONNode toJSON()
27  {
28  JSONNode jsonRequest = JSON.Parse("{}");
29  jsonRequest["function"] = "sender";
30  jsonRequest["workspace"] = this.workspace;
31  jsonRequest["senderID"] = this.senderID;
32  jsonRequest["from"] = this.from;
33  jsonRequest["proto"] = this.proto;
34 
35  jsonRequest["type"] = this.type;
36  jsonRequest["alert"] = this.alert;
37  jsonRequest["meta"] = this.metadata;
38  return jsonRequest;
39  }
40  }
41 }