source: trunk/gtk/tr-torrent.h @ 7860

Last change on this file since 7860 was 7860, checked in by charles, 13 years ago

(trunk gtk) #1735: .torrent files are not deleted even if you said so

  • Property svn:keywords set to Date Rev Author Id
File size: 3.0 KB
Line 
1/******************************************************************************
2 * $Id: tr-torrent.h 7860 2009-02-09 20:08:33Z charles $
3 *
4 * Copyright (c) 2006-2008 Transmission authors and contributors
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 *****************************************************************************/
24
25#ifndef TR_TORRENT_H
26#define TR_TORRENT_H
27
28#include <glib-object.h>
29#include <libtransmission/transmission.h>
30#include <libtransmission/bencode.h>
31#include "util.h"
32
33#define TR_TORRENT_TYPE       ( tr_torrent_get_type ( ) )
34#define TR_TORRENT( obj ) \
35    ( G_TYPE_CHECK_INSTANCE_CAST ( ( obj ), TR_TORRENT_TYPE, TrTorrent ) )
36#define TR_TORRENT_CLASS( klass ) \
37    ( G_TYPE_CHECK_CLASS_CAST ( ( klass ), TR_TORRENT_TYPE, TrTorrentClass ) )
38#define TR_IS_TORRENT( obj ) \
39    ( G_TYPE_CHECK_INSTANCE_TYPE ( ( obj ), TR_TORRENT_TYPE ) )
40#define TR_IS_TORRENT_CLASS( klass ) \
41    ( G_TYPE_CHECK_CLASS_TYPE ( ( klass ), TR_TORRENT_TYPE ) )
42#define TR_TORRENT_GET_CLASS( obj ) \
43    ( G_TYPE_INSTANCE_GET_CLASS ( ( obj ), TR_TORRENT_TYPE, TrTorrentClass ) )
44
45typedef struct _TrTorrent
46{
47    GObject    parent;
48    struct TrTorrentPrivate  * priv;
49}
50TrTorrent;
51
52typedef struct TrTorrentClass
53{
54    GObjectClass    parent;
55}
56TrTorrentClass;
57
58GType          tr_torrent_get_type( void );
59
60void           tr_torrent_clear( TrTorrent * tor );
61
62tr_torrent *   tr_torrent_handle( TrTorrent *tor );
63
64const tr_stat *tr_torrent_stat( TrTorrent *tor );
65
66const tr_info *tr_torrent_info( TrTorrent *tor );
67
68char*          tr_torrent_status_str( TrTorrent * tor );
69
70void           tr_torrent_delete_files( TrTorrent * tor );
71
72void           tr_torrent_open_folder( TrTorrent * tor );
73
74TrTorrent *    tr_torrent_new_preexisting( tr_torrent * tor );
75
76TrTorrent *    tr_torrent_new_ctor( tr_session  * session,
77                                    tr_ctor     * ctor,
78                                    int         * errcode );
79
80void           tr_torrent_set_remove_flag( TrTorrent *,
81                                           gboolean );
82
83#endif
Note: See TracBrowser for help on using the repository browser.