export interface ITorrent {
    name: string,
    infoHash: string,
    progress: number,
    state: TorrentState
}

export enum TorrentState {
    Ready  = 0x1,
    Paused = 0x2,
    Done   = 0x4
}

export interface ISerializedTorrent {
    name         : string;
    infoHash     : string;
    downloaded   : number;
    uploaded     : number;
    ratio        : number;
    size         : number;
    downloadSpeed: number;
    uploadSpeed  : number;
    numPeers     : number;
    progress     : number;
    path         : string;
    state        : TorrentState;
    files        : ISerializedFile[];
}

export interface ISerializedFile {
    path      : string;
    size      : number;
    downloaded: number;
    progress  : number;
    selected  : boolean;
}
