public FileControlEventArgs(int friendNumber, int fileNumber, bool isSend, ToxFileControl control, byte[] data) : base(friendNumber, fileNumber) { IsSend = isSend; Control = control; Data = (byte[])data.Clone(); }
public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control) { ToxErrorFileControl error; var retVal = _tox.FileControl(friendNumber, fileNumber, control, out error); ToxErrorViewModel.Instance.RelayError(error); return(retVal); }
private void HandleFileControl(ToxFileControl fileControl, TransferId transferId) { switch (fileControl) { case ToxFileControl.Cancel: RemoveTransfer(transferId); return; } }
public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control) { ToxErrorFileControl error; var retVal = _tox.FileControl(friendNumber, fileNumber, control, out error); ToxErrorViewModel.Instance.RelayError(error); return retVal; }
public FileControlEventArgs(int friendNumber, int fileNumber, ToxFileControl control) : base(friendNumber, fileNumber) { Control = control; }
public FileControlEventArgs(int friendNumber, int fileNumber, ToxFileControl control) : base(friendNumber, fileNumber) { Control = control; }
public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control) { return(true); }
internal static extern bool FileControl(ToxHandle tox, uint friendNumber, uint fileNumber, ToxFileControl control, ref ToxErrorFileControl error);
internal static extern bool FileControl(ToxHandle tox, uint friendNumber, uint fileNumber, ToxFileControl control, ref ToxErrorFileControl error);
/// <summary> /// Sends a file control request. /// </summary> /// <param name="friendnumber"></param> /// <param name="send_receive">0 if we're sending and 1 if we're receiving.</param> /// <param name="filenumber"></param> /// <param name="message_id"></param> /// <param name="data"></param> /// <returns>true on success and false on failure.</returns> public bool FileSendControl(int friendnumber, int send_receive, int filenumber, ToxFileControl message_id, byte[] data) { if (disposed) throw new ObjectDisposedException(GetType().FullName); return ToxFunctions.FileSendControl(tox, friendnumber, (byte)send_receive, (byte)filenumber, (byte)message_id, data, (ushort)data.Length) == 0; }
/// <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> /// <returns>True on success.</returns> public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control) { var error = ToxErrorFileControl.Ok; return FileControl(friendNumber, fileNumber, control, out 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);