Publishes the specified music information to contacts on the user's
roster.
Namespace: S22.Xmpp.ClientAssembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public void SetTune( TuneInformation tune ) |
Parameters
- tune
- Type: S22.Xmpp.Extensions..::..TuneInformation
The tune information to publish.
Examples
This example demonstrates how to use the SetTune method in order
to publish tune information to other contacts.
CopyC#
string hostname = "jabber.se", username = "myUsername", password = "myPassword"; using (var cl = new XmppClient(hostname, username, password)) { cl.Connect(); // Let your contacts know what you are currently listening to. cl.SetTune(new TuneInformation("Every Breath You Take", "The Police")); Console.WriteLine("Type 'quit' to exit."); while(Console.ReadLine() != "quit"); }
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | The tune parameter is null. |
System..::..NotSupportedException | The server does not support the 'Personal Eventing Protocol' extension. |
S22.Xmpp..::..XmppErrorException | The server returned an XMPP error code. Use the Error property of the XmppErrorException to obtain the specific error condition. |
S22.Xmpp..::..XmppException | The server returned invalid data or another unspecified XMPP error occurred. |
System..::..InvalidOperationException | The XmppClient instance is not connected to a remote host, or the XmppClient instance has not authenticated with the XMPP server. |
System..::..ObjectDisposedException | The XmppClient object has been disposed. |