]> granicus.if.org Git - transmission/commitdiff
update project for new rpc code (part 1)
authorMitchell Livingston <livings124@transmissionbt.com>
Mon, 19 May 2008 00:23:06 +0000 (00:23 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Mon, 19 May 2008 00:23:06 +0000 (00:23 +0000)
Transmission.xcodeproj/project.pbxproj
macosx/Controller.h
macosx/Controller.m
macosx/IPCController.h [deleted file]
macosx/IPCController.m [deleted file]

index 93b726c6f4ff6de3db1f445d5a3e10801f743350..dd4846d52ba1f936667236c65a7d2f73b95e3b81 100644 (file)
                A24621410C769D0900088E81 /* trevent.h in Headers */ = {isa = PBXBuildFile; fileRef = A24621350C769CF400088E81 /* trevent.h */; };
                A24621420C769D0900088E81 /* trevent.c in Sources */ = {isa = PBXBuildFile; fileRef = A24621360C769CF400088E81 /* trevent.c */; };
                A24B65600D3F30870079EA4D /* QuitBadge.png in Resources */ = {isa = PBXBuildFile; fileRef = A24B655F0D3F30870079EA4D /* QuitBadge.png */; };
-               A24D2A640C0A624600A0ED9F /* IPCController.m in Sources */ = {isa = PBXBuildFile; fileRef = A24D2A620C0A624600A0ED9F /* IPCController.m */; };
                A24F19080A3A790800C9C145 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A24F19070A3A790800C9C145 /* Sparkle.framework */; };
                A24F19210A3A796800C9C145 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A24F19070A3A790800C9C145 /* Sparkle.framework */; };
                A256588D0A9A695400E8A03B /* MessageWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A256588B0A9A695400E8A03B /* MessageWindowController.m */; };
                A29DF8BD0DB2545A00D04E5A /* ggets.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D307920D9EC4800051FD27 /* ggets.h */; };
                A29DF8BE0DB2545F00D04E5A /* verify.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D22A110D65EED100007D5F /* verify.h */; };
                A29E04B50DA8764100705643 /* Network.png in Resources */ = {isa = PBXBuildFile; fileRef = A29E04B40DA8764100705643 /* Network.png */; };
-               A29EBE540DC01FC9006CEE80 /* web.c in Sources */ = {isa = PBXBuildFile; fileRef = A29EBE520DC01FC9006CEE80 /* web.c */; };
-               A29EBE550DC01FC9006CEE80 /* web.h in Headers */ = {isa = PBXBuildFile; fileRef = A29EBE530DC01FC9006CEE80 /* web.h */; };
                A29EBE710DC06068006CEE80 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A29EBE700DC06068006CEE80 /* libcurl.dylib */; };
                A2A1CB7A0BF29D5500AE959F /* PeerProgressIndicatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A1CB780BF29D5500AE959F /* PeerProgressIndicatorCell.m */; };
                A2A3065C0AAD24A80049E2AC /* UKFileWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306540AAD24A80049E2AC /* UKFileWatcher.m */; };
                A2A3065E0AAD24A80049E2AC /* UKFNSubscribeFileWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306560AAD24A80049E2AC /* UKFNSubscribeFileWatcher.m */; };
                A2A306600AAD24A80049E2AC /* UKKQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306580AAD24A80049E2AC /* UKKQueue.m */; };
                A2A306620AAD24A80049E2AC /* UKMainThreadProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A3065A0AAD24A80049E2AC /* UKMainThreadProxy.m */; };
+               A2A4E9210DE0F7E9000CE197 /* web.h in Headers */ = {isa = PBXBuildFile; fileRef = A29EBE530DC01FC9006CEE80 /* web.h */; };
+               A2A4E9220DE0F7EB000CE197 /* web.c in Sources */ = {isa = PBXBuildFile; fileRef = A29EBE520DC01FC9006CEE80 /* web.c */; };
                A2A6321B0CD9751700E3DA60 /* BadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A6321A0CD9751700E3DA60 /* BadgeView.m */; };
                A2AA579D0ADFCAB400CA59F6 /* PiecesView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AA579B0ADFCAB400CA59F6 /* PiecesView.m */; };
+               A2AAB65C0DE0CF6200E04DDA /* rpc-server.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6580DE0CF6200E04DDA /* rpc-server.c */; };
+               A2AAB65D0DE0CF6200E04DDA /* rpc.h in Headers */ = {isa = PBXBuildFile; fileRef = A2AAB6590DE0CF6200E04DDA /* rpc.h */; };
+               A2AAB65E0DE0CF6200E04DDA /* rpc-server.h in Headers */ = {isa = PBXBuildFile; fileRef = A2AAB65A0DE0CF6200E04DDA /* rpc-server.h */; };
+               A2AAB65F0DE0CF6200E04DDA /* rpc.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB65B0DE0CF6200E04DDA /* rpc.c */; };
+               A2AAB6650DE0D08B00E04DDA /* blocklist.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D307930D9EC4860051FD27 /* blocklist.h */; };
+               A2AAB6DB0DE0D5A400E04DDA /* auth.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6C10DE0D5A400E04DDA /* auth.c */; };
+               A2AAB6DC0DE0D5A400E04DDA /* cgi.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6C20DE0D5A400E04DDA /* cgi.c */; };
+               A2AAB6DF0DE0D5A500E04DDA /* compat_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6C50DE0D5A400E04DDA /* compat_unix.c */; };
+               A2AAB6E10DE0D5A500E04DDA /* config.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6C70DE0D5A400E04DDA /* config.c */; };
+               A2AAB6E40DE0D5A500E04DDA /* io_cgi.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6CA0DE0D5A400E04DDA /* io_cgi.c */; };
+               A2AAB6E50DE0D5A500E04DDA /* io_dir.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6CB0DE0D5A400E04DDA /* io_dir.c */; };
+               A2AAB6E60DE0D5A500E04DDA /* io_emb.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6CC0DE0D5A400E04DDA /* io_emb.c */; };
+               A2AAB6E70DE0D5A500E04DDA /* io_file.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6CD0DE0D5A400E04DDA /* io_file.c */; };
+               A2AAB6E80DE0D5A500E04DDA /* io_socket.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6CE0DE0D5A400E04DDA /* io_socket.c */; };
+               A2AAB6E90DE0D5A500E04DDA /* io_ssl.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6CF0DE0D5A400E04DDA /* io_ssl.c */; };
+               A2AAB6EC0DE0D5A500E04DDA /* log.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6D20DE0D5A400E04DDA /* log.c */; };
+               A2AAB6ED0DE0D5A500E04DDA /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6D30DE0D5A400E04DDA /* md5.c */; };
+               A2AAB6EF0DE0D5A500E04DDA /* shttpd.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6D50DE0D5A400E04DDA /* shttpd.c */; };
+               A2AAB6F40DE0D5A600E04DDA /* string.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AAB6DA0DE0D5A400E04DDA /* string.c */; };
                A2AF1C390A3D0F6200F1575D /* FileOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AF1C370A3D0F6200F1575D /* FileOutlineView.m */; };
                A2BB67790D5BA74600AB0618 /* OpenWeb.png in Resources */ = {isa = PBXBuildFile; fileRef = A2BB67780D5BA74600AB0618 /* OpenWeb.png */; };
                A2BC19850CA9AF5A00DD302A /* CompleteCheck.png in Resources */ = {isa = PBXBuildFile; fileRef = A2BC19840CA9AF5A00DD302A /* CompleteCheck.png */; };
                BEFC1C040C07753100B0BB3C /* libcrypto.0.9.7.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D2617F709DECE3D00D08EFA /* libcrypto.0.9.7.dylib */; };
                BEFC1C050C07753500B0BB3C /* libtransmission.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D18389709DEC0030047D688 /* libtransmission.a */; };
                BEFC1C1A0C07756200B0BB3C /* daemon.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C0E0C07756200B0BB3C /* daemon.c */; };
-               BEFC1C1B0C07756200B0BB3C /* errors.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C0F0C07756200B0BB3C /* errors.c */; };
-               BEFC1C1C0C07756200B0BB3C /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C110C07756200B0BB3C /* misc.c */; };
-               BEFC1C1F0C07756200B0BB3C /* server.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C150C07756200B0BB3C /* server.c */; };
-               BEFC1C200C07756200B0BB3C /* torrents.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C170C07756200B0BB3C /* torrents.c */; };
-               BEFC1CEF0C07822400B0BB3C /* errors.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C0F0C07756200B0BB3C /* errors.c */; };
                BEFC1CF40C07822400B0BB3C /* libcrypto.0.9.7.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D2617F709DECE3D00D08EFA /* libcrypto.0.9.7.dylib */; };
-               BEFC1D000C07824D00B0BB3C /* torrents.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C170C07756200B0BB3C /* torrents.c */; };
                BEFC1D050C07825A00B0BB3C /* remote.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C140C07756200B0BB3C /* remote.c */; };
-               BEFC1D0E0C07827300B0BB3C /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C110C07756200B0BB3C /* misc.c */; };
-               BEFC1D230C07839E00B0BB3C /* client.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C0C0C07756200B0BB3C /* client.c */; };
                BEFC1D2D0C0783D900B0BB3C /* libtransmission.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D18389709DEC0030047D688 /* libtransmission.a */; };
                BEFC1D3E0C0783EE00B0BB3C /* libcrypto.0.9.7.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D2617F709DECE3D00D08EFA /* libcrypto.0.9.7.dylib */; };
                BEFC1D3F0C0783EE00B0BB3C /* libtransmission.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D18389709DEC0030047D688 /* libtransmission.a */; };
-               BEFC1D490C07842200B0BB3C /* proxy.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C130C07756200B0BB3C /* proxy.c */; };
-               BEFC1D4F0C07843400B0BB3C /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C110C07756200B0BB3C /* misc.c */; };
-               BEFC1D540C07843900B0BB3C /* errors.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1C0F0C07756200B0BB3C /* errors.c */; };
                BEFC1E290C07861A00B0BB3C /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFC1DF00C07861A00B0BB3C /* version.h */; };
                BEFC1E2A0C07861A00B0BB3C /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFC1DF10C07861A00B0BB3C /* utils.h */; };
                BEFC1E2B0C07861A00B0BB3C /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1DF20C07861A00B0BB3C /* utils.c */; };
                BEFC1E480C07861A00B0BB3C /* natpmp.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1E0F0C07861A00B0BB3C /* natpmp.c */; };
                BEFC1E490C07861A00B0BB3C /* metainfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFC1E100C07861A00B0BB3C /* metainfo.h */; };
                BEFC1E4A0C07861A00B0BB3C /* metainfo.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1E110C07861A00B0BB3C /* metainfo.c */; };
