public FileTransfer(int fileNumber, int friendNumber, ToxFileKind kind, FileTransferDirection direction) { FileNumber = fileNumber; FriendNumber = friendNumber; Kind = kind; Direction = direction; }
public FileSendRequestEventArgs(uint friendNumber, uint fileNumber, ToxFileKind kind, ulong fileSize, string fileName) : base(friendNumber, fileNumber) { this.FileSize = fileSize; this.FileName = fileName; this.FileKind = kind; }
public FileSendRequestEventArgs(int friendNumber, int fileNumber, ToxFileKind kind, long fileSize, string fileName) : base(friendNumber, fileNumber) { FileSize = fileSize; FileName = fileName; FileKind = kind; }
public FileTransfer(Tox tox, int fileNumber, int friendNumber, ToxFileKind kind, long fileSize, string fileName, string path) { Tox = tox; FileNumber = fileNumber; FriendNumber = friendNumber; Kind = kind; FileSize = fileSize; FileName = fileName; Path = path; }
public ToxFileInfo FileSend(int friendNumber, ToxFileKind kind, long fileSize, string fileName, byte[] fileId, out bool success) { ToxErrorFileSend error; var retVal = _tox.FileSend(friendNumber, kind, fileSize, fileName, fileId, out error); ToxErrorViewModel.Instance.RelayError(error); success = error == ToxErrorFileSend.Ok; return(retVal); }
internal static extern uint FileSend(ToxHandle tox, uint friendNumber, ToxFileKind kind, ulong fileSize, byte[] fileId, byte[] fileName, uint fileNameLength, ref ToxErrorFileSend error);
public ToxFileInfo FileSend(int friendNumber, ToxFileKind kind, long fileSize, string fileName, byte[] fileId, out bool success) { success = true; return(null); }
public FileReceiver(Tox tox, int fileNumber, int friendNumber, ToxFileKind kind, long fileSize, string fileName, string path) : base(tox, fileNumber, friendNumber, kind, fileSize, fileName, path) { }
public FileSender(Tox tox, int fileNumber, int friendNumber, ToxFileKind kind, long fileSize, string fileName, string path) : base(tox, fileNumber, friendNumber, kind, fileSize, fileName, path) { }
public static extern UInt32 Send(ToxHandle tox, UInt32 friendNumber, ToxFileKind kind, UInt64 fileSize, Byte[] fileId, Byte[] fileName, SizeT fileNameLength, ref ToxErrorFileSend error);
/// <summary> /// Send a file transmission request. /// </summary> /// <param name="friendNumber">The friend number to send the request to.</param> /// <param name="kind">The kind of file that will be transferred.</param> /// <param name="fileSize">The size of the file that will be transferred.</param> /// <param name="fileName">The filename of the file that will be transferred.</param> /// <param name="fileId">The id to identify this transfer with. Should be ToxConstants.FileIdLength bytes long.</param> /// <returns>Info about the file transfer on success.</returns> public ToxFileInfo FileSend(int friendNumber, ToxFileKind kind, long fileSize, string fileName, byte[] fileId) { var error = ToxErrorFileSend.Ok; return FileSend(friendNumber, kind, fileSize, fileName, fileId, out error); }
/// <summary> /// Send a file transmission request. /// </summary> /// <param name="friendNumber">The friend number to send the request to.</param> /// <param name="kind">The kind of file that will be transferred.</param> /// <param name="fileSize">The size of the file that will be transferred.</param> /// <param name="fileName">The filename of the file that will be transferred.</param> /// <param name="fileId">The id to identify this transfer with. Should be ToxConstants.FileIdLength bytes long.</param> /// <param name="error"></param> /// <returns>Info about the file transfer on success.</returns> public ToxFileInfo FileSend(int friendNumber, ToxFileKind kind, long fileSize, string fileName, byte[] fileId, out ToxErrorFileSend error) { ThrowIfDisposed(); if (fileId.Length != ToxConstants.FileIdLength) throw new ArgumentException("fileId should be exactly ToxConstants.FileIdLength bytes long", "fileId"); error = ToxErrorFileSend.Ok; byte[] fileNameBytes = Encoding.UTF8.GetBytes(fileName); int fileNumber = (int)ToxFunctions.FileSend(_tox, (uint)friendNumber, kind, (ulong)fileSize, fileId, fileNameBytes, (uint)fileNameBytes.Length, ref error); if (error == ToxErrorFileSend.Ok) return new ToxFileInfo(fileNumber, fileId); return null; }
/// <summary> /// Send a file transmission request. /// </summary> /// <param name="friendNumber">The friend number to send the request to.</param> /// <param name="kind">The kind of file that will be transferred.</param> /// <param name="fileSize">The size of the file that will be transferred.</param> /// <param name="fileName">The filename of the file that will be transferred.</param> /// <param name="error"></param> /// <returns>Info about the file transfer on success.</returns> public ToxFileInfo FileSend(int friendNumber, ToxFileKind kind, long fileSize, string fileName, out ToxErrorFileSend error) { ThrowIfDisposed(); error = ToxErrorFileSend.Ok; byte[] fileNameBytes = Encoding.UTF8.GetBytes(fileName); int fileNumber = (int)ToxFunctions.FileSend(_tox, (uint)friendNumber, kind, (ulong)fileSize, null, fileNameBytes, (uint)fileNameBytes.Length, ref error); if (error == ToxErrorFileSend.Ok) return new ToxFileInfo(fileNumber, FileGetId(friendNumber, fileNumber)); return null; }
public FileSender(Tox tox, int fileNumber, int friendNumber, ToxFileKind kind, long fileSize, string fileName, Stream stream) : base(tox, fileNumber, friendNumber, kind, fileSize, fileName, string.Empty) { _stream = stream; }
public ToxFileInfo FileSend(int friendNumber, ToxFileKind kind, long fileSize, string fileName, byte[] fileId, out bool success) { ToxErrorFileSend error; var retVal = _tox.FileSend(friendNumber, kind, fileSize, fileName, fileId, out error); ToxErrorViewModel.Instance.RelayError(error); success = error == ToxErrorFileSend.Ok; return retVal; }