Changeset 7468


Ignore:
Timestamp:
Dec 22, 2008, 7:14:43 PM (12 years ago)
Author:
charles
Message:

(trunk) patch from wereHamster to finish off tr_handle

Location:
trunk
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/conf.h

    r7367 r7468  
    2424
    2525struct tr_benc;
    26 struct tr_handle;
    2726
    2827/**
     
    4544void             pref_string_set_default( const char * key, const char * value );
    4645
    47 void             pref_save              ( struct tr_handle * );
     46void             pref_save              ( tr_session * );
    4847struct tr_benc*  pref_get_all           ( void );
    4948
  • trunk/libtransmission/net.h

    r7448 r7468  
    120120 * Sockets
    121121 **********************************************************************/
    122 int  tr_netOpenTCP( struct tr_handle * session,
     122int  tr_netOpenTCP( tr_session      * session,
    123123                    const tr_address * addr,
    124124                    tr_port            port );
     
    128128                    tr_bool            suppressMsgs );
    129129
    130 int  tr_netAccept( struct tr_handle * session,
    131                    int                 bound,
    132                    tr_address        * setme_addr,
    133                    tr_port           * setme_port );
     130int  tr_netAccept( tr_session * session,
     131                   int          bound,
     132                   tr_address * setme_addr,
     133                   tr_port    * setme_port );
    134134
    135135int  tr_netSetTOS( int s,
  • trunk/libtransmission/session.h

    r7367 r7468  
    5656struct tr_bandwidth;
    5757
    58 struct tr_handle
     58struct tr_session
    5959{
    6060    tr_bool                      isPortSet;
  • trunk/libtransmission/transmission.h

    r7456 r7468  
    8383
    8484typedef struct tr_ctor tr_ctor;
    85 typedef struct tr_handle tr_handle;
    8685typedef struct tr_info tr_info;
    8786typedef struct tr_torrent tr_torrent;
    88 typedef tr_handle tr_session;
     87typedef struct tr_session tr_session;
    8988
    9089
  • trunk/macosx/BadgeView.h

    r6959 r7468  
    2828@interface BadgeView : NSView
    2929{
    30     tr_handle * fLib;
     30    tr_session * fLib;
    3131   
    3232    NSDictionary * fAttributes;
     
    3636}
    3737
    38 - (id) initWithFrame: (NSRect) frame lib: (tr_handle *) lib;
     38- (id) initWithFrame: (NSRect) frame lib: (tr_session *) lib;
    3939
    4040- (BOOL) setRatesWithDownload: (CGFloat) downloadRate upload: (CGFloat) uploadRate;
  • trunk/macosx/BadgeView.m

    r7114 r7468  
    3636@implementation BadgeView
    3737
    38 - (id) initWithFrame: (NSRect) frame lib: (tr_handle *) lib
     38- (id) initWithFrame: (NSRect) frame lib: (tr_session *) lib
    3939{
    4040    if ((self = [super initWithFrame: frame]))
  • trunk/macosx/Badger.h

    r7032 r7468  
    2828@interface Badger : NSObject
    2929{
    30     tr_handle * fLib;
     30    tr_session * fLib;
    3131   
    3232    NSUInteger fCompleted;
     
    3939}
    4040
    41 - (id) initWithLib: (tr_handle *) lib;
     41- (id) initWithLib: (tr_session *) lib;
    4242
    4343- (void) updateBadge;
  • trunk/macosx/Badger.m

    r7077 r7468  
    4141@implementation Badger
    4242
    43 - (id) initWithLib: (tr_handle *) lib
     43- (id) initWithLib: (tr_session *) lib
    4444{
    4545    if ((self = [super init]))
  • trunk/macosx/Controller.h

    r7250 r7468  
    5050@interface Controller : NSObject <GrowlApplicationBridgeDelegate>
    5151{
    52     tr_handle                       * fLib;
     52    tr_session                       * fLib;
    5353   
    5454    NSMutableArray                  * fTorrents, * fDisplayedTorrents;
  • trunk/macosx/Controller.m

    r7437 r7468  
    146146#define DONATE_URL  @"http://www.transmissionbt.com/donate.php"
    147147
    148 static tr_rpc_callback_status rpcCallback(tr_handle * handle UNUSED, tr_rpc_callback_type type, struct tr_torrent * torrentStruct, void * controller)
     148static tr_rpc_callback_status rpcCallback(tr_session * handle UNUSED, tr_rpc_callback_type type, struct tr_torrent * torrentStruct, void * controller)
    149149{
    150150    [(Controller *)controller rpcCallback: type forTorrentStruct: torrentStruct];
  • trunk/macosx/CreatorWindowController.h

    r6038 r7468  
    5050}
    5151
    52 + (void) createTorrentFile: (tr_handle *) handle;
    53 + (void) createTorrentFile: (tr_handle *) handle forFile: (NSString *) file;
     52+ (void) createTorrentFile: (tr_session *) handle;
     53+ (void) createTorrentFile: (tr_session *) handle forFile: (NSString *) file;
    5454
    55 - (id) initWithHandle: (tr_handle *) handle path: (NSString *) path;
     55- (id) initWithHandle: (tr_session *) handle path: (NSString *) path;
    5656
    5757- (void) toggleOpenCheck: (id) sender;
  • trunk/macosx/CreatorWindowController.m

    r7032 r7468  
    4646@implementation CreatorWindowController
    4747
    48 + (void) createTorrentFile: (tr_handle *) handle
     48+ (void) createTorrentFile: (tr_session *) handle
    4949{
    5050    //get file/folder for torrent
     
    5757}
    5858
    59 + (void) createTorrentFile: (tr_handle *) handle forFile: (NSString *) file
     59+ (void) createTorrentFile: (tr_session *) handle forFile: (NSString *) file
    6060{
    6161    CreatorWindowController * creator = [[self alloc] initWithHandle: handle path: file];
     
    6363}
    6464
    65 - (id) initWithHandle: (tr_handle *) handle path: (NSString *) path
     65- (id) initWithHandle: (tr_session *) handle path: (NSString *) path
    6666{
    6767    if ((self = [super initWithWindowNibName: @"Creator"]))
  • trunk/macosx/DragOverlayWindow.h

    r4423 r7468  
    2828@interface DragOverlayWindow : NSWindow
    2929{
    30     tr_handle * fLib;
     30    tr_session * fLib;
    3131   
    3232    NSViewAnimation * fFadeInAnimation, * fFadeOutAnimation;
    3333}
    3434
    35 - (id) initWithLib: (tr_handle *) lib forWindow: (NSWindow *) window;
     35- (id) initWithLib: (tr_session *) lib forWindow: (NSWindow *) window;
    3636
    3737- (void) setTorrents: (NSArray *) files;
  • trunk/macosx/DragOverlayWindow.m

    r7151 r7468  
    2929@implementation DragOverlayWindow
    3030
    31 - (id) initWithLib: (tr_handle *) lib forWindow: (NSWindow *) window
     31- (id) initWithLib: (tr_session *) lib forWindow: (NSWindow *) window
    3232{
    3333    if ((self = ([super initWithContentRect: NSMakeRect(0, 0, 1.0, 1.0) styleMask: NSBorderlessWindowMask
  • trunk/macosx/PrefsController.h

    r7352 r7468  
    6363}
    6464
    65 + (void) setHandle: (tr_handle *) handle;
    66 + (tr_handle *) handle;
     65+ (void) setHandle: (tr_session *) handle;
     66+ (tr_session *) handle;
    6767
    6868- (void) setPort: (id) sender;
  • trunk/macosx/PrefsController.m

    r7358 r7468  
    7373@implementation PrefsController
    7474
    75 tr_handle * fHandle;
    76 + (void) setHandle: (tr_handle *) handle
     75tr_session * fHandle;
     76+ (void) setHandle: (tr_session *) handle
    7777{
    7878    fHandle = handle;
    7979}
    8080
    81 + (tr_handle *) handle
     81+ (tr_session *) handle
    8282{
    8383    return fHandle;
  • trunk/macosx/StatsWindowController.h

    r5668 r7468  
    3535}
    3636
    37 + (StatsWindowController *) statsWindow: (tr_handle *) lib;
     37+ (StatsWindowController *) statsWindow: (tr_session *) lib;
    3838
    3939- (void) resetStats: (id) sender;
  • trunk/macosx/StatsWindowController.m

    r6974 r7468  
    4141
    4242StatsWindowController * fStatsWindowInstance = nil;
    43 tr_handle * fLib;
    44 + (StatsWindowController *) statsWindow: (tr_handle *) lib
     43tr_session * fLib;
     44+ (StatsWindowController *) statsWindow: (tr_session *) lib
    4545{
    4646    if (!fStatsWindowInstance)
  • trunk/macosx/Torrent.h

    r7307 r7468  
    7878
    7979- (id) initWithPath: (NSString *) path location: (NSString *) location deleteTorrentFile: (torrentFileState) torrentDelete
    80         lib: (tr_handle *) lib;
    81 - (id) initWithTorrentStruct: (tr_torrent *) torrentStruct location: (NSString *) location lib: (tr_handle *) lib;
    82 - (id) initWithHistory: (NSDictionary *) history lib: (tr_handle *) lib;
     80        lib: (tr_session *) lib;
     81- (id) initWithTorrentStruct: (tr_torrent *) torrentStruct location: (NSString *) location lib: (tr_session *) lib;
     82- (id) initWithHistory: (NSDictionary *) history lib: (tr_session *) lib;
    8383
    8484- (NSDictionary *) history;
  • trunk/macosx/Torrent.m

    r7440 r7468  
    3232@interface Torrent (Private)
    3333
    34 - (id) initWithHash: (NSString *) hashString path: (NSString *) path torrentStruct: (tr_torrent *) torrentStruct lib: (tr_handle *) lib
     34- (id) initWithHash: (NSString *) hashString path: (NSString *) path torrentStruct: (tr_torrent *) torrentStruct lib: (tr_session *) lib
    3535        publicTorrent: (NSNumber *) publicTorrent
    3636        downloadFolder: (NSString *) downloadFolder
     
    7171
    7272- (id) initWithPath: (NSString *) path location: (NSString *) location deleteTorrentFile: (torrentFileState) torrentDelete
    73         lib: (tr_handle *) lib
     73        lib: (tr_session *) lib
    7474{
    7575    self = [self initWithHash: nil path: path torrentStruct: NULL lib: lib
     
    9696}
    9797
    98 - (id) initWithTorrentStruct: (tr_torrent *) torrentStruct location: (NSString *) location lib: (tr_handle *) lib
     98- (id) initWithTorrentStruct: (tr_torrent *) torrentStruct location: (NSString *) location lib: (tr_session *) lib
    9999{
    100100    self = [self initWithHash: nil path: nil torrentStruct: torrentStruct lib: lib
     
    108108}
    109109
    110 - (id) initWithHistory: (NSDictionary *) history lib: (tr_handle *) lib
     110- (id) initWithHistory: (NSDictionary *) history lib: (tr_session *) lib
    111111{
    112112    self = [self initWithHash: [history objectForKey: @"TorrentHash"]
     
    16761676
    16771677//if a hash is given, attempt to load that; otherwise, attempt to open file at path
    1678 - (id) initWithHash: (NSString *) hashString path: (NSString *) path torrentStruct: (tr_torrent *) torrentStruct lib: (tr_handle *) lib
     1678- (id) initWithHash: (NSString *) hashString path: (NSString *) path torrentStruct: (tr_torrent *) torrentStruct lib: (tr_session *) lib
    16791679        publicTorrent: (NSNumber *) publicTorrent
    16801680        downloadFolder: (NSString *) downloadFolder
  • trunk/wx/speed-stats.cc

    r7454 r7468  
    211211
    212212void
    213 SpeedStats :: Pulse( tr_handle * handle )
     213SpeedStats :: Pulse( tr_session * handle )
    214214{
    215215    // add a new record
  • trunk/wx/speed-stats.h

    r7404 r7468  
    5050        void SetTorrent( struct tr_torrent * );
    5151
    52         void Pulse( tr_handle * handle );
     52        void Pulse( tr_session * handle );
    5353
    5454    public:
  • trunk/wx/torrent-list.cc

    r7454 r7468  
    185185
    186186
    187 TorrentListCtrl :: TorrentListCtrl( tr_handle       * handle,
     187TorrentListCtrl :: TorrentListCtrl( tr_session       * handle,
    188188                                    wxConfig        * config,
    189189                                    wxWindow        * parent,
  • trunk/wx/torrent-list.h

    r7404 r7468  
    3232{
    3333    public:
    34         TorrentListCtrl( tr_handle       * handle,
     34        TorrentListCtrl( tr_session       * handle,
    3535                         wxConfig        * config,
    3636                         wxWindow        * parent,
     
    124124
    125125    private:
    126         tr_handle * myHandle;
     126        tr_session * myHandle;
    127127        wxConfig * myConfig;
    128128        torrents_v myTorrents;
  • trunk/wx/xmission.cc

    r7454 r7468  
    137137namespace
    138138{
    139     tr_handle * handle = NULL;
     139    tr_session * handle = NULL;
    140140
    141141    typedef std::vector<tr_torrent*> torrents_v;
Note: See TracChangeset for help on using the changeset viewer.