-               BEFC1E4B0C07861A00B0BB3C /* ipcparse.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFC1E120C07861A00B0BB3C /* ipcparse.h */; };
-               BEFC1E4C0C07861A00B0BB3C /* ipcparse.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1E130C07861A00B0BB3C /* ipcparse.c */; };
                BEFC1E4D0C07861A00B0BB3C /* session.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFC1E140C07861A00B0BB3C /* session.h */; };
                BEFC1E4E0C07861A00B0BB3C /* inout.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFC1E150C07861A00B0BB3C /* inout.h */; };
                BEFC1E4F0C07861A00B0BB3C /* inout.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1E160C07861A00B0BB3C /* inout.c */; };
                BEFC1E580C07861A00B0BB3C /* clients.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1E1F0C07861A00B0BB3C /* clients.c */; };
                BEFC1E5C0C07861A00B0BB3C /* bencode.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFC1E230C07861A00B0BB3C /* bencode.h */; };
                BEFC1E5D0C07861A00B0BB3C /* bencode.c in Sources */ = {isa = PBXBuildFile; fileRef = BEFC1E240C07861A00B0BB3C /* bencode.c */; };
-               BEFC1E5F0C07861A00B0BB3C /* trcompat.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFC1E260C07861A00B0BB3C /* trcompat.h */; };
                D4AF3B2F0C41F7A500D46B6B /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = D4AF3B2D0C41F7A500D46B6B /* list.c */; };
                D4AF3B300C41F7A600D46B6B /* list.h in Headers */ = {isa = PBXBuildFile; fileRef = D4AF3B2E0C41F7A500D46B6B /* list.h */; };
                E138A9770C04D88F00C5426C /* CTGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = E138A9740C04D88F00C5426C /* CTGradient.m */; };
                A24621350C769CF400088E81 /* trevent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = trevent.h; path = libtransmission/trevent.h; sourceTree = "<group>"; };
                A24621360C769CF400088E81 /* trevent.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = trevent.c; path = libtransmission/trevent.c; sourceTree = "<group>"; };
                A24B655F0D3F30870079EA4D /* QuitBadge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = QuitBadge.png; path = macosx/Images/QuitBadge.png; sourceTree = "<group>"; };
-               A24D2A610C0A624600A0ED9F /* IPCController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = IPCController.h; path = macosx/IPCController.h; sourceTree = "<group>"; };
-               A24D2A620C0A624600A0ED9F /* IPCController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = IPCController.m; path = macosx/IPCController.m; sourceTree = "<group>"; };
-               A24D2A770C0A65C400A0ED9F /* ipcparse.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ipcparse.c; path = libtransmission/ipcparse.c; sourceTree = "<group>"; };
-               A24D2A780C0A65C400A0ED9F /* ipcparse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ipcparse.h; path = libtransmission/ipcparse.h; sourceTree = "<group>"; };
                A24F19070A3A790800C9C145 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = macosx/Sparkle.framework; sourceTree = "<group>"; };
                A256588A0A9A695400E8A03B /* MessageWindowController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MessageWindowController.h; path = macosx/MessageWindowController.h; sourceTree = "<group>"; };
                A256588B0A9A695400E8A03B /* MessageWindowController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = MessageWindowController.m; path = macosx/MessageWindowController.m; sourceTree = "<group>"; };
                A2A6321A0CD9751700E3DA60 /* BadgeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BadgeView.m; path = macosx/BadgeView.m; sourceTree = "<group>"; };
                A2AA579A0ADFCAB400CA59F6 /* PiecesView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PiecesView.h; path = macosx/PiecesView.h; sourceTree = "<group>"; };
                A2AA579B0ADFCAB400CA59F6 /* PiecesView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PiecesView.m; path = macosx/PiecesView.m; sourceTree = "<group>"; };
+               A2AAB6580DE0CF6200E04DDA /* rpc-server.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "rpc-server.c"; path = "libtransmission/rpc-server.c"; sourceTree = "<group>"; };
+               A2AAB6590DE0CF6200E04DDA /* rpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rpc.h; path = libtransmission/rpc.h; sourceTree = "<group>"; };
+               A2AAB65A0DE0CF6200E04DDA /* rpc-server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "rpc-server.h"; path = "libtransmission/rpc-server.h"; sourceTree = "<group>"; };
+               A2AAB65B0DE0CF6200E04DDA /* rpc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rpc.c; path = libtransmission/rpc.c; sourceTree = "<group>"; };
+               A2AAB6BB0DE0D55D00E04DDA /* libshttpd.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libshttpd.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+               A2AAB6C10DE0D5A400E04DDA /* auth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = auth.c; path = "third-party/shttpd/auth.c"; sourceTree = "<group>"; };
+               A2AAB6C20DE0D5A400E04DDA /* cgi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cgi.c; path = "third-party/shttpd/cgi.c"; sourceTree = "<group>"; };
+               A2AAB6C50DE0D5A400E04DDA /* compat_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = compat_unix.c; path = "third-party/shttpd/compat_unix.c"; sourceTree = "<group>"; };
+               A2AAB6C60DE0D5A400E04DDA /* compat_unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = compat_unix.h; path = "third-party/shttpd/compat_unix.h"; sourceTree = "<group>"; };
+               A2AAB6C70DE0D5A400E04DDA /* config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = config.c; path = "third-party/shttpd/config.c"; sourceTree = "<group>"; };
+               A2AAB6C80DE0D5A400E04DDA /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "third-party/shttpd/config.h"; sourceTree = "<group>"; };
+               A2AAB6CA0DE0D5A400E04DDA /* io_cgi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = io_cgi.c; path = "third-party/shttpd/io_cgi.c"; sourceTree = "<group>"; };
+               A2AAB6CB0DE0D5A400E04DDA /* io_dir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = io_dir.c; path = "third-party/shttpd/io_dir.c"; sourceTree = "<group>"; };
+               A2AAB6CC0DE0D5A400E04DDA /* io_emb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = io_emb.c; path = "third-party/shttpd/io_emb.c"; sourceTree = "<group>"; };
+               A2AAB6CD0DE0D5A400E04DDA /* io_file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = io_file.c; path = "third-party/shttpd/io_file.c"; sourceTree = "<group>"; };
+               A2AAB6CE0DE0D5A400E04DDA /* io_socket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = io_socket.c; path = "third-party/shttpd/io_socket.c"; sourceTree = "<group>"; };
+               A2AAB6CF0DE0D5A400E04DDA /* io_ssl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = io_ssl.c; path = "third-party/shttpd/io_ssl.c"; sourceTree = "<group>"; };
+               A2AAB6D20DE0D5A400E04DDA /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = log.c; path = "third-party/shttpd/log.c"; sourceTree = "<group>"; };
+               A2AAB6D30DE0D5A400E04DDA /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = "third-party/shttpd/md5.c"; sourceTree = "<group>"; };
+               A2AAB6D40DE0D5A400E04DDA /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = md5.h; path = "third-party/shttpd/md5.h"; sourceTree = "<group>"; };
+               A2AAB6D50DE0D5A400E04DDA /* shttpd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = shttpd.c; path = "third-party/shttpd/shttpd.c"; sourceTree = "<group>"; };
+               A2AAB6D60DE0D5A400E04DDA /* shttpd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = shttpd.h; path = "third-party/shttpd/shttpd.h"; sourceTree = "<group>"; };
+               A2AAB6DA0DE0D5A400E04DDA /* string.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = string.c; path = "third-party/shttpd/string.c"; sourceTree = "<group>"; };
                A2AC81D60D987E2D00A2878C /* nl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nl; path = macosx/nl.lproj/AddWindow.xib; sourceTree = "<group>"; };
                A2AF1C360A3D0F6200F1575D /* FileOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FileOutlineView.h; path = macosx/FileOutlineView.h; sourceTree = "<group>"; };
                A2AF1C370A3D0F6200F1575D /* FileOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = FileOutlineView.m; path = macosx/FileOutlineView.m; sourceTree = "<group>"; };
                A2BB67780D5BA74600AB0618 /* OpenWeb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = OpenWeb.png; path = macosx/Images/OpenWeb.png; sourceTree = "<group>"; };
                A2BC19840CA9AF5A00DD302A /* CompleteCheck.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = CompleteCheck.png; path = macosx/Images/CompleteCheck.png; sourceTree = "<group>"; };
                A2BC19DF0CA9D82300DD302A /* evutil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = evutil.h; path = "third-party/libevent/evutil.h"; sourceTree = "<group>"; };
-               A2BC19E30CA9D8F400DD302A /* bsdqueue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = bsdqueue.h; path = daemon/bsdqueue.h; sourceTree = "<group>"; };
                A2BE9C4E0C1E4ADA002D16E6 /* makemeta.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = makemeta.c; path = libtransmission/makemeta.c; sourceTree = "<group>"; };
                A2BE9C4F0C1E4ADA002D16E6 /* makemeta.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = makemeta.h; path = libtransmission/makemeta.h; sourceTree = "<group>"; };
                A2BF078E0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SpeedLimitToTurtleIconTransformer.h; path = macosx/SpeedLimitToTurtleIconTransformer.h; sourceTree = "<group>"; };
                A2D307900D9EC46B0051FD27 /* ggets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ggets.c; path = libtransmission/ggets.c; sourceTree = "<group>"; };
                A2D307920D9EC4800051FD27 /* ggets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ggets.h; path = libtransmission/ggets.h; sourceTree = "<group>"; };
                A2D307930D9EC4860051FD27 /* blocklist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = blocklist.h; path = libtransmission/blocklist.h; sourceTree = "<group>"; };
-               A2D307950D9EC4C10051FD27 /* bsdtree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bsdtree.h; path = daemon/bsdtree.h; sourceTree = "<group>"; };
                A2D307A20D9EC6870051FD27 /* BlocklistDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlocklistDownloader.h; path = macosx/BlocklistDownloader.h; sourceTree = "<group>"; };
                A2D307A30D9EC6870051FD27 /* BlocklistDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BlocklistDownloader.m; path = macosx/BlocklistDownloader.m; sourceTree = "<group>"; };
                A2D307B00D9EC9F50051FD27 /* BlocklistStatusWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = BlocklistStatusWindow.xib; path = macosx/BlocklistStatusWindow.xib; sourceTree = "<group>"; };
                BE75C3830C72A1C100DBEFE0 /* evrpc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = evrpc.h; path = "third-party/libevent/evrpc.h"; sourceTree = "<group>"; };
                BE75C3840C72A1C100DBEFE0 /* event.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = event.h; path = "third-party/libevent/event.h"; sourceTree = "<group>"; };
                BEFC1C000C07750000B0BB3C /* transmission-daemon */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "transmission-daemon"; sourceTree = BUILT_PRODUCTS_DIR; };
