示例#1
0
        /// <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);
        }
示例#2
0
        /// <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);
 }
示例#4
0
文件: Client.cs 项目: tihilv/Vkm
 /// <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);
 }