├── .gitignore ├── .idea ├── .name ├── encodings.xml ├── find.xml ├── misc.xml ├── modules.xml ├── puttio.iml ├── scopes │ └── scope_settings.xml ├── vcs.xml ├── workspace.xml └── xcode.xml ├── APP_SECRET_EX.h ├── Default-568h@2x.png ├── Default-Landscape@2x~ipad.png ├── Default-Landscape~ipad.png ├── Default-Portrait@2x~ipad.png ├── Default-Portrait~ipad.png ├── Default.png ├── Default@2x.png ├── LICENSE ├── Models ├── File.h ├── File.m ├── WatchedList.h └── WatchedList.m ├── Podfile ├── Podfile.lock ├── Puttio.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── Puttio.xccheckout └── xcuserdata │ └── orta.xcuserdatad │ └── xcschemes │ ├── Puttio.xcscheme │ └── xcschememanagement.plist ├── Puttio.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── Puttio.xccheckout ├── Puttio ├── BrowsingViewController.h ├── BrowsingViewController.m ├── Categories │ ├── NSDate+StringParsing.h │ ├── NSDate+StringParsing.m │ ├── NSDictionary+ObjectForKey.h │ ├── NSDictionary+ObjectForKey.m │ ├── NSString+StripHTML.h │ ├── NSString+StripHTML.m │ ├── UIColor+PutioColours.h │ ├── UIColor+PutioColours.m │ ├── UIDevice+SpaceStats.h │ ├── UIDevice+SpaceStats.m │ ├── UIDevice+deviceInfo.h │ ├── UIDevice+deviceInfo.m │ ├── UIFont+Puttio.h │ ├── UIFont+Puttio.m │ ├── UIImageView+ImageRect.h │ ├── UIImageView+ImageRect.m │ ├── UINavigationController+ForceRotate.h │ └── UINavigationController+ForceRotate.m ├── Constants.h ├── Constants.m ├── Externals │ ├── DCControl.h │ ├── DCControl.m │ ├── DCKnob.h │ ├── DCKnob.m │ ├── DCRoundSwitch │ │ ├── DCRoundSwitch.h │ │ ├── DCRoundSwitch.m │ │ ├── DCRoundSwitchKnobLayer.h │ │ ├── DCRoundSwitchKnobLayer.m │ │ ├── DCRoundSwitchOutlineLayer.h │ │ ├── DCRoundSwitchOutlineLayer.m │ │ ├── DCRoundSwitchToggleLayer.h │ │ ├── DCRoundSwitchToggleLayer.m │ │ ├── license.txt │ │ └── readme.md │ ├── DCSlider.h │ ├── DCSlider.m │ ├── GMGridView │ │ ├── GMGridView-Constants.h │ │ ├── GMGridView.h │ │ ├── GMGridView.m │ │ ├── GMGridView.xcodeproj │ │ │ └── project.pbxproj │ │ ├── GMGridViewCell+Extended.h │ │ ├── GMGridViewCell.h │ │ ├── GMGridViewCell.m │ │ ├── GMGridViewLayoutStrategies.h │ │ ├── GMGridViewLayoutStrategies.m │ │ ├── UIGestureRecognizer+GMGridViewAdditions.h │ │ ├── UIGestureRecognizer+GMGridViewAdditions.m │ │ ├── UIView+GMGridViewAdditions.h │ │ └── UIView+GMGridViewAdditions.m │ ├── NSManagedObject+ActiveRecord.h │ ├── NSManagedObject+ActiveRecord.m │ ├── ORWebVTT.h │ ├── ORWebVTT.m │ ├── SubRip.h │ ├── SubRip.m │ ├── TreemapKit │ │ ├── TreemapView.h │ │ ├── TreemapView.m │ │ ├── TreemapViewCell.h │ │ └── TreemapViewCell.m │ ├── UIBarButtonItem+WEPopover.h │ ├── UIBarButtonItem+WEPopover.m │ ├── WEPopoverContainerView.h │ ├── WEPopoverContainerView.m │ ├── WEPopoverController.h │ ├── WEPopoverController.m │ ├── WEPopoverParentView.h │ ├── WETouchableView.h │ ├── WETouchableView.m │ ├── popoverArrowDown.png │ ├── popoverArrowDown@2x.png │ ├── popoverArrowLeft.png │ ├── popoverArrowLeft@2x.png │ ├── popoverArrowRight.png │ ├── popoverArrowRight@2x.png │ ├── popoverArrowUp.png │ ├── popoverArrowUp@2x.png │ ├── popoverBg.png │ └── popoverBg@2x.png ├── FileController │ ├── BaseFileController.h │ ├── BaseFileController.m │ ├── RarFileController.h │ ├── RarFileController.m │ ├── UnknownFileController.h │ ├── UnknownFileController.m │ ├── VideoFileController.h │ └── VideoFileController.m ├── LocalFile.h ├── LocalFile.m ├── Models │ ├── Bookmark.h │ ├── Bookmark.m │ ├── Folder.h │ ├── Folder.m │ ├── Message.h │ ├── Message.m │ ├── SearchResult.h │ ├── SearchResult.m │ ├── Transfer.h │ ├── Transfer.m │ ├── WatchedItem.h │ └── WatchedItem.m ├── NSDictionary+JSON.h ├── NSDictionary+JSON.m ├── NSFileManager+SkipBackup.h ├── NSFileManager+SkipBackup.m ├── NSString+StringBetweenStrings.h ├── NSString+StringBetweenStrings.m ├── Networking │ ├── LoginViewController.h │ └── LoginViewController.m ├── ORAnimatedTickView.h ├── ORAnimatedTickView.m ├── ORAppDelegate.h ├── ORAppDelegate.m ├── ORFileDownloadOperation.h ├── ORFileDownloadOperation.m ├── ORMigration.h ├── ORMigration.m ├── ORSettingsViewController.h ├── ORSettingsViewController.m ├── Processes │ ├── BaseProcess.h │ ├── BaseProcess.m │ ├── ConvertToMP4Process.h │ ├── ConvertToMP4Process.m │ ├── FileDownloadProcess.h │ └── FileDownloadProcess.m ├── Protocols │ ├── FileController.h │ └── ORDisplayItemProtocol.h ├── Putio.entitlements ├── Puttio-Info.plist ├── Puttio-Prefix.pch ├── Puttio.xcdatamodeld │ ├── .xccurrentversion │ ├── Puttio 2 (v1.1).xcdatamodel │ │ └── contents │ ├── Puttio 3 (v1.2).xcdatamodel │ │ └── contents │ ├── Puttio 5 (v1.5).xcdatamodel │ │ └── contents │ └── Puttio.xcdatamodel │ │ └── contents ├── Resources │ ├── Arabic@2x.png │ ├── Brazil@2x.png │ ├── Bulgaria@2x.png │ ├── CCLogo.png │ ├── CCLogo@2x.png │ ├── CCNext.png │ ├── CCNext@2x.png │ ├── CloseSearch.png │ ├── CloseSearch@2x.png │ ├── Cutest_Cat.jpg │ ├── Czech@2x.png │ ├── DotSlash.png │ ├── DotSlash@2x.png │ ├── English@2x.png │ ├── Exo-Bold.otf │ ├── Exo-Light.otf │ ├── Finnish@2x.png │ ├── Folder.png │ ├── Folder@2x.png │ ├── France@2x.png │ ├── Github.png │ ├── Github@2x.png │ ├── Greek@2x.png │ ├── Hand.png │ ├── Hand@2x.png │ ├── Hungry@2x.png │ ├── Indonesia@2x.png │ ├── LoadingSpinner.png │ ├── LoadingSpinner@2x.png │ ├── MP4Indicator.png │ ├── MP4Indicator@2x.png │ ├── Media-Library-Long@2x.png │ ├── MediaLibrary.png │ ├── MediaPlayer.png │ ├── MediaPlayer@2x.png │ ├── Paper.png │ ├── Paper@2x.png │ ├── Placeholder.png │ ├── Placeholder@2x.png │ ├── Poland@2x.png │ ├── Portuguese@2x.png │ ├── RefreshButton.png │ ├── RefreshButton@2x.png │ ├── Romania@2x.png │ ├── Russian@2x.png │ ├── Spain@2x.png │ ├── TransferComplete@2x.png │ ├── TransferDownloading@2x.png │ ├── TransferError@2x.png │ ├── TransferUploading@2x.png │ ├── Transfers-Long@2x.png │ ├── Transfers.png │ ├── Transfers@2x.png │ ├── Turkey@2x.png │ ├── TwitterBird.png │ ├── TwitterBird@2x.png │ ├── Ukeranian@2x.png │ ├── WatchedSash.png │ ├── WatchedSash@2x.png │ ├── mail.html │ ├── orta.png │ └── orta@2x.png ├── Utils │ ├── MoviePlayer.h │ ├── MoviePlayer.m │ ├── ORDefaults.h │ ├── ORDefaults.m │ ├── ORDownloadCleanup.h │ ├── ORDownloadCleanup.m │ ├── ORPasteboardParser.h │ ├── ORPasteboardParser.m │ ├── SearchController.h │ ├── SearchController.m │ ├── ThreeColumnViewManager.h │ └── ThreeColumnViewManager.m ├── ViewControllers │ ├── AccountViewController.h │ ├── AccountViewController.m │ ├── AudioViewController.h │ ├── AudioViewController.m │ ├── FeedbackViewController.h │ ├── FeedbackViewController.m │ ├── FileInfoViewController.h │ ├── FileInfoViewController.m │ ├── FolderViewController.h │ ├── FolderViewController.m │ ├── ItemDeletionViewController.h │ ├── ItemDeletionViewController.m │ ├── LocalBrowsingViewController.h │ ├── LocalBrowsingViewController.m │ ├── ModalZoomView.h │ ├── ModalZoomView.m │ ├── ORAddBookmarkViewController.h │ ├── ORAddBookmarkViewController.m │ ├── ORAddExternalViewController.h │ ├── ORAddExternalViewController.m │ ├── ORAddTorrentFromBrowseViewController.h │ ├── ORAddTorrentFromBrowseViewController.m │ ├── ORAddTorrentFromLinkViewController.h │ ├── ORAddTorrentFromLinkViewController.m │ ├── ORBookmarksViewController.h │ ├── ORBookmarksViewController.m │ ├── ORImageFileInfoViewController.h │ ├── ORImageFileInfoViewController.m │ ├── ORInlineEditableTableViewController.h │ ├── ORInlineEditableTableViewController.m │ ├── ORMoviePlayerController.h │ ├── ORMoviePlayerController.m │ ├── ORPutIOViewController.h │ ├── ORPutIOViewController.m │ ├── ORRemoveTransferPopoverViewController.h │ ├── ORRemoveTransferPopoverViewController.m │ ├── ORTorrentBrowserViewController.h │ ├── ORTorrentBrowserViewController.m │ ├── ORTransferViewController.h │ ├── ORTransferViewController.m │ ├── ProcessPopoverViewController.h │ ├── ProcessPopoverViewController.m │ ├── SearchViewController.h │ ├── SearchViewController.m │ ├── StatusViewController.h │ ├── StatusViewController.m │ ├── TextFileInfoViewController.h │ └── TextFileInfoViewController.m ├── Views │ ├── Cells │ │ ├── ORAddTorrentCell.h │ │ ├── ORAddTorrentCell.m │ │ ├── ORExtendedTransferCell.h │ │ └── ORExtendedTransferCell.m │ ├── ORDestructiveButton.h │ ├── ORDestructiveButton.m │ ├── ORFlatButton.h │ ├── ORFlatButton.m │ ├── ORHorizontalImageViewCell.h │ ├── ORHorizontalImageViewCell.m │ ├── ORImageViewCell.h │ ├── ORImageViewCell.m │ ├── ORMessageCell.h │ ├── ORMessageCell.m │ ├── ORRotatingButton.h │ ├── ORRotatingButton.m │ ├── ORSearchCell.h │ ├── ORSearchCell.m │ ├── ORSimpleProgress.h │ ├── ORSimpleProgress.m │ ├── ORSlidingTableView.h │ ├── ORSlidingTableView.m │ ├── ORSwipeImageView.h │ ├── ORSwipeImageView.m │ ├── ORSyncView.h │ ├── ORSyncView.m │ ├── ORTitleLabel.h │ ├── ORTitleLabel.m │ ├── ORTorrentLikeView.h │ ├── ORTorrentLikeView.m │ ├── ORTransferCell.h │ └── ORTransferCell.m ├── en.lproj │ ├── InfoPlist.strings │ └── MainStoryboard.storyboard └── main.m ├── README.markdown ├── Resources ├── Flags.psd ├── UI-Mockup.pdf ├── puttio-folder.psd └── puttio-paper.psd ├── icon114.png ├── icon144.png ├── icon57.png ├── icon72.png ├── vendor ├── IGHTMLQuery.podspec ├── OROpenSubtitleDownloader.podspec └── kkgridview │ ├── .gitignore │ ├── Documentation │ ├── docset-installed.txt │ ├── docset │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ ├── Documents │ │ │ ├── css │ │ │ │ ├── styles.css │ │ │ │ └── stylesPrint.css │ │ │ └── img │ │ │ │ ├── button_bar_background.png │ │ │ │ ├── disclosure.png │ │ │ │ ├── disclosure_open.png │ │ │ │ ├── library_background.png │ │ │ │ └── title_background.png │ │ │ ├── Nodes.xml │ │ │ ├── docSet.dsidx │ │ │ ├── docSet.mom │ │ │ ├── docSet.skidx │ │ │ └── docSet.toc │ └── html │ │ ├── css │ │ ├── styles.css │ │ └── stylesPrint.css │ │ └── img │ │ ├── button_bar_background.png │ │ ├── disclosure.png │ │ ├── disclosure_open.png │ │ ├── library_background.png │ │ └── title_background.png │ ├── Examples │ └── GridViewDemo │ │ ├── Default-Landscape@2x.png │ │ ├── Default@2x.png │ │ ├── GridViewDemo.xcodeproj │ │ └── project.pbxproj │ │ ├── GridViewDemo.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── GridViewDemo.xcscheme │ │ │ └── KKGridView.xcscheme │ │ └── GridViewDemo │ │ ├── GridViewDemo-Info.plist │ │ ├── GridViewDemo-Prefix.pch │ │ ├── GridViewDemoAppDelegate.h │ │ ├── GridViewDemoAppDelegate.m │ │ ├── GridViewDemoViewController.h │ │ ├── GridViewDemoViewController.m │ │ ├── Resources │ │ ├── Default.png │ │ ├── KKGridViewIcon.png │ │ └── KKGridViewIcon@2x.png │ │ ├── en.lproj │ │ ├── GridViewDemoViewController.xib │ │ ├── InfoPlist.strings │ │ └── MainWindow.xib │ │ └── main.m │ ├── KKGridView.podspec │ ├── LICENSE │ ├── README.md │ └── Resources │ ├── Resources-Info.plist │ ├── Resources-Prefix.pch │ └── en.lproj │ └── InfoPlist.strings └── web ├── ipad1.png ├── ipad2.png ├── ipad3.png ├── ipad4.png ├── ipad5.png ├── iphone1.png ├── iphone2.png ├── iphone3.png ├── iphone4.png └── iphone5.png /.gitignore: -------------------------------------------------------------------------------- 1 | Pods/ 2 | xcuserdata 3 | pt 4 | .DS_Store 5 | build/ 6 | chairs/ 7 | APP_SECRET.h 8 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | Puttio -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/find.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $APPLICATION_HOME_DIR$/lib/idea.jar!/resources/html5-schema/html5.rnc 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/puttio.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/xcode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /APP_SECRET_EX.h: -------------------------------------------------------------------------------- 1 | // 2 | // APP_SECRET_EX.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | // https://api.put.io/v2/docs/ 10 | // Sign up for these creds here https://put.io/v2/oauth2/register 11 | 12 | static NSString* APP_SECRET = @""; 13 | static NSString* APP_ID = @""; 14 | 15 | // You can just put fake ones here 16 | static NSString* TESTFLIGHT_SECRET = @""; 17 | static NSString* MIXPANEL_TOKEN = @""; 18 | static NSString* CRASHLYTICS_API_KEY = @""; -------------------------------------------------------------------------------- /Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Default-568h@2x.png -------------------------------------------------------------------------------- /Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Default.png -------------------------------------------------------------------------------- /Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Default@2x.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, orta therox 2 | All rights reserved. 3 | 4 | 5 | This is a customized BSD license, you don't have to write that you've 6 | used my code in your released apps. Also by using this code you agree 7 | to not wholesale copy my app; I love competition, but I'd rather compete 8 | on user experience. 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | The views and conclusions contained in the software and documentation are those 28 | of the authors and should not be interpreted as representing official policies, 29 | either expressed or implied, of the FreeBSD Project. 30 | -------------------------------------------------------------------------------- /Models/File.h: -------------------------------------------------------------------------------- 1 | // 2 | // File.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ORDisplayItemProtocol.h" 11 | 12 | // These used to be NSManagedObjects 13 | // but it was really starting to clog up iCloud sync 14 | // so you'll see references to File & Folder in the xcdatamodel 15 | // but the ones in there do nothing now. ./ 16 | 17 | @interface File : PKFile @end 18 | 19 | @interface PKFile (ORWatched) 20 | - (void)setWatched:(NSNumber *)watched; 21 | - (NSNumber *)watched; 22 | @end 23 | -------------------------------------------------------------------------------- /Models/File.m: -------------------------------------------------------------------------------- 1 | // 2 | // File.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "File.h" 11 | 12 | static char WatchedKey; 13 | 14 | @implementation File @end 15 | 16 | @implementation PKFile (ORWatched) 17 | 18 | - (void)setWatched:(NSNumber *)watched { 19 | objc_setAssociatedObject(self, &WatchedKey, watched, OBJC_ASSOCIATION_RETAIN); 20 | } 21 | 22 | - (NSNumber *)watched { 23 | return (NSNumber *)objc_getAssociatedObject(self, &WatchedKey); 24 | } 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /Models/WatchedList.h: -------------------------------------------------------------------------------- 1 | // 2 | // WatchedList.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 05/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class WatchedItem; 13 | 14 | @interface WatchedList : NSManagedObject 15 | 16 | @property (nonatomic, retain) NSString * folderID; 17 | @property (nonatomic, retain) NSSet *items; 18 | @end 19 | 20 | @interface WatchedList (CoreDataGeneratedAccessors) 21 | 22 | - (void)addItemsObject:(WatchedItem *)value; 23 | - (void)removeItemsObject:(WatchedItem *)value; 24 | - (void)addItems:(NSSet *)values; 25 | - (void)removeItems:(NSSet *)values; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Models/WatchedList.m: -------------------------------------------------------------------------------- 1 | // 2 | // WatchedList.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 05/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "WatchedList.h" 10 | #import "WatchedItem.h" 11 | 12 | 13 | @implementation WatchedList 14 | 15 | @dynamic folderID; 16 | @dynamic items; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '7.0' 2 | 3 | pod 'SEHumanizedTimeDiff' 4 | pod 'MSVCLeakHunter' 5 | 6 | pod "AFNetworking", "~> 1.0" 7 | #pod "BeamMusicPlayerViewController" 8 | #pod "Reveal-iOS-SDK" 9 | pod "IGHTMLQuery", :podspec => "vendor/IGHTMLQuery.podspec" 10 | 11 | pod 'OROpenSubtitleDownloader' 12 | pod 'PutioKit', :git => "git@github.com:PutioKit/PutioKit.git" 13 | 14 | pod 'ARAnalytics/Mixpanel' 15 | pod 'ARAnalytics/TestFlight' -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (1.3.3) 3 | - ARAnalytics/CoreIOS (2.8.0) 4 | - ARAnalytics/Mixpanel (2.8.0): 5 | - ARAnalytics/CoreIOS 6 | - Mixpanel 7 | - ARAnalytics/TestFlight (2.8.0): 8 | - ARAnalytics/CoreIOS 9 | - BPXLUUIDHandler 10 | - TestFlightSDK 11 | - BPXLUUIDHandler (0.0.1) 12 | - IGHTMLQuery (0.5.1) 13 | - Mixpanel (2.5.4) 14 | - MSVCLeakHunter (1.0.0) 15 | - NSData+Base64 (1.0.0) 16 | - OROpenSubtitleDownloader (1.0.0): 17 | - AFNetworking 18 | - xmlrpc 19 | - PutioKit (0.1): 20 | - AFNetworking (~> 1.0) 21 | - SEHumanizedTimeDiff (0.0.1) 22 | - TestFlightSDK (3.0.2) 23 | - xmlrpc (2.3.3): 24 | - NSData+Base64 (~> 1.0.0) 25 | 26 | DEPENDENCIES: 27 | - AFNetworking (~> 1.0) 28 | - ARAnalytics/Mixpanel 29 | - ARAnalytics/TestFlight 30 | - IGHTMLQuery (from `vendor/IGHTMLQuery.podspec`) 31 | - MSVCLeakHunter 32 | - OROpenSubtitleDownloader 33 | - PutioKit (from `git@github.com:PutioKit/PutioKit.git`) 34 | - SEHumanizedTimeDiff 35 | 36 | EXTERNAL SOURCES: 37 | IGHTMLQuery: 38 | :podspec: vendor/IGHTMLQuery.podspec 39 | PutioKit: 40 | :git: git@github.com:PutioKit/PutioKit.git 41 | 42 | SPEC CHECKSUMS: 43 | AFNetworking: 5f5b2a731d6fc2082b8abc63d40fcaed5482c42f 44 | ARAnalytics: 93c5b65989145f88f4d45e262612eac277b0c219 45 | BPXLUUIDHandler: 12376ecdba7aa93b7fb3da32e9130e6593d7ef99 46 | IGHTMLQuery: 6955cb8d9fa5ad15d10310a07260b0ef8ddcb70d 47 | Mixpanel: 87167a0b0a74f11f0ee3787f291357494730617c 48 | MSVCLeakHunter: 465f9ee37275031135890a491ba2a70c8ff6ae35 49 | NSData+Base64: aae92a2e3f0bd88b29fe6093551ded3f5c062548 50 | OROpenSubtitleDownloader: d6a29c7167f596db1a3566e40018f115f47b36e1 51 | PutioKit: de585b6dc650841e4199372a20fb821d286399ef 52 | SEHumanizedTimeDiff: c46af95e3812ee2a5a4bad2bd23d7d58f13b195c 53 | TestFlightSDK: 0c24c533748d0d84bfe7a3cb6036fa79124d84ee 54 | xmlrpc: 7f91bbd8600d2c9a4cc5f34d32753ba5cb9c3a65 55 | 56 | COCOAPODS: 0.34.4 57 | -------------------------------------------------------------------------------- /Puttio.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Puttio.xcodeproj/project.xcworkspace/xcshareddata/Puttio.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 8090DDD8-022B-49D7-A9C6-CDDCE1E6515F 9 | IDESourceControlProjectName 10 | Puttio 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 27D3D030B85F9A92825CB9400DFA9E3864E09AA1 14 | https://github.com/orta/Puttio.git 15 | 16 | IDESourceControlProjectPath 17 | Puttio.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 27D3D030B85F9A92825CB9400DFA9E3864E09AA1 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/orta/Puttio.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 27D3D030B85F9A92825CB9400DFA9E3864E09AA1 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 27D3D030B85F9A92825CB9400DFA9E3864E09AA1 36 | IDESourceControlWCCName 37 | Puttio 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Puttio.xcodeproj/xcuserdata/orta.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Puttio.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 6085D222151B99490068929C 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Puttio.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Puttio.xcworkspace/xcshareddata/Puttio.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 505F98B7-3B01-4821-97F6-C85F1E777A32 9 | IDESourceControlProjectName 10 | Puttio 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 27D3D030B85F9A92825CB9400DFA9E3864E09AA1 14 | ssh://github.com/orta/Puttio.git 15 | 16 | IDESourceControlProjectPath 17 | Puttio.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 27D3D030B85F9A92825CB9400DFA9E3864E09AA1 21 | .. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/orta/Puttio.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 27D3D030B85F9A92825CB9400DFA9E3864E09AA1 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 27D3D030B85F9A92825CB9400DFA9E3864E09AA1 36 | IDESourceControlWCCName 37 | puttio 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Puttio/BrowsingViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BrowsingViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GMGridView.h" 11 | #import "ORDisplayItemProtocol.h" 12 | #import "ORSwipeImageView.h" 13 | 14 | @class ORRotatingButton, ORTitleLabel, SearchViewController; 15 | @interface BrowsingViewController : UIViewController 16 | 17 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 18 | @property (weak, nonatomic) IBOutlet UIView *offlineView; 19 | @property (weak, nonatomic) IBOutlet ORRotatingButton *refreshButton; 20 | @property (assign, nonatomic) BOOL networkActivity; 21 | @property (weak, nonatomic) IBOutlet ORSwipeImageView *swipeHelperImage; 22 | @property (strong) SearchViewController *searchVC; 23 | 24 | @property (weak, nonatomic) IBOutlet UILabel *firstErrorMessageLabel; 25 | @property (weak, nonatomic) IBOutlet UILabel *secondErrorMessageLabel; 26 | 27 | - (void)setupRootFolder; 28 | - (IBAction)backPressed:(id)sender; 29 | - (IBAction)reloadPressed:(id)sender; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Puttio/Categories/NSDate+StringParsing.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+StringParsing.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 03/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDate (StringParsing) 12 | + (NSDate *)dateWithISO8601String:(NSString *)dateString; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Categories/NSDate+StringParsing.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+StringParsing.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 03/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "NSDate+StringParsing.h" 10 | 11 | static NSDateFormatter *_staticFormatter; 12 | 13 | @implementation NSDate (StringParsing) 14 | 15 | // this has been hacked and chopped into simple pieces, and isnt really ISO8601 anymore. 16 | 17 | + (NSDate *)dateWithISO8601String:(NSString *)dateString { 18 | if (!dateString) return nil; 19 | if ([dateString hasSuffix:@"Z"]) { 20 | dateString = [[dateString substringToIndex:(dateString.length-1)] stringByAppendingString:@"-0000"]; 21 | } 22 | dateString = [dateString componentsSeparatedByString:@"T"][0]; 23 | return [self dateFromString:dateString 24 | withFormat:@"yyyy-MM-dd"]; 25 | } 26 | 27 | + (NSDate *)dateFromString:(NSString *)dateString 28 | withFormat:(NSString *)dateFormat { 29 | if (!_staticFormatter) { 30 | _staticFormatter = [[NSDateFormatter alloc] init]; 31 | [_staticFormatter setDateFormat:dateFormat]; 32 | 33 | NSLocale *locale = [[NSLocale alloc] 34 | initWithLocaleIdentifier:@"en_US_POSIX"]; 35 | [_staticFormatter setLocale:locale]; 36 | } 37 | 38 | NSDate *date = [_staticFormatter dateFromString:dateString]; 39 | return date; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Puttio/Categories/NSDictionary+ObjectForKey.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+ObjectForKey.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 07/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (ObjectForKey) 12 | 13 | - (NSString *)onlyStringForKey:(NSString *)key; 14 | - (NSDictionary *)onlyDictionaryForKey:(NSString *)key; 15 | - (NSArray *)onlyArrayForKey:(NSString *)key; 16 | - (NSDecimalNumber *)onlyDecimalForKey:(NSString *)key; 17 | - (id)objectForKeyNotNull:(id)key; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Puttio/Categories/NSDictionary+ObjectForKey.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+ObjectForKey.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 07/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+ObjectForKey.h" 10 | 11 | @implementation NSDictionary (ObjectForKey) 12 | 13 | - (NSString *)onlyStringForKey:(NSString *)key { 14 | id object = self[key]; 15 | if ([[object class] isSubclassOfClass:[NSString class]]) { 16 | return object; 17 | } 18 | return nil; 19 | } 20 | 21 | - (NSDictionary *)onlyDictionaryForKey:(NSString *)key { 22 | id object = self[key]; 23 | if ([[object class] isSubclassOfClass:[NSDictionary class]]) { 24 | return object; 25 | } 26 | return nil; 27 | } 28 | 29 | - (NSArray *)onlyArrayForKey:(NSString *)key { 30 | id object = self[key]; 31 | if ([[object class] isSubclassOfClass:[NSArray class]]) { 32 | return object; 33 | } 34 | return nil; 35 | } 36 | 37 | - (NSDecimalNumber *)onlyDecimalForKey:(NSString *)key { 38 | id object = self[key]; 39 | if ([[object class] isSubclassOfClass:[NSDecimalNumber class]]) { 40 | return object; 41 | } 42 | // could still be a string 43 | if ([[object class] isSubclassOfClass:[NSString class]]) { 44 | return [NSDecimalNumber decimalNumberWithString:object]; 45 | } 46 | return nil; 47 | } 48 | 49 | - (id)objectForKeyNotNull:(id)key { 50 | id object = self[key]; 51 | if (object == [NSNull null]) 52 | return nil; 53 | 54 | return object; 55 | } 56 | @end 57 | -------------------------------------------------------------------------------- /Puttio/Categories/NSString+StripHTML.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+StripHTML.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (StripHTML) 12 | - (NSString *)stripHTMLtrimWhiteSpace:(BOOL)trim; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Categories/NSString+StripHTML.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+StripHTML.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "NSString+StripHTML.h" 10 | 11 | @implementation NSString (StripHTML) 12 | 13 | - (NSString *)stripHTMLtrimWhiteSpace:(BOOL)trim { 14 | NSScanner *theScanner; 15 | NSString *text = nil; 16 | 17 | theScanner = [NSScanner scannerWithString:self]; 18 | NSString *returnedString = self; 19 | 20 | while ([theScanner isAtEnd] == NO) { 21 | 22 | // find start of tag 23 | [theScanner scanUpToString:@"<" intoString:NULL] ; 24 | // find end of tag 25 | [theScanner scanUpToString:@">" intoString:&text] ; 26 | 27 | // replace the found tag with a space 28 | //(you can filter multi-spaces out later if you wish) 29 | returnedString = [returnedString stringByReplacingOccurrencesOfString: 30 | [ NSString stringWithFormat:@"%@>", text] 31 | withString:@""]; 32 | 33 | } // while // 34 | 35 | // trim off whitespace 36 | return trim ? [returnedString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] : returnedString; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Puttio/Categories/UIColor+PutioColours.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+PutioColours.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (PutioColours) 12 | 13 | + (UIColor *)putioYellow; 14 | + (UIColor *)putioBlue; 15 | + (UIColor *)putioDarkBlue; 16 | + (UIColor *)putioLightGray; 17 | + (UIColor *)putioRed; 18 | + (UIColor *)putioDarkRed; 19 | - (UIColor *)lighterColorByPercentage:(float)amount; 20 | @end 21 | -------------------------------------------------------------------------------- /Puttio/Categories/UIColor+PutioColours.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+PutioColours.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "UIColor+PutioColours.h" 10 | #import 11 | 12 | @implementation UIColor (PutioColours) 13 | 14 | + (UIColor *)putioYellow { 15 | return [UIColor colorWithRed:0.965 green:0.911 blue:0.247 alpha:1.000]; 16 | } 17 | 18 | + (UIColor *)putioBlue { 19 | return [UIColor colorWithRed:0.366 green:0.676 blue:0.969 alpha:1.000]; 20 | } 21 | 22 | + (UIColor *)putioRed { 23 | return [UIColor colorWithRed:1.000 green:0.301 blue:0.050 alpha:1.000]; 24 | } 25 | 26 | + (UIColor *)putioDarkRed { 27 | return [UIColor colorWithRed:0.681 green:0.141 blue:0.082 alpha:1.000]; 28 | } 29 | 30 | + (UIColor *)putioDarkBlue { 31 | return [UIColor colorWithRed:0.300 green:0.459 blue:1.000 alpha:1.000]; 32 | } 33 | 34 | + (UIColor *)putioLightGray { 35 | return [UIColor colorWithWhite:0.737 alpha:1.000]; 36 | } 37 | 38 | // https://gist.github.com/1661029 39 | - (UIColor *)lighterColorByPercentage:(float)amount { 40 | CGFloat* oldComponents = (CGFloat *) CGColorGetComponents(self.CGColor); 41 | CGFloat newComponents[4]; 42 | 43 | newComponents[0] = MIN(oldComponents[0] * amount + oldComponents[0], 1); 44 | newComponents[1] = MIN(oldComponents[1] * amount + oldComponents[1], 1); 45 | newComponents[2] = MIN(oldComponents[2] * amount + oldComponents[2], 1); 46 | newComponents[3] = MIN(oldComponents[3] * amount + oldComponents[3], 1); 47 | 48 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 49 | CGColorRef newColor = CGColorCreate(colorSpace, newComponents); 50 | CGColorSpaceRelease(colorSpace); 51 | 52 | UIColor *retColor = [UIColor colorWithCGColor:newColor]; 53 | CGColorRelease(newColor); 54 | 55 | return retColor; 56 | } 57 | 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Puttio/Categories/UIDevice+SpaceStats.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+SpaceStats.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 24/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIDevice (SpaceStats) 12 | 13 | + (NSString *)humanStringFromBytes:(double)bytes; 14 | + (double)numberOfBytesFree; 15 | + (double)numberOfBytesOnDevice; 16 | + (double)numberOfBytesUsedInDocumentsDirectory; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Puttio/Categories/UIDevice+SpaceStats.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+SpaceStats.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 24/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "UIDevice+SpaceStats.h" 10 | #include 11 | #include 12 | 13 | @implementation UIDevice (SpaceStats) 14 | 15 | + (NSString *)humanStringFromBytes:(double)bytes { 16 | if (bytes < 0) { 17 | bytes *= -1; 18 | } 19 | 20 | static const char units[] = { '\0', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y' }; 21 | static int maxUnits = sizeof units - 1; 22 | 23 | int multiplier = 1000; 24 | int exponent = 0; 25 | 26 | while (bytes >= multiplier && exponent < maxUnits) { 27 | bytes /= multiplier; 28 | exponent++; 29 | } 30 | NSNumberFormatter* formatter = [[NSNumberFormatter alloc] init]; 31 | [formatter setMaximumFractionDigits:1]; 32 | // Beware of reusing this format string. -[NSString stringWithFormat] ignores \0, *printf does not. 33 | return [NSString stringWithFormat:@"%@ %cB", [formatter stringFromNumber: @(bytes)], units[exponent]]; 34 | } 35 | 36 | + (double)numberOfBytesFree { 37 | NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 38 | struct statfs tStats; 39 | statfs([[paths lastObject] cString], &tStats); 40 | return tStats.f_bavail * tStats.f_bsize; 41 | } 42 | 43 | + (double)numberOfBytesOnDevice { 44 | NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 45 | struct statfs tStats; 46 | statfs([[paths lastObject] cString], &tStats); 47 | return tStats.f_blocks * tStats.f_bsize; 48 | } 49 | 50 | + (double)numberOfBytesUsedInDocumentsDirectory { 51 | NSString *docsDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; 52 | NSArray *paths = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:docsDir error:nil]; 53 | 54 | // the directory itself and the SQLite DB 55 | if (paths.count == 2) return 0; 56 | 57 | double totalSize = 0; 58 | for (NSString *path in paths) { 59 | NSDictionary *fileInfo = [[NSFileManager defaultManager] attributesOfItemAtPath:[docsDir stringByAppendingPathComponent:path] error:nil]; 60 | totalSize += [fileInfo[NSFileSize] doubleValue]; 61 | } 62 | return totalSize; 63 | } 64 | 65 | @end 66 | 67 | -------------------------------------------------------------------------------- /Puttio/Categories/UIDevice+deviceInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+deviceInfo.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIDevice (deviceInfo) 12 | 13 | enum DeviceType { 14 | DeviceIpad1, 15 | DeviceIpad2, 16 | DeviceIpad3Plus, 17 | DeviceIphone3GS, 18 | DeviceIphone4, 19 | DeviceIphone5Plus, 20 | DeviceOther 21 | }; 22 | 23 | + (NSString *)deviceString; 24 | + (int)deviceType; 25 | + (BOOL)isPad; 26 | + (BOOL)isPhone; 27 | @end 28 | -------------------------------------------------------------------------------- /Puttio/Categories/UIDevice+deviceInfo.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+deviceInfo.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "UIDevice+deviceInfo.h" 10 | 11 | @implementation UIDevice (deviceInfo) 12 | 13 | + (NSString *)deviceString { 14 | if ([self isPad]) { 15 | return @"iPad"; 16 | } 17 | return @"iPhone"; 18 | } 19 | 20 | + (BOOL)isPad { 21 | return UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPhone; 22 | } 23 | 24 | + (BOOL)isPhone { 25 | return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone; 26 | } 27 | 28 | + (int)deviceType { 29 | #if TARGET_IPHONE_SIMULATOR 30 | return DeviceOther; 31 | #endif 32 | bool isRetina = [[UIScreen mainScreen] scale] > 1; 33 | if ([self isPad]) { 34 | if (isRetina) { 35 | return DeviceIpad3Plus; 36 | } else { 37 | if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerCameraDeviceFront]) { 38 | return DeviceIpad2; 39 | } 40 | return DeviceIpad1; 41 | } 42 | } else { 43 | if (isRetina) { 44 | bool isFourInches = CGSizeEqualToSize([[UIScreen mainScreen] preferredMode].size,CGSizeMake(640, 1136)); 45 | if (isFourInches) { 46 | return DeviceIphone5Plus; 47 | } else { 48 | return DeviceIphone4; 49 | } 50 | 51 | }else { 52 | return DeviceIphone3GS; 53 | } 54 | } 55 | } 56 | @end 57 | -------------------------------------------------------------------------------- /Puttio/Categories/UIFont+Puttio.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+Puttio.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIFont (Puttio) 12 | + (UIFont *)titleFontWithSize:(CGFloat )size; 13 | + (UIFont *)bodyFontWithSize:(CGFloat )size; 14 | @end 15 | -------------------------------------------------------------------------------- /Puttio/Categories/UIFont+Puttio.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+Puttio.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "UIFont+Puttio.h" 10 | 11 | @implementation UIFont (Puttio) 12 | 13 | + (UIFont *)titleFontWithSize:(CGFloat )size { 14 | return [UIFont fontWithName:@"Exo-Bold" size:size]; 15 | } 16 | 17 | + (UIFont *)bodyFontWithSize:(CGFloat )size { 18 | return [UIFont fontWithName:@"Exo-Light" size:size]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Puttio/Categories/UIImageView+ImageRect.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+ImageRect.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImageView (ImageRect) 12 | - (CGRect)frameForImage; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Categories/UIImageView+ImageRect.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+ImageFrame.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 19/04/2012. 6 | // Copyright (c) 2012 http://art.sy. All rights reserved. 7 | // http://stackoverflow.com/questions/389342/how-to-get-the-size-of-a-scaled-uiimage-in-uiimageview 8 | 9 | #import "UIImageView+ImageRect.h" 10 | 11 | @implementation UIImageView (ImageFrame) 12 | 13 | - (CGRect)frameForImage { 14 | float imageRatio = self.image.size.width / self.image.size.height; 15 | float viewRatio = self.frame.size.width / self.frame.size.height; 16 | 17 | if(imageRatio < viewRatio) { 18 | float scale = self.frame.size.height / self.image.size.height; 19 | float width = scale * self.image.size.width; 20 | float topLeftX = (self.frame.size.width - width) * 0.5; 21 | 22 | return CGRectMake(topLeftX, 0, width, self.frame.size.height); 23 | 24 | } else { 25 | float scale = self.frame.size.width / self.image.size.width; 26 | float height = scale * self.image.size.height; 27 | float topLeftY = (self.frame.size.height - height) * 0.5; 28 | 29 | return CGRectMake(0, topLeftY, self.frame.size.width, height); 30 | } 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Puttio/Categories/UINavigationController+ForceRotate.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+ForceRotate.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 04/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UINavigationController (ForceRotate) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Categories/UINavigationController+ForceRotate.m: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+ForceRotate.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 04/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "UINavigationController+ForceRotate.h" 10 | 11 | @implementation UINavigationController (ForceRotate) 12 | 13 | //- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { 14 | // return UIInterfaceOrientationIsPortrait(toInterfaceOrientation); 15 | //} 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Puttio/Constants.h: -------------------------------------------------------------------------------- 1 | // 2 | // Constants.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | extern NSString *const AppOAuthID; 10 | extern NSString *const AppOAuthCallback; 11 | 12 | extern NSString *const OAuthTokenWasSavedNotification; 13 | extern NSString *const V1TokensWereSavedNotification; 14 | 15 | extern NSString *const ORDefaultsAreLoaded; 16 | 17 | extern NSString *const AppAuthTokenDefault; 18 | extern NSString *const APIKeyDefault; 19 | extern NSString *const APISecretDefault; 20 | extern NSString *const ORUserIdDefault; 21 | extern NSString *const ORStreamTokenDefault; 22 | extern NSString *const ORShownSwipeHelperDefault; 23 | extern NSString *const ORLastSiteVisitedDefault; 24 | extern NSString *const ORBookmarkURLsDefault; 25 | extern NSString *const ORBookmarkNamesDefault; 26 | 27 | extern NSString *const ORAppVersion; 28 | extern NSString *const ORShowLeftSidebarDefault; 29 | extern NSString *const ORShowRightSidebarDefault; 30 | extern NSString *const ORCurrentSpaceUsedPercentageDefault; 31 | extern NSString *const ORDiskQuotaAvailableDefault; 32 | extern NSString *const ORDiskQuotaTotalDefault; 33 | extern NSString *const ORUserAccountNameDefault; 34 | extern NSString *const ORLoggedOutDefault; 35 | extern NSString *const ORUseAllSearchEngines; 36 | extern NSString *const ORTotalVideoDuration; 37 | extern NSString *const ORHasShownReviewNagOneDefault; 38 | extern NSString *const ORMigrationVersionDefault; 39 | extern NSString *const ORSubtitleLanguageDefault; 40 | extern NSString *const ORCloudSyncDefault; 41 | 42 | extern NSString *const ORReloadGridNotification; 43 | extern NSString *const ORReloadFolderNotification; 44 | extern NSString *const ORVideoStartedNotification; 45 | extern NSString *const ORVideoFinishedNotification; 46 | extern NSString *const ORFolderChangedNotification; 47 | extern NSString *const ORCCSearchedChangedNotification; 48 | extern NSString *const ORShowTreeViewNotification; 49 | 50 | extern NSString *const ORVideoDurationKey; -------------------------------------------------------------------------------- /Puttio/Externals/DCControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCControl.h 3 | // 4 | // Copyright 2011 Domestic Cat. All rights reserved. 5 | // 6 | 7 | #define kDCControlIsPhone (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad) 8 | #define kDCControlDegreesToRadians(x) (M_PI * (x) / 180.0) 9 | #define kDCControlRadiansToDegrees(x) ((x) * 180.0 / M_PI) 10 | 11 | @protocol DCControlDelegate 12 | 13 | @required 14 | 15 | - (void)controlValueDidChange:(float)value sender:(id)sender; 16 | 17 | @end 18 | 19 | @interface DCControl : UIView 20 | { 21 | } 22 | 23 | @property (nonatomic, assign) id delegate; 24 | @property (nonatomic, retain) UIColor *color; // default: black 25 | @property CGFloat backgroundColorAlpha; // default: 0.3 26 | 27 | @property (nonatomic, retain) UIFont *labelFont; // default: bold, system, 12.5 28 | @property (nonatomic, retain) UIColor *labelColor; // default: use self.color 29 | @property CGPoint labelOffset; // default: CGPointZero 30 | 31 | @property CGFloat min; // default: 0.0 32 | @property CGFloat max; // default: 1.0 33 | @property (nonatomic) CGFloat value; // default: 0.0 34 | 35 | @property BOOL displaysValue; // default: YES 36 | @property BOOL allowsGestures; // default: YES 37 | 38 | - (id)initWithDelegate:(id)aDelegate; 39 | 40 | ///////////////////// 41 | // Drawing Methods // 42 | ///////////////////// 43 | 44 | - (void)context:(CGContextRef)context addRoundedRect:(CGRect)rect cornerRadius:(float)cornerRadius; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Puttio/Externals/DCKnob.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCKnob.h 3 | // 4 | // Copyright 2011 Domestic Cat. All rights reserved. 5 | // 6 | 7 | #import "DCControl.h" 8 | 9 | #define kDCKnobRatio (M_PI * ((360.0 - self.cutoutSize) / 360.0)) 10 | 11 | static inline CGFloat angleBetweenPoints(CGPoint first, CGPoint second) 12 | { 13 | CGFloat height = second.y - first.y; 14 | CGFloat width = first.x - second.x; 15 | CGFloat rads = atan2(height, width); 16 | return rads; 17 | } 18 | 19 | @interface DCKnob : DCControl 20 | { 21 | CGAffineTransform initialTransform; 22 | CGPoint lastPoint; 23 | CGFloat initialAngle; 24 | } 25 | 26 | @property BOOL biDirectional; // default: NO 27 | @property CGFloat arcStartAngle; // default: 90 (degrees) 28 | @property CGFloat cutoutSize; // default: 60 (degrees) 29 | @property CGFloat valueArcWidth; // default: 15.0 30 | 31 | @property CGFloat doubleTapValue; // default: 0% 32 | @property CGFloat tripleTapValue; // default: 0% 33 | 34 | ///////////////////////// 35 | // Init/Custom Setters // 36 | ///////////////////////// 37 | 38 | - (id)initWithDelegate:(id)aDelegate; 39 | - (void)setFrame:(CGRect)frame; 40 | 41 | //////////////////// 42 | // Touch Handling // 43 | //////////////////// 44 | 45 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 46 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; 47 | 48 | //////////////////// 49 | // Helper Methods // 50 | //////////////////// 51 | 52 | - (CGAffineTransform)initialTransform; 53 | - (CGFloat)newValueFromTransform:(CGAffineTransform)transform; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Puttio/Externals/DCRoundSwitch/DCRoundSwitch.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCRoundSwitch.h 3 | // 4 | // Created by Patrick Richards on 28/06/11. 5 | // MIT License. 6 | // 7 | // http://twitter.com/patr 8 | // http://domesticcat.com.au/projects 9 | // http://github.com/domesticcatsoftware/DCRoundSwitch 10 | // 11 | 12 | #import 13 | #import 14 | 15 | @class DCRoundSwitchToggleLayer; 16 | @class DCRoundSwitchOutlineLayer; 17 | @class DCRoundSwitchKnobLayer; 18 | 19 | @interface DCRoundSwitch : UIControl 20 | { 21 | @private 22 | DCRoundSwitchOutlineLayer *outlineLayer; 23 | DCRoundSwitchToggleLayer *toggleLayer; 24 | DCRoundSwitchKnobLayer *knobLayer; 25 | CAShapeLayer *clipLayer; 26 | BOOL ignoreTap; 27 | } 28 | 29 | @property (nonatomic) UIColor *onTintColor; // default: blue (matches normal UISwitch) 30 | @property (nonatomic, getter=isOn) BOOL on; // default: NO 31 | @property (nonatomic, copy) NSString *onText; // default: 'ON' - automatically localized 32 | @property (nonatomic, copy) NSString *offText; // default: 'OFF' - automatically localized 33 | 34 | - (void)setOn:(BOOL)newOn animated:(BOOL)animated; 35 | - (void)setOn:(BOOL)newOn animated:(BOOL)animated ignoreControlEvents:(BOOL)ignoreControlEvents; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Puttio/Externals/DCRoundSwitch/DCRoundSwitchKnobLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCRoundSwitchKnobLayer.h 3 | // 4 | // Created by Patrick Richards on 29/06/11. 5 | // MIT License. 6 | // 7 | // http://twitter.com/patr 8 | // http://domesticcat.com.au/projects 9 | // http://github.com/domesticcatsoftware/DCRoundSwitch 10 | // 11 | 12 | #import 13 | 14 | @interface DCRoundSwitchKnobLayer : CALayer 15 | 16 | @property (nonatomic) BOOL gripped; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Puttio/Externals/DCRoundSwitch/DCRoundSwitchOutlineLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCRoundSwitchOutlineLayer.h 3 | // 4 | // Created by Patrick Richards on 29/06/11. 5 | // MIT License. 6 | // 7 | // http://twitter.com/patr 8 | // http://domesticcat.com.au/projects 9 | // http://github.com/domesticcatsoftware/DCRoundSwitch 10 | // 11 | 12 | #import 13 | 14 | @interface DCRoundSwitchOutlineLayer : CALayer 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/Externals/DCRoundSwitch/DCRoundSwitchToggleLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCRoundSwitchToggleLayer.h 3 | // 4 | // Created by Patrick Richards on 29/06/11. 5 | // MIT License. 6 | // 7 | // http://twitter.com/patr 8 | // http://domesticcat.com.au/projects 9 | // http://github.com/domesticcatsoftware/DCRoundSwitch 10 | // 11 | 12 | #import 13 | #import 14 | 15 | @interface DCRoundSwitchToggleLayer : CALayer 16 | 17 | @property (nonatomic) UIColor *onTintColor; 18 | @property (nonatomic) NSString *onString; 19 | @property (nonatomic) NSString *offString; 20 | @property (unsafe_unretained, nonatomic, readonly) UIFont *labelFont; 21 | @property (nonatomic) BOOL drawOnTint; 22 | @property (nonatomic) BOOL clip; 23 | 24 | - (id)initWithOnString:(NSString *)anOnString offString:(NSString *)anOffString onTintColor:(UIColor *)anOnTintColor; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Puttio/Externals/DCRoundSwitch/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by Patrick Richards domesticcatsoftware.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Puttio/Externals/DCRoundSwitch/readme.md: -------------------------------------------------------------------------------- 1 | /////// NOTES BY ORTA 2 | 3 | This is a heavily modified version of DCRoundSwitch, which isn't even round anymore. hardcore. 4 | 5 | 6 | 7 | 8 | 9 | DCRoundSwitch 10 | ============ 11 | 12 | Twitter: [@patr](http://twitter.com/patr) 13 | 14 | Our commercial apps: [domesticcat.com.au](http://domesticcat.com.au/apps) 15 | 16 | About 17 | ----- 18 | 19 | DCRoundSwitch is designed to be a drop in replacement for UISwitch. It is styled 'modern' so will unify the look of your apps into the future whilst retaining backwards capability. Drawing is done in CoreGraphics so no images are required. 20 | 21 | It should behave exactly the same as a UISwitch API wise, if it doesn't please file a bug, or preferably send me a pull request. 22 | 23 | ![Round Switch Demo Image](http://domesticcat.com.au/projects/dcroundswitch/dcroundswitchdemo.png) 24 | 25 | Usage 26 | ----- 27 | 28 | To use it, add the files in the DCRoundSwitch folder to your project and add the QuartzCore framework to your project. 29 | 30 | If you you it in your project, we'd love to hear about it: [contact@domesticcat.com.au](contact@domesticcat.com.au). 31 | 32 | Extra features 33 | -------------- 34 | * onTintColor 35 | * onText 36 | * offText 37 | * resize the frame to whatever you want to make fatter/skinnier controls 38 | 39 | License 40 | ------- 41 | 42 | Made available under the MIT License. Attribution would be nice. 43 | 44 | Collaboration 45 | ------------- 46 | 47 | If you have any feature requests/bugfixes etc. feel free to help out and send a pull request, or create a new issue. -------------------------------------------------------------------------------- /Puttio/Externals/DCSlider.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCSlider.h 3 | // 4 | // Copyright 2011 Domestic Cat. All rights reserved. 5 | // 6 | 7 | #import "DCControl.h" 8 | 9 | @interface DCSlider : DCControl 10 | { 11 | CGFloat touchHandleOffset; 12 | } 13 | 14 | @property CGFloat handleSize; // default: longest side / 6 (minimum of 35.0) 15 | @property CGFloat cornerRadius; // default: 3.0 16 | @property BOOL isHorizontalSlider; // default: NO 17 | @property BOOL biDirectional; // default: NO 18 | 19 | ///////////////////////// 20 | // Init/Custom Setters // 21 | ///////////////////////// 22 | 23 | - (id)initWithDelegate:(id)aDelegate; 24 | 25 | //////////////////// 26 | // Touch Handling // 27 | //////////////////// 28 | 29 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 30 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; 31 | 32 | //////////////////////// 33 | // Handle Positioning // 34 | //////////////////////// 35 | 36 | - (CGRect)rectForHandle; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Puttio/Externals/GMGridView/GMGridView-Constants.h: -------------------------------------------------------------------------------- 1 | // 2 | // GMGridView-Constants.h 3 | // GMGridView 4 | // 5 | // Created by Gulam Moledina on 11-12-14. 6 | // Copyright (c) 2011 GMoledina.ca. All rights reserved. 7 | // 8 | // Latest code can be found on GitHub: https://github.com/gmoledina/GMGridView 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy 11 | // of this software and associated documentation files (the "Software"), to deal 12 | // in the Software without restriction, including without limitation the rights 13 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the Software is 15 | // furnished to do so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in 18 | // all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | // THE SOFTWARE. 27 | // 28 | 29 | 30 | #ifndef GMGridView_GMGridView_Constants_h 31 | #define GMGridView_GMGridView_Constants_h 32 | 33 | 34 | // 35 | // ARC on iOS 4 and 5 36 | // 37 | 38 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 && !defined (GM_DONT_USE_ARC_WEAK_FEATURE) 39 | 40 | #define gm_weak weak 41 | #define __gm_weak __weak 42 | #define gm_nil(x) 43 | 44 | 45 | #else 46 | 47 | #define gm_weak unsafe_unretained 48 | #define __gm_weak __unsafe_unretained 49 | #define gm_nil(x) x = nil 50 | 51 | #endif 52 | 53 | 54 | // 55 | // Code specific 56 | // 57 | 58 | #define GMGV_INVALID_POSITION -1 59 | 60 | 61 | 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /Puttio/Externals/GMGridView/GMGridViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // GMGridViewCell.h 3 | // GMGridView 4 | // 5 | // Created by Gulam Moledina on 11-10-22. 6 | // Copyright (c) 2011 GMoledina.ca. All rights reserved. 7 | // 8 | // Latest code can be found on GitHub: https://github.com/gmoledina/GMGridView 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy 11 | // of this software and associated documentation files (the "Software"), to deal 12 | // in the Software without restriction, including without limitation the rights 13 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the Software is 15 | // furnished to do so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in 18 | // all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | // THE SOFTWARE. 27 | // 28 | 29 | #import 30 | #import "GMGridView-Constants.h" 31 | 32 | @interface GMGridViewCell : UIView 33 | 34 | @property (nonatomic, strong) UIView *contentView; // The contentView - default is nil 35 | @property (nonatomic, strong) UIImage *deleteButtonIcon; // Delete button image 36 | @property (nonatomic) CGPoint deleteButtonOffset; // Delete button offset relative to the origin 37 | @property (nonatomic, strong) NSString *reuseIdentifier; 38 | @property (nonatomic, getter=isHighlighted) BOOL highlighted; 39 | 40 | /// Override to release custom data before cell is reused. 41 | - (void)prepareForReuse; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Puttio/Externals/GMGridView/UIGestureRecognizer+GMGridViewAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizer+GMGridViewGestureAdditions.h 3 | // GMGridView 4 | // 5 | // Created by Gulam Moledina on 11-10-30. 6 | // Copyright (c) 2011 GMoledina.ca. All rights reserved. 7 | // 8 | // Latest code can be found on GitHub: https://github.com/gmoledina/GMGridView 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy 11 | // of this software and associated documentation files (the "Software"), to deal 12 | // in the Software without restriction, including without limitation the rights 13 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the Software is 15 | // furnished to do so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in 18 | // all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | // THE SOFTWARE. 27 | // 28 | 29 | #import 30 | #import "GMGridView-Constants.h" 31 | 32 | @interface UIGestureRecognizer (GMGridViewAdditions) 33 | 34 | - (void)end; 35 | - (BOOL)hasRecognizedValidGesture; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Puttio/Externals/GMGridView/UIGestureRecognizer+GMGridViewAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizer+GMGridViewGestureAdditions.m 3 | // GMGridView 4 | // 5 | // Created by Gulam Moledina on 11-10-30. 6 | // Copyright (c) 2011 GMoledina.ca. All rights reserved. 7 | // 8 | // Latest code can be found on GitHub: https://github.com/gmoledina/GMGridView 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy 11 | // of this software and associated documentation files (the "Software"), to deal 12 | // in the Software without restriction, including without limitation the rights 13 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the Software is 15 | // furnished to do so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in 18 | // all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | // THE SOFTWARE. 27 | // 28 | 29 | #import "UIGestureRecognizer+GMGridViewAdditions.h" 30 | 31 | @implementation UIGestureRecognizer (GMGridViewAdditions) 32 | 33 | - (void)end 34 | { 35 | BOOL currentStatus = self.enabled; 36 | self.enabled = NO; 37 | self.enabled = currentStatus; 38 | } 39 | 40 | - (BOOL)hasRecognizedValidGesture 41 | { 42 | return (self.state == UIGestureRecognizerStateChanged || self.state == UIGestureRecognizerStateBegan); 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Puttio/Externals/GMGridView/UIView+GMGridViewAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+GMGridViewShake.h 3 | // GMGridView 4 | // 5 | // Created by Gulam Moledina on 11-10-22. 6 | // Copyright (c) 2011 GMoledina.ca. All rights reserved. 7 | // 8 | // Latest code can be found on GitHub: https://github.com/gmoledina/GMGridView 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy 11 | // of this software and associated documentation files (the "Software"), to deal 12 | // in the Software without restriction, including without limitation the rights 13 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the Software is 15 | // furnished to do so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in 18 | // all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | // THE SOFTWARE. 27 | // 28 | 29 | #import 30 | #import "GMGridView-Constants.h" 31 | 32 | @interface UIView (GMGridViewAdditions) 33 | 34 | - (void)shakeStatus:(BOOL)enabled; 35 | - (void)recursiveEnumerateSubviewsUsingBlock:(void (^)(UIView *view, BOOL *stop))block; 36 | @end 37 | -------------------------------------------------------------------------------- /Puttio/Externals/ORWebVTT.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORWebVTT.h 3 | // Puttio 4 | // 5 | // Created by Orta on 28/09/2013. 6 | // Copyright (c) 2013 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORWebVTT : NSObject 12 | 13 | //+ (instancetype)webVTTWithSubRip:(SubRip *)subrip; 14 | // 15 | //- (void)saveToFile:(NSString *)filePath; 16 | //{ 17 | @end 18 | -------------------------------------------------------------------------------- /Puttio/Externals/ORWebVTT.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORWebVTT.m 3 | // Puttio 4 | // 5 | // Created by Orta on 28/09/2013. 6 | // Copyright (c) 2013 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORWebVTT.h" 10 | #import "SubRip.h" 11 | 12 | // https://en.wikipedia.org/wiki/WebVTT#WebVTT 13 | // http://dev.w3.org/html5/webvtt/ 14 | 15 | // doesn't look too hard, check each line for a "-->" and if it has it switch "," to "." 16 | 17 | @implementation ORWebVTT { 18 | NSMutableString *_content; 19 | } 20 | 21 | //+ (instancetype)webVTTWithSubRipFile:(NSString *)subripPath 22 | //{ 23 | // NSString *originalFile = [NSString stringWithContentsOfFile:subripPath encoding:<#(NSStringEncoding)#> error:<#(NSError *__autoreleasing *)#>] 24 | //} 25 | // 26 | //- (void)saveToFile:(NSString *)filePath 27 | //{ 28 | // 29 | //} 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Puttio/Externals/TreemapKit/TreemapView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "TreemapViewCell.h" 3 | 4 | @protocol TreemapViewDataSource; 5 | @protocol TreemapViewDelegate; 6 | 7 | @interface TreemapView : UIView { 8 | id dataSource; 9 | id delegate; 10 | 11 | BOOL initialized; 12 | } 13 | 14 | @property (nonatomic, retain) IBOutlet id dataSource; 15 | @property (nonatomic, retain) IBOutlet id delegate; 16 | 17 | - (void)reloadData; 18 | 19 | @end 20 | 21 | @protocol TreemapViewDelegate 22 | 23 | @optional 24 | 25 | - (void)treemapView:(TreemapView *)treemapView touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 26 | - (void)treemapView:(TreemapView *)treemapView touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; 27 | - (void)treemapView:(TreemapView *)treemapView touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; 28 | - (void)treemapView:(TreemapView *)treemapView touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; 29 | - (void)treemapView:(TreemapView *)treemapView tapped:(NSInteger)index; 30 | - (void)treemapView:(TreemapView *)treemapView updateCell:(TreemapViewCell *)cell forIndex:(NSInteger)index forRect:(CGRect)rect; 31 | 32 | @end 33 | 34 | @protocol TreemapViewDataSource 35 | 36 | - (NSArray *)valuesForTreemapView:(TreemapView *)treemapView; 37 | - (TreemapViewCell *)treemapView:(TreemapView *)treemapView cellForIndex:(NSInteger)index forRect:(CGRect)rect; 38 | 39 | @optional 40 | 41 | - (CGFloat)treemapView:(TreemapView *)treemapView separatorWidthForDepth:(NSInteger)depth; 42 | - (NSInteger)treemapView:(TreemapView *)treemapView separationPositionForDepth:(NSInteger)depth; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Puttio/Externals/TreemapKit/TreemapViewCell.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol TreemapViewCellDelegate; 4 | 5 | @interface TreemapViewCell : UIControl { 6 | UILabel *valueLabel; 7 | UILabel *textLabel; 8 | 9 | NSInteger index; 10 | 11 | id delegate; 12 | } 13 | 14 | @property (nonatomic, retain) UILabel *valueLabel; 15 | @property (nonatomic, retain) UILabel *textLabel; 16 | 17 | @property NSInteger index; 18 | 19 | @property (nonatomic, retain) id delegate; 20 | 21 | - (id)initWithFrame:(CGRect)frame; 22 | 23 | @end 24 | 25 | @protocol TreemapViewCellDelegate 26 | 27 | @optional 28 | 29 | - (void)treemapViewCell:(TreemapViewCell *)treemapViewCell tapped:(NSInteger)index; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Puttio/Externals/UIBarButtonItem+WEPopover.h: -------------------------------------------------------------------------------- 1 | /* 2 | * UIBarButtonItem+WEPopover.h 3 | * WEPopover 4 | * 5 | * Created by Werner Altewischer on 07/05/11. 6 | * Copyright 2010 Werner IT Consultancy. All rights reserved. 7 | * 8 | */ 9 | 10 | @interface UIBarButtonItem(WEPopover) 11 | 12 | - (CGRect)frameInView:(UIView *)v; 13 | - (UIView *)superview; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Puttio/Externals/UIBarButtonItem+WEPopover.m: -------------------------------------------------------------------------------- 1 | /* 2 | * UIBarButtonItem+WEPopover.m 3 | * WEPopover 4 | * 5 | * Created by Werner Altewischer on 07/05/11. 6 | * Copyright 2010 Werner IT Consultancy. All rights reserved. 7 | * 8 | */ 9 | 10 | #import "UIBarButtonItem+WEPopover.h" 11 | 12 | @implementation UIBarButtonItem(WEPopover) 13 | 14 | - (CGRect)frameInView:(UIView *)v { 15 | 16 | BOOL hasCustomView = (self.customView != nil); 17 | 18 | if (!hasCustomView) { 19 | UIView *tempView = [[UIView alloc] initWithFrame:CGRectZero]; 20 | self.customView = tempView; 21 | [tempView release]; 22 | } 23 | 24 | UIView *parentView = self.customView.superview; 25 | NSUInteger indexOfView = [parentView.subviews indexOfObject:self.customView]; 26 | 27 | if (!hasCustomView) { 28 | self.customView = nil; 29 | } 30 | UIView *button = (parentView.subviews)[indexOfView]; 31 | return [parentView convertRect:button.frame toView:v]; 32 | } 33 | 34 | - (UIView *)superview { 35 | 36 | BOOL hasCustomView = (self.customView != nil); 37 | 38 | if (!hasCustomView) { 39 | UIView *tempView = [[UIView alloc] initWithFrame:CGRectZero]; 40 | self.customView = tempView; 41 | [tempView release]; 42 | } 43 | 44 | UIView *parentView = self.customView.superview; 45 | 46 | if (!hasCustomView) { 47 | self.customView = nil; 48 | } 49 | return parentView; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Puttio/Externals/WEPopoverController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WEPopoverController.h 3 | // WEPopover 4 | // 5 | // Created by Werner Altewischer on 02/09/10. 6 | // Copyright 2010 Werner IT Consultancy. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WEPopoverContainerView.h" 11 | #import "WETouchableView.h" 12 | 13 | @class WEPopoverController; 14 | 15 | @protocol WEPopoverControllerDelegate 16 | 17 | - (void)popoverControllerDidDismissPopover:(WEPopoverController *)popoverController; 18 | - (BOOL)popoverControllerShouldDismissPopover:(WEPopoverController *)popoverController; 19 | 20 | @end 21 | 22 | /** 23 | * @brief Popover controller for the iPhone, mimicing the iPad UIPopoverController interface. See that class for more details. 24 | */ 25 | @interface WEPopoverController : NSObject { 26 | UIViewController *contentViewController; 27 | UIView *view; 28 | WETouchableView *backgroundView; 29 | 30 | BOOL popoverVisible; 31 | UIPopoverArrowDirection popoverArrowDirection; 32 | id delegate; 33 | CGSize popoverContentSize; 34 | WEPopoverContainerViewProperties *containerViewProperties; 35 | id context; 36 | NSArray *passthroughViews; 37 | } 38 | 39 | @property(nonatomic, retain) UIViewController *contentViewController; 40 | 41 | @property (nonatomic, readonly) UIView *view; 42 | @property (nonatomic, readonly, getter=isPopoverVisible) BOOL popoverVisible; 43 | @property (nonatomic, readonly) UIPopoverArrowDirection popoverArrowDirection; 44 | @property (nonatomic, assign) id delegate; 45 | @property (nonatomic, assign) CGSize popoverContentSize; 46 | @property (nonatomic, retain) WEPopoverContainerViewProperties *containerViewProperties; 47 | @property (nonatomic, retain) id context; 48 | @property (nonatomic, copy) NSArray *passthroughViews; 49 | 50 | - (id)initWithContentViewController:(UIViewController *)theContentViewController; 51 | 52 | - (void)dismissPopoverAnimated:(BOOL)animated; 53 | 54 | - (void)presentPopoverFromBarButtonItem:(UIBarButtonItem *)item 55 | permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections 56 | animated:(BOOL)animated; 57 | 58 | - (void)presentPopoverFromRect:(CGRect)rect 59 | inView:(UIView *)view 60 | permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections 61 | animated:(BOOL)animated; 62 | 63 | - (void)repositionPopoverFromRect:(CGRect)rect 64 | inView:(UIView *)view 65 | permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections; 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Puttio/Externals/WEPopoverParentView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WEPopoverParentView.h 3 | * WEPopover 4 | * 5 | * Created by Werner Altewischer on 02/09/10. 6 | * Copyright 2010 Werner IT Consultancy. All rights reserved. 7 | * 8 | */ 9 | 10 | @protocol WEPopoverParentView 11 | 12 | @optional 13 | - (CGRect)displayAreaForPopover; 14 | 15 | @end -------------------------------------------------------------------------------- /Puttio/Externals/WETouchableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // WETouchableView.h 3 | // WEPopover 4 | // 5 | // Created by Werner Altewischer on 12/21/10. 6 | // Copyright 2010 Werner IT Consultancy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class WETouchableView; 12 | 13 | /** 14 | * @brief delegate to receive touch events 15 | */ 16 | @protocol WETouchableViewDelegate 17 | 18 | - (void)viewWasTouched:(WETouchableView *)view; 19 | 20 | @end 21 | 22 | /** 23 | * @brief View that can handle touch events and/or disable touch forwording to child views 24 | */ 25 | @interface WETouchableView : UIView { 26 | BOOL touchForwardingDisabled; 27 | id delegate; 28 | NSArray *passthroughViews; 29 | BOOL testHits; 30 | } 31 | 32 | @property (nonatomic, assign) BOOL touchForwardingDisabled; 33 | @property (nonatomic, assign) id delegate; 34 | @property (nonatomic, copy) NSArray *passthroughViews; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Puttio/Externals/WETouchableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // WETouchableView.m 3 | // WEPopover 4 | // 5 | // Created by Werner Altewischer on 12/21/10. 6 | // Copyright 2010 Werner IT Consultancy. All rights reserved. 7 | // 8 | 9 | #import "WETouchableView.h" 10 | 11 | @interface WETouchableView(Private) 12 | 13 | - (BOOL)isPassthroughView:(UIView *)v; 14 | 15 | @end 16 | 17 | @implementation WETouchableView 18 | 19 | @synthesize touchForwardingDisabled, delegate, passthroughViews; 20 | 21 | - (void)dealloc { 22 | [passthroughViews release]; 23 | [super dealloc]; 24 | } 25 | 26 | - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { 27 | if (testHits) { 28 | return nil; 29 | } else if (touchForwardingDisabled) { 30 | return self; 31 | } else { 32 | UIView *hitView = [super hitTest:point withEvent:event]; 33 | 34 | if (hitView == self) { 35 | //Test whether any of the passthrough views would handle this touch 36 | testHits = YES; 37 | UIView *superHitView = [self.superview hitTest:point withEvent:event]; 38 | testHits = NO; 39 | 40 | if ([self isPassthroughView:superHitView]) { 41 | hitView = superHitView; 42 | } 43 | } 44 | 45 | return hitView; 46 | } 47 | } 48 | 49 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 50 | [self.delegate viewWasTouched:self]; 51 | } 52 | 53 | @end 54 | 55 | @implementation WETouchableView(Private) 56 | 57 | - (BOOL)isPassthroughView:(UIView *)v { 58 | 59 | if (v == nil) { 60 | return NO; 61 | } 62 | 63 | if ([passthroughViews containsObject:v]) { 64 | return YES; 65 | } 66 | 67 | return [self isPassthroughView:v.superview]; 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /Puttio/Externals/popoverArrowDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverArrowDown.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverArrowDown@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverArrowDown@2x.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverArrowLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverArrowLeft.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverArrowLeft@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverArrowLeft@2x.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverArrowRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverArrowRight.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverArrowRight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverArrowRight@2x.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverArrowUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverArrowUp.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverArrowUp@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverArrowUp@2x.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverBg.png -------------------------------------------------------------------------------- /Puttio/Externals/popoverBg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Externals/popoverBg@2x.png -------------------------------------------------------------------------------- /Puttio/FileController/BaseFileController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseFileController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 26/05/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FileController.h" 11 | 12 | @class AFHTTPRequestOperation; 13 | 14 | // these are here so the subclasses can access them if needs be 15 | 16 | @interface BaseFileController : NSObject { 17 | File *_file; 18 | NSInteger fileSize; 19 | } 20 | 21 | @property FileInfoViewController *infoController; 22 | @property File *file; 23 | 24 | - (void)markFileAsViewed; 25 | - (void)downloadFileAtAddress:(NSString *)address to:(NSString *)path backgroundable:(BOOL)showTransferInBG withCompletionBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success andFailureBlock:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Puttio/FileController/RarFileController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RarFileController.h 3 | // Puttio 4 | // 5 | // Created by David Grandinetti on 6/2/12. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "BaseFileController.h" 10 | 11 | @interface RarFileController : BaseFileController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/FileController/RarFileController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RarFileController.m 3 | // Puttio 4 | // 5 | // Created by David Grandinetti on 6/2/12. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "RarFileController.h" 10 | 11 | @implementation RarFileController 12 | 13 | + (BOOL)fileSupportedByController:(File *)aFile { 14 | NSSet *fileTypes = [NSSet setWithObjects:@"rar", nil]; 15 | if ([fileTypes containsObject:aFile.extension]) { 16 | return YES; 17 | } 18 | return NO; 19 | } 20 | 21 | - (NSString *)primaryButtonText { 22 | return @"Not Implemented"; 23 | } 24 | 25 | - (void)primaryButtonAction:(id)sender { 26 | // 27 | // 1 - build up a list of rar files in this folder [.rar,.r00.r01,...] 28 | // 29 | 30 | // 31 | // 2 - make a call to start the extraction. 32 | // 33 | 34 | // 35 | // 3 - subsequent calls to check status of extractions if this view is left open. 36 | // 37 | } 38 | 39 | - (BOOL)supportsSecondaryButton { 40 | return NO; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Puttio/FileController/UnknownFileController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UnknownFileController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 10/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "BaseFileController.h" 10 | 11 | @interface UnknownFileController : BaseFileController 12 | @end 13 | -------------------------------------------------------------------------------- /Puttio/FileController/VideoFileController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VideoFileController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 26/05/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "FileController.h" 10 | #import "BaseFileController.h" 11 | #import "MoviePlayer.h" 12 | #import "OROpenSubtitleDownloader.h" 13 | 14 | @class FileInfoViewController; 15 | @interface VideoFileController : BaseFileController 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/LocalFile.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocalFile.h 3 | // Puttio 4 | // 5 | // Created by David Grandinetti on 6/11/12. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LocalFile : NSObject 12 | 13 | @property (nonatomic, retain) NSString * id; 14 | @property (nonatomic, retain) NSString * name; 15 | 16 | + (id)fileWithTXTPath:(NSString *)path; 17 | + (void)finalizeFile:(File *)file; 18 | + (BOOL)localFileExists:(File *)file; 19 | + (NSString *)localPathForMovieWithFile:(File *)file; 20 | 21 | - (void)deleteItem; 22 | 23 | - (NSString *)localPathForFile; 24 | - (NSString *)localPathForScreenshot; 25 | - (BOOL)hasPreviewThumbnail; 26 | @end 27 | -------------------------------------------------------------------------------- /Puttio/LocalFile.m: -------------------------------------------------------------------------------- 1 | // 2 | // LocalFile.m 3 | // Puttio 4 | // 5 | // Created by David Grandinetti on 6/11/12. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "LocalFile.h" 10 | 11 | @implementation LocalFile 12 | 13 | + (id)fileWithTXTPath:(NSString *)path { 14 | LocalFile *file = [[LocalFile alloc] init]; 15 | file.id = [[[path componentsSeparatedByString:@".txt"][0] componentsSeparatedByString:@"/"] lastObject]; 16 | return file; 17 | } 18 | 19 | + (void)finalizeFile:(File *)file { 20 | [file.name writeToFile:[self fileWithExtension:@"txt" withID:file.id] atomically:YES encoding:NSASCIIStringEncoding error:nil]; 21 | } 22 | 23 | - (void)deleteItem { 24 | [[NSFileManager defaultManager] removeItemAtPath:[self localPathForFile] error:nil]; 25 | [[NSFileManager defaultManager] removeItemAtPath:[self.class fileWithExtension:@"txt" withID:self.id] error:nil]; 26 | [[NSFileManager defaultManager] removeItemAtPath:[self localPathForFile] error:nil]; 27 | } 28 | 29 | + (BOOL)localFileExists:(File *)file { 30 | return [[NSFileManager defaultManager] fileExistsAtPath:[self fileWithExtension:@"txt" withID:file.id]]; 31 | } 32 | 33 | + (NSString *)localPathForMovieWithFile:(File *)file { 34 | return [self fileWithExtension:@"mp4" withID:file.id]; 35 | } 36 | 37 | 38 | - (NSString *)name { 39 | return [self displayName]; 40 | } 41 | 42 | - (NSString *)displayName { 43 | NSString *path = [self.class fileWithExtension:@"txt" withID:self.id]; 44 | return [NSString stringWithContentsOfFile:path encoding:NSASCIIStringEncoding error:nil]; 45 | } 46 | 47 | - (NSString *)localPathForFile { 48 | return [self.class fileWithExtension:@"mp4" withID:self.id]; 49 | } 50 | 51 | - (NSString *)localPathForScreenshot { 52 | return [self.class fileWithExtension:@"jpg" withID:self.id]; 53 | } 54 | 55 | + (NSString *)fileWithExtension:(NSString *)extension withID:(NSString *)id { 56 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 57 | NSString *documentsDirectory = paths[0]; 58 | return [documentsDirectory stringByAppendingPathComponent:[id stringByAppendingPathExtension:extension]]; 59 | } 60 | 61 | - (BOOL)hasPreviewThumbnail { 62 | return YES; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Puttio/Models/Bookmark.h: -------------------------------------------------------------------------------- 1 | // 2 | // Bookmark.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @interface Bookmark : NSManagedObject 14 | 15 | @property (nonatomic, retain) NSString *name; 16 | @property (nonatomic, retain) NSString *url; 17 | @property (nonatomic, retain) NSDate *lastAccessed; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Puttio/Models/Bookmark.m: -------------------------------------------------------------------------------- 1 | // 2 | // Bookmark.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "Bookmark.h" 10 | 11 | @implementation Bookmark 12 | 13 | @dynamic name; 14 | @dynamic url; 15 | @dynamic lastAccessed; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Puttio/Models/Folder.h: -------------------------------------------------------------------------------- 1 | // 2 | // Folder.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 29/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORDisplayItemProtocol.h" 10 | 11 | @interface Folder : PKFolder 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Models/Folder.m: -------------------------------------------------------------------------------- 1 | // 2 | // Folder.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 29/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "Folder.h" 10 | 11 | @implementation Folder 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Models/Message.h: -------------------------------------------------------------------------------- 1 | // 2 | // Message.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 01/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Message : NSObject 12 | @property (strong) NSString *message; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Models/Message.m: -------------------------------------------------------------------------------- 1 | // 2 | // Message.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 01/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "Message.h" 10 | 11 | @implementation Message 12 | @synthesize message; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Models/SearchResult.h: -------------------------------------------------------------------------------- 1 | // 2 | // SearchResult.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 11/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | enum cellSelectedState { 12 | SearchResultNormal, 13 | SearchResultSending, 14 | SearchResultSent, 15 | SearchResultFailed 16 | }; 17 | 18 | @interface SearchResult : NSObject 19 | 20 | @property (assign) NSInteger ranking; 21 | @property (assign) NSInteger seedersCount; 22 | @property (assign) NSInteger peersCount; 23 | 24 | @property (assign) double size; 25 | @property (strong) NSString *hostName; 26 | @property (strong) NSString *torrentURL; 27 | @property (strong) NSString *magnetURL; 28 | @property (strong) NSString *name; 29 | @property (strong) NSString *sizeString; 30 | 31 | @property (assign) int selectedState; 32 | 33 | - (void)generateRanking; 34 | - (NSString *)representedPath; 35 | - (NSString *)representedSize; 36 | 37 | + (SearchResult *)resultWithArchiveOrgDictionary: (NSDictionary *)item; 38 | + (SearchResult *)resultWithMininovaDictionary: (NSDictionary *)item; 39 | + (SearchResult *)resultWithISOHuntDictionary: (NSDictionary *)item; 40 | + (SearchResult *)resultWithFenopyDictionary: (NSDictionary *)item; 41 | @end 42 | -------------------------------------------------------------------------------- /Puttio/Models/Transfer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Transfer.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 01/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Transfer : PKTransfer 12 | @end 13 | -------------------------------------------------------------------------------- /Puttio/Models/Transfer.m: -------------------------------------------------------------------------------- 1 | // 2 | // Transfer.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 01/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "Transfer.h" 10 | 11 | @implementation Transfer 12 | @end 13 | -------------------------------------------------------------------------------- /Puttio/Models/WatchedItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // WatchedItem.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 05/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class WatchedList; 13 | 14 | @interface WatchedItem : NSManagedObject 15 | 16 | @property (nonatomic, retain) NSString *fileID; 17 | @property (nonatomic, retain) WatchedList *list; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Puttio/Models/WatchedItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // WatchedItem.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 05/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "WatchedItem.h" 10 | #import "WatchedList.h" 11 | 12 | 13 | @implementation WatchedItem 14 | 15 | @dynamic list, fileID; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Puttio/NSDictionary+JSON.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JSON.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (JSON) 12 | - (NSString *)toJSONString; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/NSDictionary+JSON.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JSON.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+JSON.h" 10 | 11 | @implementation NSDictionary (JSON) 12 | 13 | - (NSString *)toJSONString { 14 | NSError *error = nil; 15 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self options:0 error:&error]; 16 | if (!jsonData) { 17 | NSLog(@"Got an error: %@", error); 18 | return nil; 19 | } 20 | 21 | return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Puttio/NSFileManager+SkipBackup.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager+SkipBackup.h 3 | // Artsy Folio 4 | // 5 | // Created by orta therox on 02/08/2012. 6 | // Copyright (c) 2012 http://art.sy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSFileManager (SkipBackup) 12 | - (void)addSkipBackupAttributeToFileAtPath:(NSString *)filePath; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/NSFileManager+SkipBackup.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager+SkipBackup.m 3 | // Artsy Folio 4 | // 5 | // Created by orta therox on 02/08/2012. 6 | // Copyright (c) 2012 http://art.sy. All rights reserved. 7 | // 8 | 9 | #import "NSFileManager+SkipBackup.h" 10 | #include 11 | 12 | @implementation NSFileManager (SkipBackup) 13 | 14 | - (void)addSkipBackupAttributeToFileAtPath:(NSString *)filePath { 15 | if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { 16 | const char* filePathChar = [filePath fileSystemRepresentation]; 17 | 18 | const char* attrName = "com.apple.MobileBackup"; 19 | u_int8_t attrValue = 1; 20 | 21 | setxattr(filePathChar, attrName, &attrValue, sizeof(attrValue), 0, 0); 22 | }else { 23 | NSLog(@"File does not exist at path : %@ for adding skip backup to", filePath); 24 | } 25 | } 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Puttio/NSString+StringBetweenStrings.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+StringBetweenStrings.h 3 | // Artsy Folio 4 | // 5 | // Created by orta therox on 03/10/2012. 6 | // Copyright (c) 2012 http://art.sy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (StringBetweenStrings) 12 | 13 | // on a string "hello world" with arguments "e" and "d" 14 | // will return "llo world" or nil if it can't find the start or end. 15 | 16 | - (NSString *)substringBetween:(NSString *)start and:(NSString *)end; 17 | @end 18 | -------------------------------------------------------------------------------- /Puttio/NSString+StringBetweenStrings.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+StringBetweenStrings.m 3 | // Artsy Folio 4 | // 5 | // Created by orta therox on 03/10/2012. 6 | // Copyright (c) 2012 http://art.sy. All rights reserved. 7 | // 8 | 9 | #import "NSString+StringBetweenStrings.h" 10 | 11 | @implementation NSString (StringBetweenStrings) 12 | 13 | - (NSString *)substringBetween:(NSString *)start and:(NSString *)end { 14 | NSRange startingRange = [self rangeOfString:start]; 15 | NSRange endingRange = [self rangeOfString:end]; 16 | 17 | if (startingRange.location == NSNotFound || endingRange.location == NSNotFound) { 18 | return nil; 19 | } 20 | 21 | NSInteger length = endingRange.location - startingRange.location - startingRange.length; 22 | if (length < 0) { 23 | NSLog(@"length is below zero, you need a more specific end result"); 24 | return nil; 25 | } 26 | 27 | NSInteger location = startingRange.location + startingRange.length; 28 | 29 | if (length + location > self.length || location < 0) { 30 | return nil; 31 | } 32 | 33 | return [self substringWithRange:NSMakeRange(location, length)]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Puttio/Networking/LoginViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OAuthViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 23/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PutIOOAuthHelper.h" 11 | 12 | @class LoginViewController; 13 | @class ORFlatButton; 14 | 15 | @protocol OAuthVCDelegate 16 | - (void)authorizationDidFinishWithController:(LoginViewController *)controller; 17 | @end 18 | 19 | @interface LoginViewController : UIViewController 20 | @property (weak, nonatomic) id delegate; 21 | 22 | @property (strong, nonatomic) IBOutlet PutIOOAuthHelper *authHelper; 23 | @property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityView; 24 | @property (weak, nonatomic) IBOutlet UITextField *usernameTextfield; 25 | @property (weak, nonatomic) IBOutlet UITextField *passwordTextfield; 26 | @property (weak, nonatomic) IBOutlet UIView *errorHeaderView; 27 | @property (weak, nonatomic) IBOutlet UILabel *warningLabel; 28 | @property (weak, nonatomic) IBOutlet UIView *loginViewWrapper; 29 | @property (weak, nonatomic) IBOutlet UIButton *loginButton; 30 | @property (weak, nonatomic) IBOutlet UIWebView *webView; 31 | @property (weak, nonatomic) IBOutlet UIView *passwordPaddingView; 32 | @property (weak, nonatomic) IBOutlet UIView *usernamePaddingView; 33 | @property (weak, nonatomic) IBOutlet ORFlatButton *somethingsWrongButton; 34 | @property (weak, nonatomic) IBOutlet ORFlatButton *statusUpdateButton; 35 | 36 | 37 | - (IBAction)loginPressed:(id)sender; 38 | - (IBAction)backTapped:(id)sender; 39 | - (IBAction)statusUpdateTapped:(id)sender; 40 | - (IBAction)somethingsWrongTapped:(id)sender; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Puttio/ORAnimatedTickView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ARAnimatedTickView.h 3 | // Artsy Folio 4 | // 5 | // Created by orta therox on 06/10/2012. 6 | // Copyright (c) 2012 http://art.sy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORAnimatedTickView : UIView 12 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/ORAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORAppDelegate.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LoginViewController.h" 11 | 12 | @interface ORAppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; 17 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; 18 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; 19 | 20 | - (void)saveContext; 21 | - (NSURL *)applicationDocumentsDirectory; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Puttio/ORFileDownloadOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // ARFileDownloadOperation.h 3 | // Artsy Folio 4 | // 5 | // Created by orta therox on 24/07/2012. 6 | // Copyright (c) 2012 http://art.sy. All rights reserved. 7 | // 8 | 9 | #import "AFHTTPRequestOperation.h" 10 | 11 | @interface ORFileDownloadOperation : AFHTTPRequestOperation 12 | 13 | + (ORFileDownloadOperation *)fileDownloadFromURL:(NSURL *)url toLocalPath:(NSString *)localPath; 14 | @property BOOL shouldBackupFileToCloud; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/ORFileDownloadOperation.m: -------------------------------------------------------------------------------- 1 | // 2 | // ARFileDownloadOperation.m 3 | // Artsy Folio 4 | // 5 | // Created by orta therox on 24/07/2012. 6 | // Copyright (c) 2012 http://art.sy. All rights reserved. 7 | // 8 | 9 | #import "ORFileDownloadOperation.h" 10 | #import "NSFileManager+SkipBackup.h" 11 | 12 | @interface ORFileDownloadOperation () 13 | @property (strong) NSString *localPath; 14 | @end 15 | 16 | @implementation ORFileDownloadOperation 17 | 18 | + (ORFileDownloadOperation *)fileDownloadFromURL:(NSURL *)url toLocalPath:(NSString *)localPath { 19 | NSURLRequest *request = [NSURLRequest requestWithURL:url]; 20 | ORFileDownloadOperation *this = [[self alloc] initWithRequest:request]; 21 | this.localPath = localPath; 22 | this.outputStream = [NSOutputStream outputStreamToFileAtPath:localPath append:NO]; 23 | this.shouldBackupFileToCloud = NO; 24 | return this; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Puttio/ORMigration.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORMigration.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/10/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORMigration : NSObject 12 | + (void)migrate; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/ORMigration.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORMigration.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/10/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORMigration.h" 10 | 11 | @implementation ORMigration 12 | 13 | + (void)migrate { 14 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 15 | // NSInteger lastVersion = [defaults integerForKey:ORMigrationVersionDefault]; 16 | 17 | if (![defaults objectForKey:ORSubtitleLanguageDefault]) { 18 | [defaults setObject:@",eng" forKey:ORSubtitleLanguageDefault]; 19 | } 20 | } 21 | 22 | + (NSURL *)applicationDocumentsDirectory { 23 | return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; 24 | } 25 | @end 26 | -------------------------------------------------------------------------------- /Puttio/ORSettingsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORSettingsViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 15/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORSettingsViewController : UIViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UILabel *subtitlesLabel; 14 | 15 | @property (strong, nonatomic) IBOutletCollection(UIButton) NSArray *flagButtons; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Puttio/Processes/BaseProcess.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseProcess.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 16/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class BaseProcess; 12 | @protocol BaseProcessDelegate 13 | - (void)processDidFinish:(BaseProcess *)process; 14 | @end 15 | 16 | @interface BaseProcess : NSObject 17 | 18 | @property (nonatomic, assign) CGFloat processProgress; 19 | @property (assign) BOOL finished; 20 | @property NSString *primaryDescription; 21 | @property (weak) id delegate; 22 | @property (strong) NSString *id; 23 | 24 | - (id)initWithFile:(File *)file; 25 | - (void)start; 26 | - (void)tick; 27 | - (void)end; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Puttio/Processes/BaseProcess.m: -------------------------------------------------------------------------------- 1 | // 2 | // BaseProcess.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 16/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "BaseProcess.h" 10 | #import "StatusViewController.h" 11 | 12 | @interface BaseProcess(){ 13 | NSTimer *timer_; 14 | int killCount; 15 | } 16 | @end 17 | 18 | @implementation BaseProcess 19 | 20 | - (id)initWithFile:(File *)file { 21 | if (self = [super init]) { 22 | self.id = file.id; 23 | [StatusViewController.sharedController addProcess:self]; 24 | self.delegate = StatusViewController.sharedController; 25 | [self start]; 26 | } 27 | return self; 28 | } 29 | 30 | - (void)start { 31 | timer_ = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(tick) userInfo:nil repeats:YES]; 32 | [timer_ fire]; 33 | } 34 | 35 | - (void)tick { 36 | if (self.finished) { 37 | [self end]; 38 | } 39 | } 40 | 41 | - (void)end { 42 | self.finished = 1; 43 | [timer_ invalidate]; 44 | [self.delegate processDidFinish:self]; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Puttio/Processes/ConvertToMP4Process.h: -------------------------------------------------------------------------------- 1 | // 2 | // ConvertToMP4Process.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 16/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "BaseProcess.h" 10 | 11 | @interface ConvertToMP4Process : BaseProcess 12 | 13 | + (ConvertToMP4Process *)processWithFile:(File *)file; 14 | 15 | @property NSString *message; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Puttio/Processes/ConvertToMP4Process.m: -------------------------------------------------------------------------------- 1 | // 2 | // ConvertToMP4Process.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 16/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ConvertToMP4Process.h" 10 | 11 | @interface ConvertToMP4Process () 12 | @property PKFile *file; 13 | @end 14 | 15 | @implementation ConvertToMP4Process { 16 | BOOL _waiting; 17 | } 18 | 19 | + (ConvertToMP4Process *)processWithFile:(File *)aFile { 20 | ConvertToMP4Process *this = [[self alloc] initWithFile:aFile]; 21 | this.file = aFile; 22 | return this; 23 | } 24 | 25 | - (NSString *)primaryDescription { 26 | return [NSString stringWithFormat:@"Converting %@ for iOS", self.file.displayName]; 27 | } 28 | 29 | - (void)tick { 30 | [super tick]; 31 | 32 | if (_file && !_waiting) { 33 | _waiting = YES; 34 | 35 | [[PutIOClient sharedClient] getMP4InfoForFile:_file :^(PKMP4Status *status) { 36 | 37 | switch (status.mp4Status) { 38 | case PKMP4StatusCompleted: 39 | [self end]; 40 | break; 41 | case PKMP4StatusConverting: 42 | _message = nil; 43 | self.processProgress = status.progress.floatValue; 44 | break; 45 | case PKMP4StatusQueued: 46 | _message = @"In Queue"; 47 | break; 48 | case PKMP4StatusNotAvailable: 49 | _message = @"Not Available"; 50 | default: 51 | _message = [NSString stringWithFormat:@"%@ Conversion Error", [UIDevice deviceString]]; 52 | [self end]; 53 | break; 54 | } 55 | _waiting = NO; 56 | 57 | } failure:^(NSError *error) { 58 | _waiting = NO; 59 | }]; 60 | } 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /Puttio/Processes/FileDownloadProcess.h: -------------------------------------------------------------------------------- 1 | // 2 | // FileDownloadProcess.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 16/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "BaseProcess.h" 10 | 11 | @class AFHTTPRequestOperation; 12 | @interface FileDownloadProcess : BaseProcess 13 | 14 | + (FileDownloadProcess *)processWithHTTPRequest:(AFHTTPRequestOperation *)operation andFile:(File *)file; 15 | @end 16 | -------------------------------------------------------------------------------- /Puttio/Processes/FileDownloadProcess.m: -------------------------------------------------------------------------------- 1 | // 2 | // FileDownloadProcess.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 16/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "FileDownloadProcess.h" 10 | #import "AFHTTPRequestOperation.h" 11 | 12 | @interface FileDownloadProcess () 13 | @property (weak) AFHTTPRequestOperation *request; 14 | @end 15 | 16 | @implementation FileDownloadProcess 17 | 18 | + (FileDownloadProcess *)processWithHTTPRequest:(AFHTTPRequestOperation *)operation andFile:(File *)file { 19 | FileDownloadProcess *this = [[self alloc] initWithFile:file]; 20 | this.request = operation; 21 | this.primaryDescription = file.displayName; 22 | return this; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Puttio/Protocols/FileController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FileController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 26/05/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class FileInfoViewController; 12 | @protocol FileController 13 | 14 | + (id)controller; 15 | 16 | + (BOOL)fileSupportedByController:(File *)file; 17 | 18 | @property FileInfoViewController *infoController; 19 | @property File *file; 20 | 21 | - (NSString *)primaryButtonText; 22 | - (void)primaryButtonAction:(id)sender; 23 | 24 | - (BOOL)supportsSecondaryButton; 25 | - (NSString *)secondaryButtonText; 26 | - (void)secondaryButtonAction:(id)sender; 27 | 28 | -(NSString *)descriptiveTextForFile; 29 | - (void)viewWillDissapear; 30 | @end 31 | -------------------------------------------------------------------------------- /Puttio/Protocols/ORDisplayItemProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORDisplayItemProtocol.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 29/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol ORDisplayItemProtocol 12 | 13 | @property (nonatomic, retain) NSString *contentType; 14 | @property (nonatomic, retain) NSString *id; 15 | @property (nonatomic, retain) NSString *name; 16 | @property (nonatomic, retain) NSString *displayName; 17 | @property (nonatomic, retain) NSNumber *size; 18 | @property (nonatomic, retain) NSString *screenshot; 19 | @property (nonatomic, retain) NSString *parentID; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Puttio/Putio.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.ubiquity-container-identifiers 6 | 7 | $(TeamIdentifierPrefix)com.github.orta.puttio 8 | 9 | com.apple.developer.ubiquity-kvstore-identifier 10 | $(TeamIdentifierPrefix)com.github.orta.puttio 11 | keychain-access-groups 12 | 13 | $(AppIdentifierPrefix)com.github.orta.puttio 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Puttio/Puttio-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Puttio' target in the 'Puttio' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #import 15 | #import "PutIOClient.h" 16 | #import "Constants.h" 17 | #import "UIColor+PutioColours.h" 18 | #import "NSString+StripHTML.h" 19 | #import "NSManagedObject+ActiveRecord.h" 20 | #import "UIDevice+deviceInfo.h" 21 | #import "UIFont+Puttio.h" 22 | 23 | #import "ARAnalytics.h" 24 | #import "PutioKit.h" 25 | 26 | // models 27 | #import "File.h" 28 | #import "Folder.h" 29 | #import "Transfer.h" 30 | #import "Message.h" 31 | #import "SearchResult.h" 32 | 33 | 34 | // Add support for subscripting to the iOS 5 SDK. 35 | #if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000 36 | @interface NSObject (Subscripting) 37 | 38 | - (id)objectAtIndexedSubscript:(NSUInteger)idx; 39 | - (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx; 40 | - (void)setObject:(id)obj forKeyedSubscript:(id )key; 41 | - (id)objectForKeyedSubscript:(id)key; 42 | 43 | @end 44 | #endif 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /Puttio/Puttio.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | Puttio 5 (v1.5).xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /Puttio/Resources/Arabic@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Arabic@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Brazil@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Brazil@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Bulgaria@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Bulgaria@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/CCLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/CCLogo.png -------------------------------------------------------------------------------- /Puttio/Resources/CCLogo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/CCLogo@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/CCNext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/CCNext.png -------------------------------------------------------------------------------- /Puttio/Resources/CCNext@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/CCNext@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/CloseSearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/CloseSearch.png -------------------------------------------------------------------------------- /Puttio/Resources/CloseSearch@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/CloseSearch@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Cutest_Cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Cutest_Cat.jpg -------------------------------------------------------------------------------- /Puttio/Resources/Czech@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Czech@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/DotSlash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/DotSlash.png -------------------------------------------------------------------------------- /Puttio/Resources/DotSlash@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/DotSlash@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/English@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/English@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Exo-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Exo-Bold.otf -------------------------------------------------------------------------------- /Puttio/Resources/Exo-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Exo-Light.otf -------------------------------------------------------------------------------- /Puttio/Resources/Finnish@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Finnish@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Folder.png -------------------------------------------------------------------------------- /Puttio/Resources/Folder@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Folder@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/France@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/France@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Github.png -------------------------------------------------------------------------------- /Puttio/Resources/Github@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Github@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Greek@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Greek@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Hand.png -------------------------------------------------------------------------------- /Puttio/Resources/Hand@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Hand@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Hungry@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Hungry@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Indonesia@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Indonesia@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/LoadingSpinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/LoadingSpinner.png -------------------------------------------------------------------------------- /Puttio/Resources/LoadingSpinner@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/LoadingSpinner@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/MP4Indicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/MP4Indicator.png -------------------------------------------------------------------------------- /Puttio/Resources/MP4Indicator@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/MP4Indicator@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Media-Library-Long@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Media-Library-Long@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/MediaLibrary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/MediaLibrary.png -------------------------------------------------------------------------------- /Puttio/Resources/MediaPlayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/MediaPlayer.png -------------------------------------------------------------------------------- /Puttio/Resources/MediaPlayer@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/MediaPlayer@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Paper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Paper.png -------------------------------------------------------------------------------- /Puttio/Resources/Paper@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Paper@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Placeholder.png -------------------------------------------------------------------------------- /Puttio/Resources/Placeholder@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Placeholder@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Poland@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Poland@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Portuguese@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Portuguese@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/RefreshButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/RefreshButton.png -------------------------------------------------------------------------------- /Puttio/Resources/RefreshButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/RefreshButton@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Romania@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Romania@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Russian@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Russian@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Spain@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Spain@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/TransferComplete@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/TransferComplete@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/TransferDownloading@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/TransferDownloading@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/TransferError@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/TransferError@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/TransferUploading@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/TransferUploading@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Transfers-Long@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Transfers-Long@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Transfers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Transfers.png -------------------------------------------------------------------------------- /Puttio/Resources/Transfers@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Transfers@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Turkey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Turkey@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/TwitterBird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/TwitterBird.png -------------------------------------------------------------------------------- /Puttio/Resources/TwitterBird@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/TwitterBird@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/Ukeranian@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/Ukeranian@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/WatchedSash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/WatchedSash.png -------------------------------------------------------------------------------- /Puttio/Resources/WatchedSash@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/WatchedSash@2x.png -------------------------------------------------------------------------------- /Puttio/Resources/mail.html: -------------------------------------------------------------------------------- 1 | 2 |