-               BEFC1C0C0C07756200B0BB3C /* client.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = client.c; path = daemon/client.c; sourceTree = "<group>"; };
-               BEFC1C0D0C07756200B0BB3C /* client.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = client.h; path = daemon/client.h; sourceTree = "<group>"; };
                BEFC1C0E0C07756200B0BB3C /* daemon.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = daemon.c; path = daemon/daemon.c; sourceTree = "<group>"; };
-               BEFC1C0F0C07756200B0BB3C /* errors.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = errors.c; path = daemon/errors.c; sourceTree = "<group>"; };
-               BEFC1C100C07756200B0BB3C /* errors.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = errors.h; path = daemon/errors.h; sourceTree = "<group>"; };
-               BEFC1C110C07756200B0BB3C /* misc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = misc.c; path = daemon/misc.c; sourceTree = "<group>"; };
-               BEFC1C120C07756200B0BB3C /* misc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = misc.h; path = daemon/misc.h; sourceTree = "<group>"; };
-               BEFC1C130C07756200B0BB3C /* proxy.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = proxy.c; path = daemon/proxy.c; sourceTree = "<group>"; };
                BEFC1C140C07756200B0BB3C /* remote.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = remote.c; path = daemon/remote.c; sourceTree = "<group>"; };
-               BEFC1C150C07756200B0BB3C /* server.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = server.c; path = daemon/server.c; sourceTree = "<group>"; };
-               BEFC1C160C07756200B0BB3C /* server.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = server.h; path = daemon/server.h; sourceTree = "<group>"; };
-               BEFC1C170C07756200B0BB3C /* torrents.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = torrents.c; path = daemon/torrents.c; sourceTree = "<group>"; };
-               BEFC1C180C07756200B0BB3C /* torrents.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = torrents.h; path = daemon/torrents.h; sourceTree = "<group>"; };
                BEFC1CF90C07822400B0BB3C /* transmission-remote */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "transmission-remote"; sourceTree = BUILT_PRODUCTS_DIR; };
                BEFC1D430C0783EE00B0BB3C /* transmission-proxy */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "transmission-proxy"; sourceTree = BUILT_PRODUCTS_DIR; };
                BEFC1DF00C07861A00B0BB3C /* version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = version.h; path = libtransmission/version.h; sourceTree = "<group>"; };
                BEFC1E0F0C07861A00B0BB3C /* natpmp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = natpmp.c; path = libtransmission/natpmp.c; sourceTree = "<group>"; };
                BEFC1E100C07861A00B0BB3C /* metainfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = metainfo.h; path = libtransmission/metainfo.h; sourceTree = "<group>"; };
                BEFC1E110C07861A00B0BB3C /* metainfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = metainfo.c; path = libtransmission/metainfo.c; sourceTree = "<group>"; };
-               BEFC1E120C07861A00B0BB3C /* ipcparse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ipcparse.h; path = libtransmission/ipcparse.h; sourceTree = "<group>"; };
-               BEFC1E130C07861A00B0BB3C /* ipcparse.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ipcparse.c; path = libtransmission/ipcparse.c; sourceTree = "<group>"; };
                BEFC1E140C07861A00B0BB3C /* session.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = session.h; path = libtransmission/session.h; sourceTree = "<group>"; };
                BEFC1E150C07861A00B0BB3C /* inout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = inout.h; path = libtransmission/inout.h; sourceTree = "<group>"; };
                BEFC1E160C07861A00B0BB3C /* inout.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = inout.c; path = libtransmission/inout.c; sourceTree = "<group>"; };
                BEFC1E1F0C07861A00B0BB3C /* clients.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = clients.c; path = libtransmission/clients.c; sourceTree = "<group>"; };
                BEFC1E230C07861A00B0BB3C /* bencode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = bencode.h; path = libtransmission/bencode.h; sourceTree = "<group>"; };
                BEFC1E240C07861A00B0BB3C /* bencode.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = bencode.c; path = libtransmission/bencode.c; sourceTree = "<group>"; };
-               BEFC1E260C07861A00B0BB3C /* trcompat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = trcompat.h; path = libtransmission/trcompat.h; sourceTree = "<group>"; };
                D4AF3B2D0C41F7A500D46B6B /* list.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = list.c; path = libtransmission/list.c; sourceTree = "<group>"; };
                D4AF3B2E0C41F7A500D46B6B /* list.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = list.h; path = libtransmission/list.h; sourceTree = "<group>"; };
                E138A9730C04D88F00C5426C /* CTGradient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTGradient.h; sourceTree = "<group>"; };
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               A2AAB6B90DE0D55D00E04DDA /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                BE1183460CE160960002D0F3 /* Frameworks */ = {
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                                29B97316FDCFA39411CA2CEA /* main.m */,
                                4DF0C5AA0899190500DD8943 /* Controller.h */,
                                4DF0C5A90899190500DD8943 /* Controller.m */,
-                               A24D2A610C0A624600A0ED9F /* IPCController.h */,
-                               A24D2A620C0A624600A0ED9F /* IPCController.m */,
                                4DFBC2DD09C0970D00D5C571 /* Torrent.h */,
                                4DFBC2DE09C0970D00D5C571 /* Torrent.m */,
                                4D364D9E091FBB2C00377D12 /* TorrentTableView.h */,
                                BE75C3490C729E9500DBEFE0 /* libevent.a */,
                                BE1183480CE160960002D0F3 /* libminiupnp.a */,
                                3C7A118D0D0B2EB800B5701F /* libnatpmp.a */,
+                               A2AAB6BB0DE0D55D00E04DDA /* libshttpd.dylib */,
                        );
                        name = Products;
                        sourceTree = "<group>";
                                4DDBB70A09E16B3200284745 /* GUI */,
                                4DDBB71509E16B3F00284745 /* Libraries */,
                                BE75C3570C72A0D600DBEFE0 /* libevent */,
+                               A2AAB6C00DE0D57F00E04DDA /* shttpd */,
                                BE1183410CE15DF00002D0F3 /* libminiupnp */,
                                3C7A11880D0B2E6700B5701F /* libnatpmp */,
                                19C28FACFE9D520D11CA2CBB /* Products */,
                4D1838DC09DEC04A0047D688 /* libtransmission */ = {
                        isa = PBXGroup;
                        children = (
+                               A2AAB65B0DE0CF6200E04DDA /* rpc.c */,
+                               A2AAB6590DE0CF6200E04DDA /* rpc.h */,
+                               A2AAB6580DE0CF6200E04DDA /* rpc-server.c */,
+                               A2AAB65A0DE0CF6200E04DDA /* rpc-server.h */,
                                A29DF8B60DB2544C00D04E5A /* resume.c */,
                                A29DF8B70DB2544C00D04E5A /* resume.h */,
                                A29DF8B80DB2544C00D04E5A /* torrent.h */,
                                A2BE9C4E0C1E4ADA002D16E6 /* makemeta.c */,
                                A2BE9C4F0C1E4ADA002D16E6 /* makemeta.h */,
                                002C9EE50C19CD2500C2F6F4 /* fastresume.c */,
-                               A24D2A770C0A65C400A0ED9F /* ipcparse.c */,
-                               A24D2A780C0A65C400A0ED9F /* ipcparse.h */,
                                BEFC1DF00C07861A00B0BB3C /* version.h */,
                                BEFC1DF10C07861A00B0BB3C /* utils.h */,
                                BEFC1DF20C07861A00B0BB3C /* utils.c */,
                                BEFC1E0F0C07861A00B0BB3C /* natpmp.c */,
                                BEFC1E100C07861A00B0BB3C /* metainfo.h */,
                                BEFC1E110C07861A00B0BB3C /* metainfo.c */,
-                               BEFC1E120C07861A00B0BB3C /* ipcparse.h */,
-                               BEFC1E130C07861A00B0BB3C /* ipcparse.c */,
                                BEFC1E150C07861A00B0BB3C /* inout.h */,
                                BEFC1E160C07861A00B0BB3C /* inout.c */,
                                BEFC1E190C07861A00B0BB3C /* fdlimit.h */,
                                BEFC1E1F0C07861A00B0BB3C /* clients.c */,
                                BEFC1E230C07861A00B0BB3C /* bencode.h */,
                                BEFC1E240C07861A00B0BB3C /* bencode.c */,
-                               BEFC1E260C07861A00B0BB3C /* trcompat.h */,
                                A25D2CBA0CF4C7190096A262 /* stats.h */,
                                A25D2CBB0CF4C7190096A262 /* stats.c */,
                                A2D22A110D65EED100007D5F /* verify.h */,
                                A2D3078E0D9EC45F0051FD27 /* blocklist.c */,
                                A2D307920D9EC4800051FD27 /* ggets.h */,
                                A2D307900D9EC46B0051FD27 /* ggets.c */,
+                               A29EBE530DC01FC9006CEE80 /* web.h */,
+                               A29EBE520DC01FC9006CEE80 /* web.c */,
                        );
                        name = libtransmission;
                        sourceTree = "<group>";
                        name = "File Outline View";
                        sourceTree = "<group>";
                };
