public void RelayError(ToxErrorFileControl error) { if (error != ToxErrorFileControl.Ok) { Debug.WriteLine("An unexpected error occurred when controlling a file transfer: " + error); } }
internal static extern bool FileControl(ToxHandle tox, uint friendNumber, uint fileNumber, ToxFileControl control, ref ToxErrorFileControl error);
public void RelayError(ToxErrorFileControl error) { if (error != ToxErrorFileControl.Ok) Debug.WriteLine("An unexpected error occurred when controlling a file transfer: " + error); }
/// <summary> /// Sends a file control command to a friend for a given file transfer. /// </summary> /// <param name="friendNumber">The friend to send the file control to.</param> /// <param name="fileNumber">The file transfer that this control is meant for.</param> /// <param name="control">The control to send.</param> /// <param name="error"></param> /// <returns>True on success.</returns> public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control, out ToxErrorFileControl error) { ThrowIfDisposed(); error = ToxErrorFileControl.Ok; return ToxFunctions.FileControl(_tox, (uint)friendNumber, (uint)fileNumber, control, ref error); }
public static extern Boolean Control(ToxHandle tox, UInt32 friendNumber, UInt32 fileNumber, ToxFileControl control, ref ToxErrorFileControl error);