Put.IO Feedback

3 |

 

4 |

 

5 |

 

6 |

Device Details

7 |

Device : {{Device}} - {{iOS Version}}
Version : {{Version}}

-------------------------------------------------------------------------------- /Puttio/Resources/orta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/orta.png -------------------------------------------------------------------------------- /Puttio/Resources/orta@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Puttio/Resources/orta@2x.png -------------------------------------------------------------------------------- /Puttio/Utils/MoviePlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MoviePlayer.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class MoviePlayer; 13 | 14 | @protocol MoviePlayerDelegate 15 | - (void)moviePlayer:(MoviePlayer *)player didEndWithError:(NSString *)error; 16 | @end 17 | 18 | @interface MoviePlayer : NSObject 19 | @property MPMoviePlayerController *mediaPlayer; 20 | @property (weak) id delegate; 21 | 22 | + (void)streamMovieAtPath:(NSString *)path withFile:(File *)file; 23 | + (void)watchLocalMovieAtPath:(NSString *)path; 24 | + (MoviePlayer *)sharedPlayer; 25 | @end 26 | -------------------------------------------------------------------------------- /Puttio/Utils/ORDefaults.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORDefaults.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 06/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORDefaults : NSObject 12 | + (void)registerDefaults; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Utils/ORDefaults.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORDefaults.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 06/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORDefaults.h" 10 | 11 | @implementation ORDefaults 12 | + (void)registerDefaults { 13 | @autoreleasepool { 14 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 15 | 16 | NSString *appVersion = [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"]; 17 | [defaults setObject:appVersion forKey:ORAppVersion]; 18 | [defaults setBool:YES forKey:ORShowLeftSidebarDefault]; 19 | [defaults setBool:YES forKey:ORShowRightSidebarDefault]; 20 | 21 | // Mark defaults as loaded 22 | [defaults setBool:YES forKey:ORDefaultsAreLoaded]; 23 | [defaults synchronize]; 24 | } 25 | } 26 | @end 27 | -------------------------------------------------------------------------------- /Puttio/Utils/ORDownloadCleanup.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORDownloadCleanup.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 03/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORDownloadCleanup : NSObject 12 | + (void)cleanup; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Utils/ORDownloadCleanup.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORDownloadCleanup.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 03/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORDownloadCleanup.h" 10 | #import "LocalFile.h" 11 | #import "StatusViewController.h" 12 | 13 | @implementation ORDownloadCleanup 14 | 15 | + (void)cleanup { 16 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 17 | NSString *documentsDirectory = paths[0]; 18 | NSFileManager *fileManager = [NSFileManager defaultManager]; 19 | NSError *error = nil; 20 | NSArray *filesInUserDocs = [fileManager contentsOfDirectoryAtPath:documentsDirectory error:&error]; 21 | if (error) { 22 | NSLog(@"error %@", error.localizedDescription); 23 | return; 24 | } 25 | 26 | // Get all the txt files 27 | NSMutableArray *knownIDs = [NSMutableArray array]; 28 | for (NSString *path in filesInUserDocs) { 29 | if ([path isEqualToString:@"Puttio.sqlite"]) continue; 30 | if ([path rangeOfString:@".txt"].location != NSNotFound){ 31 | NSString *fileID = [path componentsSeparatedByString:@"."][0]; 32 | [knownIDs addObject:fileID]; 33 | } 34 | } 35 | 36 | // Get all the current download process IDs 37 | [knownIDs addObjectsFromArray:[StatusViewController.sharedController processIDs]]; 38 | 39 | for (NSString *path in filesInUserDocs) { 40 | NSString *fileID = [path componentsSeparatedByString:@"."][0]; 41 | if (![knownIDs containsObject:fileID]) { 42 | [[NSFileManager defaultManager] removeItemAtPath:[documentsDirectory stringByAppendingPathComponent:path] error:nil]; 43 | } 44 | } 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Puttio/Utils/ORPasteboardParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORPasteboardParser.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/11/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORPasteboardParser : NSObject 12 | + (NSSet *)submitableURLsInPasteboard; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Utils/ORPasteboardParser.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORPasteboardParser.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/11/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORPasteboardParser.h" 10 | 11 | @implementation ORPasteboardParser 12 | 13 | + (NSSet *)submitableURLsInPasteboard { 14 | UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; 15 | NSMutableSet *objects = [NSMutableSet setWithArray:pasteboard.strings]; 16 | NSMutableSet *urlsToSubmit = [NSMutableSet set]; 17 | 18 | [objects addObjectsFromArray:pasteboard.URLs]; 19 | 20 | for (id object in objects.allObjects) { 21 | NSString *url = object; 22 | if ([object isMemberOfClass:[NSURL class]]) { 23 | url = [object absoluteString]; 24 | } 25 | 26 | if ([url rangeOfString:@"magnet"].location != NSNotFound) { 27 | [urlsToSubmit addObject:url]; 28 | } 29 | else if ([url rangeOfString:@".torrent"].location != NSNotFound){ 30 | [urlsToSubmit addObject:url]; 31 | } 32 | } 33 | 34 | if(urlsToSubmit.count){ 35 | return urlsToSubmit; 36 | } else { 37 | return nil; 38 | } 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Puttio/Utils/SearchController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SearchController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class SearchController; 12 | @protocol SearchResultsDelegate 13 | - (void)searchController:(SearchController *)controller foundResults:(NSArray *)searchResults; 14 | - (void)searchControllerFoundNoResults:(SearchController *)controller; 15 | @end 16 | 17 | @interface SearchController : NSObject 18 | @property (weak) NSObject *delegate; 19 | + (SearchController *)sharedInstance; 20 | + (void)searchForString:(NSString *)query; 21 | @end 22 | -------------------------------------------------------------------------------- /Puttio/Utils/ThreeColumnViewManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // ThreeColumnViewManager.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 06/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ThreeColumnViewManager : NSObject 12 | 13 | @property UIView *leftSidebar; 14 | @property UIView *rightSidebar; 15 | @property UIView *centerView; 16 | @property (weak, nonatomic) IBOutlet UIView *view; 17 | 18 | - (void)setup; 19 | - (void)setupLayout; 20 | @end 21 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/AccountViewController.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // AccountViewController.h 4 | // Puttio 5 | // 6 | // Created by orta therox on 24/06/2012. 7 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | @class ORSimpleProgress, DCRoundSwitch; 13 | @interface AccountViewController : UIViewController 14 | 15 | @property (weak, nonatomic) IBOutlet ORSimpleProgress *accountSpaceLeftProgress; 16 | @property (weak, nonatomic) IBOutlet UILabel *searchInfoLabel; 17 | @property (weak, nonatomic) IBOutlet UILabel *welcomeAccountLabel; 18 | @property (weak, nonatomic) IBOutlet DCRoundSwitch *creativeCommonsSwitch; 19 | @property (weak, nonatomic) IBOutlet UILabel *percentageLabel; 20 | 21 | @property (weak, nonatomic) IBOutlet UILabel *accountSpaceLabel; 22 | 23 | - (IBAction)addToTwitter:(id)sender; 24 | - (IBAction)githubTapped:(id)sender; 25 | - (IBAction)ortaTapped:(id)sender; 26 | - (IBAction)feedbackTapped:(id)sender; 27 | - (IBAction)settingsTapped:(id)sender; 28 | - (IBAction)openPutIO:(id)sender; 29 | 30 | @property (weak, nonatomic) IBOutlet UIView *ortaInfoBackground; 31 | @property (weak, nonatomic) IBOutlet UILabel *ortaInfoTitleLabel; 32 | @property (weak, nonatomic) IBOutlet UILabel *ortaInfoBodyLAbel; 33 | - (IBAction)dbgrandiTapped:(id)sender; 34 | - (IBAction)putIOTapped:(id)sender; 35 | 36 | + (void)openTwitter:(NSString *)username; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/AudioViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AudioViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 31/08/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ModalZoomView.h" 11 | 12 | @interface AudioViewController : UIViewController 13 | 14 | @property (nonatomic) NSObject *item; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/FeedbackViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FeedbackViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 21/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ModalZoomView.h" 11 | #import 12 | #import 13 | 14 | @interface FeedbackViewController : UIViewController 15 | - (IBAction)review:(id)sender; 16 | - (IBAction)emailDeveloper:(id)sender; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/FileInfoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FileInfoViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 01/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ModalZoomView.h" 10 | #import "ORSimpleProgress.h" 11 | 12 | @interface FileInfoViewController : UIViewController 13 | 14 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 15 | @property (weak, nonatomic) IBOutlet UILabel *additionalInfoLabel; 16 | @property (weak, nonatomic) IBOutlet UILabel *fileSizeLabel; 17 | 18 | @property (weak, nonatomic) IBOutlet UIButton *primaryButton; 19 | @property (weak, nonatomic) IBOutlet UIButton *secondaryButton; 20 | 21 | @property (weak, nonatomic) IBOutlet UIImageView *thumbnailImageView; 22 | @property (weak, nonatomic) IBOutlet ORSimpleProgress *progressView; 23 | 24 | - (IBAction)primaryButtonTapped:(id)sender; 25 | - (IBAction)secondaryButtonTapped:(id)sender; 26 | 27 | @property File *item; 28 | 29 | - (void)setProgressInfoHidden:(BOOL)hidden; 30 | 31 | - (void)enableButtons; 32 | - (void)disableButtons; 33 | 34 | - (void)showProgress; 35 | - (void)hideProgress; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/FolderViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FolderViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 04/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GMGridView.h" 11 | #import "TreemapView.h" 12 | 13 | @class BrowsingViewController; 14 | @interface FolderViewController : UIViewController 15 | 16 | @property (nonatomic, strong) Folder *folder; 17 | @property (nonatomic, strong) NSArray *folderItems; 18 | @property GMGridView *gridView; 19 | @property (weak) BrowsingViewController *browsingViewController; 20 | 21 | - (void)reloadItemsFromServer; 22 | - (void)highlightItemAtIndex:(int)position; 23 | 24 | - (void)showTreeMap; 25 | - (void)removeTreeMap; 26 | @end 27 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ItemDeletionViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ItemDeletionViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 04/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ModalZoomView.h" 11 | 12 | @class ORFlatButton; 13 | @interface ItemDeletionViewController : UIViewController 14 | 15 | @property NSObject *item; 16 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 17 | @property (weak, nonatomic) IBOutlet UIActivityIndicatorView *networkActivityView; 18 | @property (weak, nonatomic) IBOutlet ORFlatButton *deleteButton; 19 | @property (weak, nonatomic) IBOutlet ORFlatButton *cancelButton; 20 | 21 | - (IBAction)deleteTapped:(id)sender; 22 | - (IBAction)cancelTapped:(id)sender; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/LocalBrowsingViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocalBrowsingViewController.h 3 | // Puttio 4 | // 5 | // Created by David Grandinetti on 6/10/12. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "BrowsingViewController.h" 10 | 11 | @interface LocalBrowsingViewController : BrowsingViewController 12 | 13 | @property (strong, nonatomic) IBOutlet UIView *noItemsView; 14 | @property (weak, nonatomic) IBOutlet UILabel *deviceStoredLabel; 15 | @property (weak, nonatomic) IBOutlet UILabel *deviceSpaceLeftLabel; 16 | @property (weak, nonatomic) IBOutlet UIView *phoneBottomBarView; 17 | @property (weak, nonatomic) IBOutlet UILabel *phoneDeviceStoredLabel; 18 | @property (weak, nonatomic) IBOutlet UILabel *phoneDeviceLeftLabel; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ModalZoomView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ModalZoomViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 01/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ModalZoomView; 12 | @protocol ModalZoomViewControllerDelegate 13 | 14 | @optional 15 | - (void)setItem:(id)item; 16 | - (CGSize)sizeForZoomView:(ModalZoomView *)zoomView; 17 | - (void)zoomViewDidFinishZooming:(ModalZoomView *)zoomView; 18 | - (void)zoomViewWillDissapear:(ModalZoomView *)zoomView; 19 | @end 20 | 21 | 22 | @interface ModalZoomView : NSObject 23 | + (id)showWithViewControllerIdentifier:(NSString *)viewControllerID; 24 | + (id)showFromRect:(CGRect)initialFrame withViewControllerIdentifier:(NSString *)viewControllerID andItem:(id)item; 25 | 26 | + (void)fadeOutViewAnimated:(BOOL)animated; 27 | + (BOOL)isShowing; 28 | 29 | @property UIViewController *viewController; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORAddBookmarkViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddBookmarkViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 06/01/2013. 6 | // Copyright (c) 2013 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ModalZoomView.h" 11 | #import "ORBookmarksViewController.h" 12 | @interface ORAddBookmarkViewController : UIViewController 13 | 14 | @property (assign, nonatomic) NSString *name; 15 | @property (assign, nonatomic) NSString *address; 16 | @property (weak) ORBookmarksViewController *bookmarksController; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORAddBookmarkViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddBookmarkViewController.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 06/01/2013. 6 | // Copyright (c) 2013 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORAddBookmarkViewController.h" 10 | #import "Bookmark.h" 11 | 12 | @interface ORAddBookmarkViewController () 13 | 14 | @property (weak, nonatomic) IBOutlet UITextField *titleTextField; 15 | @property (weak, nonatomic) IBOutlet UITextField *addressTextField; 16 | 17 | @end 18 | 19 | @implementation ORAddBookmarkViewController 20 | 21 | - (IBAction)addButtonPressed:(id)sender { 22 | Bookmark *bookmark = [Bookmark object]; 23 | bookmark.name = _titleTextField.text; 24 | bookmark.url = _addressTextField.text; 25 | bookmark.lastAccessed = [NSDate date]; 26 | if ([[bookmark managedObjectContext] persistentStoreCoordinator].persistentStores.count) { 27 | [[bookmark managedObjectContext] save:nil]; 28 | } else { 29 | NSLog(@"could not save"); 30 | } 31 | [_bookmarksController reloadAndHideBookmarks]; 32 | [ModalZoomView fadeOutViewAnimated:YES]; 33 | } 34 | 35 | - (IBAction)cancelButtonPressed:(id)sender { 36 | [ModalZoomView fadeOutViewAnimated:YES]; 37 | } 38 | 39 | - (void)zoomViewDidFinishZooming:(ModalZoomView *)zoomView { 40 | [UIView animateWithDuration:0.3 animations:^{ 41 | if ([UIDevice deviceType] == DeviceIphone5Plus) { 42 | self.view.frame = CGRectOffset(self.view.frame, 0, -70); 43 | } 44 | else { 45 | self.view.frame = CGRectOffset(self.view.frame, 0, -105); 46 | } 47 | }]; 48 | [_titleTextField becomeFirstResponder]; 49 | } 50 | 51 | - (void)viewDidUnload { 52 | [self setTitleTextField:nil]; 53 | [self setAddressTextField:nil]; 54 | [super viewDidUnload]; 55 | } 56 | 57 | - (CGSize)sizeForZoomView:(ModalZoomView *)zoomView { 58 | return CGSizeMake(320, 250); 59 | } 60 | 61 | - (void)setAddress:(NSString *)address { 62 | _addressTextField.text = address; 63 | } 64 | 65 | - (void)setName:(NSString *)name { 66 | _titleTextField.text = name; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORAddExternalViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddExternalViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/11/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ModalZoomView.h" 10 | 11 | @interface ORAddExternalViewController : UIViewController 12 | @end 13 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORAddTorrentFromBrowseViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddTorrentFromBrowseViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 02/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ModalZoomView.h" 11 | 12 | @interface ORAddTorrentFromBrowseViewController : UIViewController 13 | 14 | @property (strong, nonatomic) NSString *address; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORAddTorrentFromBrowseViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddTorrentFromBrowseViewController.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 02/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORAddTorrentFromBrowseViewController.h" 10 | #import "ORTitleLabel.h" 11 | 12 | @interface ORAddTorrentFromBrowseViewController () 13 | @property (weak, nonatomic) IBOutlet ORTitleLabel *addressLabel; 14 | @property (weak, nonatomic) IBOutlet ORTitleLabel *titleLabel; 15 | @property (weak, nonatomic) IBOutlet UIActivityIndicatorView *networkProgress; 16 | 17 | @end 18 | 19 | @implementation ORAddTorrentFromBrowseViewController 20 | 21 | - (IBAction)cancelButtonTapped:(id)sender { 22 | [ModalZoomView fadeOutViewAnimated:YES]; 23 | } 24 | 25 | - (IBAction)addButtonTapped:(id)sender { 26 | [_networkProgress startAnimating]; 27 | [[PutIOClient sharedClient] requestTorrentOrMagnetURLAtPath:_address :^(id userInfoObject) { 28 | [_networkProgress stopAnimating]; 29 | _addressLabel.text = @"Added to Put.IO"; 30 | [(UIButton *)sender setEnabled:NO]; 31 | [self performSelector:@selector(cancelButtonTapped:) withObject:self afterDelay:3]; 32 | 33 | } addFailure:^{ 34 | [_networkProgress stopAnimating]; 35 | _addressLabel.text = @"Failed to add file"; 36 | } networkFailure:^(NSError *error) { 37 | [_networkProgress stopAnimating]; 38 | _addressLabel.text = @"Put.IO seems to be down"; 39 | }]; 40 | } 41 | 42 | - (void)setAddress:(NSString *)address { 43 | _address = address; 44 | _addressLabel.text = address; 45 | 46 | if ([address hasPrefix:@"http"]) { 47 | _titleLabel.text = @"Add Torrent to Put.IO"; 48 | } else { 49 | _titleLabel.text = @"Add Magnet to Put.IO"; 50 | } 51 | } 52 | 53 | - (void)viewDidUnload { 54 | [self setAddressLabel:nil]; 55 | [self setTitleLabel:nil]; 56 | [self setNetworkProgress:nil]; 57 | [super viewDidUnload]; 58 | } 59 | 60 | - (CGSize)sizeForZoomView:(ModalZoomView *)zoomView { 61 | return CGSizeMake(320, 200); 62 | } 63 | 64 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 65 | return [UIDevice isPad]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORAddTorrentFromLinkViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddTorrentFromLinkViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 02/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ModalZoomView.h" 11 | 12 | @interface ORAddTorrentFromLinkViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORAddTorrentFromLinkViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddTorrentFromLinkViewController.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 02/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORAddTorrentFromLinkViewController.h" 10 | 11 | @interface ORAddTorrentFromLinkViewController (){ 12 | __weak IBOutlet UITextField *_torrentTextField; 13 | __weak IBOutlet UILabel *_addedLabel; 14 | __weak IBOutlet UIActivityIndicatorView *_networkActivitySpinner; 15 | } 16 | 17 | @end 18 | 19 | @implementation ORAddTorrentFromLinkViewController 20 | 21 | - (IBAction)addButtonPressed:(id)sender { 22 | [_networkActivitySpinner startAnimating]; 23 | _addedLabel.hidden = YES; 24 | 25 | [[PutIOClient sharedClient] requestTorrentOrMagnetURLAtPath:_torrentTextField.text :^(id userInfoObject) { 26 | [ARAnalytics incrementUserProperty:@"Added a torrent" byInt:1]; 27 | [_networkActivitySpinner stopAnimating]; 28 | _addedLabel.hidden = NO; 29 | _addedLabel.text = @"Added! :)"; 30 | [_torrentTextField resignFirstResponder]; 31 | 32 | } 33 | addFailure:^() { 34 | [_networkActivitySpinner stopAnimating]; 35 | _addedLabel.hidden = NO; 36 | _addedLabel.text = @"Failed :("; 37 | } 38 | networkFailure:^(NSError *error) { 39 | [_networkActivitySpinner stopAnimating]; 40 | _addedLabel.hidden = NO; 41 | _addedLabel.text = @"Failed :("; 42 | 43 | }]; 44 | } 45 | 46 | - (IBAction)cancelButtonPressed:(id)sender { 47 | [ModalZoomView fadeOutViewAnimated:YES]; 48 | } 49 | 50 | - (IBAction)pasteButtonPressed:(id)sender { 51 | _torrentTextField.text = @""; 52 | [_torrentTextField paste:self]; 53 | } 54 | 55 | - (void)zoomViewDidFinishZooming:(ModalZoomView *)zoomView { 56 | [UIView animateWithDuration:0.3 animations:^{ 57 | if ([UIDevice deviceType] == DeviceIphone5Plus) { 58 | self.view.frame = CGRectOffset(self.view.frame, 0, -28); 59 | } 60 | else { 61 | self.view.frame = CGRectOffset(self.view.frame, 0, -72); 62 | } 63 | }]; 64 | [_torrentTextField becomeFirstResponder]; 65 | } 66 | 67 | - (void)viewDidUnload { 68 | _torrentTextField = nil; 69 | _addedLabel = nil; 70 | _networkActivitySpinner = nil; 71 | [super viewDidUnload]; 72 | } 73 | 74 | - (CGSize)sizeForZoomView:(ModalZoomView *)zoomView { 75 | return CGSizeMake(320, 207); 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORBookmarksViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORBookmarksViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORInlineEditableTableViewController.h" 10 | 11 | @protocol ORBookmarkControllerDelegate 12 | 13 | - (NSString *)url; 14 | - (NSString *)name; 15 | - (void)setURL:(NSString *)url; 16 | 17 | @end 18 | 19 | @interface ORBookmarksViewController : UITableViewController 20 | 21 | @property (weak) NSObject *delegate; 22 | @property (weak) WEPopoverController *wePopoverController; 23 | - (void)reloadAndHideBookmarks; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORImageFileInfoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORImageFileInfoViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 02/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ModalZoomView.h" 10 | 11 | @interface ORImageFileInfoViewController : UIViewController 12 | 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORInlineEditableTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORBookmarksViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WEPopoverController.h" 11 | 12 | @interface ORInlineEditableTableViewController : UITableViewController 13 | 14 | @property (assign) NSInteger amountOfCellsToShowBeforeScrollingOnAdd; 15 | 16 | // It is expected that you override this function and add the offset in your version 17 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; 18 | 19 | - (UITableViewCell *)setupNormalCell:(UITableViewCell *)cell ForIndexPath:(NSIndexPath *)indexPath; 20 | - (UIButton *)buttonForNewItemWithFrame:(CGRect)frame; 21 | - (UITextField *)textFieldForEditingWithFrame:(CGRect)frame; 22 | 23 | - (void)saveNewItemWithString:(NSString *)string; 24 | 25 | @property (assign) WEPopoverController *container; 26 | @property (assign) BOOL showingTextField; 27 | @end 28 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORMoviePlayerController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORMoviePlayerController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 15/05/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | // From: 9 | // https://discussions.apple.com/thread/3425817?start=15&tstart=0 10 | 11 | #import 12 | #import "SubRip.h" 13 | #import "OROpenSubtitleDownloader.h" 14 | 15 | @interface ORMoviePlayerController : MPMoviePlayerViewController 16 | 17 | @property (strong, nonatomic) File *file; 18 | @property (strong, nonatomic) SubRip *currentSubtitles; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORPutIOViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORPutIOViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 16/01/2013. 6 | // Copyright (c) 2013 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORPutIOViewController : UIViewController 12 | @property (weak, nonatomic) IBOutlet UIWebView *webView; 13 | - (IBAction)backTapped:(id)sender; 14 | 15 | - (IBAction)exitTapped:(id)sender; 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORPutIOViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORPutIOViewController.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 16/01/2013. 6 | // Copyright (c) 2013 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORPutIOViewController.h" 10 | 11 | @interface ORPutIOViewController () 12 | 13 | @end 14 | 15 | @implementation ORPutIOViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | NSString *url = @"http://put.io"; 20 | if ([UIDevice isPhone]) { 21 | url = @"http://m.put.io"; 22 | } 23 | NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; 24 | [_webView loadRequest:request]; 25 | } 26 | 27 | - (void)viewDidUnload { 28 | [self setWebView:nil]; 29 | [super viewDidUnload]; 30 | } 31 | 32 | 33 | - (IBAction)backTapped:(id)sender { 34 | [_webView goBack]; 35 | } 36 | 37 | - (IBAction)exitTapped:(id)sender { 38 | UIViewController *rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController; 39 | [rootViewController dismissViewControllerAnimated:YES completion:nil]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORRemoveTransferPopoverViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORRemoveTransferPopoverViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ORTransferViewController.h" 11 | 12 | @interface ORRemoveTransferPopoverViewController : UIViewController 13 | 14 | - (void)setTransfer:(Transfer *)transfer; 15 | - (void)setTransferViewController:(ORTransferViewController *)transferVC; 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORRemoveTransferPopoverViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORRemoveTransferPopoverViewController.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORRemoveTransferPopoverViewController.h" 10 | #import "ORDestructiveButton.h" 11 | 12 | @interface ORRemoveTransferPopoverViewController (){ 13 | Transfer *_transfer; 14 | ORTransferViewController *_transferVC; 15 | } 16 | @property (weak, nonatomic) IBOutlet ORDestructiveButton *removeButton; 17 | @end 18 | 19 | @implementation ORRemoveTransferPopoverViewController 20 | 21 | - (void)setTransfer:(Transfer *)transfer { 22 | _transfer = transfer; 23 | 24 | _removeButton.enabled = YES; 25 | _removeButton.alpha = 1; 26 | [_removeButton setTitle:@"Remove" forState:UIControlStateNormal]; 27 | } 28 | 29 | - (void)setTransferViewController:(ORTransferViewController *)transferVC { 30 | _transferVC = transferVC; 31 | } 32 | 33 | - (IBAction)removeTapped:(UIButton *)sender { 34 | [_transferVC deleteTapped:sender]; 35 | [_removeButton setTitle:@"Cancelling.." forState:UIControlStateNormal]; 36 | } 37 | 38 | - (void)viewDidUnload { 39 | [self setRemoveButton:nil]; 40 | [super viewDidUnload]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORTorrentBrowserViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORTorrentBrowserViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 02/12/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | #import "ORBookmarksViewController.h" 9 | 10 | @interface ORTorrentBrowserViewController : UIViewController 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ORTransferViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORTransferViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/11/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | @interface ORTransferViewController : UIViewController 10 | - (IBAction)deleteTapped:(UIButton *)sender; 11 | @end 12 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ProcessPopoverViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TransferPopoverViewControllerViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 04/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ORSimpleProgress; 12 | @interface ProcessPopoverViewController : UIViewController 13 | 14 | @property id item; 15 | @property (weak, nonatomic) IBOutlet UILabel *progressLabel; 16 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 17 | @property (weak, nonatomic) IBOutlet ORSimpleProgress *progressView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/ProcessPopoverViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TransferPopoverViewControllerViewController.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 04/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ProcessPopoverViewController.h" 10 | #import "ORSimpleProgress.h" 11 | #import "BaseProcess.h" 12 | 13 | @interface ProcessPopoverViewController (){ 14 | id _item; 15 | NSTimer *_timer; 16 | } 17 | 18 | @end 19 | 20 | @implementation ProcessPopoverViewController 21 | 22 | @dynamic item; 23 | @synthesize progressLabel; 24 | @synthesize titleLabel; 25 | @synthesize progressView; 26 | 27 | - (id)item { 28 | return _item; 29 | } 30 | 31 | - (void)setItem:(id)item { 32 | _item = item; 33 | 34 | if ([item respondsToSelector:@selector(displayName)]) { 35 | self.titleLabel.text = [item displayName]; 36 | } 37 | 38 | if ([item respondsToSelector:@selector(primaryDescription)]) { 39 | self.titleLabel.text = [item primaryDescription]; 40 | } 41 | 42 | [self updateProgress]; 43 | self.progressView.isLandscape = YES; 44 | 45 | _timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(tick) userInfo:nil repeats:YES]; 46 | [_timer fire]; 47 | } 48 | 49 | - (void)tick { 50 | [self updateProgress]; 51 | } 52 | 53 | - (void)updateProgress { 54 | if ([_item respondsToSelector:@selector(percentDone)]) { 55 | self.progressLabel.text = [NSString stringWithFormat:@"%.0f%%", [[_item percentDone] floatValue]]; 56 | self.progressView.progress = [[_item percentDone] floatValue]/100; 57 | } 58 | 59 | if ([_item respondsToSelector:@selector(processProgress)]) { 60 | self.progressLabel.text = [NSString stringWithFormat:@"%.0f%%", [_item processProgress] * 100 ]; 61 | self.progressView.progress = [_item processProgress]; 62 | } 63 | 64 | if ([_item respondsToSelector:@selector(message)]) { 65 | if ([_item message] != nil) { 66 | self.progressLabel.text = [_item message]; 67 | } 68 | } 69 | } 70 | 71 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 72 | return YES; 73 | } 74 | 75 | - (void)viewDidUnload { 76 | [_timer invalidate]; 77 | _timer = nil; 78 | 79 | // [self setProgressLabel:nil]; 80 | // [self setTitleLabel:nil]; 81 | // [self setProgressView:nil]; 82 | // [self setItem:nil]; 83 | [super viewDidUnload]; 84 | } 85 | @end 86 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/SearchViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SearchViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SearchController.h" 11 | 12 | @class StatusViewController, ORRotatingButton; 13 | 14 | @interface SearchViewController : UIViewController 15 | 16 | @property (weak, nonatomic) IBOutlet ORRotatingButton *activitySpinner; 17 | @property (weak, nonatomic) IBOutlet UISearchBar *searchBar; 18 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 19 | @property (weak, nonatomic) IBOutlet StatusViewController *statusViewController; 20 | 21 | @property (weak, nonatomic) IBOutlet UIView *noResultsFoundView; 22 | @property (weak, nonatomic) IBOutlet UIView *tryChangingSettingsView; 23 | 24 | - (IBAction)hideSearchInterface:(id)sender; 25 | - (void)reposition; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/StatusViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // StatusViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ORSlidingTableView.h" 11 | #import "BaseProcess.h" 12 | 13 | @class ORSimpleProgress, DCKnob; 14 | @interface StatusViewController : UIViewController 15 | 16 | + (StatusViewController *)sharedController; 17 | 18 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 19 | @property (weak, nonatomic) IBOutlet DCKnob *spaceProgressView; 20 | @property (weak, nonatomic) IBOutlet DCKnob *spaceProgressBG; 21 | 22 | - (void)setup; 23 | - (void)addProcess:(BaseProcess *)process; 24 | - (NSArray *)processIDs; 25 | @end 26 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/TextFileInfoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TextFileInfoViewController.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 05/08/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ModalZoomView.h" 10 | 11 | @class ORTitleLabel, ORRotatingButton, ORSimpleProgress; 12 | 13 | @interface TextFileInfoViewController : UIViewController 14 | 15 | @property (weak, nonatomic) IBOutlet ORRotatingButton *loadingIndicator; 16 | @property (weak, nonatomic) IBOutlet UITextView *textfield; 17 | @property (weak, nonatomic) IBOutlet ORTitleLabel *titleLabel; 18 | @property (weak, nonatomic) IBOutlet ORSimpleProgress *progressBar; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Puttio/ViewControllers/TextFileInfoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TextFileInfoViewController.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 05/08/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "TextFileInfoViewController.h" 10 | #import "AFHTTPRequestOperation.h" 11 | #import "ORTitleLabel.h" 12 | #import "ORRotatingButton.h" 13 | #import "ORSimpleProgress.h" 14 | 15 | @implementation TextFileInfoViewController 16 | 17 | - (void)setItem:(File *)item { 18 | _titleLabel.text = item.displayName; 19 | _loadingIndicator.alpha = 0; 20 | [_loadingIndicator fadeIn]; 21 | _progressBar.isLandscape = YES; 22 | 23 | NSString *requestURL = [NSString stringWithFormat:@"https://put.io/v2/files/%@/download", item.id]; 24 | NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[PutIOClient appendOauthToken:requestURL]]]; 25 | 26 | AFHTTPRequestOperation *downloadOperation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; 27 | _progressBar.progress = 0; 28 | 29 | [downloadOperation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) { 30 | CGFloat progress = (float)totalBytesRead/totalBytesExpectedToRead; 31 | _progressBar.progress = progress; 32 | }]; 33 | 34 | [downloadOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { 35 | _textfield.text = operation.responseString; 36 | [_loadingIndicator fadeOut]; 37 | _progressBar.hidden = YES; 38 | } failure:^(AFHTTPRequestOperation *operation, NSError *error) { 39 | _textfield.text = [ NSString stringWithFormat:@"Could not download text for %@", item.displayName]; 40 | [_loadingIndicator fadeOut]; 41 | _progressBar.hidden = YES; 42 | }]; 43 | 44 | [downloadOperation start]; 45 | } 46 | 47 | - (void)zoomViewWillDissapear:(ModalZoomView *)zoomView { 48 | [UIView animateWithDuration:0.1 animations:^{ 49 | _textfield.alpha = 0; 50 | }]; 51 | } 52 | 53 | 54 | - (void)viewDidUnload { 55 | [self setTextfield:nil]; 56 | [self setTitleLabel:nil]; 57 | [self setLoadingIndicator:nil]; 58 | [super viewDidUnload]; 59 | } 60 | 61 | - (IBAction)closeButtonTapped:(id)sender { 62 | [ModalZoomView fadeOutViewAnimated:YES]; 63 | } 64 | @end 65 | -------------------------------------------------------------------------------- /Puttio/Views/Cells/ORAddTorrentCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddTorrentCell.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/11/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORAnimatedTickView.h" 10 | 11 | @interface ORAddTorrentCell : UITableViewCell 12 | @property (weak, nonatomic) IBOutlet UILabel *title; 13 | @property (weak, nonatomic) IBOutlet ORAnimatedTickView *selectionTick; 14 | @end 15 | -------------------------------------------------------------------------------- /Puttio/Views/Cells/ORAddTorrentCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORAddTorrentCell.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/11/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORAddTorrentCell.h" 10 | 11 | @implementation ORAddTorrentCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Views/Cells/ORExtendedTransferCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORExtendedTransferCell.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/11/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | @interface ORExtendedTransferCell : UITableViewCell 10 | 11 | @property (nonatomic, strong) Transfer *transfer; 12 | @property (assign) BOOL isExpanded; 13 | 14 | - (void)showCancelButtonWithTarget:(id)target; 15 | - (void)deletedTransfer; 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/Views/ORDestructiveButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORDestructiveButton.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORFlatButton.h" 10 | 11 | @interface ORDestructiveButton : ORFlatButton 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Views/ORDestructiveButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORDestructiveButton.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORDestructiveButton.h" 10 | #import "ORFlatButton.h" 11 | 12 | @interface ORFlatButton (private) 13 | - (void)setup; 14 | - (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state; 15 | @end 16 | 17 | @implementation ORDestructiveButton 18 | 19 | - (void)setup { 20 | [super setup]; 21 | self.backgroundColor = [UIColor putioRed]; 22 | [self setBackgroundColor:[UIColor putioDarkRed] forState:UIControlStateHighlighted]; 23 | [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Puttio/Views/ORFlatButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORFlatButton.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/05/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORFlatButton : UIButton 12 | 13 | - (UIImage *) imageFromColor:(UIColor *)color; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Puttio/Views/ORFlatButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORFlatButton.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/05/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORFlatButton.h" 10 | #import "UIColor+PutioColours.h" 11 | 12 | @implementation ORFlatButton 13 | 14 | - (id)initWithFrame:(CGRect)frame { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | [self setup]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)awakeFromNib { 23 | [self setup]; 24 | } 25 | 26 | - (void)setup { 27 | self.adjustsImageWhenDisabled = NO; 28 | 29 | self.backgroundColor = [UIColor putioBlue]; 30 | [self setBackgroundColor:[UIColor putioDarkBlue] forState:UIControlStateHighlighted]; 31 | [self setBackgroundColor:[[UIColor putioBlue] colorWithAlphaComponent:0.3] forState:UIControlStateDisabled]; 32 | 33 | [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 34 | [self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; 35 | [[self titleLabel] setFont:[UIFont boldSystemFontOfSize:15]]; 36 | } 37 | 38 | - (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state { 39 | [self setBackgroundImage:[self imageFromColor:backgroundColor] 40 | forState:state]; 41 | 42 | } 43 | 44 | // creates a 1x1 UIImage with a color 45 | // comes from http://stackoverflow.com/questions/2808888/is-it-even-possible-to-change-a-uibuttons-background-color 46 | - (UIImage *) imageFromColor:(UIColor *)color { 47 | CGRect rect = CGRectMake(0, 0, 1, 1); 48 | UIGraphicsBeginImageContext(rect.size); 49 | CGContextRef context = UIGraphicsGetCurrentContext(); 50 | CGContextSetFillColorWithColor(context, [color CGColor]); 51 | CGContextFillRect(context, rect); 52 | UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); 53 | UIGraphicsEndImageContext(); 54 | return img; 55 | } 56 | 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /Puttio/Views/ORHorizontalImageViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORHorizontalImageViewCell.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORImageViewCell.h" 10 | 11 | @interface ORHorizontalImageViewCell : ORImageViewCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Views/ORHorizontalImageViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORHorizontalImageViewCell.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 08/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORHorizontalImageViewCell.h" 10 | 11 | @implementation ORHorizontalImageViewCell 12 | 13 | + (CGFloat) cellHeight { return 60; } 14 | + (CGFloat) cellWidth { return 200; } 15 | 16 | - (id)initWithFrame:(CGRect)frame { 17 | if (self = [super initWithFrame:frame]) { 18 | [self layoutSubviews]; 19 | } 20 | return self; 21 | } 22 | 23 | - (void)layoutSubviews { 24 | [super layoutSubviews]; 25 | [imageView setFrame: CGRectMake(-4, 4, 60, 40)]; 26 | [titleLabel setFrame:CGRectMake(64, -4, 140, 60)]; 27 | titleLabel.textAlignment = UITextAlignmentLeft; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Puttio/Views/ORImageViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORImageViewCell.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | 10 | #import "GMGridViewCell.h" 11 | 12 | @interface ORImageViewCell : GMGridViewCell { 13 | UIImageView *imageView; 14 | UILabel *titleLabel; 15 | } 16 | 17 | + (CGFloat) cellHeight; 18 | + (CGFloat) cellWidth; 19 | 20 | @property (nonatomic) NSString *title; 21 | @property (nonatomic) UIImage *image; 22 | @property (nonatomic) NSURL *imageURL; 23 | @property (nonatomic) id item; 24 | @property (nonatomic, assign) BOOL watched; 25 | @property (nonatomic, assign) BOOL hasMP4; 26 | 27 | - (void)useUnknownImageForFileType:(NSString *)string; 28 | @end 29 | -------------------------------------------------------------------------------- /Puttio/Views/ORMessageCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORMessageCell.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 02/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORMessageCell : UITableViewCell 12 | @property (weak, nonatomic) IBOutlet UILabel *messageLabel; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Views/ORMessageCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORMessageCell.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 02/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORMessageCell.h" 10 | 11 | @implementation ORMessageCell 12 | @synthesize messageLabel; 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Views/ORRotatingButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORRotatingButton.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORRotatingButton : UIButton 12 | 13 | - (void)fadeIn; 14 | - (void)fadeOut; 15 | 16 | - (void)startAnimating; 17 | - (void)stopAnimating; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Puttio/Views/ORRotatingButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORRotatingButton.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 14/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORRotatingButton.h" 10 | #import 11 | 12 | @interface ORRotatingButton () { 13 | CABasicAnimation *rotationAnimation; 14 | } 15 | @end 16 | 17 | 18 | 19 | @implementation ORRotatingButton 20 | 21 | CGFloat RotationDuration = 0.9; 22 | 23 | - (void)fadeIn { 24 | [self startAnimating]; 25 | if (self.alpha) return; 26 | 27 | [UIView animateWithDuration:0.3 animations:^{ 28 | self.alpha = 1; 29 | }]; 30 | } 31 | 32 | - (void)fadeOut { 33 | [self stopAnimating]; 34 | if (!self.alpha) return; 35 | 36 | [UIView animateWithDuration:0.3 animations:^{ 37 | self.alpha = 0; 38 | }]; 39 | } 40 | 41 | - (void)startAnimating { 42 | [self animate:HUGE_VAL]; 43 | } 44 | 45 | - (void)animate:(int)times{ 46 | CATransform3D rotationTransform = CATransform3DMakeRotation(1.01f * M_PI, 0, 0, 1.0); 47 | rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform"]; 48 | 49 | rotationAnimation.toValue = [NSValue valueWithCATransform3D:rotationTransform]; 50 | rotationAnimation.duration = RotationDuration; 51 | rotationAnimation.cumulative = YES; 52 | rotationAnimation.repeatCount = times; 53 | [self.layer addAnimation:rotationAnimation forKey:@"transform"]; 54 | 55 | } 56 | 57 | - (void)stopAnimating { 58 | [self.layer removeAllAnimations]; 59 | [self animate:1]; 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Puttio/Views/ORSearchCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORSearchCell.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 11/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORSearchCell : UITableViewCell 12 | @property (weak, nonatomic) IBOutlet UILabel *fileNameLabel; 13 | @property (weak, nonatomic) IBOutlet UILabel *fileSizeLabel; 14 | @property (weak, nonatomic) IBOutlet UILabel *seedersLabel; 15 | 16 | - (void)userHasSelectedFile; 17 | - (void)userHasFailedToAddFile; 18 | - (void)userHasAddedFile; 19 | @end 20 | -------------------------------------------------------------------------------- /Puttio/Views/ORSearchCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORSearchCell.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 11/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORSearchCell.h" 10 | #import "UIColor+PutioColours.h" 11 | 12 | @implementation ORSearchCell 13 | 14 | - (void)prepareForReuse { 15 | [super prepareForReuse]; 16 | self.userInteractionEnabled = YES; 17 | self.contentView.backgroundColor = [UIColor whiteColor]; 18 | self.seedersLabel.textColor = [UIColor putioLightGray]; 19 | } 20 | 21 | - (void)userHasSelectedFile { 22 | self.contentView.backgroundColor = [UIColor putioBlue]; 23 | self.seedersLabel.textColor = [UIColor whiteColor]; 24 | self.seedersLabel.text = @"Requesting"; 25 | self.fileSizeLabel.text = @""; 26 | self.userInteractionEnabled = NO; 27 | } 28 | 29 | - (void)userHasFailedToAddFile { 30 | self.contentView.backgroundColor = [UIColor putioRed]; 31 | self.seedersLabel.textColor = [UIColor whiteColor]; 32 | self.seedersLabel.text = @"Request failed"; 33 | self.fileSizeLabel.text = @""; 34 | self.userInteractionEnabled = YES; 35 | } 36 | 37 | - (void)userHasAddedFile { 38 | self.contentView.backgroundColor = [UIColor putioDarkBlue]; 39 | self.seedersLabel.textColor = [UIColor putioBlue]; 40 | self.fileNameLabel.textColor = [UIColor whiteColor]; 41 | self.seedersLabel.text = @"Request succeeded"; 42 | self.fileSizeLabel.text = @""; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Puttio/Views/ORSimpleProgress.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORSimpleProgress.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORSimpleProgress : UIView { 12 | CGFloat _progress; 13 | } 14 | 15 | @property UILabel *label; 16 | @property UIColor *fillColour; 17 | @property (assign) BOOL isLandscape; 18 | @property CGFloat progress; 19 | @end 20 | -------------------------------------------------------------------------------- /Puttio/Views/ORSimpleProgress.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORSimpleProgress.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 25/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORSimpleProgress.h" 10 | 11 | @implementation ORSimpleProgress 12 | @synthesize label, fillColour, isLandscape; 13 | @dynamic progress; 14 | 15 | - (void)awakeFromNib { 16 | self.alpha = .3; 17 | self.label = [[UILabel alloc] initWithFrame:self.frame]; 18 | _progress = .3; 19 | self.backgroundColor = [[UIColor putioBlue] colorWithAlphaComponent:0.5]; 20 | self.fillColour = [UIColor putioYellow]; 21 | } 22 | 23 | - (void)drawRect:(CGRect)rect { 24 | CGContextRef c = UIGraphicsGetCurrentContext(); 25 | 26 | CGContextSetFillColor(c, CGColorGetComponents(self.backgroundColor.CGColor)); 27 | CGContextFillRect(c, self.bounds); 28 | 29 | CGRect filledRect = self.bounds; 30 | if (self.isLandscape) { 31 | filledRect.size.width = filledRect.size.width * _progress; 32 | }else{ 33 | filledRect.size.height = filledRect.size.height * _progress; 34 | } 35 | CGContextSetFillColor(c, CGColorGetComponents(self.fillColour.CGColor)); 36 | CGContextFillRect(c, filledRect); 37 | } 38 | 39 | - (void)setProgress:(CGFloat)progress { 40 | self.alpha = 1; 41 | _progress = progress; 42 | [self setNeedsDisplay]; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Puttio/Views/ORSlidingTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORSlidingTableView.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 03/06/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ORSlidingTableView; 12 | @protocol ORSlidingTableViewDelegate 13 | - (void)slidingTableDidBeginTouch:(ORSlidingTableView *)table; 14 | - (void)slidingTable:(ORSlidingTableView *)table didMoveToCellAtRow:(NSInteger)row inSection:(NSInteger)section; 15 | - (void)slidingTableDidEndTouch:(ORSlidingTableView *)table; 16 | @end 17 | 18 | @interface ORSlidingTableView : UITableView 19 | 20 | @property (weak) IBOutlet NSObject *slidingDelegate; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Puttio/Views/ORSwipeImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ARSwipeImageView.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 06/08/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORSwipeImageView : UIImageView 12 | - (void)startAnimation; 13 | @end -------------------------------------------------------------------------------- /Puttio/Views/ORSyncView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORSyncView.h 3 | // Puttio 4 | // 5 | // Created by Orta on 09/11/2013. 6 | // Copyright (c) 2013 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "DCRoundSwitch.h" 10 | 11 | @interface ORSyncView : DCRoundSwitch 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Views/ORSyncView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORSyncView.m 3 | // Puttio 4 | // 5 | // Created by Orta on 09/11/2013. 6 | // Copyright (c) 2013 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORSyncView.h" 10 | 11 | @interface DCRoundSwitch() 12 | 13 | - (void)setup; 14 | 15 | @end 16 | 17 | @implementation ORSyncView 18 | 19 | - (void)setup 20 | { 21 | [super setup]; 22 | 23 | self.onText = @"OFF"; 24 | self.offText = @"ON"; 25 | 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /Puttio/Views/ORTitleLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // ARTitleLabel.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORTitleLabel : UILabel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Views/ORTitleLabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // ARTitleLabel.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 27/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORTitleLabel.h" 10 | 11 | @implementation ORTitleLabel 12 | 13 | - (id)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | [self setup]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)awakeFromNib { 23 | [self setup]; 24 | } 25 | 26 | - (void)setup { 27 | self.font = [UIFont titleFontWithSize:self.font.pointSize]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Puttio/Views/ORTorrentLikeView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TorrentLikeView.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 07/07/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ORTorrentLikeView : UIView 13 | @end 14 | -------------------------------------------------------------------------------- /Puttio/Views/ORTransferCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ARTransferCell.h 3 | // Puttio 4 | // 5 | // Created by orta therox on 01/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ORSimpleProgress; 12 | @interface ORTransferCell : UITableViewCell 13 | @property (weak, nonatomic) IBOutlet UILabel *nameLabel; 14 | @property (weak, nonatomic) IBOutlet UILabel *detailsLabel; 15 | @property (weak, nonatomic) IBOutlet ORSimpleProgress *progressView; 16 | @end 17 | -------------------------------------------------------------------------------- /Puttio/Views/ORTransferCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ARTransferCell.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 01/04/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import "ORTransferCell.h" 10 | 11 | @implementation ORTransferCell 12 | @end 13 | -------------------------------------------------------------------------------- /Puttio/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Puttio/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Puttio 4 | // 5 | // Created by orta therox on 22/03/2012. 6 | // Copyright (c) 2012 ortatherox.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "ORAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ORAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | Puttio. A nice experience for Put.io on iPad. 2 | ---- 3 | 4 | This app makes it super easy to use Put.IO. See [AwesomePutIOApp.com](http://awesomeputioapp.com) for marketing jargon. 5 | It's built in Objective-C, is good readable code, but there's a lot of late-night code in here. You'll need Xcode 4.5 to compile. It uses Storyboards & ARC. 6 | 7 | iPhone 8 | --- 9 |
10 | 11 | ![SCreenshot](https://github.com/orta/Puttio/raw/master/web/iphone1.png)- 12 | ![SCreenshot](https://github.com/orta/Puttio/raw/master/web/iphone2.png)- 13 | ![SCreenshot](https://github.com/orta/Puttio/raw/master/web/iphone3.png) 14 | 15 |
16 | 17 | iPad 18 | --- 19 | 20 |
21 | 22 | ![SCreenshot](https://github.com/orta/Puttio/raw/master/web/ipad1.png)- 23 | ![SCreenshot](https://github.com/orta/Puttio/raw/master/web/ipad2.png)- 24 | ![SCreenshot](https://github.com/orta/Puttio/raw/master/web/ipad5.png) 25 | 26 |
27 | 28 | Licensed under a slightly modified BSD. I'd love Pull Requests, but app store submissions will be a rarity. -------------------------------------------------------------------------------- /Resources/Flags.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Resources/Flags.psd -------------------------------------------------------------------------------- /Resources/UI-Mockup.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Resources/UI-Mockup.pdf -------------------------------------------------------------------------------- /Resources/puttio-folder.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Resources/puttio-folder.psd -------------------------------------------------------------------------------- /Resources/puttio-paper.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/Resources/puttio-paper.psd -------------------------------------------------------------------------------- /icon114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/icon114.png -------------------------------------------------------------------------------- /icon144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/icon144.png -------------------------------------------------------------------------------- /icon57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/icon57.png -------------------------------------------------------------------------------- /icon72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/icon72.png -------------------------------------------------------------------------------- /vendor/IGHTMLQuery.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "IGHTMLQuery" 3 | s.version = "0.5.1" 4 | s.summary = "IGHTMLQuery is a lightweight XML/HTML parser for iOS, built on top of libxml." 5 | 6 | s.description = <<-DESC 7 | IGHTMLQuery is a lightweight XML/HTML parser for iOS, built on top of libxml. 8 | 9 | * XPath support for document searching. 10 | * jQuery style chainable syntax. 11 | * XML traversal and manipulation. 12 | DESC 13 | 14 | s.homepage = "https://github.com/siuying/IGHTMLQuery" 15 | 16 | s.license = { :type => 'MIT', :file => 'LICENSE.txt' } 17 | 18 | s.author = { "Francis Chong" => "francis@ignition.hk" } 19 | 20 | s.ios.deployment_target = '5.0' 21 | s.osx.deployment_target = '10.8' 22 | 23 | s.source = { :git => "https://github.com/siuying/IGHTMLQuery.git", :tag => s.version.to_s } 24 | s.source_files = 'IGHTMLQuery/Classes/**/*.{h,m}' 25 | 26 | s.library = 'xml2' 27 | s.requires_arc = true 28 | 29 | s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' } 30 | 31 | end -------------------------------------------------------------------------------- /vendor/OROpenSubtitleDownloader.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "OROpenSubtitleDownloader" 3 | s.version = "0.0.1" 4 | s.summary = "An Obj-C API for Searching and Downloading Subtitles from OpenSubtitles." 5 | s.homepage = "https://github.com/orta/OROpenSubtitleDownloader" 6 | s.license = { :type => 'BSD', :file => 'LICENSE' } 7 | s.author = { "orta" => "orta.therox@gmail.com" } 8 | s.source = { :git => "https://github.com/orta/OROpenSubtitleDownloader.git", :commit => :head } 9 | s.source_files = 'OROpenSubtitleDownloader.{h,m}' 10 | s.library = 'z' 11 | s.requires_arc = true 12 | 13 | s.platform = :ios 14 | s.ios.deployment_target = '5.0' 15 | 16 | s.dependency 'AFNetworking', "~> 1.0" 17 | s.dependency 'xmlrpc' 18 | end 19 | -------------------------------------------------------------------------------- /vendor/kkgridview/.gitignore: -------------------------------------------------------------------------------- 1 | *.xcodeproj/*.pbxuser 2 | *.xcodeproj/*.perspectivev3 3 | *.xcodeproj/xcuserdata/ 4 | *.xcodeproj/project.xcworkspace/xcuserdata/ 5 | *.xcuserstate 6 | Examples/*/*.xcodeproj/xcuserdata 7 | build/ 8 | .DS_Store 9 | Examples/GridViewDemo/GridViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata 10 | *.xcuserdatad 11 | -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset-installed.txt: -------------------------------------------------------------------------------- 1 | Documentation set was installed to Xcode! 2 | 3 | Path: /Users/kxkdesign/Library/Developer/Shared/Documentation/DocSets/com.kolinkrewinkel.KKGridView.docset 4 | Time: 2011-10-25 05:06:43 +0000 -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | com.kolinkrewinkel.KKGridView 9 | CFBundleName 10 | KKGridView Documentation 11 | CFBundleShortVersionString 12 | 1.0 13 | CFBundleVersion 14 | 1.0 15 | 16 | 17 | 18 | 19 | DocSetFeedName 20 | KKGridView Documentation 21 | 22 | DocSetMinimumXcodeVersion 23 | 3.0 24 | 25 | DocSetPublisherIdentifier 26 | com.kolinkrewinkel.documentation 27 | DocSetPublisherName 28 | Kolin Krewinkel 29 | NSHumanReadableCopyright 30 | Copyright © 2011 Kolin Krewinkel. All rights reserved. 31 | 32 | 33 | -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/css/stylesPrint.css: -------------------------------------------------------------------------------- 1 | 2 | header { 3 | display: none; 4 | } 5 | 6 | div.main-navigation, div.navigation-top { 7 | display: none; 8 | } 9 | 10 | div#overview_contents, div#contents.isShowingTOC, div#contents { 11 | overflow: visible; 12 | position: relative; 13 | top: 0px; 14 | border: none; 15 | left: 0; 16 | } 17 | #tocContainer.isShowingTOC { 18 | display: none; 19 | } 20 | nav { 21 | display: none; 22 | } -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/button_bar_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/button_bar_background.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/disclosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/disclosure.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/disclosure_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/disclosure_open.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/library_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/library_background.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/title_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/Documents/img/title_background.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/Nodes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KKGridView 6 | index.html 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/docSet.mom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/docSet.mom -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/docSet.skidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/docSet.skidx -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/docset/Contents/Resources/docSet.toc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/docset/Contents/Resources/docSet.toc -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/html/css/stylesPrint.css: -------------------------------------------------------------------------------- 1 | 2 | header { 3 | display: none; 4 | } 5 | 6 | div.main-navigation, div.navigation-top { 7 | display: none; 8 | } 9 | 10 | div#overview_contents, div#contents.isShowingTOC, div#contents { 11 | overflow: visible; 12 | position: relative; 13 | top: 0px; 14 | border: none; 15 | left: 0; 16 | } 17 | #tocContainer.isShowingTOC { 18 | display: none; 19 | } 20 | nav { 21 | display: none; 22 | } -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/html/img/button_bar_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/html/img/button_bar_background.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/html/img/disclosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/html/img/disclosure.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/html/img/disclosure_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/html/img/disclosure_open.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/html/img/library_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/html/img/library_background.png -------------------------------------------------------------------------------- /vendor/kkgridview/Documentation/html/img/title_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Documentation/html/img/title_background.png -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Examples/GridViewDemo/Default-Landscape@2x.png -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Examples/GridViewDemo/Default@2x.png -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo.xcworkspace/xcshareddata/xcschemes/KKGridView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 40 | 41 | 42 | 43 | 49 | 50 | 52 | 53 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/GridViewDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | KKGridDemo 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIconFiles 14 | 15 | KKGridViewIcon.png 16 | KKGridViewIcon@2x.png 17 | 18 | CFBundleIcons 19 | 20 | CFBundlePrimaryIcon 21 | 22 | CFBundleIconFiles 23 | 24 | KKGridViewIcon.png 25 | KKGridViewIcon@2x.png 26 | 27 | UIPrerenderedIcon 28 | 29 | 30 | 31 | CFBundleIdentifier 32 | com.kolinkrewinkel.${PRODUCT_NAME:rfc1034identifier} 33 | CFBundleInfoDictionaryVersion 34 | 6.0 35 | CFBundleName 36 | ${PRODUCT_NAME} 37 | CFBundlePackageType 38 | APPL 39 | CFBundleShortVersionString 40 | 1.0 41 | CFBundleSignature 42 | ???? 43 | CFBundleVersion 44 | 1.0 45 | LSRequiresIPhoneOS 46 | 47 | NSMainNibFile 48 | MainWindow 49 | UIStatusBarStyle 50 | UIStatusBarStyleBlackOpaque 51 | UISupportedInterfaceOrientations 52 | 53 | UIInterfaceOrientationPortrait 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/GridViewDemo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'GridViewDemo' target in the 'GridViewDemo' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #import 15 | #endif 16 | -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/GridViewDemoAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GridViewDemoAppDelegate.h 3 | // GridViewDemo 4 | // 5 | // Created by Kolin Krewinkel on 7.25.11. 6 | // Copyright 2011 Giulio Petek, Jonathan Sterling, and Kolin Krewinkel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class GridViewDemoViewController; 12 | 13 | @interface GridViewDemoAppDelegate : NSObject 14 | @property (nonatomic, strong) IBOutlet UIWindow *window; 15 | @property (nonatomic, strong) IBOutlet GridViewDemoViewController *viewController; 16 | @end 17 | -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/GridViewDemoAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // GridViewDemoAppDelegate.m 3 | // GridViewDemo 4 | // 5 | // Created by Kolin Krewinkel on 7.25.11. 6 | // Copyright 2011 Giulio Petek, Jonathan Sterling, and Kolin Krewinkel. All rights reserved. 7 | // 8 | 9 | #import "GridViewDemoAppDelegate.h" 10 | #import "GridViewDemoViewController.h" 11 | 12 | @implementation GridViewDemoAppDelegate 13 | 14 | @synthesize window = _window; 15 | @synthesize viewController = _viewController; 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | // Override point for customization after application launch. 20 | UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController]; 21 | self.window.rootViewController = navigationController; 22 | [self.window makeKeyAndVisible]; 23 | return YES; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/GridViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GridViewDemoViewController.h 3 | // GridViewDemo 4 | // 5 | // Created by Kolin Krewinkel on 7.25.11. 6 | // Copyright 2011 Giulio Petek, Jonathan Sterling, and Kolin Krewinkel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GridViewDemoViewController : KKGridViewController 12 | 13 | @property (nonatomic) NSUInteger firstSectionCount; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/Resources/Default.png -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/Resources/KKGridViewIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/Resources/KKGridViewIcon.png -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/Resources/KKGridViewIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/Resources/KKGridViewIcon@2x.png -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /vendor/kkgridview/Examples/GridViewDemo/GridViewDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GridViewDemo 4 | // 5 | // Created by Kolin Krewinkel on 7.25.11. 6 | // Copyright 2011 Giulio Petek, Jonathan Sterling, and Kolin Krewinkel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | @autoreleasepool { 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | return retVal; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/kkgridview/KKGridView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'KKGridView' 3 | s.version = '0.6.8.2' 4 | s.license = 'MIT' 5 | s.platform = :ios 6 | s.summary = 'Gridview for iOS.' 7 | s.homepage = 'https://github.com/kolinkrewinkel/KKGridView' 8 | s.authors = { 'Kolin Krewinkel' => 'kolin@kolinkrewinkel.com', 9 | 'Giulio Petek' => 'gi-lo@touch-mania.com', 10 | 'Jonathan Sterling' => 'jonsterling@me.com', 11 | 'Kyle Hickinson' => 'kyle.hickinson@gmail.com', 12 | 'Matthias Tretter' => 'matthias.tretter@gmail.com', 13 | 'Peter Steinberger' => 'me@petersteinberger.com' } 14 | 15 | s.source = { :git => 'https://github.com/kolinkrewinkel/KKGridView.git', :tag => '0.6.8.2' } 16 | 17 | s.source_files = 'KKGridView' 18 | s.clean_paths = 'Examples', 'KKGridView.xcodeproj', 'Resources' 19 | s.library = 'stdc++' 20 | s.framework = 'QuartzCore' 21 | s.requires_arc = true 22 | end 23 | -------------------------------------------------------------------------------- /vendor/kkgridview/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by Kolin Krewinkel, Giulio Petek, Jonathan Sterling, Kyle 2 | Hickinson, Matthias Tretter, Kyle Hickinson. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /vendor/kkgridview/Resources/Resources-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.kolinkrewinkel.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CFPlugInDynamicRegisterFunction 26 | 27 | CFPlugInDynamicRegistration 28 | NO 29 | CFPlugInFactories 30 | 31 | 00000000-0000-0000-0000-000000000000 32 | MyFactoryFunction 33 | 34 | CFPlugInTypes 35 | 36 | 00000000-0000-0000-0000-000000000000 37 | 38 | 00000000-0000-0000-0000-000000000000 39 | 40 | 41 | CFPlugInUnloadFunction 42 | 43 | NSHumanReadableCopyright 44 | Copyright © 2011 Enkla. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /vendor/kkgridview/Resources/Resources-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Resources' target in the 'Resources' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /vendor/kkgridview/Resources/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /web/ipad1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/ipad1.png -------------------------------------------------------------------------------- /web/ipad2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/ipad2.png -------------------------------------------------------------------------------- /web/ipad3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/ipad3.png -------------------------------------------------------------------------------- /web/ipad4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/ipad4.png -------------------------------------------------------------------------------- /web/ipad5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/ipad5.png -------------------------------------------------------------------------------- /web/iphone1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/iphone1.png -------------------------------------------------------------------------------- /web/iphone2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/iphone2.png -------------------------------------------------------------------------------- /web/iphone3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/iphone3.png -------------------------------------------------------------------------------- /web/iphone4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/iphone4.png -------------------------------------------------------------------------------- /web/iphone5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/Puttio/ed503766c11d5737d759f60663e65ebad641ebff/web/iphone5.png --------------------------------------------------------------------------------