public static ExternalInputInfo FromJson(string json) { var jobj = JsonObject.Parse(json); var ei = new ExternalInputInfo { Id = jobj.GetNamedString("id", ""), Name = jobj.GetNamedString("name", ""), Connected = jobj.GetNamedBoolean("connected", false), IconUrl = jobj.GetNamedString("icon", ""), RawData = jobj }; return ei; }
public void SetExternalInput(ExternalInputInfo input, ResponseListener pListener) { // Do nothing - not Supported Util.PostError(pListener, ServiceCommandError.NotSupported()); }
public void SetExternalInput(ExternalInputInfo input, ResponseListener listener) { const string uri = "ssap://tv/switchInput"; var payload = new JsonObject(); try { if (input != null && input.Id != null) { payload.Add("inputId", JsonValue.CreateStringValue(input.Id)); } else { Logger.Current.AddMessage("ExternalInputInfo has no id"); } } catch (Exception) { } var request = new ServiceCommand(this, uri, payload, listener); request.Send(); }
private void SetExternalInput(ExternalInputInfo externalInputInfo) { externalInputControl.SetExternalInput(externalInputInfo, null); }
protected bool Equals(ExternalInputInfo other) { return string.Equals(Id, other.Id) && string.Equals(Name, other.Name) && Connected.Equals(other.Connected) && string.Equals(IconUrl, other.IconUrl) && Equals(RawData, other.RawData); }