Publishes the image located at the specified path as the user's avatar.
Namespace: S22.Xmpp.ClientAssembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public void SetAvatar( string filePath ) |
Parameters
- filePath
- Type: System..::..String
The path to the image to publish as the user's avatar.
Remarks
The following file types are supported:
BMP, GIF, JPEG, PNG and TIFF.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | The filePath parameter is null. |
System..::..ArgumentException | filePath is a zero-length string, contains only white space, or contains one or more invalid characters. |
System.IO..::..PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. |
System.IO..::..DirectoryNotFoundException | The specified path is invalid, (for example, it is on an unmapped drive). |
System..::..UnauthorizedAccessException | The path specified is a directory, or the caller does not have the required permission. |
System.IO..::..FileNotFoundException | The file specified in filePath was not found. |
System..::..NotSupportedException | filePath is in an invalid format, or 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. |