Beispiel #1
0
        private async void OnTuneCallback(object sender, Xmpp.Extensions.TuneEventArgs e)
        {
            await LoggerHolder.Log(LogLevel.Debug, "XMPP: ====> OnTune:");

            var handler = Tune;

            if (handler != null)
            {
                var             jid         = new Jid(e.Jid.ToString());
                TuneInformation information = null;
                if (e.Information != null)
                {
                    information = new TuneInformation(e.Information.Title, e.Information.Artist, e.Information.Track, e.Information.Length, e.Information.Rating, e.Information.Source, e.Information.Uri);
                }

                handler.Invoke(this, new TuneEventArgs(jid, information));
            }

            await LoggerHolder.Log(LogLevel.Debug, "XMPP: ====> ============///////////////////////==============");
        }
Beispiel #2
0
 public void SetTune(TuneInformation tune)
 {
     this.AssertValid();
     this.userTune.Publish(tune);
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the TuneEventArgs class.
 /// </summary>
 /// <param name="jid">The JID of the XMPP entity that published the
 /// tune information.</param>
 /// <param name="information">The tune information to include as part of
 /// the event.</param>
 /// <exception cref="ArgumentNullException">The jid parameter is
 /// null.</exception>
 public TuneEventArgs(Jid jid, TuneInformation information = null)
 {
     Jid         = jid;
     Information = information;
 }