/// <summary> /// Creates a ChangeReportEvent. /// </summary> /// <returns></returns> public static SmartHomeResponse CreateChangeReportEvent(bool usePayload) { SmartHomeResponse sResponse = new SmartHomeResponse(); sResponse.Event = Response.Event.CreateChangeReportEvent(usePayload); return(sResponse); }
/// <summary> /// Creates a Deffered SmarthomeResponse /// </summary> /// <returns></returns> public static SmartHomeResponse CreateDefferedResponse() { SmartHomeResponse sResponse = new SmartHomeResponse(); sResponse.Event = Response.Event.CreateDefferedResponse(); return(sResponse); }
/// <summary> /// Creates a ErrorResponse with given RequestHeader and the Error Type. If needed a special Namespace can be given. /// </summary> /// <param name="header"></param> /// <param name="type"></param> /// <returns></returns> public static SmartHomeResponse CreateErrorResponse(DirectiveHeader header, ErrorTypes type) { if (header.Name == HeaderNames.DISCOVERY_REQUEST) { throw new UnvalidDiscoveryResponseException(); } SmartHomeResponse sResponse = new SmartHomeResponse(); sResponse.Event = RKon.Alexa.NET46.Response.Event.CreateErrorEvent(header.CorrelationToken, type, header.Namespace); return(sResponse); }