/// <summary> /// Send message to HarmonyHub to start a given activity /// Result is parsed by OnIq based on ClientCommandType /// </summary> /// <param name="activityId"></param> public void StartActivity(string activityId) { EnsureConnection(); var iqToSend = new IQ { Type = IqType.get, Namespace = "", From = "1", To = "guest" }; iqToSend.AddChild(HarmonyDocuments.StartActivityDocument(activityId)); iqToSend.GenerateId(); Xmpp.Send(iqToSend); }
/// <summary> /// Send message to HarmonyHub to start a given activity /// Result is parsed by OnIq based on ClientCommandType /// </summary> /// <param name="activityId"></param> public void StartActivity(string activityId) { _clientCommand = ClientCommandType.StartActivity; var iqToSend = new IQ { Type = IqType.get, Namespace = "", From = "1", To = "guest" }; iqToSend.AddChild(HarmonyDocuments.StartActivityDocument(activityId)); iqToSend.GenerateId(); var iqGrabber = new IqGrabber(Xmpp); iqGrabber.SendIq(iqToSend, 10); WaitForData(5); }
/// <summary> /// Send message to HarmonyHub to start a given activity /// Result is parsed by OnIq based on ClientCommandType /// </summary> /// <param name="activityId">string</param> public async Task StartActivityAsync(string activityId) { await RequestResponseAsync(HarmonyDocuments.StartActivityDocument(activityId)).ConfigureAwait(false); }
/// <summary> /// Send message to HarmonyHub to start a given activity /// Result is parsed by OnIq based on ClientCommandType /// </summary> /// <param name="activityId">string</param> public async Task StartActivityAsync(string activityId) { Trace.WriteLine("Harmony: StartActivityAsync"); await SendDocumentAsync(HarmonyDocuments.StartActivityDocument(activityId)).ConfigureAwait(false); }