Changeset 7666
- Timestamp:
- Jan 11, 2009, 6:04:45 PM (12 years ago)
- Location:
- branches/1.5x/macosx
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5x/macosx/BadgeView.h
r6959 r7666 28 28 @interface BadgeView : NSView 29 29 { 30 tr_ handle* fLib;30 tr_session * fLib; 31 31 32 32 NSDictionary * fAttributes; … … 36 36 } 37 37 38 - (id) initWithFrame: (NSRect) frame lib: (tr_ handle*) lib;38 - (id) initWithFrame: (NSRect) frame lib: (tr_session *) lib; 39 39 40 40 - (BOOL) setRatesWithDownload: (CGFloat) downloadRate upload: (CGFloat) uploadRate; -
branches/1.5x/macosx/BadgeView.m
r7077 r7666 36 36 @implementation BadgeView 37 37 38 - (id) initWithFrame: (NSRect) frame lib: (tr_ handle*) lib38 - (id) initWithFrame: (NSRect) frame lib: (tr_session *) lib 39 39 { 40 40 if ((self = [super initWithFrame: frame])) -
branches/1.5x/macosx/Badger.h
r7032 r7666 28 28 @interface Badger : NSObject 29 29 { 30 tr_ handle* fLib;30 tr_session * fLib; 31 31 32 32 NSUInteger fCompleted; … … 39 39 } 40 40 41 - (id) initWithLib: (tr_ handle*) lib;41 - (id) initWithLib: (tr_session *) lib; 42 42 43 43 - (void) updateBadge; -
branches/1.5x/macosx/Badger.m
r7077 r7666 41 41 @implementation Badger 42 42 43 - (id) initWithLib: (tr_ handle*) lib43 - (id) initWithLib: (tr_session *) lib 44 44 { 45 45 if ((self = [super init])) -
branches/1.5x/macosx/Controller.h
r7017 r7666 50 50 @interface Controller : NSObject <GrowlApplicationBridgeDelegate> 51 51 { 52 tr_ handle* fLib;52 tr_session * fLib; 53 53 54 54 NSMutableArray * fTorrents, * fDisplayedTorrents; -
branches/1.5x/macosx/Controller.m
r7084 r7666 50 50 #import "ExpandedPathToIconTransformer.h" 51 51 #import "SpeedLimitToTurtleIconTransformer.h" 52 #import "metainfo.h" 52 53 #import "bencode.h" 53 54 #import "utils.h" 54 55 … … 148 149 #define DONATE_URL @"http://www.transmissionbt.com/donate.php" 149 150 150 static tr_rpc_callback_status rpcCallback(tr_ handle* handle UNUSED, tr_rpc_callback_type type, struct tr_torrent * torrentStruct, void * controller)151 static tr_rpc_callback_status rpcCallback(tr_session * handle UNUSED, tr_rpc_callback_type type, struct tr_torrent * torrentStruct, void * controller) 151 152 { 152 153 [(Controller *)controller rpcCallback: type forTorrentStruct: torrentStruct]; … … 210 211 fDefaults = [NSUserDefaults standardUserDefaults]; 211 212 212 fLib = tr_sessionInitFull(NULL, /* use default config directory (Application Support) */ 213 "macosx", 214 #warning update when changing in prefs 215 [[[fDefaults stringForKey: @"DownloadFolder"] stringByExpandingTildeInPath] UTF8String], 216 [fDefaults boolForKey: @"PEXGlobal"], 217 [fDefaults boolForKey: @"NatTraversal"], 218 [fDefaults integerForKey: @"BindPort"], 219 TR_DEFAULT_ENCRYPTION, /* reset in prefs */ 220 TR_DEFAULT_LAZY_BITFIELD_ENABLED, 221 NO, /* reset in prefs */ 222 -1, /* reset in prefs */ 223 NO, /* reset in prefs */ 224 -1, /* reset in prefs */ 225 [fDefaults integerForKey: @"PeersTotal"], 226 [fDefaults integerForKey: @"MessageLevel"], 227 YES, 228 [fDefaults boolForKey: @"Blocklist"], 229 [fDefaults integerForKey: @"PeerSocketTOS"], /* hidden pref - default is TR_DEFAULT_PEER_SOCKET_TOS */ 230 [fDefaults boolForKey: @"RPC"], 231 [fDefaults integerForKey: @"RPCPort"], 232 [fDefaults boolForKey: @"RPCUseWhitelist"], 233 NULL, /* reset in prefs */ 234 [fDefaults boolForKey: @"RPCAuthorize"], 235 [[fDefaults stringForKey: @"RPCUsername"] UTF8String], 236 "", /* reset in prefs - from Keychain */ 237 [fDefaults boolForKey: @"Proxy"], 238 [[fDefaults stringForKey: @"ProxyAddress"] UTF8String], 239 [fDefaults integerForKey: @"ProxyPort"], 240 TR_DEFAULT_PROXY_TYPE, /* reset in prefs */ 241 [fDefaults boolForKey: @"ProxyAuthorize"], 242 [[fDefaults stringForKey: @"ProxyUsername"] UTF8String], 243 ""); /* reset in prefs - from Keychain */ 244 213 tr_benc settings; 214 tr_bencInitDict(&settings, 21); 215 tr_sessionGetDefaultSettings(&settings); 216 217 tr_bencDictAddInt(&settings, TR_PREFS_KEY_BLOCKLIST_ENABLED, [fDefaults boolForKey: @"Blocklist"]); 218 219 #warning update when changing in prefs 220 tr_bencDictAddStr(&settings, TR_PREFS_KEY_DOWNLOAD_DIR, [[[fDefaults stringForKey: @"DownloadFolder"] 221 stringByExpandingTildeInPath] UTF8String]); 222 223 tr_bencDictAddInt(&settings, TR_PREFS_KEY_MSGLEVEL, [fDefaults boolForKey: @"MessageLevel"]); 224 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PEER_LIMIT_GLOBAL, [fDefaults integerForKey: @"PeersTotal"]); 225 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PEER_LIMIT_TORRENT, [fDefaults integerForKey: @"PeersTorrent"]); 226 227 const BOOL randomPort = /*[fDefaults boolForKey: @"RandomPort"]*/NO; 228 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PEER_PORT_RANDOM_ENABLED, randomPort); 229 if (!randomPort) 230 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PEER_PORT, [fDefaults integerForKey: @"BindPort"]); 231 232 //hidden pref 233 if ([fDefaults objectForKey: @"PeerSocketTOS"]) 234 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PEER_SOCKET_TOS, [fDefaults integerForKey: @"PeerSocketTOS"]); 235 236 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PEX_ENABLED, [fDefaults boolForKey: @"PEXGlobal"]); 237 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PORT_FORWARDING, [fDefaults boolForKey: @"NatTraversal"]); 238 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PROXY_AUTH_ENABLED, [fDefaults boolForKey: @"ProxyAuthorize"]); 239 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PROXY_ENABLED, [fDefaults boolForKey: @"Proxy"]); 240 tr_bencDictAddInt(&settings, TR_PREFS_KEY_PROXY_PORT, [fDefaults integerForKey: @"ProxyPort"]); 241 tr_bencDictAddStr(&settings, TR_PREFS_KEY_PROXY, [[fDefaults stringForKey: @"ProxyAddress"] UTF8String]); 242 tr_bencDictAddStr(&settings, TR_PREFS_KEY_PROXY_USERNAME, [[fDefaults stringForKey: @"ProxyUsername"] UTF8String]); 243 tr_bencDictAddInt(&settings, TR_PREFS_KEY_RPC_AUTH_REQUIRED, [fDefaults boolForKey: @"RPCAuthorize"]); 244 tr_bencDictAddInt(&settings, TR_PREFS_KEY_RPC_ENABLED, [fDefaults boolForKey: @"RPC"]); 245 tr_bencDictAddInt(&settings, TR_PREFS_KEY_RPC_PORT, [fDefaults integerForKey: @"RPCPort"]); 246 tr_bencDictAddStr(&settings, TR_PREFS_KEY_RPC_USERNAME, [[fDefaults stringForKey: @"RPCUsername"] UTF8String]); 247 tr_bencDictAddInt(&settings, TR_PREFS_KEY_RPC_WHITELIST_ENABLED, [fDefaults boolForKey: @"RPCUseWhitelist"]); 248 249 fLib = tr_sessionInit("macosx", tr_getDefaultConfigDir("Transmission"), YES, &settings); 250 tr_bencFree(&settings); 245 251 [NSApp setDelegate: self]; 246 252 -
branches/1.5x/macosx/CreatorWindowController.h
r6038 r7666 50 50 } 51 51 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; 54 54 55 - (id) initWithHandle: (tr_ handle*) handle path: (NSString *) path;55 - (id) initWithHandle: (tr_session *) handle path: (NSString *) path; 56 56 57 57 - (void) toggleOpenCheck: (id) sender; -
branches/1.5x/macosx/CreatorWindowController.m
r7032 r7666 46 46 @implementation CreatorWindowController 47 47 48 + (void) createTorrentFile: (tr_ handle*) handle48 + (void) createTorrentFile: (tr_session *) handle 49 49 { 50 50 //get file/folder for torrent … … 57 57 } 58 58 59 + (void) createTorrentFile: (tr_ handle*) handle forFile: (NSString *) file59 + (void) createTorrentFile: (tr_session *) handle forFile: (NSString *) file 60 60 { 61 61 CreatorWindowController * creator = [[self alloc] initWithHandle: handle path: file]; … … 63 63 } 64 64 65 - (id) initWithHandle: (tr_ handle*) handle path: (NSString *) path65 - (id) initWithHandle: (tr_session *) handle path: (NSString *) path 66 66 { 67 67 if ((self = [super initWithWindowNibName: @"Creator"])) -
branches/1.5x/macosx/DragOverlayWindow.h
r4423 r7666 28 28 @interface DragOverlayWindow : NSWindow 29 29 { 30 tr_ handle* fLib;30 tr_session * fLib; 31 31 32 32 NSViewAnimation * fFadeInAnimation, * fFadeOutAnimation; 33 33 } 34 34 35 - (id) initWithLib: (tr_ handle*) lib forWindow: (NSWindow *) window;35 - (id) initWithLib: (tr_session *) lib forWindow: (NSWindow *) window; 36 36 37 37 - (void) setTorrents: (NSArray *) files; -
branches/1.5x/macosx/DragOverlayWindow.m
r7013 r7666 26 26 #import "DragOverlayView.h" 27 27 #import "NSStringAdditions.h" 28 #import "metainfo.h"29 28 30 29 @implementation DragOverlayWindow 31 30 32 - (id) initWithLib: (tr_ handle*) lib forWindow: (NSWindow *) window31 - (id) initWithLib: (tr_session *) lib forWindow: (NSWindow *) window 33 32 { 34 33 if ((self = ([super initWithContentRect: NSMakeRect(0, 0, 1.0, 1.0) styleMask: NSBorderlessWindowMask -
branches/1.5x/macosx/PrefsController.h
r7007 r7666 63 63 } 64 64 65 + (void) setHandle: (tr_ handle*) handle;66 + (tr_ handle*) handle;65 + (void) setHandle: (tr_session *) handle; 66 + (tr_session *) handle; 67 67 68 68 - (void) setPort: (id) sender; -
branches/1.5x/macosx/PrefsController.m
r7081 r7666 71 71 @implementation PrefsController 72 72 73 tr_ handle* fHandle;74 + (void) setHandle: (tr_ handle*) handle73 tr_session * fHandle; 74 + (void) setHandle: (tr_session *) handle 75 75 { 76 76 fHandle = handle; 77 77 } 78 78 79 + (tr_ handle*) handle79 + (tr_session *) handle 80 80 { 81 81 return fHandle; -
branches/1.5x/macosx/StatsWindowController.h
r5668 r7666 35 35 } 36 36 37 + (StatsWindowController *) statsWindow: (tr_ handle*) lib;37 + (StatsWindowController *) statsWindow: (tr_session *) lib; 38 38 39 39 - (void) resetStats: (id) sender; -
branches/1.5x/macosx/StatsWindowController.m
r6974 r7666 41 41 42 42 StatsWindowController * fStatsWindowInstance = nil; 43 tr_ handle* fLib;44 + (StatsWindowController *) statsWindow: (tr_ handle*) lib43 tr_session * fLib; 44 + (StatsWindowController *) statsWindow: (tr_session *) lib 45 45 { 46 46 if (!fStatsWindowInstance) -
branches/1.5x/macosx/Torrent.h
r7661 r7666 78 78 79 79 - (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; 83 83 84 84 - (NSDictionary *) history; -
branches/1.5x/macosx/Torrent.m
r7661 r7666 32 32 @interface Torrent (Private) 33 33 34 - (id) initWithHash: (NSString *) hashString path: (NSString *) path torrentStruct: (tr_torrent *) torrentStruct lib: (tr_ handle*) lib34 - (id) initWithHash: (NSString *) hashString path: (NSString *) path torrentStruct: (tr_torrent *) torrentStruct lib: (tr_session *) lib 35 35 publicTorrent: (NSNumber *) publicTorrent 36 36 downloadFolder: (NSString *) downloadFolder … … 77 77 78 78 - (id) initWithPath: (NSString *) path location: (NSString *) location deleteTorrentFile: (torrentFileState) torrentDelete 79 lib: (tr_ handle*) lib79 lib: (tr_session *) lib 80 80 { 81 81 self = [self initWithHash: nil path: path torrentStruct: NULL lib: lib … … 102 102 } 103 103 104 - (id) initWithTorrentStruct: (tr_torrent *) torrentStruct location: (NSString *) location lib: (tr_ handle*) lib104 - (id) initWithTorrentStruct: (tr_torrent *) torrentStruct location: (NSString *) location lib: (tr_session *) lib 105 105 { 106 106 self = [self initWithHash: nil path: nil torrentStruct: torrentStruct lib: lib … … 114 114 } 115 115 116 - (id) initWithHistory: (NSDictionary *) history lib: (tr_ handle*) lib116 - (id) initWithHistory: (NSDictionary *) history lib: (tr_session *) lib 117 117 { 118 118 self = [self initWithHash: [history objectForKey: @"TorrentHash"] … … 1620 1620 1621 1621 //if a hash is given, attempt to load that; otherwise, attempt to open file at path 1622 - (id) initWithHash: (NSString *) hashString path: (NSString *) path torrentStruct: (tr_torrent *) torrentStruct lib: (tr_ handle*) lib1622 - (id) initWithHash: (NSString *) hashString path: (NSString *) path torrentStruct: (tr_torrent *) torrentStruct lib: (tr_session *) lib 1623 1623 publicTorrent: (NSNumber *) publicTorrent 1624 1624 downloadFolder: (NSString *) downloadFolder -
branches/1.5x/macosx/version.sh
r7492 r7666 8 8 # "0" for stable, supported releases 9 9 # these should be the only two lines you need to change 10 PEERID_PREFIX="-TR142 0-"11 USERAGENT_PREFIX="1. 42"10 PEERID_PREFIX="-TR142X-" 11 USERAGENT_PREFIX="1.50b1" 12 12 13 13 SVN_REVISION=`find ./libtransmission -name "*\.[chmp]" -o -name "*\.cpp" -o -name "*\.po" -o -name "*\.sh" | \
Note: See TracChangeset
for help on using the changeset viewer.