1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 16:52:39 +00:00
transmission/wx/filter.h

68 lines
1.8 KiB
C
Raw Normal View History

2007-07-23 21:01:26 +00:00
/*
2007-08-14 13:53:03 +00:00
* Xmission - a cross-platform bittorrent client
* Copyright (C) 2007 Charles Kerr <charles@rebelbase.com>
2007-07-23 21:01:26 +00:00
*
2007-08-14 13:53:03 +00:00
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2007-08-18 17:19:49 +00:00
*
* $Id$
2007-07-23 21:01:26 +00:00
*/
#ifndef __XMISSION_TORRENT_FILTER_H__
#define __XMISSION_TORRENT_FILTER_H__
#include <vector>
#include <wx/intl.h>
#include <libtransmission/transmission.h>
class TorrentFilter
{
private:
2007-07-23 21:01:26 +00:00
2007-08-03 16:22:52 +00:00
enum ShowFlags
{
FLAG_ALL = (1<<0),
FLAG_COMPLETE = (1<<1),
FLAG_INCOMPLETE = (1<<2),
FLAG_SEEDING = (1<<3),
FLAG_LEECHING = (1<<4),
FLAG_ACTIVE = (1<<5),
FLAG_IDLE = (1<<6)
};
2007-08-03 16:22:52 +00:00
public:
2007-08-03 16:22:52 +00:00
typedef std::vector<tr_torrent*> torrents_v;
enum Show {
ALL,
COMPLETE, INCOMPLETE,
SEEDING, LEECHING,
2007-08-03 16:22:52 +00:00
ACTIVE, IDLE,
2007-07-23 21:01:26 +00:00
N_FILTERS
};
static int GetFlags( const tr_torrent * );
static void CountHits( const torrents_v & torrents,
int * counts );
2007-07-23 21:01:26 +00:00
static wxString GetName( int show, int count=0 );
2007-07-23 21:01:26 +00:00
static void RemoveFailures( int show,
torrents_v & torrents );
};
#endif