+               A2AAB6C00DE0D57F00E04DDA /* shttpd */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A2AAB6C10DE0D5A400E04DDA /* auth.c */,
+                               A2AAB6C20DE0D5A400E04DDA /* cgi.c */,
+                               A2AAB6C50DE0D5A400E04DDA /* compat_unix.c */,
+                               A2AAB6C60DE0D5A400E04DDA /* compat_unix.h */,
+                               A2AAB6C70DE0D5A400E04DDA /* config.c */,
+                               A2AAB6C80DE0D5A400E04DDA /* config.h */,
+                               A2AAB6CA0DE0D5A400E04DDA /* io_cgi.c */,
+                               A2AAB6CB0DE0D5A400E04DDA /* io_dir.c */,
+                               A2AAB6CC0DE0D5A400E04DDA /* io_emb.c */,
+                               A2AAB6CD0DE0D5A400E04DDA /* io_file.c */,
+                               A2AAB6CE0DE0D5A400E04DDA /* io_socket.c */,
+                               A2AAB6CF0DE0D5A400E04DDA /* io_ssl.c */,
+                               A2AAB6D20DE0D5A400E04DDA /* log.c */,
+                               A2AAB6D30DE0D5A400E04DDA /* md5.c */,
+                               A2AAB6D40DE0D5A400E04DDA /* md5.h */,
+                               A2AAB6D50DE0D5A400E04DDA /* shttpd.c */,
+                               A2AAB6D60DE0D5A400E04DDA /* shttpd.h */,
+                               A2AAB6DA0DE0D5A400E04DDA /* string.c */,
+                       );
+                       name = shttpd;
+                       sourceTree = "<group>";
+               };
                BE1183410CE15DF00002D0F3 /* libminiupnp */ = {
                        isa = PBXGroup;
                        children = (
                BE75C3570C72A0D600DBEFE0 /* libevent */ = {
                        isa = PBXGroup;
                        children = (
-                               A29EBE520DC01FC9006CEE80 /* web.c */,
-                               A29EBE530DC01FC9006CEE80 /* web.h */,
                                A2BC19DF0CA9D82300DD302A /* evutil.h */,
-                               4D36BBC80CA309AA00A63CA5 /* evutil.c */,
                                BE75C3810C72A1C100DBEFE0 /* evhttp.h */,
                                BE75C3820C72A1C100DBEFE0 /* evdns.h */,
                                BE75C3830C72A1C100DBEFE0 /* evrpc.h */,
                                BE75C3840C72A1C100DBEFE0 /* event.h */,
+                               4D36BBC80CA309AA00A63CA5 /* evutil.c */,
                                BE75C3580C72A0EF00DBEFE0 /* kqueue.c */,
                                BE75C3590C72A0EF00DBEFE0 /* signal.c */,
                                BE75C35A0C72A0EF00DBEFE0 /* buffer.c */,
                BEFC1C0B0C07754700B0BB3C /* daemon */ = {
                        isa = PBXGroup;
                        children = (
-                               A2D307950D9EC4C10051FD27 /* bsdtree.h */,
-                               A2BC19E30CA9D8F400DD302A /* bsdqueue.h */,
-                               BEFC1C0C0C07756200B0BB3C /* client.c */,
-                               BEFC1C0D0C07756200B0BB3C /* client.h */,
                                BEFC1C0E0C07756200B0BB3C /* daemon.c */,
-                               BEFC1C0F0C07756200B0BB3C /* errors.c */,
-                               BEFC1C100C07756200B0BB3C /* errors.h */,
-                               BEFC1C110C07756200B0BB3C /* misc.c */,
-                               BEFC1C120C07756200B0BB3C /* misc.h */,
-                               BEFC1C130C07756200B0BB3C /* proxy.c */,
                                BEFC1C140C07756200B0BB3C /* remote.c */,
-                               BEFC1C150C07756200B0BB3C /* server.c */,
-                               BEFC1C160C07756200B0BB3C /* server.h */,
-                               BEFC1C170C07756200B0BB3C /* torrents.c */,
-                               BEFC1C180C07756200B0BB3C /* torrents.h */,
                        );
                        name = daemon;
                        sourceTree = "<group>";
                                BEFC1E290C07861A00B0BB3C /* version.h in Headers */,
                                BEFC1E2A0C07861A00B0BB3C /* utils.h in Headers */,
                                BEFC1E2C0C07861A00B0BB3C /* upnp.h in Headers */,
+                               A2AAB65D0DE0CF6200E04DDA /* rpc.h in Headers */,
+                               A2AAB65E0DE0CF6200E04DDA /* rpc-server.h in Headers */,
                                BEFC1E2E0C07861A00B0BB3C /* transmission.h in Headers */,
                                BEFC1E300C07861A00B0BB3C /* tracker.h in Headers */,
                                BEFC1E350C07861A00B0BB3C /* port-forwarding.h in Headers */,
                                BEFC1E450C07861A00B0BB3C /* net.h in Headers */,
                                BEFC1E470C07861A00B0BB3C /* natpmp.h in Headers */,
                                BEFC1E490C07861A00B0BB3C /* metainfo.h in Headers */,
-                               BEFC1E4B0C07861A00B0BB3C /* ipcparse.h in Headers */,
                                BEFC1E4D0C07861A00B0BB3C /* session.h in Headers */,
                                BEFC1E4E0C07861A00B0BB3C /* inout.h in Headers */,
                                BEFC1E520C07861A00B0BB3C /* fdlimit.h in Headers */,
                                BEFC1E550C07861A00B0BB3C /* completion.h in Headers */,
                                BEFC1E570C07861A00B0BB3C /* clients.h in Headers */,
                                BEFC1E5C0C07861A00B0BB3C /* bencode.h in Headers */,
-                               BEFC1E5F0C07861A00B0BB3C /* trcompat.h in Headers */,
                                A2BE9C530C1E4AF7002D16E6 /* makemeta.h in Headers */,
                                D4AF3B300C41F7A600D46B6B /* list.h in Headers */,
                                A24621410C769D0900088E81 /* trevent.h in Headers */,
                                A29DF8BB0DB2544C00D04E5A /* torrent.h in Headers */,
                                A29DF8BD0DB2545A00D04E5A /* ggets.h in Headers */,
                                A29DF8BE0DB2545F00D04E5A /* verify.h in Headers */,
-                               A29EBE550DC01FC9006CEE80 /* web.h in Headers */,
+                               A2AAB6650DE0D08B00E04DDA /* blocklist.h in Headers */,
+                               A2A4E9210DE0F7E9000CE197 /* web.h in Headers */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               A2AAB6B70DE0D55D00E04DDA /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        productReference = 8D1107320486CEB800E47090 /* Transmission.app */;
                        productType = "com.apple.product-type.application";
                };
+               A2AAB6BA0DE0D55D00E04DDA /* shttpd */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = A2AAB6BF0DE0D56200E04DDA /* Build configuration list for PBXNativeTarget "shttpd" */;
+                       buildPhases = (
+                               A2AAB6B70DE0D55D00E04DDA /* Headers */,
+                               A2AAB6B80DE0D55D00E04DDA /* Sources */,
+                               A2AAB6B90DE0D55D00E04DDA /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = shttpd;
+                       productName = shttpd;
+                       productReference = A2AAB6BB0DE0D55D00E04DDA /* libshttpd.dylib */;
+                       productType = "com.apple.product-type.library.dynamic";
+               };
                BE1183470CE160960002D0F3 /* miniupnp */ = {
                        isa = PBXNativeTarget;
                        buildConfigurationList = BE11834C0CE160A80002D0F3 /* Build configuration list for PBXNativeTarget "miniupnp" */;
                                BEFC1CEA0C07822400B0BB3C /* transmission-remote */,
                                BEFC1D340C0783EE00B0BB3C /* transmission-proxy */,
                                BE75C3480C729E9500DBEFE0 /* event */,
+                               A2AAB6BA0DE0D55D00E04DDA /* shttpd */,
                                BE1183470CE160960002D0F3 /* miniupnp */,
                                3C7A118C0D0B2EB800B5701F /* natpmp */,
                        );
                        buildActionMask = 2147483647;
                        files = (
                                BEFC1E2B0C07861A00B0BB3C /* utils.c in Sources */,
+                               A2AAB65F0DE0CF6200E04DDA /* rpc.c in Sources */,
                                BEFC1E2D0C07861A00B0BB3C /* upnp.c in Sources */,
+                               A2AAB65C0DE0CF6200E04DDA /* rpc-server.c in Sources */,
                                BEFC1E2F0C07861A00B0BB3C /* session.c in Sources */,
                                BEFC1E310C07861A00B0BB3C /* tracker.c in Sources */,
                                BEFC1E320C07861A00B0BB3C /* torrent.c in Sources */,
                                BEFC1E460C07861A00B0BB3C /* net.c in Sources */,
                                BEFC1E480C07861A00B0BB3C /* natpmp.c in Sources */,
                                BEFC1E4A0C07861A00B0BB3C /* metainfo.c in Sources */,
-                               BEFC1E4C0C07861A00B0BB3C /* ipcparse.c in Sources */,
                                BEFC1E4F0C07861A00B0BB3C /* inout.c in Sources */,
                                BEFC1E530C07861A00B0BB3C /* fdlimit.c in Sources */,
                                BEFC1E560C07861A00B0BB3C /* completion.c in Sources */,
                                4D4ADFC70DA1631500A68297 /* blocklist.c in Sources */,
                                A29DF8B90DB2544C00D04E5A /* resume.c in Sources */,
                                A29DF8BC0DB2545900D04E5A /* ggets.c in Sources */,
-                               A29EBE540DC01FC9006CEE80 /* web.c in Sources */,
+                               A2A4E9220DE0F7EB000CE197 /* web.c in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                A2FB057F0BFEB6800095564D /* DragOverlayView.m in Sources */,
                                E138A9770C04D88F00C5426C /* CTGradient.m in Sources */,
                                E138A9780C04D88F00C5426C /* CTGradientAdditions.m in Sources */,
-                               A24D2A640C0A624600A0ED9F /* IPCController.m in Sources */,
                                A215760B0C0D449A0057A26A /* NSBezierPathAdditions.m in Sources */,
                                A2DF37070C220D03006523C1 /* CreatorWindowController.m in Sources */,
                                35F373030C2DA89000DAA8F2 /* FilePriorityCell.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               A2AAB6B80DE0D55D00E04DDA /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               A2AAB6DB0DE0D5A400E04DDA /* auth.c in Sources */,
+                               A2AAB6DC0DE0D5A400E04DDA /* cgi.c in Sources */,
+                               A2AAB6DF0DE0D5A500E04DDA /* compat_unix.c in Sources */,
+                               A2AAB6E10DE0D5A500E04DDA /* config.c in Sources */,
+                               A2AAB6E40DE0D5A500E04DDA /* io_cgi.c in Sources */,
+                               A2AAB6E50DE0D5A500E04DDA /* io_dir.c in Sources */,
+                               A2AAB6E60DE0D5A500E04DDA /* io_emb.c in Sources */,
+                               A2AAB6E70DE0D5A500E04DDA /* io_file.c in Sources */,
+                               A2AAB6E80DE0D5A500E04DDA /* io_socket.c in Sources */,
+                               A2AAB6E90DE0D5A500E04DDA /* io_ssl.c in Sources */,
+                               A2AAB6EC0DE0D5A500E04DDA /* log.c in Sources */,
+                               A2AAB6ED0DE0D5A500E04DDA /* md5.c in Sources */,
+                               A2AAB6EF0DE0D5A500E04DDA /* shttpd.c in Sources */,
+                               A2AAB6F40DE0D5A600E04DDA /* string.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                BE1183450CE160960002D0F3 /* Sources */ = {
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        buildActionMask = 2147483647;
                        files = (
                                BEFC1C1A0C07756200B0BB3C /* daemon.c in Sources */,
-                               BEFC1C1B0C07756200B0BB3C /* errors.c in Sources */,
-                               BEFC1C1C0C07756200B0BB3C /* misc.c in Sources */,
-                               BEFC1C1F0C07756200B0BB3C /* server.c in Sources */,
-                               BEFC1C200C07756200B0BB3C /* torrents.c in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               BEFC1CEF0C07822400B0BB3C /* errors.c in Sources */,
-                               BEFC1D000C07824D00B0BB3C /* torrents.c in Sources */,
                                BEFC1D050C07825A00B0BB3C /* remote.c in Sources */,
-                               BEFC1D0E0C07827300B0BB3C /* misc.c in Sources */,
-                               BEFC1D230C07839E00B0BB3C /* client.c in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               BEFC1D490C07842200B0BB3C /* proxy.c in Sources */,
-                               BEFC1D4F0C07843400B0BB3C /* misc.c in Sources */,
-                               BEFC1D540C07843900B0BB3C /* errors.c in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                0053D3D30C86774200545606 /* Development */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
+                               GCC_ENABLE_SYMBOL_SEPARATION = NO;
+                               GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
                                OTHER_CFLAGS = "-DHAVE_CONFIG_H";
                                PRODUCT_NAME = event;
                                USER_HEADER_SEARCH_PATHS = "third-party/libevent";
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                HEADER_SEARCH_PATHS = (
+                                       "third-party/shttpd",
                                        "third-party/libevent",
                                        "third-party",
                                );
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                HEADER_SEARCH_PATHS = (
+                                       "third-party/shttpd",
                                        "third-party/libevent",
                                        "third-party",
                                );
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                HEADER_SEARCH_PATHS = (
+                                       "third-party/shttpd",
                                        "third-party/libevent",
                                        "third-party",
                                );
                        };
                        name = "Release - Debug";
                };
+               A2AAB6BC0DE0D55E00E04DDA /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = YES;
+                               DEBUG_INFORMATION_FORMAT = dwarf;
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_MODEL_TUNING = G5;
+                               INSTALL_PATH = /usr/local/lib;
+                               MACH_O_TYPE = staticlib;
+                               PREBINDING = NO;
+                               PRODUCT_NAME = shttpd;
+                               USER_HEADER_SEARCH_PATHS = "third-party/shttpd";
+                               ZERO_LINK = NO;
+                       };
+                       name = Release;
+               };
+               A2AAB6BD0DE0D55E00E04DDA /* Release - Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               DEBUG_INFORMATION_FORMAT = dwarf;
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               INSTALL_PATH = /usr/local/lib;
+                               MACH_O_TYPE = staticlib;
+                               PREBINDING = NO;
+                               PRODUCT_NAME = shttpd;
+                               USER_HEADER_SEARCH_PATHS = "third-party/shttpd";
+                       };
+                       name = "Release - Debug";
+               };
+               A2AAB6BE0DE0D55E00E04DDA /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = YES;
+                               COPY_PHASE_STRIP = YES;
+                               DEBUG_INFORMATION_FORMAT = dwarf;
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               INSTALL_PATH = /usr/local/lib;
+                               MACH_O_TYPE = staticlib;
+                               PREBINDING = NO;
+                               PRODUCT_NAME = shttpd;
+                               SEPARATE_STRIP = YES;
+                               SKIP_INSTALL = YES;
+                               USER_HEADER_SEARCH_PATHS = "third-party/shttpd";
+                       };
+                       name = Development;
+               };
                BE1183490CE160960002D0F3 /* Release */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Development;
                };
+               A2AAB6BF0DE0D56200E04DDA /* Build configuration list for PBXNativeTarget "shttpd" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               A2AAB6BC0DE0D55E00E04DDA /* Release */,
+                               A2AAB6BD0DE0D55E00E04DDA /* Release - Debug */,
+                               A2AAB6BE0DE0D55E00E04DDA /* Development */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Development;
+               };
                BE11834C0CE160A80002D0F3 /* Build configuration list for PBXNativeTarget "miniupnp" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
index 928aab9ac9a24a298715ff19a669143b290d178c..81e8b2e0f97fc69e5884c40ede8de18b4dd7e5a0 100644 (file)
@@ -33,7 +33,6 @@
 #import "StatusBarView.h"
 #import "FilterButton.h"
 #import "MenuLabel.h"
-#import "IPCController.h"
 
 #import <Growl/Growl.h>
 
@@ -56,7 +55,6 @@ typedef enum
     PrefsController                 * fPrefsController;
     InfoWindowController            * fInfoController;
     MessageWindowController         * fMessageController;
-    IPCController                   * fIPCController;
     
     NSUserDefaults                  * fDefaults;
     
index 91d4037b64a4696060dc5e8fa9d35b96074ae1d0..f5f57d2aff649766b3b42e2ef8ddebad4996a197 100644 (file)
@@ -194,21 +194,21 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
     {
         fDefaults = [NSUserDefaults standardUserDefaults];
         
-        fLib = tr_initFull(NULL, /* use default config directory (Application Support) */
-                        "macosx",
-                        [fDefaults boolForKey: @"PEXGlobal"],
-                        [fDefaults boolForKey: @"NatTraversal"],
-                        [fDefaults integerForKey: @"BindPort"],
-                        TR_ENCRYPTION_PREFERRED, /* reset in prefs */
-                        FALSE, /* reset in prefs */
-                        -1, /* reset in prefs */
-                        FALSE, /* reset in prefs */
-                        -1, /* reset in prefs */
-                        [fDefaults integerForKey: @"PeersTotal"],
-                        [fDefaults integerForKey: @"MessageLevel"],
-                        YES,
-                        [fDefaults boolForKey: @"Blocklist"],
-                        TR_DEFAULT_PEER_SOCKET_TOS );
+        fLib = tr_sessionInitFull(NULL, /* use default config directory (Application Support) */
+                                "macosx",
+                                [fDefaults boolForKey: @"PEXGlobal"],
+                                [fDefaults boolForKey: @"NatTraversal"],
+                                [fDefaults integerForKey: @"BindPort"],
+                                TR_ENCRYPTION_PREFERRED, /* reset in prefs */
+                                FALSE, /* reset in prefs */
+                                -1, /* reset in prefs */
+                                FALSE, /* reset in prefs */
+                                -1, /* reset in prefs */
+                                [fDefaults integerForKey: @"PeersTotal"],
+                                [fDefaults integerForKey: @"MessageLevel"],
+                                YES,
+                                [fDefaults boolForKey: @"Blocklist"],
+                                TR_DEFAULT_PEER_SOCKET_TOS );
         
         [NSApp setDelegate: self];
         
