Publishes the specified music information to contacts on the user's roster.

Namespace: S22.Xmpp.Client
Assembly: 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

ExceptionCondition
System..::..ArgumentNullExceptionThe tune parameter is null.
System..::..NotSupportedExceptionThe server does not support the 'Personal Eventing Protocol' extension.
S22.Xmpp..::..XmppErrorExceptionThe server returned an XMPP error code. Use the Error property of the XmppErrorException to obtain the specific error condition.
S22.Xmpp..::..XmppExceptionThe server returned invalid data or another unspecified XMPP error occurred.
System..::..InvalidOperationExceptionThe XmppClient instance is not connected to a remote host, or the XmppClient instance has not authenticated with the XMPP server.
System..::..ObjectDisposedExceptionThe XmppClient object has been disposed.

See Also