@@ -223,9 +223,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
         
         fSoundPlaying = NO;
         
-        fIPCController = [[IPCController alloc] init];
-        [fIPCController setDelegate: self];
-        [fIPCController setPrefsController: fPrefsController];
         fRemoteQuit = NO;
         
         [GrowlApplicationBridge setGrowlDelegate: self];
@@ -597,14 +594,13 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
     [fDisplayedTorrents release];
     
     [fOverlayWindow release];
-    [fIPCController release];
     
     [fAutoImportedNames release];
     [fPendingTorrentDownloads release];
     [fTempTorrentFiles release];
     
     //complete cleanup
-    tr_close(fLib);
+    tr_sessionClose(fLib);
     
     [fBadger release]; //clears dock icon on 10.4
 }
diff --git a/macosx/IPCController.h b/macosx/IPCController.h
deleted file mode 100644 (file)
index d8f8e12..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/******************************************************************************
- * $Id$
- *
- * Copyright (c) 2007-2008 Transmission authors and contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *****************************************************************************/
-
-#import <Cocoa/Cocoa.h>
-
-#include "ipcparse.h"
-@class PrefsController;
-@interface NSObject (IPCControllerDelegate)
-
-- (void)                    ipcQuit;
-- (NSArray *)    ipcGetTorrentsByID: (NSArray *) idlist;
-- (NSArray *)  ipcGetTorrentsByHash: (NSArray *) hashlist;
-- (BOOL)             ipcAddTorrents: (NSArray *) torrents;
-- (BOOL)          ipcAddTorrentFile: (NSString *) path
-                          directory: (NSString *) dir;
-- (BOOL) ipcAddTorrentFileAutostart: (NSString *) path
-                          directory: (NSString *) dir
-                          autostart: (BOOL) autostart;
-- (BOOL)          ipcAddTorrentData: (NSData *) data
-                          directory: (NSString *) dir;
-- (BOOL) ipcAddTorrentDataAutostart: (NSData *) data
-                          directory: (NSString *) dir
-                          autostart: (BOOL) autostart;
-- (BOOL)           ipcStartTorrents: (NSArray *) torrents;
-- (BOOL)            ipcStopTorrents: (NSArray *) torrents;
-- (BOOL)          ipcVerifyTorrents: (NSArray *) torrents;
-- (BOOL)          ipcRemoveTorrents: (NSArray *) torrents;
-/* XXX how to get and set prefs nicely? */
-
-@end
-
-@interface IPCController : NSObject
-{
-    NSSocketPort     * _sock;
-    NSFileHandle     * _listen;
-    struct ipc_funcs * _funcs;
-    NSMutableArray   * _clients;
-    id                 _delegate;
-}
-
-
-- (id) init;
-- (id)      delegate;
-- (void) setDelegate: (id) newdelegate;
-- (void) setPrefsController: (id) thePrefsController;
-
-@end
diff --git a/macosx/IPCController.m b/macosx/IPCController.m
deleted file mode 100644 (file)
index b10d584..0000000
+++ /dev/null
@@ -1,1077 +0,0 @@
-/******************************************************************************
- * $Id$
- *
- * Copyright (c) 2007-2008 Transmission authors and contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *****************************************************************************/
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <assert.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "bencode.h"
-#include "ipcparse.h"
-#include "transmission.h"
-#include "utils.h"
-
-#import "IPCController.h"
-#import "Torrent.h"
-#import "PrefsController.h"
-
-static void
-getaddr( struct sockaddr_un * );
-static NSArray *
-bencarray( benc_val_t * val, int type );
-static void
-msg_lookup   ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-static void
-msg_info     ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_infoall  ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_action   ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_actionall( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_addold   ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_addnew   ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_getbool  ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_getint   ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_getstr   ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_setbool  ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_setint   ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_setstr   ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_empty    ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-void
-msg_sup      ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-static void
-msg_default  ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
-
-@interface IPCClient : NSObject
-{
-    NSFileHandle    * _handle;
-    struct ipc_info * _ipc;
-    IPCController   * _controller;
-    NSMutableData   * _buf;
-}
-
-- (id)              initClient: (IPCController *) controller
-                         funcs: (struct ipc_funcs *) funcs
-                        handle: (NSFileHandle *) handle;
-- (IPCController *) controller;
-- (struct ipc_info *)      ipc;
-- (void)               gotdata: (NSNotification *) notification;
-- (BOOL)              sendresp: (uint8_t *) buf
-                          size: (size_t) size;
-- (BOOL)         sendrespEmpty: (enum ipc_msg) msgid
-                           tag: (int64_t) tag;
-- (BOOL)           sendrespInt: (enum ipc_msg) msgid
-                           tag: (int64_t) tag
-                           val: (int64_t) val;
-- (BOOL)           sendrespStr: (enum ipc_msg) msgid
-                           tag: (int64_t) tag
-                           val: (NSString *) val;
-- (void)          sendrespInfo: (enum ipc_msg) respid
-                           tag: (int64_t) tag
-                      torrents: (NSArray *) tors
-                         types: (int) types;
-
-@end
-
-@interface IPCController (Private)
-
-- (void)  newclient: (NSNotification *) notification;
-- (void) killclient: (IPCClient *) client;
-
-NSUserDefaults          * fDefaults;
-PrefsController         * fPrefsController;
-
-
-@end
-
-@implementation IPCController
-
-- (id) init
-{
-    struct sockaddr_un sun;
-
-    self = [super init];
-    if( nil == self )
-        return nil;
-
-    getaddr( &sun );
-    unlink( sun.sun_path );
-    _sock    = [[NSSocketPort alloc]
-                   initWithProtocolFamily: PF_UNIX
-                               socketType: SOCK_STREAM
-                                 protocol: 0
-                                  address: [NSData dataWithBytes: &sun
-                                                          length: sizeof(sun)]];
-    _listen  = [[NSFileHandle alloc]
-                   initWithFileDescriptor: [_sock socket]
-                           closeOnDealloc: YES];
-    _funcs   = ipc_initmsgs();
-    _clients = [[NSMutableArray alloc] init];
-
-    /* XXX is this error checking bogus? */
-    if( nil  == _sock    ||
-        nil  == _listen  ||
-        NULL == _funcs   ||
-        nil  == _clients )
-    {
-        [self release];
-        return nil;
-    }
-
-    ipc_addmsg( _funcs, IPC_MSG_ADDMANYFILES, msg_addold    );
-    ipc_addmsg( _funcs, IPC_MSG_ADDONEFILE,   msg_addnew    );
-    ipc_addmsg( _funcs, IPC_MSG_AUTOMAP,      msg_setbool   );
-    ipc_addmsg( _funcs, IPC_MSG_AUTOSTART,    msg_setbool   );
-    ipc_addmsg( _funcs, IPC_MSG_CRYPTO,       msg_setstr    );
-    ipc_addmsg( _funcs, IPC_MSG_DIR,          msg_setstr    );
-    ipc_addmsg( _funcs, IPC_MSG_DOWNLIMIT,    msg_setint    );
-    ipc_addmsg( _funcs, IPC_MSG_GETAUTOMAP,   msg_getbool   );
-    ipc_addmsg( _funcs, IPC_MSG_GETAUTOSTART, msg_getbool   );
-    ipc_addmsg( _funcs, IPC_MSG_GETCRYPTO,    msg_getstr    );
-    ipc_addmsg( _funcs, IPC_MSG_GETDIR,       msg_getstr    );
-    ipc_addmsg( _funcs, IPC_MSG_GETDOWNLIMIT, msg_getint    );
-    ipc_addmsg( _funcs, IPC_MSG_GETINFO,      msg_info      );
-    ipc_addmsg( _funcs, IPC_MSG_GETINFOALL,   msg_infoall   );
-    ipc_addmsg( _funcs, IPC_MSG_GETPEX,       msg_getbool   );
-    ipc_addmsg( _funcs, IPC_MSG_GETPORT,      msg_getint    );
-    ipc_addmsg( _funcs, IPC_MSG_GETSTAT,      msg_info      );
-    ipc_addmsg( _funcs, IPC_MSG_GETSTATALL,   msg_infoall   );
-    ipc_addmsg( _funcs, IPC_MSG_GETUPLIMIT,   msg_getint    );
-    ipc_addmsg( _funcs, IPC_MSG_LOOKUP,       msg_lookup    );
-    ipc_addmsg( _funcs, IPC_MSG_NOOP,         msg_empty     );
-    ipc_addmsg( _funcs, IPC_MSG_PEX,          msg_setbool   );
-    ipc_addmsg( _funcs, IPC_MSG_PORT,         msg_setint    );
-    ipc_addmsg( _funcs, IPC_MSG_QUIT,         msg_empty     );
-    ipc_addmsg( _funcs, IPC_MSG_REMOVE,       msg_action    );
-    ipc_addmsg( _funcs, IPC_MSG_REMOVEALL,    msg_actionall );
-    ipc_addmsg( _funcs, IPC_MSG_START,        msg_action    );
-    ipc_addmsg( _funcs, IPC_MSG_STARTALL,     msg_actionall );
-    ipc_addmsg( _funcs, IPC_MSG_STOP,         msg_action    );
-    ipc_addmsg( _funcs, IPC_MSG_STOPALL,      msg_actionall );
-    ipc_addmsg( _funcs, IPC_MSG_SUP,          msg_sup       );
-    ipc_addmsg( _funcs, IPC_MSG_UPLIMIT,      msg_setint    );
-    ipc_addmsg( _funcs, IPC_MSG_VERIFY,       msg_action    );
-    ipc_setdefmsg( _funcs, msg_default );
-
-    [[NSNotificationCenter defaultCenter]
-        addObserver: self
-           selector: @selector(newclient:)
-               name: NSFileHandleConnectionAcceptedNotification
-             object: _listen];
-    [_listen acceptConnectionInBackgroundAndNotify];
-
-    return self;
-}
-
-- (void) dealloc
-{
-    struct sockaddr_un sun;
-
-    [[NSNotificationCenter defaultCenter] removeObserver: self];
-    [_listen  release];
-    [_sock    release];
-    [_clients release];
-    ipc_freemsgs( _funcs );
-    getaddr( &sun );
-    unlink( sun.sun_path );
-    [super dealloc];
-}
-
-- (id) delegate
-{
-    return _delegate;
-}
-
-- (void) setDelegate: (id) newdelegate
-{
-    _delegate = newdelegate;
-}
-
-- (void) setPrefsController: (id) thePrefsController
-{
-    fPrefsController = thePrefsController;
-}
-
-@end
-
-@implementation IPCController (Private)
-
-- (void) newclient: (NSNotification *) notification
-{
-    NSDictionary * info;
-    NSFileHandle * handle;
-    NSNumber     * error;
-    IPCClient    * client;
-    
-
-    info   = [notification userInfo];
-    handle = [info objectForKey: NSFileHandleNotificationFileHandleItem];
-    error  = [info objectForKey: @"NSFileHandleError"];
-
-    if( nil != error )
-    {
-        NSLog( @"Failed to accept IPC socket connection: %@", error );
-        return;
-    }
-
-    [_listen acceptConnectionInBackgroundAndNotify];
-
-    if( nil == handle )
-        return;
-
-    client = [[IPCClient alloc]
-                 initClient: self
-                      funcs: _funcs
-                     handle: handle];
-    if( nil == client )
-        return;
-
-    [_clients addObject:client];
-    [client release];
-}
-
-- (void) killclient: (IPCClient *) client
-{
-    [_clients removeObject: client];
-}
-
-@end
-
-@implementation IPCClient
-
-- (id) initClient: (IPCController *) controller
-            funcs: (struct ipc_funcs *) funcs
-           handle: (NSFileHandle *) handle
-{
-    uint8_t * buf;
-    size_t    size;
-
-    self = [super init];
-    if( nil == self )
-        return nil;
-
-    _handle     = [handle retain];
-    _ipc        = ipc_newcon( funcs );
-    _controller = controller;
-    _buf        = [[NSMutableData alloc] init];
-
-    buf = ipc_mkvers( &size, "Transmission Mac OS X " LONG_VERSION_STRING );
-    if( NULL == _ipc || nil == _buf || NULL == buf ||
-        ![self sendresp: buf size: size] )
-    {
-        [self release];
-        return nil;
-    }
-
-    [[NSNotificationCenter defaultCenter]
-        addObserver: self
-           selector: @selector(gotdata:)
-               name: NSFileHandleReadCompletionNotification
-             object: _handle];
-    [_handle readInBackgroundAndNotify];
-
-    return self;
-}
-
-- (void) dealloc
-{
-    [[NSNotificationCenter defaultCenter] removeObserver: self];
-    [_handle release];
-    [_buf    release];
-    ipc_freecon( _ipc );
-    [super   dealloc];
-}
-
-- (IPCController *) controller
-{
-    return _controller;
-}
-
-- (struct ipc_info *) ipc
-{
-    return _ipc;
-}
-
-- (void) gotdata: (NSNotification *) notification
-{
-    NSDictionary * info;
-    NSData       * data;
-    NSNumber     * error;
-    ssize_t        res;
-
-    info  = [notification userInfo];
-    data  = [info objectForKey: NSFileHandleNotificationDataItem];
-    error = [info objectForKey: @"NSFileHandleError"];
-
-    if( nil != error )
-    {
-        NSLog( @"Failed to read from IPC socket connection: %@", error );
-        [_controller killclient: self];
-        return;
-    }
-
-    if( nil == data || 0 == [data length] )
-    {
-        [_controller killclient: self];
-        return;
-    }
-
-    [_handle readInBackgroundAndNotify];
-    [_buf appendData: data];
-
-    if( IPC_MIN_MSG_LEN > [_buf length] )
-        return;
-
-    res = ipc_handleMessages( _ipc, [_buf mutableBytes], [_buf length], self );
-
-    if( 0 > res )
-    {
-        switch( errno )
-        {
-            case EPERM:
-                NSLog( @"IPC client has unsupported protocol version" );
-                break;
-            case EINVAL:
-                NSLog( @"IPC protocol parse error" );
-                break;
-            default:
-                NSLog( @"IPC parsing failed" );
-                break;
-        }
-        [_controller killclient: self];
-        return;
-    }
-    else if( 0 < res )
-    {
-        assert( res <= [_buf length]);
-        if( res < [_buf length])
-        {
-            memmove( [_buf mutableBytes], [_buf bytes] + res,
-                     [_buf length] - res );
-        }
-        [_buf setLength: ([_buf length] - res)];
-    }
-}
-
-- (BOOL) sendresp: (uint8_t *) buf
-             size: (size_t) size
-{
-    @try
-    {
-        [_handle writeData: [NSData dataWithBytesNoCopy: buf
-                                                 length: size
-                                           freeWhenDone: YES]];
-        return YES;
-    }
-    @catch( NSException * ex )
-    {
-        NSLog( @"Failed to write to IPC socket connection" );
-        return NO;
-    }
-}
-
-- (BOOL) sendrespEmpty: (enum ipc_msg) msgid
-                   tag: (int64_t) tag
-{
-    uint8_t * buf;
-    size_t    size;
-
-    buf = ipc_mkempty( _ipc, &size, msgid, tag );
-    if( NULL == buf )
-        return NO;
-
-    return [self sendresp: buf
-                     size: size];
-}
-
-- (BOOL) sendrespInt: (enum ipc_msg) msgid
-                 tag: (int64_t) tag
-                 val: (int64_t) val
-{
-    uint8_t * buf;
-    size_t    size;
-
-    buf = ipc_mkint( _ipc, &size, msgid, tag, val );
-    if( NULL == buf )
-        return NO;
-
-    return [self sendresp: buf
-                     size: size];
-}
-
-- (BOOL) sendrespStr: (enum ipc_msg) msgid
-                 tag: (int64_t) tag
-                 val: (NSString *) val
-{
-    uint8_t       * buf;
-    size_t          size;
-    NSData        * data;
-    NSMutableData * sucky;
-
-    if( [val canBeConvertedToEncoding: NSUTF8StringEncoding] )
-        buf = ipc_mkstr( _ipc, &size, msgid, tag,
-                         [val cStringUsingEncoding: NSUTF8StringEncoding] );
-    else
-    {
-        data = [val dataUsingEncoding: NSUTF8StringEncoding
-                 allowLossyConversion: YES];
-        /* XXX this sucks, I should add a length argument to ipc_mkstr() */
-        sucky = [NSMutableData dataWithData: data];
-        [sucky appendBytes: "" length: 1];
-        buf = ipc_mkstr( _ipc, &size, msgid, tag, [sucky bytes] );
-    }
-    if( NULL == buf )
-        return NO;
-
-    return [self sendresp: buf
-                     size: size];
-}
-
-- (void) sendrespInfo: (enum ipc_msg) respid
-                  tag: (int64_t) tag
-             torrents: (NSArray *) tors
-                types: (int) types
-{
-    benc_val_t     packet, * pkinf;
-    NSEnumerator * enumerator;
-    Torrent      * tor;
-    uint8_t      * buf;
-    size_t         size;
-    int            res;
-
-    pkinf = ipc_initval( _ipc, respid, tag, &packet, TYPE_LIST );
-    if( NULL == pkinf )
-        goto fail;
-    if( tr_bencListReserve( pkinf, [tors count] ) )
-    {
-        tr_bencFree( &packet );
-        goto fail;
-    }
-
-    enumerator = [tors objectEnumerator];
-    while( nil != ( tor = [enumerator nextObject] ) )
-    {
-        if( IPC_MSG_INFO == respid )
-            res = ipc_addinfo( pkinf, [tor torrentID], [tor torrentStruct], types );
-        else
-            res = ipc_addstat( pkinf, [tor torrentID], [tor torrentStruct], types );
-        if( 0 > res )
-        {
-            tr_bencFree( &packet );
-            goto fail;
-        }
-    }
-
-    buf = ipc_serialize( &packet, &size );
-    tr_bencFree( &packet );
-    if( NULL == buf )
-        goto fail;
-    [self sendresp: buf size: size ];
-    return;
-
-  fail:
-    NSLog( @"Failed to create IPC reply packet" );
-    [_controller killclient: self];
-}
-
-
-@end
-
-void getaddr( struct sockaddr_un * sun )
-{
-    bzero( sun, sizeof *sun );
-    sun->sun_family = AF_LOCAL;
-    tr_buildPath( sun->sun_path, sizeof( sun->sun_path ), tr_getDefaultConfigDir(), "socket", NULL );
-}
-
-NSArray * bencarray( benc_val_t * val, int type )
-{
-    int              ii;
-    NSMutableArray * ret;
-    benc_val_t     * item;
-
-    assert( TYPE_STR == type || TYPE_INT == type );
-
-    if( NULL == val || TYPE_LIST != val->type )
-        return nil;
-
-    ret = [NSMutableArray arrayWithCapacity: val->val.l.count];
-    for( ii = 0; ii < val->val.l.count; ii++ )
-    {
-        item = &val->val.l.vals[ii];
-        if( type != item->type )
-            return nil;
-        if( TYPE_STR == type )
-        {
-            [ret addObject: [NSString stringWithCString: item->val.s.s
-                                               encoding: NSUTF8StringEncoding]];
-        }
-        else
-        {
-            [ret addObject: [NSNumber numberWithLongLong: (long long) item->val.i]];
-        }
-    }
-
-    return ret;
-}
-
-void msg_lookup( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient      * client = arg;
-    NSArray        * hashes, * tors;
-
-    hashes = bencarray( val, TYPE_STR );
-    if( NULL == hashes )
-    {
-        [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-        return;
-    }
-
-    tors  = [[[client controller] delegate] ipcGetTorrentsByHash: hashes];
-    [client sendrespInfo: IPC_MSG_INFO
-                     tag: tag
-                torrents: tors
-                   types: IPC_INF_HASH];
-}
-
-void msg_info( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient  * client = arg;
-    enum ipc_msg respid;
-    benc_val_t * typesval;
-    int          types;
-    NSArray    * ids, * tors;
-
-    if( NULL == val || TYPE_DICT != val->type )
-        goto bad;
-
-    typesval = tr_bencDictFind( val, "type" );
-    if( NULL == typesval || TYPE_LIST != typesval->type ||
-        nil == ( ids = bencarray( tr_bencDictFind( val, "id" ), TYPE_INT ) ) )
-        goto bad;
-
-    respid = ( IPC_MSG_GETINFO == msgid ? IPC_MSG_INFO : IPC_MSG_STAT );
-    tors   = [[[client controller] delegate] ipcGetTorrentsByID: ids];
-    types  = ipc_infotypes( respid, typesval );
-    [client sendrespInfo: respid tag: tag torrents: tors types: types];
-    return;
-
-  bad:
-    NSLog( @"Got bad IPC packet" );
-    [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-}
-
-void msg_infoall( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient  * client = arg;
-    enum ipc_msg respid;
-    int          types;
-    NSArray    * tors;
-
-    if( NULL == val || TYPE_LIST != val->type )
-    {
-        NSLog( @"Got bad IPC packet" );
-        [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-        return;
-    }
-
-    respid = ( IPC_MSG_GETINFOALL == msgid ? IPC_MSG_INFO : IPC_MSG_STAT );
-    tors   = [[[client controller] delegate] ipcGetTorrentsByID: nil];
-    types  = ipc_infotypes( respid, val );
-    [client sendrespInfo: respid tag: tag torrents: tors types: types];
-}
-
-void msg_action( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-    BOOL        res;
-    NSArray   * ids, * tors;
-    id          delegate;
-
-    ids = bencarray( val, TYPE_INT );
-    if( nil == ids )
-    {
-        NSLog( @"Got bad IPC packet" );
-        [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-        return;
-    }
-
-    delegate = [[client controller] delegate];
-    tors     = [delegate ipcGetTorrentsByID: ids];
-    switch( msgid )
-    {
-        case IPC_MSG_REMOVE:
-            res = [delegate ipcRemoveTorrents: tors];
-            break;
-        case IPC_MSG_START:
-            res = [delegate ipcStartTorrents: tors];
-            break;
-        case IPC_MSG_STOP:
-            res = [delegate ipcStopTorrents: tors];
-            break;
-        case IPC_MSG_VERIFY:
-            res = [delegate ipcVerifyTorrents: tors];
-            break;
-        default:
-            assert( 0 );
-            return;
-    }
-
-    if( res )
-        [client sendrespEmpty: IPC_MSG_OK tag: tag];
-    else
-        [client sendrespEmpty: IPC_MSG_FAIL tag: tag];
-}
-
-void msg_actionall( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-    BOOL        res;
-    NSArray   * tors;
-    id          delegate;
-
-    delegate = [[client controller] delegate];
-    tors     = [delegate ipcGetTorrentsByID: nil];
-    switch( msgid )
-    {
-        case IPC_MSG_REMOVEALL:
-            res = [delegate ipcRemoveTorrents: tors];
-            break;
-        case IPC_MSG_STARTALL:
-            res = [delegate ipcStartTorrents: tors];
-            break;
-        case IPC_MSG_STOPALL:
-            res = [delegate ipcStopTorrents: tors];
-            break;
-        default:
-            assert( 0 );
-            return;
-    }
-
-    if( res )
-        [client sendrespEmpty: IPC_MSG_OK tag: tag];
-    else
-        [client sendrespEmpty: IPC_MSG_FAIL tag: tag];
-}
-
-void msg_addold( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-    NSArray   * paths;
-
-    paths = bencarray( val, TYPE_STR );
-    if( nil == paths )
-    {
-        NSLog( @"Got bad IPC packet" );
-        [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-        return;
-    }
-
-    /* XXX should send back info message with torrent IDs */
-    if( [[[client controller] delegate] ipcAddTorrents: paths] )
-        [client sendrespEmpty: IPC_MSG_OK tag: tag];
-    else
-        [client sendrespEmpty: IPC_MSG_FAIL tag: tag];
-}
-
-void msg_addnew( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient  * client = arg;
-    benc_val_t * fileval, * dataval, * dirval, * autoval;
-    NSString   * file, * dir;
-    NSData     * data;
-    BOOL         autobool, res;
-
-    if( NULL == val || TYPE_DICT != val->type )
-        goto bad;
-
-    fileval = tr_bencDictFind( val, "file" );
-    dataval = tr_bencDictFind( val, "data" );
-    dirval  = tr_bencDictFind( val, "directory" );
-    autoval = tr_bencDictFind( val, "autostart" );
-    if( ( ( NULL == fileval || TYPE_STR != fileval->type )   &&
-          ( NULL == dataval || TYPE_STR != dataval->type ) ) ||
-        ( ( NULL != fileval && TYPE_STR == fileval->type )   &&
-          ( NULL != dataval && TYPE_STR == dataval->type ) ) ||
-          ( NULL != dirval  && TYPE_STR != dirval->type  )   ||
-          ( NULL != autoval && TYPE_INT != autoval->type ) )
-        goto bad;
-
-    dir = ( NULL == dirval ? nil :
-            [NSString stringWithCString: dirval->val.s.s
-                               encoding: NSUTF8StringEncoding] );
-    autobool = ( NULL == autoval || 0 == autoval->val.i ? NO : YES );
-
-    if( NULL != fileval )
-    {
-        file = [NSString stringWithCString: fileval->val.s.s
-                                  encoding: NSUTF8StringEncoding];
-        if( NULL == autoval )
-            res = [[[client controller] delegate]
-                      ipcAddTorrentFile: file
-                              directory: dir];
-        else
-            res = [[[client controller] delegate]
-                      ipcAddTorrentFileAutostart: file
-                                       directory: dir
-                                       autostart: autobool];
-    }
-    else
-    {
-        data = [NSData dataWithBytes: dataval->val.s.s
-                              length: dataval->val.s.i];
-        if( NULL == autoval )
-            res = [[[client controller] delegate]
-                      ipcAddTorrentData: data
-                              directory: dir];
-        else
-            res = [[[client controller] delegate]
-                      ipcAddTorrentDataAutostart: data
-                                       directory: dir
-                                       autostart: autobool];
-    }
-
-    /* XXX should send back info message with torrent ID */
-    if( res )
-        [client sendrespEmpty: IPC_MSG_OK tag: tag];
-    else
-        [client sendrespEmpty: IPC_MSG_FAIL tag: tag];
-    return;
-
-  bad:
-    NSLog( @"Got bad IPC packet" );
-    [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-}
-
-void msg_getbool( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-    
-    fDefaults = [NSUserDefaults standardUserDefaults];
-
-    switch( msgid )
-    {
-        case IPC_MSG_GETAUTOMAP:
-            [client sendrespInt:IPC_MSG_AUTOMAP tag:tag val:[fDefaults boolForKey:@"NatTraversal"]];
-            break;
-        case IPC_MSG_GETAUTOSTART:
-            [client sendrespInt:IPC_MSG_AUTOSTART tag:tag val:[fDefaults boolForKey:@"AutoStartDownload"]];
-            break;
-        case IPC_MSG_GETPEX:
-            [client sendrespInt:IPC_MSG_PEX tag:tag val:[fDefaults boolForKey:@"PEXGlobal"]];
-            break;
-        default:
-            assert( 0 );
-            break;
-    }
-}
-
-void msg_getint( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-    
-    fDefaults = [NSUserDefaults standardUserDefaults];
-    
-    int theValue;
-    
-    switch( msgid )
-    {
-        case IPC_MSG_GETDOWNLIMIT:
-            if ( [fDefaults boolForKey:@"CheckDownload"] )
-                theValue = [fDefaults integerForKey:@"DownloadLimit"];
-            else
-                theValue = -1;
-            [client sendrespInt:IPC_MSG_DOWNLIMIT tag:tag val:theValue];
-            break;
-        case IPC_MSG_GETPORT:
-            [client sendrespInt:IPC_MSG_PORT tag:tag val:[fDefaults integerForKey:@"BindPort"]];
-            break;
-        case IPC_MSG_GETUPLIMIT:
-            if ( [fDefaults boolForKey:@"CheckUpload"] )
-                theValue = [fDefaults integerForKey:@"UploadLimit"];
-            else
-                theValue = -1;
-            [client sendrespInt:IPC_MSG_UPLIMIT tag:tag val:theValue];
-            break;
-        default:
-            assert( 0 );
-            break;
-    }
-}
-
-void msg_getstr( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-    NSString    * cryptoValue;
-
-    fDefaults = [NSUserDefaults standardUserDefaults];
-    
-    switch( msgid )
-    {
-            
-        case IPC_MSG_GETDIR:
-            [client sendrespStr:IPC_MSG_DIR tag:tag val:[fDefaults stringForKey:@"DownloadFolder"]];
-            break;
-            
-        case IPC_MSG_GETCRYPTO:
-            if ([fDefaults boolForKey: @"EncryptionPrefer"])
-                if ([fDefaults boolForKey: @"EncryptionRequire"])
-                    cryptoValue = @"required";
-                else
-                    cryptoValue = @"preferred";
-            else
-                cryptoValue = @"plaintext";
-            
-            [client sendrespStr:IPC_MSG_CRYPTO tag:tag val:cryptoValue];
-            break;
-            
-        default:
-            assert( 0 );
-            break;
-    }
-}
-
-void msg_setbool( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-
-    if( NULL == val || TYPE_INT != val->type )
-    {
-        NSLog( @"Got bad IPC packet" );
-        [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-        return;
-    }
-    
-    fDefaults = [NSUserDefaults standardUserDefaults];
-    
-    switch( msgid )
-    {
-        case IPC_MSG_AUTOMAP:
-            [fDefaults setBool:(bool)val->val.i forKey:@"NatTraversal"];
-            [fPrefsController setNat:nil];
-            [client sendrespEmpty:IPC_MSG_OK tag:tag];
-            break;
-        case IPC_MSG_AUTOSTART:
-            [fDefaults setBool:(bool)val->val.i forKey:@"AutoStartDownload"];
-            [client sendrespEmpty:IPC_MSG_OK tag:tag];
-            break;
-        case IPC_MSG_PEX:
-            [fDefaults setBool:(bool)val->val.i forKey:@"PEXGlobal"];
-            [fPrefsController setPEX:nil];
-            [client sendrespEmpty: IPC_MSG_OK tag: tag];
-            break;
-        default:
-            assert( 0 );
-            break;
-    }
-}
-
-void msg_setint( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-
-    if( NULL == val || TYPE_INT != val->type )
-    {
-        NSLog( @"Got bad IPC packet" );
-        [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-        return;
-    }
-    
-    fDefaults = [NSUserDefaults standardUserDefaults];
-    switch( msgid )
-    {
-        case IPC_MSG_DOWNLIMIT:
-            if ( val->val.i < 0 )
-                [fDefaults setBool:NO forKey:@"CheckDownload"];
-            else
-            {
-                [fDefaults setBool:YES forKey:@"CheckDownload"];
-                [fDefaults setInteger:val->val.i forKey:@"DownloadLimit"];
-            }
-            [fPrefsController updateLimitFields];
-            [fPrefsController applySpeedSettings: nil];
-            break;
-        case IPC_MSG_PORT:
-            [fPrefsController setPort:[NSNumber numberWithInt:val->val.i]];
-            [fPrefsController updatePortField];
-            break;
-        case IPC_MSG_UPLIMIT:
-            if ( val->val.i < 0 )
-                [fDefaults setBool:NO forKey:@"CheckUpload"];
-            else
-            {
-                [fDefaults setBool:YES forKey:@"CheckUpload"];
-                [fDefaults setInteger:val->val.i forKey:@"UploadLimit"];
-            }
-            [fPrefsController updateLimitFields];
-            [fPrefsController applySpeedSettings: nil];
-            break;
-        default:
-            assert( 0 );
-            break;
-    }
-    [client sendrespEmpty:IPC_MSG_OK tag:tag];
-}
-
-void msg_setstr( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-
-    if( NULL == val || TYPE_STR != val->type )
-    {
-        NSLog( @"Got bad IPC packet" );
-        [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-        return;
-    }
-             
-    fDefaults = [NSUserDefaults standardUserDefaults];
-             
-    switch( msgid )
-    {
-        case IPC_MSG_DIR:
-             [fDefaults setObject:[NSString stringWithCString: val->val.s.s] forKey:@"DownloadFolder"];
-             [fDefaults setObject: @"Constant" forKey: @"DownloadChoice"];
-             [client sendrespEmpty: IPC_MSG_OK tag: tag];
-             break;
-            
-        case IPC_MSG_CRYPTO:
-            if(!strcasecmp(val->val.s.s, "required"))
-            {
-                [fDefaults setBool:YES  forKey: @"EncryptionPrefer"];
-                [fDefaults setBool:YES  forKey: @"EncryptionRequire"];
-            }
-            
-            else if(!strcasecmp(val->val.s.s, "preferred"))
-            {
-                [fDefaults setBool:YES  forKey: @"EncryptionPrefer"];
-                [fDefaults setBool:NO  forKey: @"EncryptionRequire"];
-            }
-            
-            else if(!strcasecmp(val->val.s.s, "plaintext"))
-            {
-                [fDefaults setBool:NO  forKey: @"EncryptionPrefer"];
-                [fDefaults setBool:NO  forKey: @"EncryptionRequire"];
-            }
-            [fPrefsController setEncryptionMode:nil];
-            [client sendrespEmpty: IPC_MSG_OK tag: tag];
-            break;
-           
-        default:
-             assert( 0 );
-             break;
-    }
-}
-
-void msg_empty( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-
-    switch( msgid )
-    {
-        case IPC_MSG_NOOP:
-            [client sendrespEmpty: IPC_MSG_OK tag: tag];
-            break;
-        case IPC_MSG_QUIT:
-            [[[client controller] delegate] ipcQuit];
-            [client sendrespEmpty: IPC_MSG_OK tag: tag];
-            break;
-        default:
-            assert( 0 );
-            break;
-    }
-}
-
-void msg_sup( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient       * client = arg;
-    benc_val_t        packet, * pkval, * name;
-    struct ipc_info * ipc;
-    int               ii;
-    enum ipc_msg      found;
-    uint8_t         * buf;
-    size_t            size;
-
-    if( NULL == val || TYPE_LIST != val->type )
-        goto bad;
-
-    ipc   = [client ipc];
-    pkval = ipc_initval( ipc, IPC_MSG_SUP, tag, &packet, TYPE_LIST );
-    if( NULL == pkval )
-        goto fail;
-    if( tr_bencListReserve( pkval, val->val.l.count ) )
-    {
-        tr_bencFree( &packet );
-        goto fail;
-    }
-
-    for( ii = 0; val->val.l.count > ii; ii++ )
-    {
-        name = &val->val.l.vals[ii];
-        if( NULL == name || TYPE_STR != name->type )
-            goto bad;
-        found = ipc_msgid( ipc, name->val.s.s );
-        if( IPC__MSG_COUNT == found || !ipc_ishandled( ipc, found ) )
-        {
-            continue;
-        }
-        tr_bencInitStr( tr_bencListAdd( pkval ),
-                        name->val.s.s, name->val.s.i, 1 );
-    }
-
-    buf = ipc_serialize( &packet, &size );
-    tr_bencFree( &packet );
-    if( NULL == buf )
-        goto fail;
-    [client sendresp: buf size: size ];
-    return;
-
-  bad:
-    NSLog( @"Got bad IPC packet" );
-    [client sendrespEmpty: IPC_MSG_BAD tag: tag];
-    return;
-
-  fail:
-    NSLog( @"Failed to create IPC reply packet" );
-    [[client controller] killclient: client];
-}
-
-void msg_default( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
-{
-    IPCClient * client = arg;
-
-    [client sendrespEmpty: IPC_MSG_NOTSUP tag: tag];
-}