├── PlexATV ├── theos │ ├── lib │ │ └── .keep │ ├── extras │ │ └── vim │ │ │ ├── README │ │ │ ├── indent │ │ │ └── logos.vim │ │ │ ├── ftplugin │ │ │ └── logos.vim │ │ │ └── syntax │ │ │ └── logos.vim │ ├── bin │ │ ├── install.exec │ │ ├── install.copyFile │ │ ├── install.mergeDir │ │ ├── plistkey.py │ │ ├── lib │ │ │ └── Logos │ │ │ │ ├── Generator │ │ │ │ └── MobileSubstrate │ │ │ │ │ ├── Base.pm │ │ │ │ │ ├── Class.pm │ │ │ │ │ ├── Subclass.pm │ │ │ │ │ ├── StaticClassGroup.pm │ │ │ │ │ └── Method.pm │ │ │ │ ├── Ivar.pm │ │ │ │ ├── BaseStaticClassGroup.pm │ │ │ │ ├── BaseSubclass.pm │ │ │ │ ├── Group.pm │ │ │ │ └── BaseClass.pm │ │ ├── deb_build_num.sh │ │ ├── logify.pl │ │ ├── denicify.pl │ │ ├── fakeroot.sh │ │ ├── package_version.sh │ │ └── nicify.pl │ ├── makefiles │ │ ├── null.mk │ │ ├── tool.mk │ │ ├── tweak.mk │ │ ├── aggregate.mk │ │ ├── bundle.mk │ │ ├── platform │ │ │ ├── Darwin.mk │ │ │ ├── Linux.mk │ │ │ └── Darwin-arm.mk │ │ ├── library.mk │ │ ├── framework.mk │ │ ├── subproject.mk │ │ ├── application.mk │ │ ├── instance │ │ │ ├── null.mk │ │ │ ├── tweak.mk │ │ │ ├── subproject.mk │ │ │ ├── tool.mk │ │ │ ├── library.mk │ │ │ ├── framework.mk │ │ │ ├── application.mk │ │ │ ├── shared │ │ │ │ └── bundle.mk │ │ │ ├── bundle.mk │ │ │ └── rules.mk │ │ ├── targets │ │ │ ├── _common │ │ │ │ ├── linux.mk │ │ │ │ ├── darwin.mk │ │ │ │ ├── install_deb_local.mk │ │ │ │ └── install_deb_remote.mk │ │ │ ├── Linux │ │ │ │ ├── linux.mk │ │ │ │ ├── native.mk │ │ │ │ └── iphone.mk │ │ │ ├── Darwin │ │ │ │ ├── macosx.mk │ │ │ │ ├── native.mk │ │ │ │ ├── iphone.mk │ │ │ │ └── simulator.mk │ │ │ └── Darwin-arm │ │ │ │ ├── iphone.mk │ │ │ │ └── native.mk │ │ ├── master │ │ │ ├── null.mk │ │ │ ├── tool.mk │ │ │ ├── bundle.mk │ │ │ ├── library.mk │ │ │ ├── framework.mk │ │ │ ├── tweak.mk │ │ │ ├── application.mk │ │ │ ├── subproject.mk │ │ │ ├── aggregate.mk │ │ │ └── rules.mk │ │ ├── messages.mk │ │ ├── rules.mk │ │ └── package.mk │ ├── documentation │ │ └── Makefile │ ├── LICENSE │ ├── templates │ │ └── iphone │ │ │ ├── tool.nic │ │ │ ├── library.nic │ │ │ ├── tweak.nic │ │ │ ├── application.nic │ │ │ └── preference_bundle.nic │ ├── include │ │ ├── BackRow │ │ │ ├── BRTransportDataProvider.h │ │ │ ├── BRVOSpeechAction.h │ │ │ ├── BRVoiceOverSpeechManager.h │ │ │ └── BRVoiceOver.h │ │ ├── DHCommon.h │ │ └── nlist.h │ └── Prefix.pch ├── .debmake │ └── fakeroot ├── .theos │ └── packages │ │ └── com.plex.client-plugin-0.6.7b ├── English.lproj │ └── InfoPlist.strings ├── Resources │ ├── PmsLogo.png │ ├── Poster.png │ ├── PlexIcon.png │ ├── PlexSettings.png │ ├── PlexTextLogo.png │ ├── PlexAudioSubsON.png │ ├── PmsMainMenuLogo.png │ ├── PlexAudioSubsOFF.png │ ├── English.lproj │ │ └── InfoPlist.strings │ └── Info.plist ├── _ │ ├── plex.bundle │ │ ├── PlexIcon.png │ │ ├── PlexLogo.png │ │ ├── PlexSettings.png │ │ ├── PlexTextLogo.png │ │ ├── English.lproj │ │ │ └── InfoPlist.strings │ │ └── Info.plist │ └── DEBIAN │ │ └── control ├── control ├── _deb │ ├── create_repo │ ├── PLEX.frapplication │ │ ├── Applications │ │ │ └── Lowtide.app │ │ │ │ └── Appliances │ │ │ │ └── PLEX.frappliance │ │ │ │ ├── PlexIcon.png │ │ │ │ ├── PmsLogo.png │ │ │ │ ├── Poster.png │ │ │ │ ├── PlexSettings.png │ │ │ │ ├── PlexTextLogo.png │ │ │ │ ├── PlexAudioSubsON.png │ │ │ │ ├── PmsMainMenuLogo.png │ │ │ │ ├── PlexAudioSubsOFF.png │ │ │ │ ├── English.lproj │ │ │ │ └── InfoPlist.strings │ │ │ │ └── Info.plist │ │ └── DEBIAN │ │ │ ├── postrm │ │ │ ├── postinst │ │ │ └── control │ ├── REPO │ │ ├── Release │ │ └── dpkg-gettext.pl │ ├── debian_control │ └── create_deb ├── plex.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ ├── All.xcscheme │ │ ├── Install.xcscheme │ │ └── plex.xcscheme ├── Classes │ ├── PlexControlFactory.h │ ├── UIImage+Tint.m │ ├── BackRowExtras.h │ ├── PlexTVEpisodeMetadataAsset.h │ ├── HWBasicMenu.h │ ├── PlexMoreInfoMenuItem.h │ ├── PlexMediaShelfView.h │ ├── PlexSecuritySettingsController.h │ ├── PlexViewSettingsController.h │ ├── PlexPlaybackSettingsController.h │ ├── HWSettingsController.h │ ├── ProxyMachineDelegate.h │ ├── PlexMediaObject+Assets.h │ ├── HWAppliance.h │ ├── PlexThemeMusicPlayer.h │ ├── PlexTopShelfController.h │ ├── PlexCompatibility.h │ ├── PlexChannelsController.h │ ├── HWServersController.h │ ├── UIImage+ProportionalFill.h │ ├── HWTVShowsController.h │ ├── PlexMoreInfoMenuItem.m │ ├── HWMediaGridController.h │ ├── Plex_SMFMoviePreviewController.h │ ├── PlexMediaContainer + SkinResources.h │ ├── PlexSearchController.h │ ├── HWUserDefaults.h │ ├── PlexNavigationController.h │ ├── PlexMediaProvider.h │ ├── PlexCompatibility.m │ ├── PlexControlFactory.m │ ├── PlexSongAsset.h │ ├── PlexMediaAssetOld.h │ ├── PlexMediaAsset.h │ ├── PlexMediaShelfView.m │ ├── Plex_SynthesizeSingleton.h │ ├── PlexPlaybackController.h │ ├── PlexAudioSubsController.h │ ├── NSArray-Shuffle.h │ ├── PlexMoreInfoController.h │ ├── UIImage+Tint.h │ ├── PlexPreplayController.h │ ├── PlexTVEpisodeMetadataAsset.m │ ├── HWPlexDir.h │ ├── PlexPreviewAsset.h │ ├── NSArray-Shuffle.m │ ├── PlexSongListController.h │ ├── HWServerDetailsController.h │ ├── Plex_SMFBookcaseController.h │ ├── PlexChannelsController.m │ ├── Constants.h │ ├── ProxyMachineDelegate.m │ └── HWBasicMenu.m ├── build.sh ├── .gitignore ├── plex_Prefix.pch ├── Info.plist └── Makefile ├── plex-workspace.xcworkspace └── contents.xcworkspacedata ├── .gitmodules ├── .gitignore └── LICENSE /PlexATV/theos/lib/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PlexATV/.debmake/fakeroot: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PlexATV/.theos/packages/com.plex.client-plugin-0.6.7b: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /PlexATV/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /PlexATV/Resources/PmsLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/Resources/PmsLogo.png -------------------------------------------------------------------------------- /PlexATV/Resources/Poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/Resources/Poster.png -------------------------------------------------------------------------------- /PlexATV/Resources/PlexIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/Resources/PlexIcon.png -------------------------------------------------------------------------------- /PlexATV/Resources/PlexSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/Resources/PlexSettings.png -------------------------------------------------------------------------------- /PlexATV/Resources/PlexTextLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/Resources/PlexTextLogo.png -------------------------------------------------------------------------------- /PlexATV/_/plex.bundle/PlexIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_/plex.bundle/PlexIcon.png -------------------------------------------------------------------------------- /PlexATV/_/plex.bundle/PlexLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_/plex.bundle/PlexLogo.png -------------------------------------------------------------------------------- /PlexATV/Resources/PlexAudioSubsON.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/Resources/PlexAudioSubsON.png -------------------------------------------------------------------------------- /PlexATV/Resources/PmsMainMenuLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/Resources/PmsMainMenuLogo.png -------------------------------------------------------------------------------- /PlexATV/theos/extras/vim/README: -------------------------------------------------------------------------------- 1 | Place the following in filetype.vim. 2 | 3 | au BufNewFile,BufRead *.xm,*.xmm,*.l.mm setf logos 4 | -------------------------------------------------------------------------------- /PlexATV/Resources/PlexAudioSubsOFF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/Resources/PlexAudioSubsOFF.png -------------------------------------------------------------------------------- /PlexATV/_/plex.bundle/PlexSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_/plex.bundle/PlexSettings.png -------------------------------------------------------------------------------- /PlexATV/_/plex.bundle/PlexTextLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_/plex.bundle/PlexTextLogo.png -------------------------------------------------------------------------------- /PlexATV/theos/bin/install.exec: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ TARGET_REMOTE -eq 1 ]]; then 3 | ssh -p $FW_DEVICE_PORT root@$FW_DEVICE_IP "$*" 4 | else 5 | $* 6 | fi 7 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/install.copyFile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ TARGET_REMOTE -eq 1 ]]; then 3 | scp -P $FW_DEVICE_PORT $1 root@$FW_DEVICE_IP:$2 4 | else 5 | cp $1 $2 6 | fi 7 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/null.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_INSTANCE),) 2 | include $(FW_MAKEDIR)/master/null.mk 3 | else 4 | ifeq ($(FW_TYPE),null) 5 | include $(FW_MAKEDIR)/instance/null.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/tool.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_INSTANCE),) 2 | include $(FW_MAKEDIR)/master/tool.mk 3 | else 4 | ifeq ($(FW_TYPE),tool) 5 | include $(FW_MAKEDIR)/instance/tool.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/documentation/Makefile: -------------------------------------------------------------------------------- 1 | all: makefiles.html 2 | 3 | %.html: %.docbook 4 | xsltproc --output $@ /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl $< 5 | 6 | clean: 7 | rm *.html 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/tweak.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_INSTANCE),) 2 | include $(FW_MAKEDIR)/master/tweak.mk 3 | else 4 | ifeq ($(FW_TYPE),tweak) 5 | include $(FW_MAKEDIR)/instance/tweak.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/aggregate.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_AGGREGATE_MK_LOADED),) 2 | FW_AGGREGATE_MK_LOADED := 1 3 | 4 | ifeq ($(FW_INSTANCE),) 5 | include $(FW_MAKEDIR)/master/aggregate.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/bundle.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_INSTANCE),) 2 | include $(FW_MAKEDIR)/master/bundle.mk 3 | else 4 | ifeq ($(FW_TYPE),bundle) 5 | include $(FW_MAKEDIR)/instance/bundle.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/platform/Darwin.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_PLATFORM_LOADED),) 2 | FW_PLATFORM_LOADED := 1 3 | FW_PLATFORM_NAME := macosx 4 | 5 | FW_PLATFORM_DEFAULT_TARGET := iphone 6 | DU_EXCLUDE = -I 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/extras/vim/indent/logos.vim: -------------------------------------------------------------------------------- 1 | " Vim filetype plugin file 2 | " Language: Logos (Objective-C++) 3 | " Maintainer: Dustin Howett 4 | " Latest Revision: December 22, 2009 5 | 6 | runtime! indent/objc.vim 7 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/library.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_INSTANCE),) 2 | include $(FW_MAKEDIR)/master/library.mk 3 | else 4 | ifeq ($(FW_TYPE),library) 5 | include $(FW_MAKEDIR)/instance/library.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/platform/Linux.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_PLATFORM_LOADED),) 2 | FW_PLATFORM_LOADED := 1 3 | FW_PLATFORM_NAME := linux 4 | 5 | FW_PLATFORM_DEFAULT_TARGET := iphone 6 | DU_EXCLUDE = --exclude 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/control: -------------------------------------------------------------------------------- 1 | Package: com.plex.client-plugin 2 | Name: Plex 3 | Version: 0.6.7b 4 | Architecture: iphoneos-arm 5 | Description: Plex Client 6 | Maintainer: b0bben & ccjensen 7 | Author: quiqueck 8 | Section: Media 9 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/framework.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_INSTANCE),) 2 | include $(FW_MAKEDIR)/master/framework.mk 3 | else 4 | ifeq ($(FW_TYPE),framework) 5 | include $(FW_MAKEDIR)/instance/framework.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/platform/Darwin-arm.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_PLATFORM_LOADED),) 2 | FW_PLATFORM_LOADED := 1 3 | FW_PLATFORM_NAME := iphone 4 | 5 | FW_PLATFORM_DEFAULT_TARGET := iphone 6 | DU_EXCLUDE = --exclude 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/subproject.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_INSTANCE),) 2 | include $(FW_MAKEDIR)/master/subproject.mk 3 | else 4 | ifeq ($(FW_TYPE),subproject) 5 | include $(FW_MAKEDIR)/instance/subproject.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /PlexATV/_deb/create_repo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export COPYFILE_DISABLE=1 3 | export COPY_EXTENDED_ATTRIBUTES_DISABLE=1 4 | cd REPO 5 | ./dpkg-scanpackages.pl -m . /dev/null /downloads/PLEX/ >Packages 6 | rm Packages.bz2 7 | bzip2 Packages -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/application.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_INSTANCE),) 2 | include $(FW_MAKEDIR)/master/application.mk 3 | else 4 | ifeq ($(FW_TYPE),application) 5 | include $(FW_MAKEDIR)/instance/application.mk 6 | endif 7 | endif 8 | -------------------------------------------------------------------------------- /plex-workspace.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PlexATV/plex.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/null.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | .PHONY: internal-null-all_ internal-null-stage_ 6 | 7 | internal-null-all_:: 8 | 9 | internal-null-stage_:: 10 | -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexIcon.png -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PmsLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PmsLogo.png -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/Poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/Poster.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "_Contrib/libPLEX-iOS"] 2 | path = _Contrib/libPLEX-iOS 3 | url = git://github.com/quiqueck/libPLEX-iOS.git 4 | [submodule "_Contrib/SMFramework"] 5 | path = _Contrib/SMFramework 6 | url = git://github.com/tru/SMFramework.git 7 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/install.mergeDir: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $1 3 | # Use fakeroot.sh to ensure that permissions are preserved, and install.exec to ensure that we are running tar -x on the right system. 4 | fakeroot.sh -r tar -c . | install.exec tar -x -C $2 5 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/_common/linux.mk: -------------------------------------------------------------------------------- 1 | # Variables that are common to all Linux-based targets. 2 | TARGET_EXE_EXT = 3 | TARGET_LIB_EXT = .so 4 | 5 | TARGET_LDFLAGS_DYNAMICLIB = -shared -Wl,-soname,$(1) 6 | TARGET_CFLAGS_DYNAMICLIB = -fPIC 7 | -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexSettings.png -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexTextLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexTextLogo.png -------------------------------------------------------------------------------- /PlexATV/_/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: com.plex.client-plugin 2 | Name: Plex 3 | Version: 0.6.7b-1 4 | Architecture: iphoneos-arm 5 | Description: Plex Client 6 | Maintainer: b0bben & ccjensen 7 | Author: quiqueck 8 | Section: Media 9 | Installed-Size: 428 10 | -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexAudioSubsON.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexAudioSubsON.png -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PmsMainMenuLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PmsMainMenuLogo.png -------------------------------------------------------------------------------- /PlexATV/_deb/REPO/Release: -------------------------------------------------------------------------------- 1 | Origin: PLEX Repository 2 | Label: PLEX 3 | Suite: stable 4 | Version: 0.9 5 | Codename: plex 6 | Architectures: iphoneos-arm 7 | Components: main 8 | Description: A Repository for the ATV PLEX Plugins 9 | Icon: http://www.saurik.com/repo.png -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexAudioSubsOFF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlexATV/Plex-ATV-Plugin/HEAD/PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexAudioSubsOFF.png -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/_common/darwin.mk: -------------------------------------------------------------------------------- 1 | # Variables that are common to all Darwin-based targets. 2 | TARGET_EXE_EXT = 3 | TARGET_LIB_EXT = .dylib 4 | 5 | TARGET_LDFLAGS_DYNAMICLIB = -dynamiclib -install_name $(LOCAL_INSTALL_PATH)/$(1) 6 | TARGET_CFLAGS_DYNAMICLIB = 7 | -------------------------------------------------------------------------------- /PlexATV/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | Hello World 7 | 8 | 9 | -------------------------------------------------------------------------------- /PlexATV/_/plex.bundle/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | Hello World 7 | 8 | 9 | -------------------------------------------------------------------------------- /PlexATV/theos/extras/vim/ftplugin/logos.vim: -------------------------------------------------------------------------------- 1 | " Vim filetype plugin file 2 | " Language: Logos (Objective-C++) 3 | " Maintainer: Dustin Howett 4 | " Latest Revision: December 22, 2009 5 | 6 | if exists("b:did_ftplugin") 7 | finish 8 | endif 9 | 10 | " Behaves just like Objective-C 11 | runtime! ftplugin/objc.vim 12 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/_common/install_deb_local.mk: -------------------------------------------------------------------------------- 1 | export TARGET_REMOTE := 0 2 | 3 | ifeq ($(FW_CAN_PACKAGE),1) 4 | internal-install:: 5 | install.exec "dpkg -i $(FW_PACKAGE_FILENAME).deb" 6 | else # FW_CAN_PACKAGE 7 | internal-install:: stage 8 | install.mergeDir "$(FW_STAGING_DIR)" "/" 9 | endif 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.deb 2 | PlexATV/_deb/REPO/Packages.bz2 3 | *.orig 4 | webTranscode2.zip 5 | webTranscode.zip 6 | test.htm 7 | key 8 | jssha256.js 9 | base64.js 10 | PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/plex 11 | PlexATV/_deb/Packages 12 | .DS_Store 13 | /PlexATV/Classes/gitversion.h -------------------------------------------------------------------------------- /PlexATV/Classes/PlexControlFactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // Plex_SMFControlFactory.h 3 | // plex 4 | // 5 | // Created by bob on 2011-04-08. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface PlexControlFactory : SMFControlFactory { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /PlexATV/build.sh: -------------------------------------------------------------------------------- 1 | 2 | IP_ADDRESS=apple-tv.local 3 | 4 | echo "Always clean up first!" 5 | echo "" 6 | 7 | make clean 8 | 9 | echo "Making..." 10 | echo "" 11 | 12 | make 13 | 14 | echo "Make Stage..." 15 | echo "" 16 | 17 | make stage 18 | 19 | echo "Make Package" 20 | 21 | make package 22 | 23 | echo "Make Install..." 24 | 25 | make install -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | PLEX 7 | 8 | 9 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/plistkey.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import plistlib, sys 3 | 4 | if len(sys.argv) < 4: 5 | print 'Syntax:', sys.argv[0], 'plist key value' 6 | sys.exit(1) 7 | 8 | filename = sys.argv[1] 9 | key = sys.argv[2] 10 | value = sys.argv[3] 11 | maindict = plistlib.readPlist(filename) 12 | maindict[key] = value 13 | plistlib.writePlist(maindict, filename) 14 | -------------------------------------------------------------------------------- /PlexATV/Classes/UIImage+Tint.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Tint.h 3 | // 4 | // Created by Matt Gemmell on 04/07/2010. 5 | // Copyright 2010 Instinctive Code. 6 | // 7 | 8 | #import 9 | 10 | @interface UIImage (MGTint) 11 | 12 | - (UIImage*)imageTintedWithColor:(UIColor*)color; 13 | - (UIImage*)imageTintedWithColor:(UIColor*)color fraction:(CGFloat)fraction; 14 | 15 | @end -------------------------------------------------------------------------------- /PlexATV/Classes/BackRowExtras.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #import 4 | 5 | 6 | template 7 | static inline Type_&MSHookIvar(id self, const char *name) { 8 | Ivar ivar( class_getInstanceVariable(object_getClass(self), name) ); 9 | void*pointer( ivar == NULL ? NULL : reinterpret_cast(self) + ivar_getOffset(ivar) ); 10 | return *reinterpret_cast(pointer); 11 | } -------------------------------------------------------------------------------- /PlexATV/Classes/PlexTVEpisodeMetadataAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexTVEpisodeMetadataAsset.h 3 | // plex 4 | // 5 | // Created by ccjensen on 14/06/2011. 6 | // 7 | 8 | #import 9 | #import "PlexPreviewAsset.h" 10 | 11 | @interface PlexTVEpisodeMetadataAsset : PlexPreviewAsset {} 12 | @property (nonatomic, retain) PlexMediaObject *tvshowObject; 13 | 14 | - (void)setupTvshowObject; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /PlexATV/Classes/HWBasicMenu.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | @interface HWBasicMenu : BRMediaMenuController { 4 | 5 | NSMutableArray *_names; 6 | 7 | } 8 | //list provider 9 | - (float)heightForRow:(long)row; 10 | - (long)itemCount; 11 | - (id)itemForRow:(long)row; 12 | - (BOOL)rowSelectable:(long)selectable; 13 | - (id)titleForRow:(long)row; 14 | - (void)setNeedsUpdate; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/DEBIAN/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export APP_NAME="Lowtide.app" 3 | export TARGET_DIR=/Applications/${APP_NAME}/Appliances/PLEX.frappliance 4 | export NEW_TARGET_DIR=/Applications/AppleTV.app/Appliances/ 5 | 6 | if [ -d ${NEW_TARGET_DIR} ]; then 7 | rm -rf "${NEW_TARGET_DIR}/PLEX.frappliance" 8 | killall AppleTV || echo "Couldn't kill AppleTV" 9 | else 10 | killall Lowtide || echo "Couldn't kill Lowtide" 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMoreInfoMenuItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMoreInfoMenuItem.h 3 | // plex 4 | // 5 | // Created by ccjensen on 28/05/2011. 6 | // 7 | 8 | #import 9 | @class PlexDirectory; 10 | 11 | @interface PlexMoreInfoMenuItem : BRMenuItem {} 12 | @property (retain) PlexDirectory *directory; 13 | 14 | + (PlexMoreInfoMenuItem*)menuItemForDirectory:(PlexDirectory*)aDirectory; 15 | - (id)initWithDirectory:(PlexDirectory*)aDirectory; 16 | @end 17 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/Generator/MobileSubstrate/Base.pm: -------------------------------------------------------------------------------- 1 | package Generator; 2 | use strict; 3 | 4 | sub generateClassList { 5 | shift; 6 | my $return = ""; 7 | map $return .= "\@class $_; ", @_; 8 | return $return; 9 | } 10 | 11 | sub classReferenceWithScope { 12 | shift; 13 | my $classname = shift; 14 | my $scope = shift; 15 | my $prefix = "\$"; 16 | if($scope eq "+") { 17 | $prefix = "\$meta\$"; 18 | } 19 | return $prefix.$classname; 20 | } 21 | 22 | 1; 23 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMediaShelfView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMediaShelfView.h 3 | // plex 4 | // 5 | // Created by Tobias Hieta on 8/20/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface PlexMediaShelfView : BRMediaShelfView 13 | { 14 | id adapter; 15 | } 16 | 17 | @property (retain) id provider; 18 | @property (retain) id focusedIndexCompat; 19 | @property (retain) id adapter; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexSecuritySettingsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexSecuritySettingsController.h 3 | // atvTwo 4 | // 5 | // Created by ccjensen on 24/04/2011. 6 | // 7 | // Inspired by 8 | // 9 | // MLoader.m 10 | // MextLoader 11 | // 12 | // Created by Thomas Cool on 10/22/10. 13 | // Copyright 2010 tomcool.org. All rights reserved. 14 | // 15 | 16 | 17 | @interface PlexSecuritySettingsController : SMFMediaMenuController {} 18 | - (void)setupList; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/DEBIAN/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export APP_NAME="Lowtide.app" 3 | export TARGET_DIR=/Applications/${APP_NAME}/Appliances/PLEX.frappliance 4 | export NEW_TARGET_DIR=/Applications/AppleTV.app/Appliances/ 5 | 6 | if [ -d ${NEW_TARGET_DIR} ]; then 7 | ln -s ${TARGET_DIR} ${NEW_TARGET_DIR} 8 | killall AppleTV || echo "No AppleTV process found, please kill it manually" 9 | else 10 | killall Lowtide || echo "No Lowtide process found, please kill it manually" 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexViewSettingsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexViewSettingsController.h 3 | // atvTwo 4 | // 5 | // Created by ccjensen on 10/01/2011. 6 | // 7 | // Inspired by 8 | // 9 | // MLoader.m 10 | // MextLoader 11 | // 12 | // Created by Thomas Cool on 10/22/10. 13 | // Copyright 2010 tomcool.org. All rights reserved. 14 | // 15 | 16 | 17 | @interface PlexViewSettingsController : SMFMediaMenuController {} 18 | @property (retain) NSArray *viewTypesDescription; 19 | - (void)setupList; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexPlaybackSettingsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexAudioSettingsController.h 3 | // atvTwo 4 | // 5 | // Created by bob on 10/01/2011. 6 | // 7 | // Inspired by 8 | // 9 | // MLoader.m 10 | // MextLoader 11 | // 12 | // Created by Thomas Cool on 10/22/10. 13 | // Copyright 2010 tomcool.org. All rights reserved. 14 | // 15 | 16 | 17 | @interface PlexPlaybackSettingsController : SMFMediaMenuController {} 18 | @property (retain) NSArray *plexStreamingQualities; 19 | - (void)setupList; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/Generator/MobileSubstrate/Class.pm: -------------------------------------------------------------------------------- 1 | package Class; 2 | use strict; 3 | use Logos::BaseClass; 4 | @Class::ISA = ('BaseClass'); 5 | 6 | sub initializers { 7 | my $self = shift; 8 | my $return = ""; 9 | $return .= "Class \$\$".$self->{NAME}." = ".$self->expression."; " if $self->{INST} or $self->{META}; 10 | $return .= "Class \$\$meta\$".$self->{NAME}." = ".$self->metaexpression."; " if $self->{META}; 11 | foreach(@{$self->{METHODS}}) { 12 | $return .= $_->initializers; 13 | } 14 | return $return; 15 | } 16 | 17 | 1; 18 | -------------------------------------------------------------------------------- /PlexATV/theos/extras/vim/syntax/logos.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: Logos (Objective-C++) 3 | " Maintainer: Dustin Howett 4 | " Latest Revision: December 22, 2009 5 | 6 | if exists("b:current_syntax") 7 | finish 8 | endif 9 | 10 | runtime! syntax/objc.vim 11 | 12 | syn match logosHookInit '%hook' 13 | syn match logosKeyword '%\(log\|orig\(inal\)\=\|c\(onstruc\)\=tor\|init\|group\|new\|class\)%\=' 14 | syn match logosKeyword '%end%\=' 15 | 16 | let b:currentsyntax = "logos" 17 | hi def link logosHookInit PreProc 18 | hi def link logosKeyword PreProc 19 | -------------------------------------------------------------------------------- /PlexATV/theos/LICENSE: -------------------------------------------------------------------------------- 1 | Theos (and by extension, Logos) is available under the provisions of the GNU 2 | General Public License, version 3 (or later), available here: 3 | http://www.gnu.org/licenses/gpl-3.0.html. 4 | 5 | Projects created using Theos and/or Logos are not considered derivative works 6 | (from a licensing standpoint, or, for that matter, any other standpoint) and 7 | are, as such, not required to be licensed under the GNU GPL. 8 | 9 | The included project templates are license-free. The use of a template does 10 | not confer a license to your project. 11 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Linux/linux.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := linux 4 | 5 | ifneq ($(words $(_FW_TARGET_ARGS)),0) 6 | CROSS_COMPILE := $(firstword $(_FW_TARGET_ARGS))- 7 | endif 8 | 9 | TARGET_CC ?= $(CROSS_COMPILE)gcc 10 | TARGET_CXX ?= $(CROSS_COMPILE)g++ 11 | TARGET_STRIP ?= $(CROSS_COMPILE)strip 12 | TARGET_STRIP_FLAGS ?= 13 | TARGET_CODESIGN_ALLOCATE ?= 14 | TARGET_CODESIGN ?= 15 | TARGET_CODESIGN_FLAGS ?= 16 | 17 | include $(FW_MAKEDIR)/targets/_common/linux.mk 18 | 19 | SDKFLAGS := 20 | endif 21 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Linux/native.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := linux 4 | 5 | ifneq ($(words $(_FW_TARGET_ARGS)),0) 6 | CROSS_COMPILE := $(firstword $(_FW_TARGET_ARGS))- 7 | endif 8 | 9 | TARGET_CC ?= $(CROSS_COMPILE)gcc 10 | TARGET_CXX ?= $(CROSS_COMPILE)g++ 11 | TARGET_STRIP ?= $(CROSS_COMPILE)strip 12 | TARGET_STRIP_FLAGS ?= 13 | TARGET_CODESIGN_ALLOCATE ?= 14 | TARGET_CODESIGN ?= 15 | TARGET_CODESIGN_FLAGS ?= 16 | 17 | include $(FW_MAKEDIR)/targets/_common/linux.mk 18 | 19 | SDKFLAGS := 20 | endif 21 | -------------------------------------------------------------------------------- /PlexATV/Classes/HWSettingsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWSettingsController.h 3 | // atvTwo 4 | // 5 | // Created by ccjensen on 10/01/2011. 6 | // 7 | // Inspired by 8 | // 9 | // MLoader.m 10 | // MextLoader 11 | // 12 | // Created by Thomas Cool on 10/22/10. 13 | // Copyright 2010 tomcool.org. All rights reserved. 14 | // 15 | 16 | 17 | @interface HWSettingsController : SMFMediaMenuController { 18 | BRBaseAppliance *topLevelController; 19 | } 20 | 21 | @property (readwrite, assign) BRBaseAppliance *topLevelController; 22 | - (void)setupList; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /PlexATV/Classes/ProxyMachineDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProxyMachineDelegate.h 3 | // atvTwo 4 | // 5 | // Created by Frank Bauer on 14.01.11. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @class Machine; 12 | @interface ProxyMachineDelegate : NSObject { 13 | NSMutableArray *delegates; 14 | } 15 | 16 | + (ProxyMachineDelegate*)shared; 17 | 18 | - (void)registerDelegate:(id)del; 19 | - (void)removeDelegate:(id)del; 20 | - (void)removeAllDelegates; 21 | @end 22 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/null.mk: -------------------------------------------------------------------------------- 1 | NULL_NAME := $(strip $(NULL_NAME)) 2 | 3 | ifeq ($(FW_RULES_LOADED),) 4 | include $(FW_MAKEDIR)/rules.mk 5 | endif 6 | 7 | internal-all:: $(NULL_NAME:=.all.null.variables); 8 | 9 | internal-stage:: $(NULL_NAME:=.stage.null.variables); 10 | 11 | NULLS_WITH_SUBPROJECTS = $(strip $(foreach null,$(NULL_NAME),$(patsubst %,$(null),$($(null)_SUBPROJECTS)))) 12 | ifneq ($(NULLS_WITH_SUBPROJECTS),) 13 | internal-clean:: $(NULLS_WITH_SUBPROJECTS:=.clean.null.subprojects) 14 | endif 15 | 16 | $(NULL_NAME): 17 | @$(MAKE) --no-print-directory --no-keep-going $@.all.null.variables 18 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/tool.mk: -------------------------------------------------------------------------------- 1 | TOOL_NAME := $(strip $(TOOL_NAME)) 2 | 3 | ifeq ($(FW_RULES_LOADED),) 4 | include $(FW_MAKEDIR)/rules.mk 5 | endif 6 | 7 | internal-all:: $(TOOL_NAME:=.all.tool.variables); 8 | 9 | internal-stage:: $(TOOL_NAME:=.stage.tool.variables); 10 | 11 | TOOLS_WITH_SUBPROJECTS = $(strip $(foreach tool,$(TOOL_NAME),$(patsubst %,$(tool),$($(tool)_SUBPROJECTS)))) 12 | ifneq ($(TOOLS_WITH_SUBPROJECTS),) 13 | internal-clean:: $(TOOLS_WITH_SUBPROJECTS:=.clean.tool.subprojects) 14 | endif 15 | 16 | $(TOOL_NAME): 17 | @$(MAKE) --no-print-directory --no-keep-going $@.all.tool.variables 18 | -------------------------------------------------------------------------------- /PlexATV/theos/templates/iphone/tool.nic: -------------------------------------------------------------------------------- 1 | file 5 main.mm 2 | int main(int argc, char **argv, char **envp) { 3 | return 0; 4 | } 5 | 6 | // vim:ft=objc 7 | 8 | file 6 Makefile 9 | include theos/makefiles/common.mk 10 | 11 | TOOL_NAME = @@PROJECTNAME@@ 12 | @@PROJECTNAME@@_FILES = main.mm 13 | 14 | include $(FW_MAKEDIR)/tool.mk 15 | 16 | file 10 control 17 | Package: @@PACKAGENAME@@ 18 | Name: @@FULLPROJECTNAME@@ 19 | Depends: 20 | Version: 0.0.1 21 | Architecture: iphoneos-arm 22 | Description: An awesome tool of some sort!! 23 | Maintainer: @@USER@@ 24 | Author: @@USER@@ 25 | Section: System 26 | Tag: role::hacker 27 | 28 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/bundle.mk: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME := $(strip $(BUNDLE_NAME)) 2 | 3 | ifeq ($(FW_RULES_LOADED),) 4 | include $(FW_MAKEDIR)/rules.mk 5 | endif 6 | 7 | internal-all:: $(BUNDLE_NAME:=.all.bundle.variables); 8 | 9 | internal-stage:: $(BUNDLE_NAME:=.stage.bundle.variables); 10 | 11 | BUNDLES_WITH_SUBPROJECTS = $(strip $(foreach bundle,$(BUNDLE_NAME),$(patsubst %,$(bundle),$($(bundle)_SUBPROJECTS)))) 12 | ifneq ($(BUNDLES_WITH_SUBPROJECTS),) 13 | internal-clean:: $(BUNDLES_WITH_SUBPROJECTS:=.clean.bundle.subprojects) 14 | endif 15 | 16 | $(BUNDLE_NAME): 17 | @$(MAKE) --no-print-directory --no-keep-going $@.all.bundle.variables 18 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/deb_build_num.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | GETONLY=0 3 | if [[ $1 == "-g" ]]; then 4 | GETONLY=1 5 | shift 6 | fi 7 | 8 | if [[ $# -lt 2 ]]; then 9 | echo "Syntax: $0 [-g] packagename versionname" >&2 10 | exit 1 11 | fi 12 | 13 | if [[ ! -d $TOP_DIR/.debmake ]]; then 14 | mkdir $TOP_DIR/.debmake 15 | fi 16 | 17 | PACKAGE=$1 18 | VERSION=$2 19 | INFOFILE=$TOP_DIR/.debmake/$PACKAGE-$VERSION 20 | if [[ ! -e $INFOFILE ]]; then 21 | echo -n 1 > $INFOFILE 22 | echo -n 1 23 | exit 0 24 | else 25 | CURNUM=$(cat $INFOFILE) 26 | if [[ $GETONLY -eq 0 ]]; then 27 | let CURNUM++ 28 | echo -n $CURNUM > $INFOFILE 29 | fi 30 | echo $CURNUM 31 | fi 32 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/library.mk: -------------------------------------------------------------------------------- 1 | LIBRARY_NAME := $(strip $(LIBRARY_NAME)) 2 | 3 | ifeq ($(FW_RULES_LOADED),) 4 | include $(FW_MAKEDIR)/rules.mk 5 | endif 6 | 7 | internal-all:: $(LIBRARY_NAME:=.all.library.variables); 8 | 9 | internal-stage:: $(LIBRARY_NAME:=.stage.library.variables); 10 | 11 | LIBRARYS_WITH_SUBPROJECTS = $(strip $(foreach library,$(LIBRARY_NAME),$(patsubst %,$(library),$($(library)_SUBPROJECTS)))) 12 | ifneq ($(LIBRARYS_WITH_SUBPROJECTS),) 13 | internal-clean:: $(LIBRARYS_WITH_SUBPROJECTS:=.clean.library.subprojects) 14 | endif 15 | 16 | $(LIBRARY_NAME): 17 | @$(MAKE) --no-print-directory --no-keep-going $@.all.library.variables 18 | -------------------------------------------------------------------------------- /PlexATV/theos/templates/iphone/library.nic: -------------------------------------------------------------------------------- 1 | file 5 @@PROJECTNAME@@.mm 2 | int main(int argc, char **argv, char **envp) { 3 | return 0; 4 | } 5 | 6 | // vim:ft=objc 7 | 8 | file 6 Makefile 9 | include theos/makefiles/common.mk 10 | 11 | LIBRARY_NAME = @@PROJECTNAME@@ 12 | @@PROJECTNAME@@_FILES = @@PROJECTNAME@@.mm 13 | 14 | include $(FW_MAKEDIR)/library.mk 15 | 16 | file 10 control 17 | Package: @@PACKAGENAME@@ 18 | Name: @@FULLPROJECTNAME@@ 19 | Depends: 20 | Version: 0.0.1 21 | Architecture: iphoneos-arm 22 | Description: An awesome library of some sort!! 23 | Maintainer: @@USER@@ 24 | Author: @@USER@@ 25 | Section: System 26 | Tag: role::developer 27 | 28 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMediaObject+Assets.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMediaObject+Assets.h 3 | // plex 4 | // 5 | // Created by ccjensen on 03/05/2011. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @class PlexPreviewAsset, PlexMediaAsset, PlexSongAsset; 12 | @interface PlexMediaObject (Assets) 13 | 14 | @property (readonly) PlexPreviewAsset *previewAsset; 15 | @property (readonly) PlexMediaAsset *mediaAsset; 16 | //@property (readonly) PlexSongAsset *songAsset; 17 | 18 | @property (readonly) float heightForMenuItem; 19 | @property (readonly) BRMenuItem *menuItem; 20 | @property (readonly) id previewControl; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /PlexATV/_deb/REPO/dpkg-gettext.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use strict; 3 | use warnings; 4 | # Copied from /usr/share/perl5/Debconf/Gettext.pm 5 | 6 | use strict; 7 | 8 | BEGIN { 9 | eval 'use Locale::gettext'; 10 | if ($@) { 11 | eval q{ 12 | sub _g { 13 | return shift; 14 | } 15 | sub textdomain { 16 | } 17 | sub ngettext { 18 | if ($_[2] == 1) { 19 | return $_[0]; 20 | } else { 21 | return $_[1]; 22 | } 23 | } 24 | }; 25 | } else { 26 | eval q{ 27 | sub _g { 28 | return gettext(shift); 29 | } 30 | }; 31 | } 32 | } 33 | 34 | use base qw(Exporter); 35 | our @EXPORT=qw(_g textdomain ngettext); 36 | 37 | 1; -------------------------------------------------------------------------------- /PlexATV/theos/include/BackRow/BRTransportDataProvider.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This header is generated by class-dump-z 0.2a. 3 | * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3. 4 | * 5 | * Source: /System/Library/PrivateFrameworks/BackRow.framework/BackRow 6 | */ 7 | 8 | // 9 | #import "BackRow-Structs.h" 10 | 11 | 12 | @protocol BRTransportDataProvider 13 | - (BRTimeRange)bufferedRange; 14 | - (float)bufferingProgress; 15 | - (id)chapterTimes; 16 | - (id)currentChapterTitle; 17 | - (double)duration; 18 | - (double)elapsedTime; 19 | - (int)playerState; 20 | - (BOOL)supportsBufferedRange; 21 | - (double)virtualChapterMark; 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/framework.mk: -------------------------------------------------------------------------------- 1 | FRAMEWORK_NAME := $(strip $(FRAMEWORK_NAME)) 2 | 3 | ifeq ($(FW_RULES_LOADED),) 4 | include $(FW_MAKEDIR)/rules.mk 5 | endif 6 | 7 | internal-all:: $(FRAMEWORK_NAME:=.all.framework.variables); 8 | 9 | internal-stage:: $(FRAMEWORK_NAME:=.stage.framework.variables); 10 | 11 | FRAMEWORKS_WITH_SUBPROJECTS = $(strip $(foreach framework,$(FRAMEWORK_NAME),$(patsubst %,$(framework),$($(framework)_SUBPROJECTS)))) 12 | ifneq ($(FRAMEWORKS_WITH_SUBPROJECTS),) 13 | internal-clean:: $(FRAMEWORKS_WITH_SUBPROJECTS:=.clean.framework.subprojects) 14 | endif 15 | 16 | $(FRAMEWORK_NAME): 17 | @$(MAKE) --no-print-directory --no-keep-going $@.all.framework.variables 18 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/tweak.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | .PHONY: internal-tweak-all_ internal-tweak-stage_ 6 | 7 | LOCAL_INSTALL_PATH ?= $(strip $($(FW_INSTANCE)_INSTALL_PATH)) 8 | ifeq ($(LOCAL_INSTALL_PATH),) 9 | LOCAL_INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries 10 | endif 11 | 12 | AUXILIARY_LDFLAGS += -lsubstrate 13 | 14 | include $(FW_MAKEDIR)/instance/library.mk 15 | 16 | internal-tweak-all_:: internal-library-all_ 17 | 18 | internal-tweak-stage_:: internal-library-stage_ 19 | $(ECHO_NOTHING)if [ -f $(FW_INSTANCE).plist ]; then cp $(FW_INSTANCE).plist "$(FW_STAGING_DIR)$(LOCAL_INSTALL_PATH)/"; fi$(ECHO_END) 20 | -------------------------------------------------------------------------------- /PlexATV/Classes/HWAppliance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HWAppliance.h 3 | * atvTwo 4 | * 5 | * Created by Frank Bauer on 15.01.11. 6 | * Modified by ccjensen 7 | */ 8 | 9 | 10 | #import "BackRowExtras.h" 11 | @class PlexTopShelfController, PlexMediaContainer; 12 | 13 | @interface PlexAppliance : BRBaseAppliance { } 14 | @property (nonatomic, retain) PlexTopShelfController *topShelfController; 15 | @property (nonatomic, retain) NSMutableArray *currentApplianceCategories; 16 | @property (nonatomic, retain) BRApplianceCategory *otherServersApplianceCategory; 17 | @property (nonatomic, retain) BRApplianceCategory *settingsApplianceCategory; 18 | 19 | - (void)rebuildCategories; 20 | 21 | @end -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/tweak.mk: -------------------------------------------------------------------------------- 1 | TWEAK_NAME := $(strip $(TWEAK_NAME)) 2 | 3 | ifeq ($(FW_RULES_LOADED),) 4 | include $(FW_MAKEDIR)/rules.mk 5 | endif 6 | 7 | internal-all:: $(TWEAK_NAME:=.all.tweak.variables); 8 | 9 | internal-stage:: $(TWEAK_NAME:=.stage.tweak.variables); 10 | 11 | internal-after-install:: 12 | install.exec "killall -9 SpringBoard" 13 | 14 | TWEAKS_WITH_SUBPROJECTS = $(strip $(foreach tweak,$(TWEAK_NAME),$(patsubst %,$(tweak),$($(tweak)_SUBPROJECTS)))) 15 | ifneq ($(TWEAKS_WITH_SUBPROJECTS),) 16 | internal-clean:: $(TWEAKS_WITH_SUBPROJECTS:=.clean.tweak.subprojects) 17 | endif 18 | 19 | $(TWEAK_NAME): 20 | @$(MAKE) --no-print-directory --no-keep-going $@.all.tweak.variables 21 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Darwin/macosx.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := macosx 4 | 5 | SDKBINPATH ?= /usr/bin 6 | 7 | TARGET_CC ?= $(SDKBINPATH)/gcc-4.2 8 | TARGET_CXX ?= $(SDKBINPATH)/g++-4.2 9 | TARGET_STRIP ?= $(SDKBINPATH)/strip 10 | TARGET_STRIP_FLAGS ?= -x 11 | TARGET_CODESIGN_ALLOCATE ?= $(SDKBINPATH)/codesign_allocate 12 | TARGET_CODESIGN ?= 13 | TARGET_CODESIGN_FLAGS ?= 14 | 15 | include $(FW_MAKEDIR)/targets/_common/install_deb_local.mk 16 | include $(FW_MAKEDIR)/targets/_common/darwin.mk 17 | 18 | ARCHS ?= i386 x86_64 19 | SDKFLAGS := $(foreach ARCH,$(ARCHS),-arch $(ARCH)) 20 | TARGET_CFLAGS := $(SDKFLAGS) 21 | TARGET_LDFLAGS := $(SDKFLAGS) -multiply_defined suppress 22 | endif 23 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Darwin/native.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := macosx 4 | 5 | SDKBINPATH ?= /usr/bin 6 | 7 | TARGET_CC ?= $(SDKBINPATH)/gcc-4.2 8 | TARGET_CXX ?= $(SDKBINPATH)/g++-4.2 9 | TARGET_STRIP ?= $(SDKBINPATH)/strip 10 | TARGET_STRIP_FLAGS ?= -x 11 | TARGET_CODESIGN_ALLOCATE ?= $(SDKBINPATH)/codesign_allocate 12 | TARGET_CODESIGN ?= 13 | TARGET_CODESIGN_FLAGS ?= 14 | 15 | include $(FW_MAKEDIR)/targets/_common/install_deb_local.mk 16 | include $(FW_MAKEDIR)/targets/_common/darwin.mk 17 | 18 | ARCHS ?= i386 x86_64 19 | SDKFLAGS := $(foreach ARCH,$(ARCHS),-arch $(ARCH)) 20 | TARGET_CFLAGS := $(SDKFLAGS) 21 | TARGET_LDFLAGS := $(SDKFLAGS) -multiply_defined suppress 22 | endif 23 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexThemeMusicPlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexThemeMusicPlayer.h 3 | // plex 4 | // 5 | // Created by ccjensen on 06/05/2011. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @class PlexMediaObject; 12 | 13 | @interface PlexThemeMusicPlayer : NSObject {} 14 | @property (retain) AVPlayer *themeMusicPlayer; 15 | @property (retain) NSURL *currentlyPlayingThemeUrl; 16 | 17 | 18 | + (PlexThemeMusicPlayer*)sharedPlexThemeMusicPlayer; 19 | 20 | - (void)startPlayingThemeMusicIfAppropiateForMediaObject:(PlexMediaObject*)mediaObject; 21 | - (void)stopPlayingThemeMusicForMediaObject:(PlexMediaObject*)pmo; 22 | - (AVPlayerItem*)playerItemForURL:(NSURL*)url withVolumeAt:(CGFloat)requestedVolume; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexTopShelfController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexTopShelfController.h 3 | // plex 4 | // 5 | // Created by tomcool 6 | // Modified by ccjensen 7 | // 8 | 9 | #import 10 | @class PlexMediaContainer; 11 | 12 | @interface PlexTopShelfController : NSObject { 13 | BRTopShelfView *topShelfView; 14 | BRMediaShelfView *shelfView; 15 | int shelfItemCount; 16 | } 17 | @property (copy) NSString *containerName; 18 | @property (retain) PlexMediaContainer *onDeckMediaContainer; 19 | @property (retain) PlexMediaContainer *recentlyAddedMediaContainer; 20 | 21 | - (void)selectCategoryWithIdentifier:(id)identifier; 22 | - (id)topShelfView; 23 | - (void)refresh; 24 | 25 | - (void)setContentToContainer:(PlexMediaContainer*)aMediaContainer; 26 | @end -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Darwin-arm/iphone.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := iphone 4 | 5 | SDKTARGET ?= arm-apple-darwin9 6 | SDKBINPATH ?= /usr/bin 7 | SYSROOT ?= /var/sdk 8 | 9 | PREFIX := $(SDKBINPATH)/$(SDKTARGET)- 10 | 11 | TARGET_CC ?= $(PREFIX)gcc 12 | TARGET_CXX ?= $(PREFIX)g++ 13 | TARGET_STRIP ?= strip 14 | TARGET_STRIP_FLAGS ?= -x 15 | TARGET_CODESIGN_ALLOCATE ?= codesign_allocate 16 | TARGET_CODESIGN ?= ldid 17 | TARGET_CODESIGN_FLAGS ?= -S 18 | 19 | include $(FW_MAKEDIR)/targets/_common/install_deb_local.mk 20 | include $(FW_MAKEDIR)/targets/_common/darwin.mk 21 | 22 | SDKFLAGS := -isysroot $(SYSROOT) 23 | TARGET_CFLAGS := $(SDKFLAGS) 24 | TARGET_LDFLAGS := $(SDKFLAGS) -multiply_defined suppress 25 | endif 26 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Darwin-arm/native.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := iphone 4 | 5 | SDKTARGET ?= arm-apple-darwin9 6 | SDKBINPATH ?= /usr/bin 7 | SYSROOT ?= /var/sdk 8 | 9 | PREFIX := $(SDKBINPATH)/$(SDKTARGET)- 10 | 11 | TARGET_CC ?= $(PREFIX)gcc 12 | TARGET_CXX ?= $(PREFIX)g++ 13 | TARGET_STRIP ?= strip 14 | TARGET_STRIP_FLAGS ?= -x 15 | TARGET_CODESIGN_ALLOCATE ?= codesign_allocate 16 | TARGET_CODESIGN ?= ldid 17 | TARGET_CODESIGN_FLAGS ?= -S 18 | 19 | include $(FW_MAKEDIR)/targets/_common/install_deb_local.mk 20 | include $(FW_MAKEDIR)/targets/_common/darwin.mk 21 | 22 | SDKFLAGS := -isysroot $(SYSROOT) 23 | TARGET_CFLAGS := $(SDKFLAGS) 24 | TARGET_LDFLAGS := $(SDKFLAGS) -multiply_defined suppress 25 | endif 26 | -------------------------------------------------------------------------------- /PlexATV/_deb/debian_control: -------------------------------------------------------------------------------- 1 | Package: com.plex.client-plugin 2 | Name: AppleTV PLEX Plugin 3 | Version: **VERSION** 4 | Priority: optional 5 | Size: 1083178 6 | Installed-Size: 2662 7 | Depends: beigelist,com.nito,org.tomcool.smframework (>= 0.7.7-2) 8 | Replaces: plex-client-plugin 9 | Architecture: iphoneos-arm 10 | Description: A PLEX Client for Lowtide (beta) 11 | This Lowtide Plugin allows you to browse your local PMS Libraries 12 | and play back videos. 13 | Changes: New machine manager, new views for movies and shows + a lot of minor fixes 14 | Homepage: http://plexapp.com/ 15 | Maintainer: Quiqueck 16 | Author: Quiqueck 17 | Section: Multimedia 18 | Icon: file:///Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexIcon.png 19 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexCompatibility.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexCompatibility.h 3 | // plex 4 | // 5 | // Created by bob on 2011-11-27. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | // BASED ON: 10 | // SMFCompatibility.h 11 | // SMFramework 12 | // 13 | // Created by Thomas Cool on 7/13/11. 14 | // Copyright 2011 tomcool.org. All rights reserved. 15 | // 16 | 17 | #import 18 | 19 | @interface PlexCompatibility : NSObject 20 | { 21 | BOOL _usingFourPointTwo; 22 | BOOL _usingFourPointThree; 23 | BOOL _usingFourPointFour; 24 | } 25 | + (PlexCompatibility*)compat; 26 | - (BOOL)usingFourPointTwo; 27 | - (BOOL)usingFourPointThree; 28 | - (BOOL)usingFourPointFour; 29 | @end 30 | 31 | #define PLEX_COMPAT [PlexCompatibility compat] 32 | 33 | -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: com.plex.client-plugin 2 | Name: AppleTV PLEX Plugin 3 | Version: 0.9.0.0-4a56af69 4 | Priority: optional 5 | Size: 1083178 6 | Installed-Size: 2662 7 | Depends: beigelist,com.nito,org.tomcool.smframework (>= 0.7.7-2) 8 | Replaces: plex-client-plugin 9 | Architecture: iphoneos-arm 10 | Description: A PLEX Client for Lowtide (beta) 11 | This Lowtide Plugin allows you to browse your local PMS Libraries 12 | and play back videos. 13 | Changes: New machine manager, new views for movies and shows + a lot of minor fixes 14 | Homepage: http://plexapp.com/ 15 | Maintainer: Quiqueck 16 | Author: Quiqueck 17 | Section: Multimedia 18 | Icon: file:///Applications/Lowtide.app/Appliances/PLEX.frappliance/PlexIcon.png 19 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexChannelsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexChannelsController.h 3 | // plex 4 | // 5 | // Created by ccjensen on 13/04/2011. 6 | // 7 | 8 | 9 | #import 10 | #import 11 | @class PlexMediaObject; 12 | 13 | @interface PlexChannelsController : SMFMediaMenuController { 14 | PlexMediaContainer *rootContainer; 15 | PlexMediaObject *playbackItem; 16 | } 17 | 18 | @property (readwrite, retain) PlexMediaContainer *rootContainer; 19 | - (void)log:(NSNotificationCenter*)note; 20 | 21 | - (id)initWithRootContainer:(PlexMediaContainer*)container; 22 | //list provider 23 | - (float)heightForRow:(long)row; 24 | - (long)itemCount; 25 | - (id)itemForRow:(long)row; 26 | - (BOOL)rowSelectable:(long)selectable; 27 | - (id)titleForRow:(long)row; 28 | 29 | @end -------------------------------------------------------------------------------- /PlexATV/Classes/HWServersController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWServersController.h 3 | // atvTwo 4 | // 5 | // Created by ccjensen on 10/01/2011. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface HWServersController : SMFMediaMenuController { 12 | NSMutableArray *_machines; 13 | NSArray *_machineSortDescriptors; 14 | } 15 | 16 | @property (assign) NSMutableArray *machines; 17 | 18 | //custom methods 19 | - (void)showAddNewMachineWizard; 20 | - (void)showEditMachineDetailsViewForMachine:(Machine*)machine; 21 | 22 | //list provider 23 | - (float)heightForRow:(long)row; 24 | - (long)itemCount; 25 | - (id)itemForRow:(long)row; 26 | - (BOOL)rowSelectable:(long)selectable; 27 | - (id)titleForRow:(long)row; 28 | - (void)setNeedsUpdate; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/Generator/MobileSubstrate/Subclass.pm: -------------------------------------------------------------------------------- 1 | package Subclass; 2 | use Logos::Generator::MobileSubstrate::Class; 3 | use Logos::BaseSubclass; 4 | @Subclass::ISA = ('Class', 'BaseSubclass'); 5 | 6 | sub initializers { 7 | my $self = shift; 8 | my $return = ""; 9 | $return .= "{ \$".$self->name." = objc_allocateClassPair(objc_getClass(\"".$self->superclass."\"), \"".$self->name."\", 0); "; 10 | # 11 | foreach(@{$self->{IVARS}}) { 12 | $return .= $_->initializers; 13 | } 14 | # 15 | foreach(keys %{$self->{PROTOCOLS}}) { 16 | $return .= "class_addProtocol(\$".$self->name.", objc_getProtocol(\"$_\")); "; 17 | } 18 | $return .= "objc_registerClassPair(\$".$self->name."); "; 19 | $return .= $self->SUPER::initializers; 20 | $return .= "}"; 21 | return $return; 22 | } 23 | 24 | 1; 25 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Linux/iphone.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := iphone 4 | 5 | SDKTARGET ?= arm-apple-darwin9 6 | SDKBINPATH ?= /opt/iphone-sdk-3.0/prefix/bin 7 | SYSROOT ?= /opt/iphone-sdk-3.0/sysroot 8 | 9 | PREFIX := $(SDKBINPATH)/$(SDKTARGET)- 10 | 11 | TARGET_CC ?= $(PREFIX)gcc 12 | TARGET_CXX ?= $(PREFIX)g++ 13 | TARGET_STRIP ?= $(PREFIX)strip 14 | TARGET_STRIP_FLAGS ?= -x 15 | TARGET_CODESIGN_ALLOCATE ?= $(PREFIX)codesign_allocate 16 | TARGET_CODESIGN ?= ldid 17 | TARGET_CODESIGN_FLAGS ?= -S 18 | 19 | include $(FW_MAKEDIR)/targets/_common/install_deb_remote.mk 20 | include $(FW_MAKEDIR)/targets/_common/darwin.mk 21 | 22 | SDKFLAGS := -isysroot $(SYSROOT) 23 | TARGET_CFLAGS := $(SDKFLAGS) 24 | TARGET_LDFLAGS := $(SDKFLAGS) -multiply_defined suppress 25 | endif 26 | -------------------------------------------------------------------------------- /PlexATV/.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X Finder and whatnot 2 | .DS_Store 3 | 4 | # Sparkle distribution Private Key (Don't check me in!) 5 | dsa_priv.pem 6 | 7 | # XCode (and ancestors) per-user config (very noisy, and not relevant) 8 | *.mode1 9 | *.mode1v3 10 | *.mode2v3 11 | *.perspective 12 | *.perspectivev3 13 | *.pbxuser 14 | *.xcworkspace 15 | xcuserdata 16 | 17 | # Generated files 18 | VersionX-revision.h 19 | 20 | # build products 21 | build/ 22 | *.[oa] 23 | obj/ 24 | PlexATV/_deb/PLEX.frapplication/Applications/AppleTV.app/Appliances/PLEX.frappliance/plex 25 | 26 | # Other source repository archive directories (protects when importing) 27 | .hg 28 | .svn 29 | CVS 30 | 31 | # automatic backup files 32 | *~.nib 33 | *.swp 34 | *~ 35 | *(Autosaved).rtfd/ 36 | Backup[ ]of[ ]*.pages/ 37 | Backup[ ]of[ ]*.key/ 38 | Backup[ ]of[ ]*.numbers/ -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/_common/install_deb_remote.mk: -------------------------------------------------------------------------------- 1 | export TARGET_REMOTE := 1 2 | 3 | ifeq ($(FW_DEVICE_IP),) 4 | internal-install:: 5 | $(info $(MAKE) install requires that you set FW_DEVICE_IP in your environment. It is also recommended that you have public-key authentication set up for root over SSH, or you'll be entering your password a lot.) 6 | @exit 1 7 | else # FW_DEVICE_IP 8 | 9 | FW_DEVICE_PORT ?= 22 10 | 11 | export FW_DEVICE_IP FW_DEVICE_PORT 12 | 13 | ifeq ($(FW_CAN_PACKAGE),1) 14 | internal-install:: 15 | install.copyFile "$(FW_PROJECT_DIR)/$(FW_PACKAGE_FILENAME).deb" "$(FW_PACKAGE_FILENAME).deb" 16 | install.exec "dpkg -i $(FW_PACKAGE_FILENAME).deb" 17 | else # FW_CAN_PACKAGE == 0 18 | internal-install:: stage 19 | install.mergeDir "$(FW_STAGING_DIR)" "/" 20 | endif # FW_CAN_PACKAGE 21 | 22 | endif # FW_DEVICE_IP 23 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/application.mk: -------------------------------------------------------------------------------- 1 | APPLICATION_NAME := $(strip $(APPLICATION_NAME)) 2 | 3 | ifeq ($(FW_RULES_LOADED),) 4 | include $(FW_MAKEDIR)/rules.mk 5 | endif 6 | 7 | internal-all:: $(APPLICATION_NAME:=.all.application.variables); 8 | 9 | internal-stage:: $(APPLICATION_NAME:=.stage.application.variables); 10 | 11 | # Maybe, disabled for further discussion 12 | # ssh mobile@$(FW_DEVICE_IP) "uicache" 13 | internal-after-install:: 14 | 15 | APPLICATIONS_WITH_SUBPROJECTS = $(strip $(foreach application,$(APPLICATION_NAME),$(patsubst %,$(application),$($(application)_SUBPROJECTS)))) 16 | ifneq ($(APPLICATIONS_WITH_SUBPROJECTS),) 17 | internal-clean:: $(APPLICATIONS_WITH_SUBPROJECTS:=.clean.application.subprojects) 18 | endif 19 | 20 | $(APPLICATION_NAME): 21 | @$(MAKE) --no-print-directory --no-keep-going $@.all.application.variables 22 | -------------------------------------------------------------------------------- /PlexATV/Classes/UIImage+ProportionalFill.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+ProportionalFill.h 3 | // 4 | // Created by Matt Gemmell on 20/08/2008. 5 | // Copyright 2008 Instinctive Code. 6 | // 7 | 8 | @interface UIImage (MGProportionalFill) 9 | 10 | typedef enum { 11 | MGImageResizeCrop, // analogous to UIViewContentModeScaleAspectFill, i.e. "best fit" with no space around. 12 | MGImageResizeCropStart, 13 | MGImageResizeCropEnd, 14 | MGImageResizeScale // analogous to UIViewContentModeScaleAspectFit, i.e. scale down to fit, leaving space around if necessary. 15 | } MGImageResizingMethod; 16 | 17 | - (UIImage*)imageToFitSize:(CGSize)size method:(MGImageResizingMethod)resizeMethod; 18 | - (UIImage*)imageCroppedToFitSize:(CGSize)size; // uses MGImageResizeCrop 19 | - (UIImage*)imageScaledToFitSize:(CGSize)size; // uses MGImageResizeScale 20 | 21 | @end -------------------------------------------------------------------------------- /PlexATV/theos/include/DHCommon.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | /* Common, useful things. 5 | * A bit has been lifted from rpetrich's Captain Hook macros. Thanks, Ryan! 6 | */ 7 | #define _Constructor __attribute__( (constructor) ) 8 | #define DHLateClass(name) @class name; static Class $ ## name = objc_getClass(#name) 9 | #define DHEarlyClass(name) static Class $ ## name = [name class] 10 | #define DHClass(name) $ ## name 11 | 12 | static inline void _DHRelease(id object) __attribute__( (always_inline) ); 13 | static inline void _DHRelease(id object) { 14 | [object release]; 15 | } 16 | #define DHScopeReleased __attribute__( ( cleanup(_DHRelease) ) ) 17 | #define DHScopedAutoreleasePool() NSAutoreleasePool * DHScopedAutoreleasePool __attribute__( (cleanup(_DHRelease),unused) ) = [[NSAutoreleasePool alloc] init] 18 | 19 | // vim:ft=objc 20 | -------------------------------------------------------------------------------- /PlexATV/_deb/create_deb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export COPYFILE_DISABLE=1 3 | export COPY_EXTENDED_ATTRIBUTES_DISABLE=1 4 | find PLEX.frapplication -name .svn -exec rm -rf {} \; 5 | find PLEX.frapplication -name .DS_Store -exec rm -rf {} \; 6 | find . -name "._*" -exec rm -rf {} \; 7 | 8 | #set verison in the control file 9 | BASE_VERSION=`grep kPlexPluginVersion ../plex_Prefix.pch | awk -F\" '{print $2}'` 10 | GIT_VERSION=`git rev-parse --verify HEAD --short=8` 11 | B=${BUILD_NUMBER:=0} 12 | VERSION=$BASE_VERSION.$BUILD_NUMBER-$GIT_VERSION 13 | 14 | echo "Building $VERSION" 15 | 16 | cat debian_control | sed "s/\*\*VERSION\*\*/$VERSION/" > PLEX.frapplication/DEBIAN/control 17 | 18 | dpkg-deb -b PLEX.frapplication 19 | mv PLEX.frapplication.deb REPO/plex_atv_plugin-$VERSION.deb 20 | cd REPO 21 | ./dpkg-scanpackages.pl -m . /dev/null /downloads/PLEX/ >Packages 22 | #rm Packages.bz2 23 | #bzip2 Packages 24 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/logify.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # logify.pl 3 | ############ 4 | # Converts an Objective-C header file (or anything containing a @interface and method definitions) 5 | #+into a Logos input file which causes all function calls to be logged. 6 | # 7 | # Accepts input on stdin or via filename specified on the commandline. 8 | 9 | # Lines are only processed if we were in an @interface, so you can run this on a file containing 10 | # an @implementation, as well. 11 | $interface = 0; 12 | while($line = <>) { 13 | if($line =~ m/^[+-]\s*\((.*?)\).*?(?=;)/ && $interface == 1) { 14 | print "$& { %log; ".($1 ne "void" ? "return " : "")."%orig; }\n"; 15 | } elsif($line =~ m/^\@interface\s+(.*?)\s*[:(]/ && $interface == 0) { 16 | print "%hook $1\n"; 17 | $interface = 1; 18 | } elsif($line =~ m/^\@end/ && $interface == 1) { 19 | print "%end\n"; 20 | $interface = 0; 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /PlexATV/Classes/HWTVShowsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWTVShowsController.h 3 | // plex 4 | // 5 | // Created by ccjensen on 26/02/2011. 6 | // 7 | 8 | #import 9 | #import "Plex_SMFBookcaseController.h" 10 | #import "PlexMediaShelfView.h" 11 | 12 | @class PlexMediaContainer, PlexMediaObject; 13 | @interface HWTVShowsController : Plex_SMFBookcaseController { 14 | PlexMediaContainer *tvShows; 15 | NSMutableArray *allTvShowsSeasonsPlexMediaContainer; 16 | 17 | BOOL allShelvesLoaded; 18 | BOOL shouldPlayInitialThemeSong; 19 | } 20 | @property (nonatomic, retain) PlexMediaContainer *seasonsForSelectedTVShow; 21 | @property (nonatomic, retain) NSTimer *themeMusicTimer; 22 | 23 | - (id)initWithPlexAllTVShows:(PlexMediaContainer*)allTVShows; 24 | 25 | - (void)playThemeMusicForMediaObjectInTimer:(NSTimer*)theTimer; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/subproject.mk: -------------------------------------------------------------------------------- 1 | SUBPROJECT_NAME := $(strip $(SUBPROJECT_NAME)) 2 | ifneq ($(words $(SUBPROJECT_NAME)), 1) 3 | SUBPROJECT_NAME := $(word 1, $(SUBPROJECT_NAME)) 4 | $(warning Only a single subproject can be built in any directory!) 5 | $(warning Ignoring all subprojects and building only $(SUBPROJECT_NAME)) 6 | endif 7 | 8 | ifeq ($(FW_RULES_LOADED),) 9 | include $(FW_MAKEDIR)/rules.mk 10 | endif 11 | 12 | internal-all:: $(SUBPROJECT_NAME:=.all.subproject.variables); 13 | 14 | internal-stage:: $(SUBPROJECT_NAME:=.stage.subproject.variables); 15 | 16 | SUBPROJECTS_WITH_SUBPROJECTS = $(strip $(foreach subproject,$(SUBPROJECT_NAME),$(patsubst %,$(subproject),$($(subproject)_SUBPROJECTS)))) 17 | ifneq ($(SUBPROJECTS_WITH_SUBPROJECTS),) 18 | internal-clean:: $(SUBPROJECTS_WITH_SUBPROJECTS:=.clean.subproject.subprojects) 19 | endif 20 | 21 | $(SUBPROJECT_NAME): 22 | @$(MAKE) --no-print-directory --no-keep-going $@.all.subproject.variables 23 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMoreInfoMenuItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMoreInfoMenuItem.m 3 | // plex 4 | // 5 | // Created by ccjensen on 28/05/2011. 6 | // 7 | 8 | #import "PlexMoreInfoMenuItem.h" 9 | #import 10 | 11 | @implementation PlexMoreInfoMenuItem 12 | @synthesize directory; 13 | 14 | + (PlexMoreInfoMenuItem*)menuItemForDirectory:(PlexDirectory*)aDirectory { 15 | PlexMoreInfoMenuItem *menuItem = [[PlexMoreInfoMenuItem alloc] initWithDirectory:aDirectory]; 16 | return [menuItem autorelease]; 17 | } 18 | 19 | - (id)initWithDirectory:(PlexDirectory*)aDirectory { 20 | self = [super init]; 21 | if (self) { 22 | self.directory = aDirectory; 23 | 24 | NSString *title = [self.directory.attributes objectForKey:@"tag"]; 25 | [self setText:title withAttributes:nil]; 26 | } 27 | return self; 28 | } 29 | 30 | - (void)dealloc { 31 | self.directory = nil; 32 | [super dealloc]; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/subproject.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | .PHONY: internal-subproject-all_ internal-subproject-stage_ internal-subproject-compile 6 | 7 | ifeq ($(FW_MAKE_PARALLEL_BUILDING), no) 8 | internal-subproject-all_:: $(_OBJ_DIR_STAMPS) $(FW_OBJ_DIR)/$(FW_SUBPROJECT_PRODUCT) 9 | else 10 | internal-subproject-all_:: $(_OBJ_DIR_STAMPS) 11 | $(ECHO_NOTHING)$(MAKE) --no-print-directory --no-keep-going \ 12 | internal-subproject-compile \ 13 | FW_TYPE=$(FW_TYPE) FW_INSTANCE=$(FW_INSTANCE) FW_OPERATION=compile \ 14 | FW_BUILD_DIR="$(FW_BUILD_DIR)" _FW_MAKE_PARALLEL=yes$(ECHO_END) 15 | 16 | internal-subproject-compile: $(FW_OBJ_DIR)/$(FW_SUBPROJECT_PRODUCT) 17 | endif 18 | 19 | $(FW_OBJ_DIR)/$(FW_SUBPROJECT_PRODUCT): $(OBJ_FILES_TO_LINK) 20 | $(ECHO_LINKING)$(TARGET_CXX) -nostdlib -r -d $(ADDITIONAL_LDFLAGS) $(TARGET_LDFLAGS) $(LDFLAGS) -o $@ $^$(ECHO_END) 21 | @echo "$(AUXILIARY_LDFLAGS)" > $(FW_OBJ_DIR)/ldflags 22 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/Ivar.pm: -------------------------------------------------------------------------------- 1 | package Ivar; 2 | use strict; 3 | 4 | sub new { 5 | my $proto = shift; 6 | my $class = ref($proto) || $proto; 7 | my $self = {}; 8 | $self->{NAME} = shift; 9 | $self->{TYPE} = shift; 10 | $self->{CLASS} = undef; 11 | bless($self, $class); 12 | return $self; 13 | } 14 | 15 | ##################### # 16 | # Setters and Getters # 17 | # ##################### 18 | sub name { 19 | my $self = shift; 20 | if(@_) { $self->{NAME} = shift; } 21 | return $self->{NAME}; 22 | } 23 | 24 | sub type { 25 | my $self = shift; 26 | if(@_) { $self->{TYPE} = shift; } 27 | return $self->{TYPE}; 28 | } 29 | 30 | sub class { 31 | my $self = shift; 32 | if(@_) { $self->{CLASS} = shift; } 33 | return $self->{CLASS}; 34 | } 35 | ##### # 36 | # END # 37 | # ##### 38 | 39 | sub initializers { 40 | my $self = shift; 41 | return "class_addIvar(\$".$self->class->name.", \"".$self->{NAME}."\", sizeof(".$self->{TYPE}."), 0, \@encode(".$self->{TYPE}.")); "; 42 | } 43 | 44 | 1; 45 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/denicify.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use warnings; 4 | use FindBin; 5 | use lib "$FindBin::Bin/lib"; 6 | 7 | use Module::Load::Conditional 'can_load'; 8 | 9 | $nicfile = $ARGV[0] if($ARGV[0]); 10 | $outputdir = $ARGV[1]; 11 | if(!$nicfile || !$outputdir) { 12 | exitWithError("Syntax: $0 nicfile outputdir"); 13 | } 14 | 15 | ### LOAD THE NICFILE! ### 16 | open(my $nichandle, "<", $nicfile); 17 | my $line = <$nichandle>; 18 | my $nicversion = 1; 19 | if($line =~ /^nic (\w+)$/) { 20 | $nicversion = $1; 21 | } 22 | seek($nichandle, 0, 0); 23 | 24 | my $NICPackage = "NIC$nicversion"; 25 | exitWithError("I don't understand NIC version $nicversion!") if(!can_load(modules => {"NIC::Formats::$NICPackage" => undef})); 26 | my $NIC = $NICPackage->new(); 27 | $NIC->load($nichandle); 28 | close($nichandle); 29 | ### YAY! ### 30 | 31 | $NIC->build($outputdir); 32 | $NIC->dumpPreamble("pre.NIC"); 33 | 34 | sub exitWithError { 35 | my $error = shift; 36 | print STDERR "[error] ", $error, $/; 37 | exit 1; 38 | } 39 | -------------------------------------------------------------------------------- /PlexATV/plex_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'atvTwo' target in the 'atvTwo' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #import 9 | #import "ProxyMachineDelegate.h" 10 | #import "PlexCompatibility.h" 11 | #define kPlexPluginVersion @"0.9.0" 12 | #endif 13 | 14 | #define DEBUG 1 15 | 16 | 17 | // DLog is almost a drop-in replacement for DLog 18 | // DLog(); 19 | // DLog(@"here"); 20 | // DLog(@"value: %d", x); 21 | // Unfortunately this doesn't work DLog(aStringVariable); you have to do this instead DLog(@"%@", aStringVariable); 22 | #if DEBUG 23 | # define DLog(fmt, ...) NSLog((@"[PLEX ATV] %s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 24 | #else 25 | # define DLog(...) 26 | #endif 27 | 28 | // ALog always displays output regardless of the DEBUG setting 29 | #define ALog(fmt, ...) NSLog((@"[PLEX ATV] %s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 30 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/fakeroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | required=0 3 | persistence=/tmp/dhbxxx 4 | 5 | while getopts ":p:rc" flag; do 6 | case "$flag" in 7 | :) echo "$0: Option -$OPTARG requires an argument." 1>&2 8 | exit 1 9 | ;; 10 | \?) echo "$0: Option -$OPTARG unrecognized." 1>&2 11 | exit 1 12 | ;; 13 | p) persistence="$OPTARG" ;; 14 | r) required=1 ;; 15 | c) delpersistence=1 ;; 16 | esac 17 | done 18 | shift $((OPTIND-1)) 19 | cmd=$* 20 | 21 | mkdir -p $(dirname $persistence) 22 | touch $persistence 23 | 24 | if [[ $delpersistence -eq 1 ]]; then 25 | rm -f $persistence 26 | exit 0 27 | fi 28 | 29 | if [[ "$USER" == "root" ]]; then 30 | fakeroot="" 31 | elif type fakeroot-ng &> /dev/null; then 32 | fakeroot="fakeroot-ng -p $persistence -- " 33 | elif type fakeroot &> /dev/null; then 34 | fakeroot="fakeroot -i $persistence -s $persistence -- " 35 | else 36 | if [[ $required -eq 1 ]]; then 37 | fakeroot="" 38 | else 39 | fakeroot=": " 40 | fi 41 | fi 42 | 43 | #echo $fakeroot $cmd 44 | $fakeroot $cmd 45 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/BaseStaticClassGroup.pm: -------------------------------------------------------------------------------- 1 | package BaseStaticClassGroup; 2 | use Logos::Group; 3 | @ISA = "Group"; 4 | 5 | sub new { 6 | my $proto = shift; 7 | my $class = ref($proto) || $proto; 8 | my $self = Group->new(); 9 | $self->name("_staticClass"); 10 | $self->explicit(0); 11 | $self->{DECLAREDONLYCLASSES} = {}; 12 | $self->{USEDCLASSES} = {}; 13 | $self->{USEDMETACLASSES} = {}; 14 | bless($self, $class); 15 | return $self; 16 | } 17 | 18 | sub addUsedClass { 19 | my $self = shift; 20 | my $class = shift; 21 | $self->{USEDCLASSES}{$class}++; 22 | } 23 | 24 | sub addUsedMetaClass { 25 | my $self = shift; 26 | my $class = shift; 27 | $self->{USEDMETACLASSES}{$class}++; 28 | } 29 | 30 | sub addDeclaredOnlyClass { 31 | my $self = shift; 32 | my $class = shift; 33 | $self->{DECLAREDONLYCLASSES}{$class}++; 34 | } 35 | 36 | sub declarations { 37 | ::fileError(-1, "Generator hasn't implemented StaticClassGroup::declarations :("); 38 | return ""; 39 | } 40 | 41 | sub initializers { 42 | ::fileError(-1, "Generator hasn't implemented StaticClassGroup::initializers :("); 43 | return ""; 44 | } 45 | 46 | 1; 47 | -------------------------------------------------------------------------------- /PlexATV/Classes/HWMediaGridController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWMediaShelfController.h 3 | // atvTwo 4 | // 5 | // Created by bob on 2011-01-29. 6 | // Copyright 2011 Band's gonna make it!. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Backrow/BRMediaShelfControl.h" 11 | #import "PlexMediaShelfView.h" 12 | 13 | @class PlexMediaContainer; 14 | 15 | @interface HWMediaGridController : BRController { 16 | BRGridControl *_gridControl; 17 | PlexMediaShelfView *_shelfControl; 18 | BRWaitSpinnerControl *_spinner; 19 | BRCursorControl *_cursorControl; 20 | BRScrollControl *_scroller; 21 | BRPanelControl *_panelControl; 22 | } 23 | 24 | @property (retain) PlexMediaContainer *shelfMediaContainer; 25 | @property (retain) PlexMediaContainer *gridMediaContainer; 26 | @property (retain) NSArray *shelfMediaObjects; 27 | @property (retain) NSArray *gridMediaObjects; 28 | 29 | - (void)drawSelf; 30 | - (id)getProviderForGrid; 31 | - (id)getProviderForShelf; 32 | 33 | //our own stuff 34 | - (id)initWithPlexAllMovies:(PlexMediaContainer*)allMovies andRecentMovies:(PlexMediaContainer*)recentMovies; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /PlexATV/Classes/Plex_SMFMoviePreviewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Plex_SMFMoviePreviewController.h 3 | // plex 4 | // 5 | // Created by ccjensen on 04/04/2011. 6 | // 7 | 8 | #import 9 | #import "Backrow/BRMediaShelfControl.h" 10 | #import "PlexMediaShelfView.h" 11 | 12 | @protocol Plex_SMFMoviePreviewControllerDatasource 13 | - (NSURL*)backgroundImageUrl; 14 | - (NSArray*)flags; 15 | @end 16 | 17 | @protocol Plex_SMFMoviePreviewControllerDelegate 18 | @optional 19 | - (void)controller:(SMFMoviePreviewController*)c playButtonEventOnButtonAtIndex:(int)index; 20 | - (void)controller:(SMFMoviePreviewController*)c playButtonEventInShelf:(PlexMediaShelfView*)shelfControl; 21 | - (void)controller:(SMFMoviePreviewController*)c downButtonEventInShelf:(PlexMediaShelfView*)shelfControl; 22 | @end 23 | 24 | @interface Plex_SMFMoviePreviewController : SMFMoviePreviewController {} 25 | @property (retain) NSObject *datasource; 26 | @property (retain) NSObject *delegate; 27 | @property (retain) NSArray *flags; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/messages.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(messages),yes) 2 | ECHO_COMPILING = @(echo " Compiling $<..."; 3 | ECHO_LINKING = @(echo " Linking $(FW_TYPE) $(FW_INSTANCE)..."; 4 | ECHO_STRIPPING = @(echo " Stripping $(FW_INSTANCE)..."; 5 | ECHO_SIGNING = @(echo " Signing $(FW_INSTANCE)..."; 6 | ECHO_LOGOS = @(echo " Preprocessing $<..."; 7 | ECHO_COPYING_RESOURCE_FILES = @(echo " Copying resource files into the $(FW_TYPE) wrapper..."; 8 | ECHO_COPYING_RESOURCE_DIRS = @(echo " Copying resource directories into the $(FW_TYPE) wrapper..."; 9 | ECHO_NOTHING = @( 10 | 11 | STDERR_NULL_REDIRECT = 2> /dev/null 12 | 13 | ECHO_END = ) 14 | else 15 | ECHO_COMPILING = 16 | ECHO_LINKING = 17 | ECHO_STRIPPING = 18 | ECHO_SIGNING = 19 | ECHO_LOGOS = 20 | ECHO_COPYING_RESOURCE_FILES = 21 | ECHO_COPYING_RESOURCE_DIRS = 22 | ECHO_NOTHING = 23 | STDERR_NULL_REDIRECT = 24 | ECHO_END = 25 | endif 26 | 27 | WARNING_EMPTY_LINKING = @(echo " Warning! No files to link. Please check your Makefile! Make sure you set $(FW_INSTANCE)_OBJC_FILES (or similar variables)") 28 | 29 | # (bundle) 30 | NOTICE_EMPTY_LINKING = @(echo " Notice: No files to link - creating a bundle containing only resources") 31 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Darwin/iphone.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := iphone 4 | 5 | SDKBINPATH ?= /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin 6 | ifneq ($(words $(_FW_TARGET_ARGS)),0) 7 | # A version specified as a target argument overrides all previous definitions. 8 | override SDKVERSION := $(firstword $(_FW_TARGET_ARGS)) 9 | else 10 | SDKVERSION ?= 3.0 11 | endif 12 | SYSROOT ?= /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(SDKVERSION).sdk 13 | 14 | TARGET_CC ?= $(SDKBINPATH)/gcc-4.2 15 | TARGET_CXX ?= $(SDKBINPATH)/g++-4.2 16 | TARGET_STRIP ?= $(SDKBINPATH)/strip 17 | TARGET_STRIP_FLAGS ?= -x 18 | TARGET_CODESIGN_ALLOCATE ?= $(SDKBINPATH)/codesign_allocate 19 | TARGET_CODESIGN ?= ldid 20 | TARGET_CODESIGN_FLAGS ?= -S 21 | 22 | include $(FW_MAKEDIR)/targets/_common/install_deb_remote.mk 23 | include $(FW_MAKEDIR)/targets/_common/darwin.mk 24 | 25 | ARCHS ?= armv6 26 | SDKFLAGS := -isysroot $(SYSROOT) $(foreach ARCH,$(ARCHS),-arch $(ARCH)) -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_$(subst .,_,$(SDKVERSION)) 27 | TARGET_CFLAGS := $(SDKFLAGS) 28 | TARGET_LDFLAGS := $(SDKFLAGS) -multiply_defined suppress 29 | endif 30 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/Generator/MobileSubstrate/StaticClassGroup.pm: -------------------------------------------------------------------------------- 1 | package StaticClassGroup; 2 | use Logos::BaseStaticClassGroup; 3 | @ISA = "BaseStaticClassGroup"; 4 | 5 | sub declarations { 6 | my $self = shift; 7 | my $return = ""; 8 | return "" if scalar(keys %{$self->{USEDMETACLASSES}}) + scalar(keys %{$self->{USEDCLASSES}}) + scalar(keys %{$self->{DECLAREDONLYCLASSES}}) == 0; 9 | foreach(keys %{$self->{USEDMETACLASSES}}) { 10 | $return .= "static Class \$meta\$$_; "; 11 | } 12 | foreach(keys %{$self->{USEDCLASSES}}) { 13 | $return .= "static Class \$$_; "; 14 | } 15 | foreach(keys %{$self->{DECLAREDONLYCLASSES}}) { 16 | $return .= "static Class \$$_; "; 17 | } 18 | return $return; 19 | } 20 | 21 | sub initializers { 22 | my $self = shift; 23 | my $return = ""; 24 | $self->initialized(1); 25 | return "" if scalar(keys %{$self->{USEDMETACLASSES}}) + scalar(keys %{$self->{USEDCLASSES}}) == 0; 26 | $return .= "{"; 27 | foreach(keys %{$self->{USEDMETACLASSES}}) { 28 | $return .= "\$meta\$$_ = objc_getMetaClass(\"$_\"); "; 29 | } 30 | foreach(keys %{$self->{USEDCLASSES}}) { 31 | $return .= "\$$_ = objc_getClass(\"$_\"); "; 32 | } 33 | $return .= "}"; 34 | return $return; 35 | } 36 | 37 | 1; 38 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/tool.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | .PHONY: internal-tool-all_ internal-tool-stage_ internal-tool-compile 6 | 7 | ifeq ($(FW_MAKE_PARALLEL_BUILDING), no) 8 | internal-tool-all_:: $(_OBJ_DIR_STAMPS) $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_EXE_EXT) 9 | else 10 | internal-tool-all_:: $(_OBJ_DIR_STAMPS) 11 | $(ECHO_NOTHING)$(MAKE) --no-print-directory --no-keep-going \ 12 | internal-tool-compile \ 13 | FW_TYPE=$(FW_TYPE) FW_INSTANCE=$(FW_INSTANCE) FW_OPERATION=compile \ 14 | FW_BUILD_DIR="$(FW_BUILD_DIR)" _FW_MAKE_PARALLEL=yes$(ECHO_END) 15 | 16 | internal-tool-compile: $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_EXE_EXT) 17 | endif 18 | 19 | $(eval $(call _FW_TEMPLATE_DEFAULT_LINKING_RULE,$(FW_INSTANCE)$(TARGET_EXE_EXT))) 20 | 21 | LOCAL_INSTALL_PATH = $(strip $($(FW_INSTANCE)_INSTALL_PATH)) 22 | ifeq ($(LOCAL_INSTALL_PATH),) 23 | LOCAL_INSTALL_PATH = $($(FW_INSTANCE)_PACKAGE_TARGET_DIR) 24 | ifeq ($(LOCAL_INSTALL_PATH),) 25 | LOCAL_INSTALL_PATH = /usr/bin 26 | endif 27 | endif 28 | 29 | internal-tool-stage_:: 30 | $(ECHO_NOTHING)mkdir -p "$(FW_STAGING_DIR)$(LOCAL_INSTALL_PATH)"$(ECHO_END) 31 | $(ECHO_NOTHING)cp $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_EXE_EXT) "$(FW_STAGING_DIR)$(LOCAL_INSTALL_PATH)"$(ECHO_END) 32 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/aggregate.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | SUBPROJECTS := $(strip $(SUBPROJECTS)) 6 | ifneq ($(SUBPROJECTS),) 7 | internal-all internal-stage internal-clean:: 8 | @operation=$(subst internal-,,$@); \ 9 | abs_build_dir=$(ABS_FW_BUILD_DIR); \ 10 | for d in $(SUBPROJECTS); do \ 11 | echo "Making $$operation in $$d..."; \ 12 | if [ "$${abs_build_dir}" = "." ]; then \ 13 | lbuilddir="."; \ 14 | else \ 15 | lbuilddir="$${abs_build_dir}/$$d"; \ 16 | fi; \ 17 | if $(MAKE) -C $$d $(FW_NO_PRINT_DIRECTORY_FLAG) --no-keep-going $$operation \ 18 | FW_BUILD_DIR="$$lbuilddir" \ 19 | ; then\ 20 | :; \ 21 | else exit $$?; \ 22 | fi; \ 23 | done; 24 | 25 | internal-after-install:: 26 | @operation=$@; \ 27 | abs_build_dir=$(ABS_FW_BUILD_DIR); \ 28 | for d in $(SUBPROJECTS); do \ 29 | echo "Running post-install rules for $$d..."; \ 30 | if [ "$${abs_build_dir}" = "." ]; then \ 31 | lbuilddir="."; \ 32 | else \ 33 | lbuilddir="$${abs_build_dir}/$$d"; \ 34 | fi; \ 35 | if $(MAKE) -C $$d $(FW_NO_PRINT_DIRECTORY_FLAG) --no-keep-going $$operation \ 36 | FW_BUILD_DIR="$$lbuilddir" \ 37 | ; then\ 38 | :; \ 39 | else exit $$?; \ 40 | fi; \ 41 | done; 42 | endif 43 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMediaContainer + SkinResources.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PlexMediaContainer + SkinResources.h 3 | * atvTwo 4 | * 5 | * Created by Frank Bauer on 23.12.10. 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | */ 25 | 26 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexSearchController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexSearchController.h 3 | // plex 4 | // 5 | // Created by ccjensen on 29/04/2011. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | #import 12 | 13 | 14 | @class Machine; 15 | @interface PlexSearchController : BRMediaMenuController {} 16 | //@property (assign) NSObject *delegate; 17 | 18 | @property (retain) BRTextControl *totalResults; 19 | @property (retain) BRTextEntryControl *textEntry; 20 | @property (retain) BRControl *previewContainer; 21 | @property (retain) NSString *currentSearchTerm; 22 | @property (retain) NSArray *items; 23 | 24 | - (void)hideSearchInterface:(BOOL)hide; 25 | - (void)refresh; 26 | - (void)drawSelf; 27 | 28 | //list methods 29 | - (void)setSelection:(int)sel; 30 | - (int)getSelection; 31 | - (void)playPauseActionForRow:(long)row; 32 | 33 | //search 34 | - (void)finishedSearch:(NSDictionary*)data; 35 | - (void)performSearch:(NSMutableDictionary*)data; 36 | - (void)startSearch; 37 | 38 | //custom 39 | @property (retain) Machine *machine; 40 | @property (retain) PlexMediaContainer *currentSearchMediaContainer; 41 | - (id)initWithMachine:(Machine*)aMachine; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/library.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | .PHONY: internal-library-all_ internal-library-stage_ internal-library-compile 6 | 7 | LOCAL_INSTALL_PATH ?= $(strip $($(FW_INSTANCE)_INSTALL_PATH)) 8 | ifeq ($(LOCAL_INSTALL_PATH),) 9 | LOCAL_INSTALL_PATH = /usr/lib 10 | endif 11 | 12 | AUXILIARY_LDFLAGS += $(call TARGET_LDFLAGS_DYNAMICLIB,$(FW_INSTANCE)$(TARGET_LIB_EXT)) 13 | AUXILIARY_CFLAGS += $(TARGET_CFLAGS_DYNAMICLIB) 14 | 15 | ifeq ($(FW_MAKE_PARALLEL_BUILDING), no) 16 | internal-library-all_:: $(_OBJ_DIR_STAMPS) $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_LIB_EXT) 17 | else 18 | internal-library-all_:: $(_OBJ_DIR_STAMPS) 19 | $(ECHO_NOTHING)$(MAKE) --no-print-directory --no-keep-going \ 20 | internal-library-compile \ 21 | FW_TYPE=$(FW_TYPE) FW_INSTANCE=$(FW_INSTANCE) FW_OPERATION=compile \ 22 | FW_BUILD_DIR="$(FW_BUILD_DIR)" _FW_MAKE_PARALLEL=yes$(ECHO_END) 23 | 24 | internal-library-compile: $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_LIB_EXT) 25 | endif 26 | 27 | $(eval $(call _FW_TEMPLATE_DEFAULT_LINKING_RULE,$(FW_INSTANCE)$(TARGET_LIB_EXT))) 28 | 29 | internal-library-stage_:: 30 | $(ECHO_NOTHING)mkdir -p "$(FW_STAGING_DIR)$(LOCAL_INSTALL_PATH)/"$(ECHO_END) 31 | $(ECHO_NOTHING)cp $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_LIB_EXT) "$(FW_STAGING_DIR)$(LOCAL_INSTALL_PATH)/"$(ECHO_END) 32 | -------------------------------------------------------------------------------- /PlexATV/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | plex 7 | CFBundleIdentifier 8 | com.apple.frontrow.appliance.plex 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | BNDL 13 | CFBundleSignature 14 | fnrw 15 | CFBundleSupportedPlatforms 16 | 17 | iPhoneOS 18 | 19 | CFBundleVersion 20 | 1.0 21 | DTPlatformName 22 | iphoneos 23 | DTSDKName 24 | iphoneos3.0 25 | DTXcode 26 | 0324 27 | FRApplianceDataSourceType 28 | All 29 | FRAppliancePreferedOrderValue 30 | 1 31 | FRHideIfNoCategories 32 | 33 | FRPrimaryAppliance 34 | 35 | FRRemoteAppliance 36 | 37 | LSRequiresIPhoneOS 38 | 1 39 | MinimumOSVersion 40 | 3.0 41 | NSPrincipalClass 42 | PlexAppliance 43 | 44 | 45 | -------------------------------------------------------------------------------- /PlexATV/Makefile: -------------------------------------------------------------------------------- 1 | GO_EASY_ON_ME=1 2 | export SDKVERSION=4.2 3 | FW_DEVICE_IP=apple-tv.local 4 | include theos/makefiles/common.mk 5 | 6 | BUNDLE_NAME = plex 7 | 8 | PlexATV_FILES = Classes/PlexBaseMetadataAsset.m Classes/PlexTVEpisodeMetadataAsset.m Classes/PlexSongAsset.m Classes/PlexMediaAsset.m Classes/PlexMediaAssetOld.m 9 | 10 | PlexATV_FILES += Classes/HWSettingsController.m Classes/HWDefaultServerController.m Classes/HWAdvancedSettingsController.m 11 | PlexATV_FILES += Classes/HWServersController.m Classes/HWServerDetailsController.m 12 | 13 | PlexATV_FILES += Classes/SongListController.m Classes/HWPlexDir.m Classes/HWAppliance.mm Classes/HWBasicMenu.m 14 | PlexATV_FILES += Classes/HWMediaGridController.m Classes/HWDetailedMovieMetadataController.m Classes/PlexPlaybackController.m 15 | PlexATV_FILES += Classes/HWTVShowsController.m 16 | 17 | PlexATV_FILES += Classes/NSArray-Shuffle.m Classes/PlexMediaProvider.m Classes/HWUserDefaults.m Classes/ProxyMachineDelegate.m 18 | 19 | PlexATV_INSTALL_PATH = /Applications/AppleTV.app/Appliances 20 | PlexATV_BUNDLE_EXTENSION = frappliance 21 | PlexATV_LDFLAGS = -undefined dynamic_lookup 22 | PlexATV_CFLAGS = -I../_contrib/ATV2Includes 23 | PlexATV_OBJ_FILES = ../_contrib/SMFramework/obj/SMFramework 24 | include $(FW_MAKEDIR)/bundle.mk 25 | 26 | after-install:: 27 | echo $(FW_PROJECT_DIR) 28 | install.exec "killall -9 Lowtide" 29 | install.exec "killall -9 AppleTV" -------------------------------------------------------------------------------- /PlexATV/Classes/HWUserDefaults.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWUserDefaults.h 3 | // atvTwo 4 | // 5 | // Created by ccjensen on 24/01/2011. 6 | // 7 | 8 | #import 9 | 10 | @interface HWUserDefaults : PlexPrefs {} 11 | 12 | + (SMFPreferences*)preferences; 13 | + (void)setupPlexClient; 14 | + (NSDictionary*)defaultValues; 15 | + (NSArray*)plexStreamingQualities; 16 | 17 | + (NSInteger)lastTabBarSelectionForMachineID:(NSString*)machineID section:(NSInteger)sectionKey viewGroup:(NSString*)viewGroup; 18 | + (void)setLastTabBarSelection:(NSInteger)selectedIndex forMachineID:(NSString*)machineID section:(NSInteger)sectionKey viewGroup:(NSString*)viewGroup; 19 | 20 | //plex prefs methods 21 | - (void)syncSettings; 22 | 23 | - (void)_setDefaults; 24 | 25 | - (void)removeValueForKey:(NSString*)key; 26 | 27 | - (id)objectForKey:(NSString*)key; 28 | - (void)setObject:(id)value forKey:(NSString*)key; 29 | 30 | - (id)objectForKey:(NSString*)key; 31 | - (void)setObject:(id)obj forKey:(NSString*)key; 32 | 33 | - (NSInteger)integerForKey:(NSString*)key; 34 | - (void)setInteger:(NSInteger)v forKey:(NSString*)key; 35 | 36 | - (BOOL)boolForKey:(NSString*)key; 37 | - (void)setBool:(BOOL)value forKey:(NSString*)key; 38 | 39 | - (double)doubleForKey:(NSString*)key; 40 | - (void)setDouble:(double)value forKey:(NSString*)key; 41 | 42 | - (float)floatForKey:(NSString*)key; 43 | - (void)setFloat:(float)value forKey:(NSString*)key; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /PlexATV/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DTXcode 6 | 0324 7 | FRApplianceDataSourceType 8 | All 9 | UIDeviceFamily 10 | 11 | 3 12 | 2 13 | 14 | CFBundleExecutable 15 | HW 16 | CFBundleIdentifier 17 | com.apple.frontrow.appliance.hw 18 | CFBundleInfoDictionaryVersion 19 | 6.0 20 | CFBundlePackageType 21 | BNDL 22 | CFBundleSignature 23 | fnrw 24 | CFBundleSupportedPlatforms 25 | 26 | iPhoneOS 27 | 28 | CFBundleVersion 29 | 1.0 30 | DTPlatformName 31 | iphoneos 32 | DTSDKName 33 | iphoneos3.0 34 | FRAppliancePreferedOrderValue 35 | 1 36 | FRHideIfNoCategories 37 | 38 | FRRemoteAppliance 39 | 40 | LSRequiresIPhoneOS 41 | 1 42 | MinimumOSVersion 43 | 3.0 44 | NSPrincipalClass 45 | HWAppliance 46 | 47 | 48 | -------------------------------------------------------------------------------- /PlexATV/_/plex.bundle/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DTXcode 6 | 0324 7 | FRApplianceDataSourceType 8 | All 9 | UIDeviceFamily 10 | 11 | 3 12 | 2 13 | 14 | CFBundleExecutable 15 | HW 16 | CFBundleIdentifier 17 | com.apple.frontrow.appliance.hw 18 | CFBundleInfoDictionaryVersion 19 | 6.0 20 | CFBundlePackageType 21 | BNDL 22 | CFBundleSignature 23 | fnrw 24 | CFBundleSupportedPlatforms 25 | 26 | iPhoneOS 27 | 28 | CFBundleVersion 29 | 1.0 30 | DTPlatformName 31 | iphoneos 32 | DTSDKName 33 | iphoneos3.0 34 | FRAppliancePreferedOrderValue 35 | 1 36 | FRHideIfNoCategories 37 | 38 | FRRemoteAppliance 39 | 40 | LSRequiresIPhoneOS 41 | 1 42 | MinimumOSVersion 43 | 3.0 44 | NSPrincipalClass 45 | HWAppliance 46 | 47 | 48 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/BaseSubclass.pm: -------------------------------------------------------------------------------- 1 | package BaseSubclass; 2 | use Logos::BaseClass; 3 | @ISA = "BaseClass"; 4 | 5 | sub new { 6 | my $proto = shift; 7 | my $class = ref($proto) || $proto; 8 | my $self = $class->SUPER::new(); 9 | $self->{SUPERCLASS} = undef; 10 | $self->{PROTOCOLS} = {}; 11 | $self->{IVARS} = []; 12 | bless($self, $class); 13 | return $self; 14 | } 15 | 16 | ##################### # 17 | # Setters and Getters # 18 | # ##################### 19 | sub name { 20 | my $self = shift; 21 | if(@_) { 22 | $self->{NAME} = shift; 23 | $self->expression("\$".$self->{NAME}); 24 | $self->metaexpression("object_getClass(\$".$self->{NAME}.")"); 25 | } 26 | return $self->{NAME}; 27 | } 28 | 29 | sub superclass { 30 | my $self = shift; 31 | if(@_) { $self->{SUPERCLASS} = shift; } 32 | return $self->{SUPERCLASS}; 33 | } 34 | ##### # 35 | # END # 36 | # ##### 37 | 38 | sub addProtocol { 39 | my $self = shift; 40 | my $protocol = shift; 41 | $self->{PROTOCOLS}{$protocol}++; 42 | } 43 | 44 | sub addIvar { 45 | my $self = shift; 46 | my $ivar = shift; 47 | $ivar->class($self); 48 | push(@{$self->{IVARS}}, $ivar); 49 | } 50 | 51 | sub getIvarNamed { 52 | my $self = shift; 53 | my $name = shift; 54 | foreach(@{$self->{IVARS}}) { 55 | return $_ if $_->name eq $name; 56 | } 57 | return undef; 58 | } 59 | 60 | sub initializers { 61 | ::fileError(-1, "Generator hasn't implemented Subclass::initializers :("); 62 | return ""; 63 | } 64 | 65 | 1; 66 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/framework.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | .PHONY: internal-framework-all_ internal-framework-stage_ internal-framework-compile 6 | 7 | ifeq ($($(FW_INSTANCE)_FRAMEWORK_NAME),) 8 | LOCAL_FRAMEWORK_NAME = $(FW_INSTANCE) 9 | else 10 | LOCAL_FRAMEWORK_NAME = $($(FW_INSTANCE)_FRAMEWORK_NAME) 11 | endif 12 | 13 | AUXILIARY_LDFLAGS += -dynamiclib -install_name $($(FW_INSTANCE)_INSTALL_PATH)/$(LOCAL_FRAMEWORK_NAME).framework/$(FW_INSTANCE) 14 | 15 | ifeq ($(FW_MAKE_PARALLEL_BUILDING), no) 16 | internal-framework-all_:: $(_OBJ_DIR_STAMPS) $(FW_OBJ_DIR)/$(FW_INSTANCE) 17 | else 18 | internal-framework-all_:: $(_OBJ_DIR_STAMPS) 19 | $(ECHO_NOTHING)$(MAKE) --no-print-directory --no-keep-going \ 20 | internal-framework-compile \ 21 | FW_TYPE=$(FW_TYPE) FW_INSTANCE=$(FW_INSTANCE) FW_OPERATION=compile \ 22 | FW_BUILD_DIR="$(FW_BUILD_DIR)" _FW_MAKE_PARALLEL=yes$(ECHO_END) 23 | 24 | internal-framework-compile: $(FW_OBJ_DIR)/$(FW_INSTANCE) 25 | endif 26 | 27 | $(eval $(call _FW_TEMPLATE_DEFAULT_LINKING_RULE,$(FW_INSTANCE))) 28 | 29 | FW_SHARED_BUNDLE_RESOURCE_PATH = $(FW_STAGING_DIR)$($(FW_INSTANCE)_INSTALL_PATH)/$(LOCAL_FRAMEWORK_NAME).framework 30 | include $(FW_MAKEDIR)/instance/shared/bundle.mk 31 | 32 | internal-framework-stage_:: shared-instance-bundle-stage 33 | $(ECHO_NOTHING)mkdir -p "$(FW_SHARED_BUNDLE_RESOURCE_PATH)"$(ECHO_END) 34 | $(ECHO_NOTHING)cp $(FW_OBJ_DIR)/$(FW_INSTANCE) "$(FW_SHARED_BUNDLE_RESOURCE_PATH)"$(ECHO_END) 35 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/targets/Darwin/simulator.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_TARGET_LOADED),) 2 | FW_TARGET_LOADED := 1 3 | FW_TARGET_NAME := iphone_simulator 4 | 5 | SDKBINPATH ?= /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin 6 | ifneq ($(words $(_FW_TARGET_ARGS)),0) 7 | # A version specified as a target argument overrides all previous definitions. 8 | override SDKVERSION := $(firstword $(_FW_TARGET_ARGS)) 9 | else 10 | SDKVERSION ?= 3.0 11 | endif 12 | SYSROOT ?= /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(SDKVERSION).sdk 13 | 14 | TARGET_CC ?= $(SDKBINPATH)/gcc-4.2 15 | TARGET_CXX ?= $(SDKBINPATH)/g++-4.2 16 | TARGET_STRIP ?= $(SDKBINPATH)/strip 17 | TARGET_STRIP_FLAGS ?= -x 18 | TARGET_CODESIGN_ALLOCATE ?= $(SDKBINPATH)/codesign_allocate 19 | TARGET_CODESIGN ?= 20 | TARGET_CODESIGN_FLAGS ?= 21 | 22 | include $(FW_MAKEDIR)/targets/_common/darwin.mk 23 | 24 | ifeq ($(IPHONE_SIMULATOR_ROOT),) 25 | internal-install:: 26 | $(info $(MAKE) install for the simulator requires that you set IPHONE_SIMULATOR_ROOT to the root directory of the simulated OS.) 27 | @exit 1 28 | else 29 | internal-install:: stage 30 | install.mergeDir "$(FW_STAGING_DIR)" "$(IPHONE_SIMULATOR_ROOT)" 31 | endif 32 | 33 | ARCHS ?= i386 34 | SDKFLAGS := -isysroot $(SYSROOT) $(foreach ARCH,$(ARCHS),-arch $(ARCH)) -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_$(subst .,_,$(SDKVERSION)) 35 | TARGET_CFLAGS := $(SDKFLAGS) 36 | TARGET_LDFLAGS := $(SDKFLAGS) -multiply_defined suppress -mmacosx-version-min=10.5 37 | endif 38 | -------------------------------------------------------------------------------- /PlexATV/theos/Prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | 4 | #if TARGET_IPHONE || TARGET_IPHONE_SIMULATOR 5 | #import 6 | #endif 7 | 8 | #define CLASS(cls) objc_getClass(#cls) 9 | 10 | #ifdef DEBUG 11 | #define __DEBUG__ 12 | #endif 13 | 14 | #ifdef __DEBUG__ 15 | #define CMLog(format, ...) NSLog(@"(%s) in [%s:%d] ::: %@", __PRETTY_FUNCTION__, __FILE__, __LINE__, [NSString stringWithFormat:format, ## __VA_ARGS__]) 16 | #define MARK CMLog(@"%s", __PRETTY_FUNCTION__); 17 | #define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; 18 | #define END_TIMER(msg) NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start]) 19 | #else 20 | #define CMLog(format, ...) 21 | #define MARK 22 | #define START_TIMER 23 | #define END_TIMER(msg) 24 | //#define NSLog(...) 25 | #endif 26 | 27 | #define NB [NSBundle mainBundle] 28 | #define UD [NSUserDefaults standardUserDefaults] 29 | #define FM [NSFileManager defaultManager] 30 | #define BRLocalizedString(key, comment) \ 31 | [BRLocalizedStringManager appliance:self localizedStringForKey:(key) inFile:nil] 32 | #define BRLocalizedStringFromTable(key, tbl, comment) \ 33 | [BRLocalizedStringManager appliance:self localizedStringForKey:(key) inFile:(tbl)] 34 | #define BRLocalizedStringFromTableInBundle(key, tbl, obj, comment) \ 35 | [BRLocalizedStringManager appliance:(obj) localizedStringForKey:(key) inFile:(tbl)] 36 | #endif 37 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/package_version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while getopts ":e:1c:" flag; do 4 | case "$flag" in 5 | :) echo "$0: Option -$OPTARG requires an argument." 1>&2 6 | exit 1 7 | ;; 8 | \?) echo "$0: What're you talking about?" 1>&2 9 | exit 1 10 | ;; 11 | e) EXTRAVERS="$OPTARG" ;; 12 | c) CONTROL="$OPTARG" ;; 13 | 1) SKIPONE=1 ;; 14 | esac 15 | done 16 | 17 | if [[ -z "$CONTROL" || ! -f "$CONTROL" ]]; then 18 | echo "$0: Please specify a control file with -c." 1>&2 19 | exit 1; 20 | fi 21 | 22 | if [[ ! -d "${FW_PROJECT_DIR}/.theos/packages" ]]; then 23 | if [[ -d "${FW_PROJECT_DIR}/.debmake" ]]; then 24 | mkdir -p "${FW_PROJECT_DIR}/.theos" 25 | mv "${FW_PROJECT_DIR}/.debmake" "${FW_PROJECT_DIR}/.theos/packages" 26 | else 27 | mkdir -p "${FW_PROJECT_DIR}/.theos/packages" 28 | fi 29 | fi 30 | 31 | package=$(grep "^Package:" "$CONTROL" | cut -d' ' -f2) 32 | version=$(grep "^Version:" "$CONTROL" | cut -d' ' -f2) 33 | versionfile="${FW_PROJECT_DIR}/.theos/packages/$package-$version" 34 | build_number=0 35 | 36 | if [[ ! -e "$versionfile" ]]; then 37 | echo -n 1 > "$versionfile" 38 | build_number=1 39 | else 40 | build_number=$(< "$versionfile") 41 | let build_number++ 42 | echo -n "$build_number" > "$versionfile" 43 | fi 44 | 45 | buildno_part="-$build_number" 46 | if [[ $SKIPONE -eq 1 && $build_number -eq 1 ]]; then 47 | buildno_part="" 48 | fi 49 | 50 | extra_part="" 51 | if [[ ! -z "$EXTRAVERS" ]]; then 52 | extra_part="+$EXTRAVERS" 53 | fi 54 | 55 | sed -e "s/^Version: \(.*\)/Version: \1$buildno_part$extra_part/g" $CONTROL 56 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexNavigationController.h 3 | // plex 4 | // 5 | // Created by ccjensen on 18/04/2011. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @interface PlexNavigationController : BRController {} 13 | 14 | @property (retain) BRWaitPromptControl *waitControl; 15 | @property (retain) PlexMediaObject *targetMediaObject; 16 | @property (retain) BRController *targetController; 17 | @property (retain) NSString *promptText; 18 | 19 | + (PlexNavigationController*)sharedPlexNavigationController; 20 | 21 | //Navigation Methods 22 | - (void)initiatePlaybackOfMediaObject:(PlexMediaObject*)aMediaObject; 23 | - (void)navigateToObjectsContents:(PlexMediaObject*)aMediaObject; 24 | - (void)navigateToChannelsForMachine:(Machine*)aMachine; 25 | - (void)navigateToSearchForMachine:(Machine*)aMachine; 26 | - (void)navigateToSettingsWithTopLevelController:(BRBaseAppliance*)topLevelController; 27 | - (void)navigateToServerList; 28 | 29 | //Determine View Type Methods 30 | - (BRController*)newControllerForObject:(PlexMediaObject*)aMediaObject; 31 | - (BRTabControl*)newTabBarForContents:(PlexMediaContainer*)someContents; 32 | 33 | //Container Manipulation Methods 34 | - (BRController*)newTVShowsController:(PlexMediaContainer*)tvShowCategory; 35 | - (BRController*)newGridController:(PlexMediaContainer*)movieCategory withShelfKeyString:(NSString*)shelfKey; 36 | - (PlexMediaContainer*)applySkipFilteringOnContainer:(PlexMediaContainer*)container; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /PlexATV/_deb/PLEX.frapplication/Applications/Lowtide.app/Appliances/PLEX.frappliance/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DTXcode 6 | 0324 7 | FRApplianceDataSourceType 8 | All 9 | UIDeviceFamily 10 | 11 | 3 12 | 2 13 | 14 | CFBundleExecutable 15 | plex 16 | CFBundleIdentifier 17 | com.apple.frontrow.appliance.plex 18 | CFBundleInfoDictionaryVersion 19 | 6.0 20 | CFBundlePackageType 21 | BNDL 22 | CFBundleSignature 23 | fnrw 24 | CFBundleSupportedPlatforms 25 | 26 | iPhoneOS 27 | 28 | CFBundleVersion 29 | 1.0 30 | DTPlatformName 31 | iphoneos 32 | DTSDKName 33 | iphoneos3.0 34 | FRAppliancePreferedOrderValue 35 | 1 36 | FRHideIfNoCategories 37 | 38 | FRRemoteAppliance 39 | 40 | FRPrimaryAppliance 41 | 42 | LSRequiresIPhoneOS 43 | 1 44 | MinimumOSVersion 45 | 3.0 46 | NSPrincipalClass 47 | PlexAppliance 48 | 49 | 50 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMediaProvider.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMediaProvider.h 3 | // atvTwo 4 | // 5 | // Created by Frank Bauer on 27.10.10. 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | #import 27 | 28 | 29 | @class PlexMediaAsset; 30 | @interface PlexMediaProvider : NSObject { 31 | BRBaseMediaProvider *prov; 32 | 33 | } 34 | 35 | - (int)load; 36 | - (int)unload; 37 | 38 | - (int)load; 39 | - (int)unload; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/nicify.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use warnings; 4 | use File::Find; 5 | 6 | @directories = (); 7 | %files = (); 8 | %symlinks = (); 9 | 10 | chdir $ARGV[0]; 11 | find({wanted => \&processDirectories, follow => 0, no_chdir => 1}, "."); 12 | find({wanted => \&processFiles, follow => 0, no_chdir => 1}, "."); 13 | find({wanted => \&processSymlinks, follow => 0, no_chdir => 1}, "."); 14 | 15 | print "nic 1",$/; 16 | 17 | if(-f "pre.NIC") { 18 | open(my $pfh, "<", "pre.NIC"); 19 | while(<$pfh>) { 20 | print $_; 21 | } 22 | close($pfh); 23 | } 24 | 25 | foreach $dir (@directories) { 26 | print "dir $dir",$/; 27 | } 28 | 29 | foreach $filename (keys %files) { 30 | my @lines = split(/\n/, $files{$filename}); 31 | my $ln = scalar(@lines); 32 | print "file $ln $filename",$/; 33 | print $files{$filename},$/; 34 | } 35 | 36 | foreach $symlink (keys %symlinks) { 37 | print "symlink \"$symlink\" \"".$symlinks{$symlink}."\"",$/; 38 | } 39 | 40 | sub processDirectories { 41 | return if(! -d $_); 42 | return if(/\.svn/); 43 | return if(/^.$/); 44 | s/^\.\///; 45 | push(@directories, $_); 46 | } 47 | 48 | sub processFiles { 49 | return if(! -f $_ || -l $_); 50 | return if(/\.svn/); 51 | return if(/\.[Nn][Ii][Cc]$/); 52 | s/^\.\///; 53 | $files{$_} = slurp($_); 54 | } 55 | 56 | sub processSymlinks { 57 | return if(! -l $_); 58 | return if(/\.svn/); 59 | return if(/\.nic$/); 60 | s/^\.\///; 61 | $symlinks{$_} = readlink($_); 62 | } 63 | 64 | sub slurp { 65 | my $fn = shift; 66 | open(my($fh), "<", $fn); 67 | local $/ = undef; 68 | my $d = <$fh>; 69 | return $d; 70 | } 71 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/application.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | .PHONY: internal-application-all_ internal-application-stage_ internal-application-compile 6 | 7 | AUXILIARY_LDFLAGS += -framework UIKit 8 | 9 | LOCAL_INSTALL_PATH ?= $(strip $($(FW_INSTANCE)_INSTALL_PATH)) 10 | ifeq ($(LOCAL_INSTALL_PATH),) 11 | LOCAL_INSTALL_PATH = /Applications 12 | endif 13 | 14 | ifeq ($(FW_MAKE_PARALLEL_BUILDING), no) 15 | internal-application-all_:: $(_OBJ_DIR_STAMPS) $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_EXE_EXT) 16 | else 17 | internal-application-all_:: $(_OBJ_DIR_STAMPS) 18 | $(ECHO_NOTHING)$(MAKE) --no-print-directory --no-keep-going \ 19 | internal-application-compile \ 20 | FW_TYPE=$(FW_TYPE) FW_INSTANCE=$(FW_INSTANCE) FW_OPERATION=compile \ 21 | FW_BUILD_DIR="$(FW_BUILD_DIR)" _FW_MAKE_PARALLEL=yes$(ECHO_END) 22 | 23 | internal-application-compile: $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_EXE_EXT) 24 | endif 25 | 26 | $(eval $(call _FW_TEMPLATE_DEFAULT_LINKING_RULE,$(FW_INSTANCE)$(TARGET_EXE_EXT))) 27 | 28 | ifeq ($($(FW_INSTANCE)_BUNDLE_NAME),) 29 | LOCAL_BUNDLE_NAME = $(FW_INSTANCE) 30 | else 31 | LOCAL_BUNDLE_NAME = $($(FW_INSTANCE)_BUNDLE_NAME) 32 | endif 33 | 34 | FW_SHARED_BUNDLE_RESOURCE_PATH = $(FW_STAGING_DIR)$(LOCAL_INSTALL_PATH)/$(LOCAL_BUNDLE_NAME).app 35 | include $(FW_MAKEDIR)/instance/shared/bundle.mk 36 | 37 | internal-application-stage_:: shared-instance-bundle-stage 38 | $(ECHO_NOTHING)mkdir -p "$(FW_SHARED_BUNDLE_RESOURCE_PATH)"$(ECHO_END) 39 | $(ECHO_NOTHING)cp $(FW_OBJ_DIR)/$(FW_INSTANCE)$(TARGET_EXE_EXT) "$(FW_SHARED_BUNDLE_RESOURCE_PATH)"$(ECHO_END) 40 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexCompatibility.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlexCompatibility.m 3 | // plex 4 | // 5 | // Created by bob on 2011-11-27. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | // BASED ON: 10 | // SMFCompatibility.m 11 | // SMFramework 12 | // 13 | // Created by Thomas Cool on 7/13/11. 14 | // Copyright 2011 tomcool.org. All rights reserved. 15 | // 16 | 17 | #import "PlexCompatibility.h" 18 | 19 | @implementation PlexCompatibility 20 | 21 | 22 | SYNTHESIZE_SINGLETON_FOR_CLASS(PlexCompatibility, compat) 23 | - (id)init { 24 | self = [super init]; 25 | if (self != nil) { 26 | Class cls = NSClassFromString(@"ATVVersionInfo"); 27 | 28 | _usingFourPointFour = NO; 29 | _usingFourPointThree = NO; 30 | _usingFourPointTwo = NO; 31 | if (cls != nil && [[cls currentOSVersion] isEqualToString:@"4.2"]) { 32 | _usingFourPointTwo = YES; 33 | } 34 | if (cls != nil && [[cls currentOSVersion] isEqualToString:@"4.3"]) { 35 | _usingFourPointTwo = YES; 36 | _usingFourPointThree = YES; 37 | } 38 | if (cls != nil && [[cls currentOSVersion] rangeOfString:@"5."].location != NSNotFound) { 39 | _usingFourPointTwo = YES; 40 | _usingFourPointThree = YES; 41 | _usingFourPointFour = YES; 42 | } 43 | } 44 | return self; 45 | } 46 | - (BOOL)usingFourPointTwo { 47 | return _usingFourPointTwo; 48 | } 49 | - (BOOL)usingFourPointThree { 50 | return _usingFourPointThree; 51 | } 52 | - (BOOL)usingFourPointFour { 53 | return _usingFourPointFour; 54 | } 55 | @end 56 | 57 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexControlFactory.m: -------------------------------------------------------------------------------- 1 | // 2 | // Plex_SMFControlFactory.m 3 | // plex 4 | // 5 | // Created by bob on 2011-04-08. 6 | // 7 | 8 | #import "PlexControlFactory.h" 9 | #import 10 | 11 | @implementation PlexControlFactory 12 | 13 | //Returns the control shown on main menu 14 | - (id)initForMainMenu:(BOOL)arg1 { 15 | self = [super initForMainMenu:arg1]; 16 | _mainmenu = arg1; 17 | self._poster = YES; 18 | self.defaultImage = nil; 19 | self.favorProxy = YES; 20 | self._alwaysShowTitles = NO; 21 | return self; 22 | } 23 | - (float)heightForControlForData:(id)data requestedBy:(id)by { 24 | return 206.0f; 25 | } 26 | 27 | - (BRControl*)controlForImageProxy:(BRURLImageProxy*)imageProxy title:(NSString*)title { 28 | BRPosterControl *returnObj = [[BRPosterControl alloc] init]; 29 | returnObj.posterStyle = 1; 30 | 31 | NSAttributedString *str = [[NSAttributedString alloc] initWithString:title attributes:[[BRThemeInfo sharedTheme] menuTitleSubtextAttributes]]; 32 | returnObj.title = str; 33 | [str release]; 34 | 35 | returnObj.imageProxy = imageProxy; 36 | returnObj.defaultImage = self.defaultImage; 37 | returnObj.alwaysShowTitles = self._alwaysShowTitles; 38 | returnObj.posterBorderWidth = 1.0f; 39 | returnObj.titleWidthScale = 1.0f; 40 | returnObj.titleVerticalOffset = 0.0f; 41 | returnObj.reflectionAmount = 0.14000000059604645; 42 | @try { 43 | [returnObj performSelector:@selector(setIgnoreLoadAndDisplayOnDemand)]; 44 | } 45 | @catch (NSException *exception) { 46 | /* silently ignore the exception here */ 47 | } 48 | 49 | return [returnObj autorelease]; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/Group.pm: -------------------------------------------------------------------------------- 1 | package Group; 2 | use strict; 3 | 4 | sub new { 5 | my $proto = shift; 6 | my $class = ref($proto) || $proto; 7 | my $self = {}; 8 | $self->{NAME} = undef; 9 | $self->{EXPLICIT} = 1; 10 | $self->{INITIALIZED} = 0; 11 | $self->{CLASSES} = []; 12 | bless($self, $class); 13 | return $self; 14 | } 15 | 16 | ##################### # 17 | # Setters and Getters # 18 | # ##################### 19 | sub name { 20 | my $self = shift; 21 | if(@_) { $self->{NAME} = shift; } 22 | return $self->{NAME}; 23 | } 24 | 25 | sub explicit { 26 | my $self = shift; 27 | if(@_) { $self->{EXPLICIT} = shift; } 28 | return $self->{EXPLICIT}; 29 | } 30 | 31 | sub initialized { 32 | my $self = shift; 33 | if(@_) { $self->{INITIALIZED} = shift; } 34 | return $self->{INITIALIZED}; 35 | } 36 | ##### # 37 | # END # 38 | # ##### 39 | 40 | sub addClass { 41 | my $self = shift; 42 | my $class = shift; 43 | $class->group($self); 44 | push(@{$self->{CLASSES}}, $class); 45 | } 46 | 47 | sub addClassNamed { 48 | my $self = shift; 49 | my $name = shift; 50 | 51 | my $class = $self->getClassNamed($name); 52 | return $class if defined($class); 53 | 54 | $class = Class->new(); 55 | $class->name($name); 56 | $self->addClass($class); 57 | return $class; 58 | } 59 | 60 | sub getClassNamed { 61 | my $self = shift; 62 | my $name = shift; 63 | foreach(@{$self->{CLASSES}}) { 64 | return $_ if $_->name eq $name; 65 | } 66 | return undef; 67 | } 68 | 69 | sub initializers { 70 | my $self = shift; 71 | my $return = ""; 72 | $self->initialized(1); 73 | $return .= "{"; 74 | foreach(@{$self->{CLASSES}}) { 75 | $return .= $_->initializers; 76 | } 77 | $return .= "}"; 78 | return $return; 79 | } 80 | 81 | 1; 82 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexSongAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMediaAsset.h 3 | // atvTwo 4 | // 5 | // Created by Frank Bauer on 27.10.10. 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | #import 27 | 28 | @class PlexMediaObject; 29 | @interface PlexSongAsset : BRBaseMediaAsset { 30 | //BRBaseMediaAsset* bma; 31 | NSURL *url; 32 | PlexMediaObject *pmo; 33 | } 34 | @property (nonatomic, retain) PlexMediaObject *pmo; 35 | 36 | - (id)initWithURL:(NSURL*)url mediaProvider:(id)mediaProvider mediaObject:(PlexMediaObject*)pmo; 37 | - (NSString*)mediaURL; 38 | @end 39 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMediaAssetOld.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMediaAsset.h 3 | // atvTwo 4 | // 5 | // Created by Frank Bauer on 27.10.10. 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | #import 27 | 28 | @class PlexMediaObject, PlexPreviewAsset; 29 | @interface PlexMediaAssetOld : BRBaseMediaAsset { 30 | NSURL *url; 31 | PlexMediaObject *pmo; 32 | PlexPreviewAsset *ppa; 33 | } 34 | @property (nonatomic, retain) PlexMediaObject *pmo; 35 | 36 | - (id)initWithURL:(NSURL*)url mediaProvider:(id)mediaProvider mediaObject:(PlexMediaObject*)pmo; 37 | - (NSString*)mediaURL; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/shared/bundle.mk: -------------------------------------------------------------------------------- 1 | # Input Variables 2 | # FW_SHARED_BUNDLE_INSTALL_NAME: bundle name and extension 3 | # FW_SHARED_BUNDLE_INSTALL_PATH: bundle install path 4 | # FW_SHARED_BUNDLE_RESOURCE_PATH: bundle resource path (typically just INSTALL_PATH/INSTALL_NAME) 5 | # 6 | # Instance Variables: 7 | # xxx_RESOURCE_FILES: list of resource files to install (why would you use this in favour of xxx_RESOURCE_DIRS? eh.) 8 | # xxx_RESOURCE_DIRS: folders to copy resources from 9 | # note a deviation from gnustep-make's xxx_RESOURCE_DIRS which simply specifies resource subdirectories to create 10 | # defaults to Resources/ if it exists. 11 | 12 | .PHONY: shared-instance-bundle-stage 13 | 14 | RESOURCE_FILES := $($(FW_INSTANCE)_RESOURCE_FILES) 15 | RESOURCE_DIRS := $($(FW_INSTANCE)_RESOURCE_DIRS) 16 | ifeq ($(RESOURCE_DIRS),) 17 | ifeq ($(shell [ -d "Resources" ] && echo 1 || echo 0),1) 18 | RESOURCE_DIRS := Resources 19 | else 20 | RESOURCE_DIRS := 21 | endif 22 | endif 23 | 24 | shared-instance-bundle-stage:: 25 | $(ECHO_NOTHING)mkdir -p $(FW_SHARED_BUNDLE_RESOURCE_PATH)$(ECHO_END) 26 | ifneq ($(RESOURCE_FILES),) 27 | $(ECHO_COPYING_RESOURCE_FILES)for f in $(RESOURCE_FILES); do \ 28 | if [ -f "$$f" -o -d "$$f" ]; then \ 29 | rsync -a "$$f" "$(FW_SHARED_BUNDLE_RESOURCE_PATH)/" $(FW_RSYNC_EXCLUDES); \ 30 | else \ 31 | echo "Warning: ignoring missing bundle resource $$f."; \ 32 | fi; \ 33 | done$(ECHO_END) 34 | endif 35 | ifneq ($(RESOURCE_DIRS),) 36 | $(ECHO_COPYING_RESOURCE_DIRS)for d in $(RESOURCE_DIRS); do \ 37 | if [ -d "$$d" ]; then \ 38 | rsync -a "$$d/" "$(FW_SHARED_BUNDLE_RESOURCE_PATH)/" $(FW_RSYNC_EXCLUDES); \ 39 | else \ 40 | echo "Warning: ignoring missing bundle resource directory $$d."; \ 41 | fi; \ 42 | done$(ECHO_END) 43 | endif 44 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/bundle.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | include $(FW_MAKEDIR)/rules.mk 3 | endif 4 | 5 | .PHONY: internal-bundle-all_ internal-bundle-stage_ internal-bundle-compile 6 | 7 | AUXILIARY_LDFLAGS += -dynamiclib 8 | 9 | ifeq ($(FW_MAKE_PARALLEL_BUILDING), no) 10 | internal-bundle-all_:: $(_OBJ_DIR_STAMPS) $(FW_OBJ_DIR)/$(FW_INSTANCE) 11 | else 12 | internal-bundle-all_:: $(_OBJ_DIR_STAMPS) 13 | $(ECHO_NOTHING)$(MAKE) --no-print-directory --no-keep-going \ 14 | internal-bundle-compile \ 15 | FW_TYPE=$(FW_TYPE) FW_INSTANCE=$(FW_INSTANCE) FW_OPERATION=compile \ 16 | FW_BUILD_DIR="$(FW_BUILD_DIR)" _FW_MAKE_PARALLEL=yes$(ECHO_END) 17 | 18 | internal-bundle-compile: $(FW_OBJ_DIR)/$(FW_INSTANCE) 19 | endif 20 | 21 | ifneq ($(OBJ_FILES_TO_LINK),) 22 | 23 | $(eval $(call _FW_TEMPLATE_NOWARNING_LINKING_RULE,$(FW_INSTANCE))) 24 | 25 | else # OBJ_FILES_TO_LINK == "" 26 | 27 | $(FW_OBJ_DIR)/$(FW_INSTANCE): 28 | $(NOTICE_EMPTY_LINKING) 29 | 30 | endif # OBJ_FILES_TO_LINK 31 | 32 | 33 | ifeq ($($(FW_INSTANCE)_BUNDLE_NAME),) 34 | LOCAL_BUNDLE_NAME = $(FW_INSTANCE) 35 | else 36 | LOCAL_BUNDLE_NAME = $($(FW_INSTANCE)_BUNDLE_NAME) 37 | endif 38 | 39 | ifeq ($($(FW_INSTANCE)_BUNDLE_EXTENSION),) 40 | LOCAL_BUNDLE_EXTENSION = bundle 41 | else 42 | LOCAL_BUNDLE_EXTENSION = $($(FW_INSTANCE)_BUNDLE_EXTENSION) 43 | endif 44 | 45 | FW_SHARED_BUNDLE_RESOURCE_PATH = $(FW_STAGING_DIR)$($(FW_INSTANCE)_INSTALL_PATH)/$(LOCAL_BUNDLE_NAME).$(LOCAL_BUNDLE_EXTENSION) 46 | include $(FW_MAKEDIR)/instance/shared/bundle.mk 47 | 48 | internal-bundle-stage_:: shared-instance-bundle-stage 49 | $(ECHO_NOTHING)mkdir -p "$(FW_SHARED_BUNDLE_RESOURCE_PATH)"$(ECHO_END) 50 | ifneq ($(OBJ_FILES_TO_LINK),) 51 | $(ECHO_NOTHING)cp $(FW_OBJ_DIR)/$(FW_INSTANCE) "$(FW_SHARED_BUNDLE_RESOURCE_PATH)"$(ECHO_END) 52 | endif 53 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMediaAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMediaAsset.h 3 | // atvTwo 4 | // 5 | // Created by Frank Bauer on 27.10.10. 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | #import 27 | 28 | @class PlexMediaObject, PlexPreviewAsset; 29 | @interface PlexMediaAsset : BRXMLMediaAsset { //BRBaseMediaAsset { 30 | //BRBaseMediaAsset* bma; 31 | NSURL *url; 32 | PlexMediaObject *pmo; 33 | PlexPreviewAsset *ppa; 34 | } 35 | @property (nonatomic, retain) PlexMediaObject *pmo; 36 | 37 | - (id)initWithURL:(NSURL*)url mediaProvider:(id)mediaProvider mediaObject:(PlexMediaObject*)pmo; 38 | - (NSString*)mediaURL; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMediaShelfView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMediaShelfView.m 3 | // plex 4 | // 5 | // Created by Tobias Hieta on 8/20/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "PlexMediaShelfView.h" 10 | 11 | @implementation PlexMediaShelfView 12 | @synthesize adapter; 13 | 14 | - (id)init { 15 | if ([PLEX_COMPAT usingFourPointThree]) 16 | { 17 | self = [super init]; 18 | } else { 19 | self = [[NSClassFromString (@"BRMediaShelfControl")alloc] init]; 20 | } 21 | if (self) { 22 | } 23 | return self; 24 | } 25 | 26 | - (id)provider { 27 | return nil; 28 | } 29 | 30 | - (void)dealloc { 31 | [adapter release]; 32 | [super dealloc]; 33 | } 34 | 35 | - (void)setProvider:(id)provider { 36 | if ([PLEX_COMPAT usingFourPointThree]) 37 | { 38 | DLog(@"Using 4.3+ provider settings!"); 39 | BRProviderDataSourceAdapter *_adapter = [[NSClassFromString (@"BRProviderDataSourceAdapter")alloc] init]; 40 | [_adapter setProviders:[NSArray arrayWithObjects:provider, nil]]; 41 | [self setDelegate:_adapter]; 42 | [self setDataSource:_adapter]; 43 | self.adapter = _adapter; 44 | [_adapter release]; 45 | } else { 46 | [(id) self setProvider:provider]; 47 | } 48 | } 49 | 50 | - (id)focusedIndexCompat { 51 | if ([PLEX_COMPAT usingFourPointThree]) 52 | { 53 | return [self focusedIndexPath]; 54 | } else { 55 | return [(id) self focusedIndex]; 56 | } 57 | } 58 | 59 | - (void)setFocusedIndexCompat:(id)focusedIndexCompat { 60 | if ([PLEX_COMPAT usingFourPointThree]) 61 | { 62 | self.focusedIndexPath = focusedIndexCompat; 63 | } else { 64 | [(id) self setFocusedIndex:focusedIndexCompat]; 65 | } 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /PlexATV/Classes/Plex_SynthesizeSingleton.h: -------------------------------------------------------------------------------- 1 | // 2 | // SynthesizeSingleton.h 3 | // CocoaWithLove 4 | // 5 | // Created by Matt Gallagher on 20/10/08. 6 | // Copyright 2009 Matt Gallagher. All rights reserved. 7 | // 8 | // Permission is given to use this source code file without charge in any 9 | // project, commercial or otherwise, entirely at your risk, with the condition 10 | // that any redistribution (in part or whole) of source code must retain 11 | // this copyright and permission notice. Attribution in compiled projects is 12 | // appreciated but not required. 13 | // 14 | 15 | #define PLEX_SYNTHESIZE_SINGLETON_FOR_CLASS(classname) \ 16 | \ 17 | static classname * shared ## classname = nil; \ 18 | \ 19 | + (classname*)shared ## classname \ 20 | { \ 21 | @synchronized(self) \ 22 | { \ 23 | if (shared ## classname == nil) \ 24 | { \ 25 | shared ## classname = [[self alloc] init]; \ 26 | } \ 27 | } \ 28 | \ 29 | return shared ## classname; \ 30 | } \ 31 | \ 32 | + (id)allocWithZone:(NSZone*)zone \ 33 | { \ 34 | @synchronized(self) \ 35 | { \ 36 | if (shared ## classname == nil) \ 37 | { \ 38 | shared ## classname = [super allocWithZone:zone]; \ 39 | return shared ## classname; \ 40 | } \ 41 | } \ 42 | \ 43 | return nil; \ 44 | } \ 45 | \ 46 | - (id)copyWithZone:(NSZone*)zone \ 47 | { \ 48 | return self; \ 49 | } \ 50 | \ 51 | - (id)retain \ 52 | { \ 53 | return self; \ 54 | } \ 55 | \ 56 | - (NSUInteger)retainCount \ 57 | { \ 58 | return NSUIntegerMax; \ 59 | } \ 60 | \ 61 | - (void)release \ 62 | { \ 63 | } \ 64 | \ 65 | - (id)autorelease \ 66 | { \ 67 | return self; \ 68 | } 69 | -------------------------------------------------------------------------------- /PlexATV/theos/templates/iphone/tweak.nic: -------------------------------------------------------------------------------- 1 | nic 1 2 | name "iphone/tweak" 3 | prompt FILTER "MobileSubstrate Bundle filter" "com.apple.springboard" 4 | file 1 @@PROJECTNAME@@.plist 5 | { Filter = { Bundles = ( "@@FILTER@@" ); }; } 6 | 7 | file 34 Tweak.xm 8 | /* How to Hook with Logos 9 | Hooks are written with syntax similar to that of an Objective-C @implementation. 10 | You don't need to #include , it will be done automatically, as will 11 | the generation of a class list and an automatic constructor. 12 | 13 | %hook ClassName 14 | 15 | // Hooking a class method 16 | + (id)sharedInstance { 17 | return %orig; 18 | } 19 | 20 | // Hooking an instance method with an argument. 21 | - (void)messageName:(int)argument { 22 | %log; // Write a message about this call, including its class, name and arguments, to the system log. 23 | 24 | %orig; // Call through to the original function with its original arguments. 25 | %orig(nil); // Call through to the original function with a custom argument. 26 | 27 | // If you use %orig(), you MUST supply all arguments (except for self and _cmd, the automatically generated ones.) 28 | } 29 | 30 | // Hooking an instance method with no arguments. 31 | - (id)noArguments { 32 | %log; 33 | id awesome = %orig; 34 | [awesome doSomethingElse]; 35 | 36 | return awesome; 37 | } 38 | 39 | // Always make sure you clean up after yourself; Not doing so could have grave conseqeuences! 40 | %end 41 | */ 42 | 43 | 44 | file 6 Makefile 45 | include theos/makefiles/common.mk 46 | 47 | TWEAK_NAME = @@PROJECTNAME@@ 48 | @@PROJECTNAME@@_FILES = Tweak.xm 49 | 50 | include $(FW_MAKEDIR)/tweak.mk 51 | 52 | file 9 control 53 | Package: @@PACKAGENAME@@ 54 | Name: @@FULLPROJECTNAME@@ 55 | Depends: mobilesubstrate 56 | Version: 0.0.1 57 | Architecture: iphoneos-arm 58 | Description: An awesome MobileSubstrate tweak! 59 | Maintainer: @@USER@@ 60 | Author: @@USER@@ 61 | Section: Tweaks 62 | 63 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexPlaybackController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexPlaybackController.h 3 | // plex 4 | // 5 | // Created by Bob Jelica on 22.02.2011. 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | @class PlexMediaObject; 27 | 28 | @interface PlexPlaybackController : BRController { 29 | BOOL playbackCancelled; 30 | } 31 | @property (retain) PlexMediaObject *mediaObject; 32 | @property (retain) NSTimer *playProgressTimer; 33 | 34 | - (id)initWithPlexMediaObject:(PlexMediaObject*)aMediaObject; 35 | - (void)startPlaying; 36 | - (void)playbackVideoWithOffset:(int)offset; 37 | - (void)movieFinished:(NSNotification*)event; 38 | - (void)playerStateChanged:(NSNotification*)event; 39 | - (void)playbackAudio; 40 | - (void)postProgress:(NSDictionary*)progressDict; 41 | - (void)showResumeDialog; 42 | @end -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/BaseClass.pm: -------------------------------------------------------------------------------- 1 | package BaseClass; 2 | use strict; 3 | 4 | sub new { 5 | my $proto = shift; 6 | my $class = ref($proto) || $proto; 7 | my $self = {}; 8 | $self->{NAME} = undef; 9 | $self->{EXPR} = undef; 10 | $self->{METAEXPR} = undef; 11 | $self->{TYPE} = undef; 12 | $self->{META} = 0; 13 | $self->{INST} = 0; 14 | $self->{METHODS} = []; 15 | $self->{NUM_METHODS} = 0; 16 | $self->{GROUP} = undef; 17 | bless($self, $class); 18 | return $self; 19 | } 20 | 21 | ##################### # 22 | # Setters and Getters # 23 | # ##################### 24 | sub name { 25 | my $self = shift; 26 | if(@_) { $self->{NAME} = shift; } 27 | return $self->{NAME}; 28 | } 29 | 30 | sub expression { 31 | my $self = shift; 32 | if(@_) { $self->{EXPR} = shift; $self->type("id"); } 33 | return $self->{EXPR} if $self->{EXPR}; 34 | return "objc_getClass(\"".$self->{NAME}."\")"; 35 | } 36 | 37 | sub metaexpression { 38 | my $self = shift; 39 | if(@_) { $self->{METAEXPR} = shift; } 40 | return $self->{METAEXPR} if $self->{METAEXPR}; 41 | return "object_getClass(\$\$".$self->{NAME}.")"; 42 | } 43 | 44 | sub type { 45 | my $self = shift; 46 | if(@_) { $self->{TYPE} = shift; } 47 | return $self->{TYPE} if $self->{TYPE}; 48 | return $self->{NAME}."*"; 49 | } 50 | 51 | sub hasmetahooks { 52 | my $self = shift; 53 | if(@_) { $self->{META} = shift; } 54 | return $self->{META}; 55 | } 56 | 57 | sub hasinstancehooks { 58 | my $self = shift; 59 | if(@_) { $self->{INST} = shift; } 60 | return $self->{INST}; 61 | } 62 | 63 | sub group { 64 | my $self = shift; 65 | if(@_) { $self->{GROUP} = shift; } 66 | return $self->{GROUP}; 67 | } 68 | 69 | ##### # 70 | # END # 71 | # ##### 72 | 73 | sub addMethod { 74 | my $self = shift; 75 | my $hook = shift; 76 | push(@{$self->{METHODS}}, $hook); 77 | $self->{NUM_METHODS}++; 78 | } 79 | 80 | sub initializers { 81 | ::fileError(-1, "Generator hasn't implemented Class::initializers :("); 82 | return ""; 83 | } 84 | 85 | 1; 86 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexAudioSubsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexAudioSubsController.h 3 | // plex 4 | // 5 | // Created by bob on 2011-05-03. 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | 26 | 27 | #import 28 | 29 | @class PlexMediaObject; 30 | @interface PlexAudioSubsController : SMFMenuController { 31 | PlexMediaObject *playbackItem; 32 | PlexMediaObject *detailedItem; 33 | } 34 | 35 | @property (retain) PlexMediaObject *playbackItem; 36 | @property (retain) PlexMediaObject *detailedItem; 37 | @property (retain) NSArray *items; 38 | 39 | - (id)initWithMediaObject:(PlexMediaObject*)mediaObject; 40 | - (void)populateListWithStreams; 41 | 42 | //list provider 43 | - (float)heightForRow:(long)row; 44 | - (long)itemCount; 45 | - (id)itemForRow:(long)row; 46 | - (BOOL)rowSelectable:(long)selectable; 47 | - (id)titleForRow:(long)row; 48 | 49 | @end 50 | 51 | -------------------------------------------------------------------------------- /PlexATV/Classes/NSArray-Shuffle.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray-Shuffle.h 3 | // Groovy 4 | // 5 | // Copyright (c) 2010, hackfrag 6 | // http://groovy.weasel-project.com 7 | // 8 | // All rights reserved. 9 | // 10 | // 11 | // Permission is hereby granted, free of charge, to any person 12 | // obtaining a copy of this software and associated documentation 13 | // files (the "Software"), to deal in the Software without 14 | // restriction except as noted below, including without limitation 15 | // the rights to use,copy, modify, merge, publish, distribute, 16 | // and/or sublicense, and to permit persons to whom the Software is 17 | // furnished to do so, subject to the following conditions: 18 | // 19 | // The Software and/or source code cannot be copied in whole and 20 | // sold without meaningful modification for a profit. 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // Redistributions of source code must retain the above copyright 26 | // notice, this list of conditions and the following disclaimer. 27 | // 28 | // Redistributions in binary form must reproduce the above copyright 29 | // notice, this list of conditions and the following disclaimer in 30 | // the documentation and/or other materials provided with 31 | // the distribution. 32 | // 33 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40 | // OTHER DEALINGS IN THE SOFTWARE. 41 | 42 | 43 | @interface NSArray (Shuffle) 44 | - (NSArray*)shuffledArray; 45 | @end -------------------------------------------------------------------------------- /PlexATV/Classes/PlexMoreInfoController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMoreInfoController.h 3 | // plex 4 | // 5 | // Created by ccjensen on 5/26/11. 6 | // 7 | 8 | #import 9 | @class PlexMediaContainer, PlexMediaObject, PlexDirectory; 10 | 11 | @interface PlexMoreInfoController : BRMediaMenuController { 12 | int firstFocusableItemIndex; 13 | } 14 | @property (retain) BRScrollControl *scrollControl; 15 | @property (retain) BRCursorControl *cursorControl; 16 | @property (retain) BRPanelControl *innerPanelControl; 17 | @property (retain) BRSpacerControl *spacerTopControl; 18 | @property (retain) BRControl *metadataControl; 19 | @property (retain) BRMetadataTitleControl *metadataTitleControl; 20 | @property (retain) BRSpacerControl *spacerTitleGridControl; 21 | @property (retain) BRGridControl *gridControl; 22 | @property (retain) BRSpacerControl *spacerBottom; 23 | 24 | 25 | 26 | @property (retain) BRWaitSpinnerControl *waitSpinnerControl; 27 | 28 | @property (retain) PlexMediaContainer *moreInfoContainer; 29 | @property (retain) PlexMediaObject *mediaObject; 30 | @property (retain) NSArray *menuItems; 31 | 32 | @property (retain) PlexMediaContainer *currentGridContentMediaContainer; 33 | @property (retain) NSArray *currentGridContent; 34 | 35 | - (id)initWithMoreInfoContainer:(PlexMediaContainer*)mediaContainer; 36 | - (void)setupListForMediaObject:(PlexMediaObject*)aMediaObject; 37 | - (void)addCreditsSectionToArray:(NSMutableArray*)creditsSectionArray ForKey:(NSString*)key withLabel:(NSString*)label; 38 | - (void)setupPreviewControl; 39 | 40 | //Grid Datesource & Delegate Methods 41 | - (id)gridProvider; 42 | 43 | //Grid Content Methods 44 | - (void)startRetrievalOfContentsForDirectory:(PlexDirectory*)directory; 45 | 46 | //list methods 47 | - (void)playPauseActionForRow:(long)row; 48 | - (void)setListSelection:(int)selection; 49 | - (int)getListSelection; 50 | 51 | //grid methods 52 | - (void)playPauseActionForGridIndex:(long)selectedIndex; 53 | - (void)selectActionForGridIndex:(long)selectedIndex; 54 | - (long)getGridSelection; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /PlexATV/Classes/UIImage+Tint.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Tint.m 3 | // 4 | // Created by Matt Gemmell on 04/07/2010. 5 | // Copyright 2010 Instinctive Code. 6 | // 7 | 8 | #import "UIImage+Tint.h" 9 | 10 | 11 | @implementation UIImage (MGTint) 12 | 13 | 14 | - (UIImage*)imageTintedWithColor:(UIColor*)color { 15 | // This method is designed for use with template images, i.e. solid-coloured mask-like images. 16 | return [self imageTintedWithColor:color fraction:0.0]; // default to a fully tinted mask of the image. 17 | } 18 | 19 | 20 | - (UIImage*)imageTintedWithColor:(UIColor*)color fraction:(CGFloat)fraction { 21 | if (color) { 22 | // Construct new image the same size as this one. 23 | UIImage *image; 24 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 25 | if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 4.0) { 26 | UIGraphicsBeginImageContextWithOptions([self size], NO, 0.0); // 0.0 for scale means "scale for device's main screen". 27 | } 28 | #else 29 | if ([[[UIDevice currentDevice] systemVersion] floatValue] < 4.0) { 30 | UIGraphicsBeginImageContext([self size]); 31 | } 32 | #endif 33 | CGRect rect = CGRectZero; 34 | rect.size = [self size]; 35 | 36 | // Composite tint color at its own opacity. 37 | [color set]; 38 | UIRectFill(rect); 39 | 40 | // Mask tint color-swatch to this image's opaque mask. 41 | // We want behaviour like NSCompositeDestinationIn on Mac OS X. 42 | [self drawInRect:rect blendMode:kCGBlendModeDestinationIn alpha:1.0]; 43 | 44 | // Finally, composite this image over the tinted mask at desired opacity. 45 | if (fraction > 0.0) { 46 | // We want behaviour like NSCompositeSourceOver on Mac OS X. 47 | [self drawInRect:rect blendMode:kCGBlendModeSourceAtop alpha:fraction]; 48 | } 49 | image = UIGraphicsGetImageFromCurrentImageContext(); 50 | UIGraphicsEndImageContext(); 51 | 52 | return image; 53 | } 54 | 55 | return self; 56 | } 57 | 58 | 59 | 60 | @end -------------------------------------------------------------------------------- /PlexATV/plex.xcodeproj/xcshareddata/xcschemes/All.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 40 | 41 | 42 | 43 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /PlexATV/plex.xcodeproj/xcshareddata/xcschemes/Install.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 40 | 41 | 42 | 43 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /PlexATV/plex.xcodeproj/xcshareddata/xcschemes/plex.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 40 | 41 | 42 | 43 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexPreplayController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWDetailedMovieMetadataController.h 3 | // atvTwo 4 | // 5 | // Created by ccjensen on 2/7/11. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import "Plex_SMFMoviePreviewController.h" 31 | #import "PlexMediaShelfView.h" 32 | 33 | @interface PlexPreplayController : Plex_SMFMoviePreviewController { 34 | BOOL shelfIsSelected; 35 | int currentSelectedIndex; 36 | int lastFocusedIndex; 37 | BOOL moreInfoSelected; 38 | SMFListDropShadowControl *listDropShadowControl; //popup 39 | PlexMediaShelfView *shelfCtrl; 40 | } 41 | @property (retain) PlexMediaContainer *relatedMediaContainer; 42 | @property (retain) PlexMediaObject *selectedMediaObject; 43 | 44 | - (id)initWithPlexMediaObject:(PlexMediaObject*)aMediaObject; 45 | - (void)changeMetadataViewToShowDataForIndex:(int)index; 46 | - (BRImage*)flagImageForUrl:(NSURL*)url; 47 | 48 | @end -------------------------------------------------------------------------------- /PlexATV/Classes/PlexTVEpisodeMetadataAsset.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlexTVEpisodeMetadataAsset.m 3 | // plex 4 | // 5 | // Created by ccjensen on 14/06/2011. 6 | // 7 | 8 | #import "PlexTVEpisodeMetadataAsset.h" 9 | #import 10 | #import 11 | #import 12 | //#import 13 | //#import 14 | 15 | @implementation PlexTVEpisodeMetadataAsset 16 | @synthesize tvshowObject; 17 | 18 | #pragma mark - 19 | #pragma mark Object/Class Lifecycle 20 | - (id)initWithURL:(NSURL*)u mediaProvider:(id)mediaProvider mediaObject:(PlexMediaObject*)obj { 21 | self = [super initWithURL:u mediaProvider:mediaProvider mediaObject:obj]; 22 | if (self) { 23 | [self setupTvshowObject]; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)dealloc { 29 | self.tvshowObject = nil; 30 | [super dealloc]; 31 | } 32 | 33 | - (void)setupTvshowObject { 34 | NSString *grandparentKey = [self.pmo.attributes objectForKey:@"grandparentKey"]; 35 | if (grandparentKey) { 36 | //mixed 37 | PlexMediaContainer *tvshowContainer = [self.pmo.request query:grandparentKey callingObject:nil ignorePresets:YES timeout:20 cachePolicy:NSURLRequestUseProtocolCachePolicy]; 38 | if ([tvshowContainer.directories count] == 1) { 39 | self.tvshowObject = [tvshowContainer.directories objectAtIndex:0]; 40 | } 41 | } else { 42 | //hierarchial 43 | if ([self.pmo.parentObject isKindOfClass:[PlexMediaObject class]]) { 44 | PlexMediaObject *parent = self.pmo.parentObject; 45 | if ([parent.parentObject isKindOfClass:[PlexMediaObject class]]) { 46 | self.tvshowObject = parent.parentObject; 47 | } 48 | } 49 | } 50 | } 51 | 52 | #pragma mark - 53 | #pragma mark BRMediaAsset 54 | - (id)genres { 55 | NSString *result = [self.tvshowObject listSubObjects:@"Genre" usingKey:@"tag"]; 56 | return [result componentsSeparatedByString:@", "]; 57 | } 58 | 59 | - (id)primaryGenre { 60 | NSArray *allGenres = [self genres]; 61 | BRGenre *result = nil; 62 | if ([allGenres count] > 0) { 63 | result = [[[BRGenre alloc] initWithString:[allGenres objectAtIndex:0]] autorelease]; 64 | } 65 | return result; 66 | } 67 | 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /PlexATV/Classes/HWPlexDir.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWPlexDir.h 3 | // atvTwo 4 | // 5 | // Created by Frank Bauer on 22.10.10. 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | 26 | 27 | #import 28 | #import 29 | 30 | 31 | 32 | @class PlexMediaObject; 33 | @interface HWPlexDir : SMFMediaMenuController { 34 | PlexMediaContainer *rootContainer; 35 | PlexMediaObject *playbackItem; 36 | NSDictionary *previewControlData; 37 | } 38 | 39 | @property (retain) BRTabControl *tabBar; 40 | @property (retain) PlexMediaContainer *rootContainer; 41 | @property (retain) NSArray *items; 42 | @property (retain) NSDictionary *previewControlData; 43 | 44 | - (id)initWithRootContainer:(PlexMediaContainer*)container andTabBar:(BRTabControl*)aTabBar; 45 | - (void)showModifyViewedStatusViewForRow:(long)row; 46 | - (void)reselectCurrentTabBarItem; 47 | 48 | - (void)createParadeForData:(NSMutableDictionary*)data; 49 | - (void)finishedCreatingParade:(NSDictionary*)data; 50 | 51 | //list provider 52 | - (float)heightForRow:(long)row; 53 | - (long)itemCount; 54 | - (id)itemForRow:(long)row; 55 | - (BOOL)rowSelectable:(long)selectable; 56 | - (id)titleForRow:(long)row; 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /PlexATV/theos/include/BackRow/BRVOSpeechAction.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This header is generated by class-dump-z 0.2a. 3 | * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3. 4 | * 5 | * Source: /System/Library/PrivateFrameworks/BackRow.framework/BackRow 6 | */ 7 | 8 | // 9 | 10 | @class NSString; 11 | 12 | __attribute__( ( visibility("hidden") ) ) 13 | @interface BRVOSpeechAction : NSObject { 14 | @private 15 | NSString *_string; // 4 = 0x4 16 | NSString *_pitch; // 8 = 0x8 17 | NSString *_language; // 12 = 0xc 18 | BOOL _shouldQueue; // 16 = 0x10 19 | BOOL _cannotInterrupt; // 17 = 0x11 20 | id _completionCallback; // 20 = 0x14 21 | } 22 | @property (assign, nonatomic) BOOL cannotInterrupt; // G=0x32e582f9; S=0x32e58309; @synthesize=_cannotInterrupt 23 | @property (copy, nonatomic) id completionCallback; // G=0x32e582d9; S=0x32e58f6d; @synthesize=_completionCallback 24 | @property (retain, nonatomic) NSString *language; // G=0x32e582e9; S=0x32e58f45; @synthesize=_language 25 | @property (retain, nonatomic) NSString *pitch; // G=0x32e58339; S=0x32e58f1d; @synthesize=_pitch 26 | @property (assign, nonatomic) BOOL shouldQueue; // G=0x32e58319; S=0x32e58329; @synthesize=_shouldQueue 27 | @property (copy, nonatomic) NSString *string; // G=0x32e58349; S=0x32e58ef1; @synthesize=_string 28 | + (id)actionWithString:(id)string shouldQueue:(BOOL)queue; // 0x32e58c79 29 | // declared property getter: - (BOOL)cannotInterrupt; // 0x32e582f9 30 | // declared property getter: - (id)completionCallback; // 0x32e582d9 31 | - (void)dealloc; // 0x32e58e71 32 | - (id)description; // 0x32e58c29 33 | // declared property getter: - (id)language; // 0x32e582e9 34 | // declared property getter: - (id)pitch; // 0x32e58339 35 | // declared property setter: - (void)setCannotInterrupt:(BOOL)interrupt; // 0x32e58309 36 | // declared property setter: - (void)setCompletionCallback:(id)callback; // 0x32e58f6d 37 | // declared property setter: - (void)setLanguage:(id)language; // 0x32e58f45 38 | // declared property setter: - (void)setPitch:(id)pitch; // 0x32e58f1d 39 | // declared property setter: - (void)setShouldQueue:(BOOL)queue; // 0x32e58329 40 | // declared property setter: - (void)setString:(id)string; // 0x32e58ef1 41 | // declared property getter: - (BOOL)shouldQueue; // 0x32e58319 42 | // declared property getter: - (id)string; // 0x32e58349 43 | @end 44 | 45 | -------------------------------------------------------------------------------- /PlexATV/theos/bin/lib/Logos/Generator/MobileSubstrate/Method.pm: -------------------------------------------------------------------------------- 1 | package Method; 2 | use strict; 3 | use Logos::BaseMethod; 4 | @Method::ISA = ('BaseMethod'); 5 | 6 | sub classname { 7 | my $self = shift; 8 | return ($self->{SCOPE} eq "+" ? "meta\$" : "").$self->class->name; 9 | } 10 | 11 | sub new_selector { 12 | my $self = shift; 13 | if($self->{NUM_ARGS} == 0) { 14 | return $self->{SELECTOR_PARTS}[0]; 15 | } else { 16 | return join("\$", @{$self->{SELECTOR_PARTS}})."\$"; 17 | } 18 | } 19 | 20 | sub originalFunctionName { 21 | my $self = shift; 22 | return "_".$self->groupIdentifier."\$".$self->classname."\$".$self->new_selector; 23 | } 24 | 25 | sub newFunctionName { 26 | my $self = shift; 27 | return "\$".$self->groupIdentifier."\$".$self->classname."\$".$self->new_selector; 28 | } 29 | 30 | sub methodSignature { 31 | my $self = shift; 32 | my $build = ""; 33 | my $classargtype = ""; 34 | if($self->{SCOPE} eq "+") { 35 | $classargtype = "Class"; 36 | } else { 37 | $classargtype = $self->class->type; 38 | } 39 | if(!$self->{NEW}) { 40 | $build .= "static ".$self->{RETURN}." (*".$self->originalFunctionName.")(".$classargtype.", SEL"; 41 | my $argtypelist = join(", ", @{$self->{ARGTYPES}}); 42 | $build .= ", ".$argtypelist if $argtypelist; 43 | 44 | $build .= ");" 45 | } 46 | my $arglist = ""; 47 | map $arglist .= ", ".$self->{ARGTYPES}[$_]." ".$self->{ARGNAMES}[$_], (0..$self->{NUM_ARGS} - 1); 48 | 49 | $build .= "static ".$self->{RETURN}." ".$self->newFunctionName."(".$classargtype." self, SEL _cmd".$arglist.")"; 50 | return $build; 51 | } 52 | 53 | sub originalCall { 54 | my $self = shift; 55 | my ($customargs) = @_; 56 | return "" if $self->{NEW}; 57 | 58 | my $build = $self->originalFunctionName."(self, _cmd"; 59 | if($customargs) { 60 | $build .= ", ".$customargs; 61 | } elsif($self->{NUM_ARGS} > 0) { 62 | $build .= ", ".join(", ",@{$self->{ARGNAMES}}); 63 | } 64 | $build .= ")"; 65 | return $build; 66 | } 67 | 68 | sub initializers { 69 | my $self = shift; 70 | if(!$self->{NEW}) { 71 | return "MSHookMessageEx(\$\$".$self->classname.", \@selector(".$self->selector."), (IMP)&".$self->newFunctionName.", (IMP*)&".$self->originalFunctionName.");"; 72 | } else { 73 | return "class_addMethod(\$\$".$self->classname.", \@selector(".$self->selector."), (IMP)&".$self->newFunctionName.", \"".$self->{TYPE}."\");"; 74 | } 75 | } 76 | 77 | 1; 78 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexPreviewAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlexMediaAsset.h 3 | // atvTwo 4 | // 5 | // Created by Frank Bauer on 27.10.10. 6 | // Modified by ccjensen 7 | // 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import 29 | #import 30 | 31 | @class PlexMediaObject; 32 | 33 | //needs to be a subclass of photo media asset to enable supercharged grid 34 | @interface PlexPreviewAsset : BRPhotoMediaAsset { 35 | NSURL *url; 36 | PlexMediaObject *pmo; 37 | NSDateFormatter *shortDateFormatter; 38 | } 39 | @property (nonatomic, retain) PlexMediaObject *pmo; 40 | 41 | - (id)initWithURL:(NSURL*)url mediaProvider:(id)mediaProvider mediaObject:(PlexMediaObject*)pmo; 42 | - (NSDate*)dateFromPlexDateString:(NSString*)dateString; 43 | 44 | //other metadata methods 45 | @property (readonly) NSURL *coverArtRealURL; 46 | @property (readonly) NSURL *seasonCoverArtRealURL; 47 | @property (readonly) BRImage *seasonCoverArt; 48 | @property (readonly) NSURL *fanartUrl; 49 | @property (readonly) BOOL hasClosedCaptioning; 50 | @property (readonly) BOOL hasDolbyDigitalAudioTrack; 51 | @property (readonly) NSString *mediaURL; 52 | @property (readonly) BRImage *starRatingImage; 53 | @property (readonly) NSArray *writers; 54 | @property (readonly) NSString *year; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /PlexATV/Classes/NSArray-Shuffle.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray-Shuffle.m 3 | // Groovy 4 | // 5 | // Copyright (c) 2010, hackfrag 6 | // http://groovy.weasel-project.com 7 | // 8 | // All rights reserved. 9 | // 10 | // 11 | // Permission is hereby granted, free of charge, to any person 12 | // obtaining a copy of this software and associated documentation 13 | // files (the "Software"), to deal in the Software without 14 | // restriction except as noted below, including without limitation 15 | // the rights to use,copy, modify, merge, publish, distribute, 16 | // and/or sublicense, and to permit persons to whom the Software is 17 | // furnished to do so, subject to the following conditions: 18 | // 19 | // The Software and/or source code cannot be copied in whole and 20 | // sold without meaningful modification for a profit. 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // Redistributions of source code must retain the above copyright 26 | // notice, this list of conditions and the following disclaimer. 27 | // 28 | // Redistributions in binary form must reproduce the above copyright 29 | // notice, this list of conditions and the following disclaimer in 30 | // the documentation and/or other materials provided with 31 | // the distribution. 32 | // 33 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40 | // OTHER DEALINGS IN THE SOFTWARE. 41 | 42 | 43 | 44 | #import "NSArray-Shuffle.h" 45 | 46 | @implementation NSArray (Shuffle) 47 | - (NSArray*)shuffledArray { 48 | NSMutableArray *array = [NSMutableArray arrayWithCapacity:[self count]]; 49 | 50 | NSMutableArray *copy = [self mutableCopy]; 51 | while ([copy count] > 0) 52 | { 53 | int index = arc4random() % [copy count]; 54 | id objectToMove = [copy objectAtIndex:index]; 55 | [array addObject:objectToMove]; 56 | [copy removeObjectAtIndex:index]; 57 | } 58 | 59 | [copy release]; 60 | return array; 61 | } 62 | @end -------------------------------------------------------------------------------- /PlexATV/theos/include/BackRow/BRVoiceOverSpeechManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This header is generated by class-dump-z 0.2a. 3 | * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3. 4 | * 5 | * Source: /System/Library/PrivateFrameworks/BackRow.framework/BackRow 6 | */ 7 | 8 | // 9 | #import "BackRow-Structs.h" 10 | 11 | @class NSMutableArray, NSThread; 12 | @protocol VSSpeechHiddenProtocol; 13 | 14 | __attribute__( ( visibility("hidden") ) ) 15 | @interface BRVoiceOverSpeechManager : NSObject { 16 | @private 17 | NSMutableArray *_speechQueue; // 4 = 0x4 18 | NSObject *_synthesizer; // 8 = 0x8 19 | NSThread *_runThread; // 12 = 0xc 20 | BOOL _runLoopEnabled; // 16 = 0x10 21 | BOOL _didInitialize; // 17 = 0x11 22 | BOOL _isSpeaking; // 18 = 0x12 23 | } 24 | @property (readonly, assign) BOOL isSpeaking; // G=0x32e583f9; converted property 25 | @property (assign, nonatomic) float speechRate; // G=0x32e583b9; S=0x32e5931d; @dynamic 26 | + (URegularExpression*)createRegularExpressionFromString:(id)string; // 0x32e593e1 27 | + (id)matchedRangesForString:(id)string withRegularExpression:(URegularExpression*)regularExpression; // 0x32e59459 28 | - (id)init; // 0x32e58d89 29 | - (void)_clearSpeechQueue; // 0x32e5867d 30 | - (void)_continueSpeaking; // 0x32e58551 31 | - (void)_dispatchSpeechAction:(id)action; // 0x32e5869d 32 | - (void)_initialize; // 0x32e58f99 33 | - (void)_isSpeaking:(id)speaking; // 0x32e58461 34 | - (void)_pauseSpeaking; // 0x32e585ad 35 | - (id)_preprocessString:(id)string; // 0x32e587c1 36 | - (id)_processDurationStrings:(id)strings; // 0x32e590ed 37 | - (void)_setSpeechRate:(id)rate; // 0x32e58359 38 | - (void)_speechJobFinished:(BOOL)finished; // 0x32e58b49 39 | - (void)_startNextSpeechJob; // 0x32e58949 40 | - (void)_stopSpeaking; // 0x32e584f1 41 | - (void)clearSpeechQueue; // 0x32e58641 42 | - (void)continueSpeaking; // 0x32e58515 43 | - (void)dealloc; // 0x32e58cdd 44 | - (void)dispatchSpeechAction:(id)action; // 0x32e585d1 45 | // converted property getter: - (BOOL)isSpeaking; // 0x32e583f9 46 | - (void)pauseSpeaking; // 0x32e58571 47 | - (void)setMaintainConnection:(BOOL)connection; // 0x32e58c05 48 | // declared property setter: - (void)setSpeechRate:(float)rate; // 0x32e5931d 49 | // declared property getter: - (float)speechRate; // 0x32e583b9 50 | - (void)speechSynthesizer:(id)synthesizer didFinishSpeaking:(BOOL)speaking withError:(id)error; // 0x32e593b5 51 | - (void)stopSpeaking; // 0x32e584b5 52 | @end 53 | 54 | -------------------------------------------------------------------------------- /PlexATV/theos/templates/iphone/application.nic: -------------------------------------------------------------------------------- 1 | dir Resources 2 | file 16 Resources/Info.plist 3 | { 4 | CFBundleExecutable = "@@PROJECTNAME@@"; 5 | CFBundleIconFile = icon.png; 6 | CFBundleIdentifier = "@@PACKAGENAME@@"; 7 | CFBundleInfoDictionaryVersion = 6.0; 8 | CFBundlePackageType = APPL; 9 | CFBundleSignature = "????"; 10 | CFBundleSupportedPlatforms = ( 11 | iPhoneOS 12 | ); 13 | CFBundleVersion = 1.0; 14 | DTPlatformName = iphoneos; 15 | DTSDKName = iphoneos3.0; 16 | LSRequiresIPhoneOS = 1; 17 | MinimumOSVersion = 3.0; 18 | } 19 | file 8 RootViewController.mm 20 | #import "RootViewController.h" 21 | 22 | @implementation RootViewController 23 | - (void)loadView { 24 | self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; 25 | self.view.backgroundColor = [UIColor redColor]; 26 | } 27 | @end 28 | 29 | file 8 main.m 30 | int main(int argc, char **argv) { 31 | NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init]; 32 | int ret = UIApplicationMain(argc, argv, @"@@PROJECTNAME@@Application", @"@@PROJECTNAME@@Application"); 33 | [p drain]; 34 | return ret; 35 | } 36 | 37 | // vim:ft=objc 38 | 39 | file 25 @@PROJECTNAME@@Application.mm 40 | #import "RootViewController.h" 41 | 42 | @interface @@PROJECTNAME@@Application: UIApplication { 43 | UIWindow *_window; 44 | RootViewController *_viewController; 45 | } 46 | @property (nonatomic, retain) UIWindow *window; 47 | @end 48 | 49 | @implementation @@PROJECTNAME@@Application 50 | @synthesize window = _window; 51 | - (void)applicationDidFinishLaunching:(UIApplication *)application { 52 | _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 53 | _viewController = [[RootViewController alloc] init]; 54 | [_window addSubview:_viewController.view]; 55 | [_window makeKeyAndVisible]; 56 | } 57 | 58 | - (void)dealloc { 59 | [_window release]; 60 | [super dealloc]; 61 | } 62 | @end 63 | 64 | // vim:ft=objc 65 | 66 | file 3 RootViewController.h 67 | @interface RootViewController: UIViewController { 68 | } 69 | @end 70 | 71 | file 6 Makefile 72 | include theos/makefiles/common.mk 73 | 74 | APPLICATION_NAME = @@PROJECTNAME@@ 75 | @@PROJECTNAME@@_FILES = main.m @@PROJECTNAME@@Application.mm RootViewController.mm 76 | 77 | include $(FW_MAKEDIR)/application.mk 78 | 79 | file 9 control 80 | Package: @@PACKAGENAME@@ 81 | Name: @@FULLPROJECTNAME@@ 82 | Depends: 83 | Version: 0.0.1 84 | Architecture: iphoneos-arm 85 | Description: An awesome application! 86 | Maintainer: @@USER@@ 87 | Author: @@USER@@ 88 | Section: Utilities 89 | 90 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexSongListController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SongListController.h 3 | // Groovy 4 | // 5 | // Copyright (c) 2010, hackfrag 6 | // http://groovy.weasel-project.com 7 | // 8 | // All rights reserved. 9 | // 10 | // 11 | // Permission is hereby granted, free of charge, to any person 12 | // obtaining a copy of this software and associated documentation 13 | // files (the "Software"), to deal in the Software without 14 | // restriction except as noted below, including without limitation 15 | // the rights to use,copy, modify, merge, publish, distribute, 16 | // and/or sublicense, and to permit persons to whom the Software is 17 | // furnished to do so, subject to the following conditions: 18 | // 19 | // The Software and/or source code cannot be copied in whole and 20 | // sold without meaningful modification for a profit. 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // Redistributions of source code must retain the above copyright 26 | // notice, this list of conditions and the following disclaimer. 27 | // 28 | // Redistributions in binary form must reproduce the above copyright 29 | // notice, this list of conditions and the following disclaimer in 30 | // the documentation and/or other materials provided with 31 | // the distribution. 32 | // 33 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40 | // OTHER DEALINGS IN THE SOFTWARE. 41 | 42 | 43 | #import "NSArray-Shuffle.h" 44 | @class PlexMediaContainer; 45 | 46 | @interface PlexSongListController : BRMediaMenuController { 47 | PlexMediaContainer *rootContainer; 48 | NSArray *songs; 49 | } 50 | 51 | @property (nonatomic, retain) NSArray *songs; 52 | @property (nonatomic, retain) PlexMediaContainer *rootContainer; 53 | 54 | - (id)initWithPlexContainer:(PlexMediaContainer*)container title:(NSString*)title; 55 | - (void)convertDirToSongAssets:(NSArray*)plexDirectories; 56 | - (void)playAtIndex:(NSInteger)index withArray:(NSArray*)songList; 57 | 58 | - (float)heightForRow:(long)row; 59 | - (long)itemCount; 60 | - (id)itemForRow:(long)row; 61 | - (BOOL)rowSelectable:(long)selectable; 62 | - (id)titleForRow:(long)row; 63 | - (void)itemSelected:(long)selected; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ======== For libPLEX-OSS.a ======== 2 | This license applies to libPLEX-OSS.a and all included header files in include/ambertation-plex and include/plex-oss. 3 | 4 | Copyright (c) 2010 F. Bauer 5 | 6 | Redistribution and use of the libPLEX-OSS.a code or any derivative works are permitted provided that the following conditions are met: 7 | - Redistributions may not bea sold, nor may they be used in a commercial product or activity. 8 | - Redistributions must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | - It is not allowed to redistribute a modified version of the libPLEX-OSS.a 10 | - It is not allowed to use libPLEX-OSS.a in any product submitted to any App Store. 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | 13 | 14 | ======== For the ATV Plugin (Excluding libPLEX-OSS.a)======== 15 | The Plugin code itself is based on the sample code created 16 | from NitoTV: http://www.iclarified.com/entry/index.php?enid=12374. 17 | 18 | Permission is hereby granted, free of charge, to any person obtaining a copy 19 | of this software and associated documentation files (the "Software"), to deal 20 | in the Software without restriction, including without limitation the rights 21 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 22 | copies of the Software, and to permit persons to whom the Software is 23 | furnished to do so, subject to the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be included in 26 | all copies or substantial portions of the Software. 27 | 28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 29 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 30 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 31 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 32 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 33 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 34 | THE SOFTWARE. -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/rules.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_RULES_LOADED),) 2 | FW_RULES_LOADED := 1 3 | 4 | ifeq ($(FW_INSTANCE),) 5 | include $(FW_MAKEDIR)/master/rules.mk 6 | -include $(foreach mod,$(_FW_MODULES),$(FW_MODDIR)/$(mod)/master/rules.mk) 7 | else 8 | include $(FW_MAKEDIR)/instance/rules.mk 9 | -include $(foreach mod,$(_FW_MODULES),$(FW_MODDIR)/$(mod)/instance/rules.mk) 10 | endif 11 | 12 | ALL_CFLAGS = $(INTERNAL_CFLAGS) $(TARGET_CFLAGS) $(ADDITIONAL_CFLAGS) $(AUXILIARY_CFLAGS) $(DEBUG_CFLAGS) $(CFLAGS) 13 | ALL_CCFLAGS = $(ADDITIONAL_CCFLAGS) $(CCFLAGS) 14 | ALL_OBJCFLAGS = $(INTERNAL_OBJCFLAGS) $(TARGET_OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) $(AUXILIARY_OBJCFLAGS) $(DEBUG_CFLAGS) $(OBJCFLAGS) 15 | ALL_OBJCCFLAGS = $(ADDITIONAL_OBJCCFLAGS) $(OBJCCFLAGS) 16 | 17 | ALL_LDFLAGS = $(INTERNAL_LDFLAGS) $(ADDITIONAL_LDFLAGS) $(AUXILIARY_LDFLAGS) $(TARGET_LDFLAGS) $(DEBUG_LDFLAGS) $(LDFLAGS) 18 | 19 | ifeq ($(FW_MAKE_PARALLEL_BUILDING), no) 20 | .NOTPARALLEL: 21 | else 22 | ifneq ($(_FW_MAKE_PARALLEL), yes) 23 | .NOTPARALLEL: 24 | endif 25 | endif 26 | 27 | .SUFFIXES: 28 | 29 | .SUFFIXES: .m .mm .c .cc .cpp .xm 30 | 31 | $(FW_OBJ_DIR)/%.m.o: %.m 32 | $(ECHO_COMPILING)$(TARGET_CXX) -x objective-c -c $(ALL_CFLAGS) $(ALL_OBJCFLAGS) $< -o $@$(ECHO_END) 33 | 34 | $(FW_OBJ_DIR)/%.mm.o: %.mm 35 | $(ECHO_COMPILING)$(TARGET_CXX) -c $(ALL_CFLAGS) $(ALL_OBJCFLAGS) $(ALL_CCFLAGS) $(ALL_OBJCCFLAGS) $< -o $@$(ECHO_END) 36 | 37 | $(FW_OBJ_DIR)/%.c.o: %.c 38 | $(ECHO_COMPILING)$(TARGET_CXX) -x c -c $(ALL_CFLAGS) $< -o $@$(ECHO_END) 39 | 40 | $(FW_OBJ_DIR)/%.cc.o: %.cc 41 | $(ECHO_COMPILING)$(TARGET_CXX) -c $(ALL_CFLAGS) $(ALL_CCFLAGS) $< -o $@$(ECHO_END) 42 | 43 | $(FW_OBJ_DIR)/%.cpp.o: %.cpp 44 | $(ECHO_COMPILING)$(TARGET_CXX) -c $(ALL_CFLAGS) $(ALL_CCFLAGS) $< -o $@$(ECHO_END) 45 | 46 | $(FW_OBJ_DIR)/%.xm.o: %.xm 47 | $(ECHO_LOGOS)$(FW_BINDIR)/logos.pl $< > $(FW_OBJ_DIR)/$<.mm$(ECHO_END) 48 | $(ECHO_COMPILING)$(TARGET_CXX) -c -I"$(shell pwd)" $(ALL_CFLAGS) $(ALL_OBJCFLAGS) $(ALL_CCFLAGS) $(ALL_OBJCCFLAGS) $(FW_OBJ_DIR)/$<.mm -o $@$(ECHO_END) 49 | $(ECHO_NOTHING)rm $(FW_OBJ_DIR)/$<.mm$(ECHO_END) 50 | 51 | %.mm: %.l.mm 52 | $(FW_BINDIR)/logos.pl $< > $@ 53 | 54 | %.mm: %.xmm 55 | $(FW_BINDIR)/logos.pl $< > $@ 56 | 57 | %.mm: %.xm 58 | $(FW_BINDIR)/logos.pl $< > $@ 59 | 60 | %.m: %.xm 61 | $(FW_BINDIR)/logos.pl $< > $@ 62 | 63 | ifneq ($(FW_BUILD_DIR),.) 64 | $(FW_BUILD_DIR): 65 | @mkdir -p $(FW_BUILD_DIR) 66 | endif 67 | 68 | $(FW_OBJ_DIR): 69 | @cd $(FW_BUILD_DIR); mkdir -p $(FW_OBJ_DIR_NAME) 70 | 71 | $(FW_OBJ_DIR)/.stamp: $(FW_OBJ_DIR) 72 | @touch $@ 73 | 74 | $(FW_OBJ_DIR)/%/.stamp: $(FW_OBJ_DIR) 75 | @mkdir -p $(dir $@); touch $@ 76 | 77 | Makefile: ; 78 | framework/makefiles/*.mk: ; 79 | $(FW_MAKEDIR)/*.mk: ; 80 | $(FW_MAKEDIR)/master/*.mk: ; 81 | $(FW_MAKEDIR)/instance/*.mk: ; 82 | $(FW_MAKEDIR)/platform/*.mk: ; 83 | 84 | endif 85 | 86 | # TODO MAKE A BUNCH OF THINGS PHONY 87 | -include $(foreach mod,$(_FW_MODULES),$(FW_MODDIR)/$(mod)/rules.mk) 88 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/master/rules.mk: -------------------------------------------------------------------------------- 1 | .PHONY: all before-all internal-all after-all \ 2 | clean before-clean internal-clean after-clean 3 | ifeq ($(FW_BUILD_DIR),.) 4 | all:: before-all internal-all after-all 5 | else 6 | all:: $(FW_BUILD_DIR) before-all internal-all after-all 7 | endif 8 | 9 | clean:: before-clean internal-clean after-clean 10 | 11 | before-all:: 12 | ifneq ($(SYSROOT),) 13 | @[ -d "$(SYSROOT)" ] || { echo "Your current SYSROOT, \"$(SYSROOT)\", appears to be missing."; exit 1; } 14 | endif 15 | 16 | internal-all:: 17 | 18 | after-all:: 19 | 20 | before-clean:: 21 | 22 | internal-clean:: 23 | rm -rf $(FW_OBJ_DIR) 24 | ifeq ($(MAKELEVEL),0) 25 | rm -rf "$(FW_STAGING_DIR)" 26 | endif 27 | 28 | after-clean:: 29 | 30 | include $(FW_MAKEDIR)/package.mk 31 | 32 | ifeq ($(MAKELEVEL),0) 33 | ifneq ($(FW_BUILD_DIR),.) 34 | ABS_FW_BUILD_DIR = $(shell (unset CDPATH; cd "$(FW_BUILD_DIR)"; pwd)) 35 | else 36 | ABS_FW_BUILD_DIR = . 37 | endif 38 | else 39 | ABS_FW_BUILD_DIR = $(strip $(FW_BUILD_DIR)) 40 | endif 41 | 42 | ifeq ($(_FW_TOP_INVOCATION_DONE),) 43 | export _FW_TOP_INVOCATION_DONE = 1 44 | endif 45 | 46 | .PRECIOUS: %.variables %.subprojects 47 | 48 | %.variables: 49 | @ \ 50 | instance=$(basename $(basename $*)); \ 51 | operation=$(subst .,,$(suffix $(basename $*))); \ 52 | type=$(subst -,_,$(subst .,,$(suffix $*))); \ 53 | abs_build_dir=$(ABS_FW_BUILD_DIR); \ 54 | if [ "$($(basename $(basename $*))_SUBPROJECTS)" != "" ]; then \ 55 | echo Making $$operation in subprojects of $$type $$instance...; \ 56 | for d in $($(basename $(basename $*))_SUBPROJECTS); do \ 57 | if [ "$${abs_build_dir}" = "." ]; then \ 58 | lbuilddir="."; \ 59 | else \ 60 | lbuilddir="$${abs_build_dir}/$$d"; \ 61 | fi; \ 62 | if $(MAKE) -C $$d $(FW_NO_PRINT_DIRECTORY_FLAG) --no-keep-going $$operation \ 63 | FW_BUILD_DIR="$$lbuilddir" \ 64 | ; then\ 65 | :; \ 66 | else exit $$?; \ 67 | fi; \ 68 | done; \ 69 | fi; \ 70 | echo Making $$operation for $$type $$instance...; \ 71 | $(MAKE) --no-print-directory --no-keep-going \ 72 | internal-$${type}-$$operation \ 73 | FW_TYPE=$$type \ 74 | FW_INSTANCE=$$instance \ 75 | FW_OPERATION=$$operation \ 76 | FW_BUILD_DIR=$$abs_build_dir 77 | 78 | %.subprojects: 79 | @ \ 80 | instance=$(basename $(basename $*)); \ 81 | operation=$(subst .,,$(suffix $(basename $*))); \ 82 | type=$(subst -,_,$(subst .,,$(suffix $*))); \ 83 | abs_build_dir=$(ABS_FW_BUILD_DIR); \ 84 | if [ "$($(basename $(basename $*))_SUBPROJECTS)" != "" ]; then \ 85 | echo Making $$operation in subprojects of $$type $$instance...; \ 86 | for d in $($(basename $(basename $*))_SUBPROJECTS); do \ 87 | if [ "$${abs_build_dir}" = "." ]; then \ 88 | lbuilddir="."; \ 89 | else \ 90 | lbuilddir="$${abs_build_dir}/$$d"; \ 91 | fi; \ 92 | if $(MAKE) -C $$d $(FW_NO_PRINT_DIRECTORY_FLAG) --no-keep-going $$operation \ 93 | FW_BUILD_DIR="$$lbuilddir" \ 94 | ; then\ 95 | :; \ 96 | else exit $$?; \ 97 | fi; \ 98 | done; \ 99 | fi 100 | -------------------------------------------------------------------------------- /PlexATV/Classes/HWServerDetailsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWServerDetailsController.h 3 | // atvTwo 4 | // 5 | // Created by ccjensen on 02/02/2011. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | #import 12 | 13 | @interface HWServerDetailsController : SMFMediaMenuController { 14 | Machine *_machine; 15 | BRWaitPromptControl *waitPromptControl; 16 | SMFListDropShadowControl *listDropShadowControl; //popup 17 | 18 | //add new machine flags 19 | BOOL isCreatingNewMachine; 20 | BOOL hasCompletedAddNewMachineWithConnectionWizardStep1; //if completed proceed to step 2 21 | BOOL hasCompletedAddNewMachineWithConnectionWizardStep2; //if completed proceed to step 3 22 | 23 | //editing machine specific flags 24 | BOOL isEditingServerName; 25 | BOOL isEditingUserName; 26 | BOOL isEditingPassword; 27 | BOOL isDeletingMachine; 28 | 29 | //add new connection flags 30 | BOOL isCreatingNewConnection; 31 | BOOL hasCompletedAddNewConnectionWizardStep1; //if completed proceed to step 2 32 | 33 | //editing connection specific variables 34 | BOOL isDeletingConnection; 35 | MachineConnectionBase *_selectedConnection; 36 | 37 | NSString *_serverName; 38 | NSString *_userName; 39 | NSString *_password; 40 | NSString *_hostName; 41 | uint _portNumber; 42 | } 43 | @property (retain) Machine *machine; 44 | @property (copy) NSString *serverName; 45 | @property (copy) NSString *userName; 46 | @property (copy) NSString *password; 47 | @property (copy) NSString *hostName; 48 | @property (assign) uint portNumber; 49 | @property (retain) MachineConnectionBase *selectedConnection; 50 | 51 | //custom methods 52 | - (id)initAndShowAddNewMachineWizard; 53 | - (id)initWithMachine:(Machine*)machine; 54 | 55 | - (BOOL)isExcludedFromServerList; 56 | 57 | - (void)startAddNewMachineWizard; 58 | - (void)addNewMachineWizardWithInput:(NSString*)input; 59 | - (void)startAddNewConnectionWizard; 60 | - (void)addNewConnectionWizardWithInput:(NSString*)input; 61 | 62 | - (void)showEnterHostNameDialogBoxWithInitialText:(NSString*)initalText; 63 | - (void)showEnterPortNumberDialogBoxWithInitialText:(NSString*)initalText; 64 | - (void)showEnterServerNameDialogBoxWithInitialText:(NSString*)initalText; 65 | - (void)showEnterUsernameDialogBoxWithInitialText:(NSString*)initalText; 66 | - (void)showEnterPasswordDialogBoxWithInitialText:(NSString*)initalText; 67 | 68 | - (void)showDialogBoxWithTitle:(NSString*)title secondaryInfoText:(NSString*)infoText deviceTitle:(NSString*)deviceTitle deviceSecondaryInfoText:(NSString*)deviceInfoText textFieldLabel:(NSString*)textFieldLabel withInitialText:(NSString*)initialText usingSecureText:(BOOL)useSecureText; 69 | 70 | - (void)showEditConnectionViewForConnection:(MachineConnectionBase*)connection; 71 | 72 | - (NSString*)rightTextForRow:(long)row; 73 | //list provider 74 | - (float)heightForRow:(long)row; 75 | - (long)itemCount; 76 | - (id)itemForRow:(long)row; 77 | - (BOOL)rowSelectable:(long)selectable; 78 | - (id)titleForRow:(long)row; 79 | - (void)setNeedsUpdate; 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /PlexATV/theos/templates/iphone/preference_bundle.nic: -------------------------------------------------------------------------------- 1 | nic 1 2 | dir Resources 3 | file 28 Resources/Info.plist 4 | 5 | 6 | 7 | 8 | CFBundleDevelopmentRegion 9 | English 10 | CFBundleExecutable 11 | @@PROJECTNAME@@ 12 | CFBundleIdentifier 13 | @@PACKAGENAME@@ 14 | CFBundleInfoDictionaryVersion 15 | 6.0 16 | CFBundlePackageType 17 | BNDL 18 | CFBundleShortVersionString 19 | 1.0.0 20 | CFBundleSignature 21 | ???? 22 | CFBundleVersion 23 | 1.0 24 | DTPlatformName 25 | iphoneos 26 | MinimumOSVersion 27 | 3.0 28 | NSPrincipalClass 29 | @@PROJECTNAME@@ListController 30 | 31 | 32 | 33 | file 16 @@PROJECTNAME@@.mm 34 | #import 35 | 36 | @interface @@PROJECTNAME@@ListController: PSListController { 37 | } 38 | @end 39 | 40 | @implementation @@PROJECTNAME@@ListController 41 | - (id)specifiers { 42 | if(_specifiers == nil) { 43 | _specifiers = [[self loadSpecifiersFromPlistName:@"@@PROJECTNAME@@" target:self] retain]; 44 | } 45 | return _specifiers; 46 | } 47 | @end 48 | 49 | // vim:ft=objc 50 | 51 | file 10 entry.plist 52 | { 53 | entry = { 54 | bundle = @@PROJECTNAME@@; 55 | cell = PSLinkCell; 56 | detail = @@PROJECTNAME@@ListController; 57 | icon = @@PROJECTNAME@@.png; 58 | isController = 1; 59 | label = @@PROJECTNAME@@; 60 | }; 61 | } 62 | 63 | file 29 Resources/@@PROJECTNAME@@.plist 64 | 65 | 66 | 67 | 68 | items 69 | 70 | 71 | cell 72 | PSGroupCell 73 | label 74 | @@PROJECTNAME@@ First Page 75 | 76 | 77 | cell 78 | PSSwitchCell 79 | default 80 | 81 | defaults 82 | @@PACKAGENAME@@ 83 | key 84 | AwesomeSwitch1 85 | label 86 | Awesome Switch 1 87 | 88 | 89 | title 90 | @@PROJECTNAME@@ 91 | 92 | 93 | 94 | file 13 Makefile 95 | include theos/makefiles/common.mk 96 | 97 | BUNDLE_NAME = @@PROJECTNAME@@ 98 | @@PROJECTNAME@@_FILES = @@PROJECTNAME@@.mm 99 | @@PROJECTNAME@@_INSTALL_PATH = /Library/PreferenceBundles 100 | @@PROJECTNAME@@_FRAMEWORKS = UIKit 101 | @@PROJECTNAME@@_PRIVATE_FRAMEWORKS = PlexPrefs 102 | 103 | include $(FW_MAKEDIR)/bundle.mk 104 | 105 | internal-stage:: 106 | $(ECHO_NOTHING)mkdir -p $(FW_STAGING_DIR)/Library/PreferenceLoader/PlexPrefs$(ECHO_END) 107 | $(ECHO_NOTHING)cp entry.plist $(FW_STAGING_DIR)/Library/PreferenceLoader/PlexPrefs/@@PROJECTNAME@@.plist$(ECHO_END) 108 | 109 | -------------------------------------------------------------------------------- /PlexATV/Classes/Plex_SMFBookcaseController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Plex_SMFBookcaseController.h 3 | // SMFramework 4 | // 5 | // Created by Chris Jensen on 2/26/11. 6 | // 7 | 8 | #import 9 | #import "PlexMediaShelfView.h" 10 | 11 | @class Plex_SMFBookcaseController; 12 | /** 13 | *Datasource protocol for the Plex_SMFBookcaseController 14 | */ 15 | @protocol Plex_SMFBookcaseControllerDatasource 16 | /** 17 | *@param bookcaseController the bookcase asking for the header 18 | *@return a string containing the title for the controller 19 | */ 20 | - (NSString*)headerTitleForBookcaseController:(Plex_SMFBookcaseController*)bookcaseController; 21 | /** 22 | *@param bookcaseController the bookcase 23 | *@return the number of shelves on your bookcase 24 | */ 25 | - (NSInteger)numberOfShelfsInBookcaseController:(Plex_SMFBookcaseController*)bookcaseController; 26 | /** 27 | *@param bookcaseController the bookcase 28 | *@param index the index of the shelf for which to return a datastore provider 29 | *@return the datastoreprovider with the posters 30 | * 31 | */ 32 | - (BRPhotoDataStoreProvider*)bookcaseController:(Plex_SMFBookcaseController*)bookcaseController datastoreProviderForShelfAtIndex:(NSInteger)index; 33 | @optional 34 | /** 35 | *@param bookcaseController the bookcase 36 | *@return an image to be displayed in the top right corner 37 | */ 38 | - (BRImage*)headerIconForBookcaseController:(Plex_SMFBookcaseController*)bookcaseController; 39 | /** 40 | *@param bookcaseController the bookcase 41 | *@param index the index of the shelf for which to return a title 42 | *@return the title for the shelf at index: index 43 | */ 44 | - (NSString*)bookcaseController:(Plex_SMFBookcaseController*)bookcaseController titleForShelfAtIndex:(NSInteger)index; 45 | @end 46 | 47 | @protocol Plex_SMFBookcaseControllerDelegate 48 | - (BOOL)bookcaseController:(Plex_SMFBookcaseController*)bookcaseController allowSelectionForShelf:(PlexMediaShelfView*)shelfControl atIndex:(NSInteger)index; 49 | @optional 50 | - (void)bookcaseController:(Plex_SMFBookcaseController*)bookcaseController selectionWillOccurInShelf:(PlexMediaShelfView*)shelfControl atIndex:(NSInteger)index; 51 | - (void)bookcaseController:(Plex_SMFBookcaseController*)bookcaseController selectionDidOccurInShelf:(PlexMediaShelfView*)shelfControl atIndex:(NSInteger)index; 52 | - (void)bookcaseController:(Plex_SMFBookcaseController*)bookcaseController shelf:(PlexMediaShelfView*)shelfControl noLongerFocusedAtIndex:(NSInteger)index; 53 | - (void)bookcaseController:(Plex_SMFBookcaseController*)bookcaseController shelf:(PlexMediaShelfView*)shelfControl focusedAtIndex:(NSInteger)index; 54 | @end 55 | 56 | @interface Plex_SMFBookcaseController : BRController { 57 | NSObject *datasource; 58 | NSObject *delegate; 59 | 60 | @private 61 | //datasource variables 62 | NSInteger numberOfShelfControls; 63 | NSMutableArray *_shelfTitles; 64 | 65 | //delegate variables 66 | int focusedShelfIndex; 67 | PlexMediaShelfView *focusedShelf; 68 | 69 | //ui controls 70 | NSMutableArray *_shelfControls; 71 | BRPanelControl *_panelControl; 72 | } 73 | @property (retain) NSObject *datasource; 74 | @property (retain) NSObject *delegate; 75 | - (void)rebuildBookcase; 76 | - (void)refreshShelves; 77 | - (void)refreshShelfAtIndex:(NSInteger)index; 78 | 79 | @end 80 | 81 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/package.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(FW_PACKAGING_RULES_LOADED),) 2 | FW_PACKAGING_RULES_LOADED := 1 3 | 4 | .PHONY: package before-package internal-package after-package-buildno after-package \ 5 | stage before-stage internal-stage after-stage 6 | 7 | # For the toplevel invocation of make, mark 'all' and the *-package rules as prerequisites. 8 | # We do not do this for anything else, because otherwise, all the packaging rules would run for every subproject. 9 | ifeq ($(_FW_TOP_INVOCATION_DONE),) 10 | stage:: all before-stage internal-stage after-stage 11 | 12 | _FW_HAS_DPKG_DEB := $(shell type dpkg-deb > /dev/null 2>&1 && echo 1 || echo 0) 13 | ifeq ($(_FW_HAS_DPKG_DEB),1) 14 | package:: stage package-build-deb 15 | else # _FW_HAS_DPKG_DEB == 0 16 | package:: 17 | @echo "$(MAKE) package requires dpkg-deb."; exit 1 18 | endif 19 | 20 | install:: before-install internal-install after-install 21 | else # _FW_TOP_INVOCATION_DONE 22 | stage:: internal-stage 23 | package:: 24 | install:: 25 | endif 26 | 27 | FAKEROOT := $(FW_BINDIR)/fakeroot.sh -p "$(FW_PROJECT_DIR)/.debmake/fakeroot" 28 | export FAKEROOT 29 | 30 | # Only do the master packaging rules if we're the toplevel make invocation. 31 | ifeq ($(_FW_TOP_INVOCATION_DONE),) 32 | before-stage:: 33 | $(ECHO_NOTHING)rm -rf "$(FW_STAGING_DIR)"$(ECHO_END) 34 | $(ECHO_NOTHING)$(FAKEROOT) -c$(ECHO_END) 35 | $(ECHO_NOTHING)mkdir -p "$(FW_STAGING_DIR)"$(ECHO_END) 36 | 37 | ifeq ($(FW_CAN_PACKAGE),1) # Control file found (or layout/ found.) 38 | 39 | FW_PACKAGE_NAME := $(shell grep "^Package:" "$(FW_PACKAGE_CONTROL_PATH)" | cut -d' ' -f2) 40 | FW_PACKAGE_ARCH := $(shell grep "^Architecture:" "$(FW_PACKAGE_CONTROL_PATH)" | cut -d' ' -f2) 41 | FW_PACKAGE_VERSION := $(shell grep "^Version:" "$(FW_PACKAGE_CONTROL_PATH)" | cut -d' ' -f2) 42 | 43 | FW_PACKAGE_DEBVERSION = $(shell grep "^Version:" "$(FW_STAGING_DIR)/DEBIAN/control" | cut -d' ' -f2) 44 | 45 | FW_PACKAGE_FILENAME = $(FW_PACKAGE_NAME)_$(FW_PACKAGE_DEBVERSION)_$(FW_PACKAGE_ARCH) 46 | 47 | package-build-deb-buildno:: 48 | $(ECHO_NOTHING)mkdir -p $(FW_STAGING_DIR)/DEBIAN$(ECHO_END) 49 | ifeq ($(FW_HAS_LAYOUT),1) # If we have a layout/ directory, copy layout/DEBIAN to the staging directory. 50 | $(ECHO_NOTHING)rsync -a "$(FW_PROJECT_DIR)/layout/DEBIAN/" "$(FW_STAGING_DIR)/DEBIAN" $(FW_RSYNC_EXCLUDES)$(ECHO_END) 51 | endif # FW_HAS_LAYOUT 52 | $(ECHO_NOTHING)$(FW_BINDIR)/package_version.sh -c "$(FW_PACKAGE_CONTROL_PATH)" $(if $(PACKAGE_BUILDNAME),-e $(PACKAGE_BUILDNAME),) > "$(FW_STAGING_DIR)/DEBIAN/control"$(ECHO_END) 53 | $(ECHO_NOTHING)echo "Installed-Size: $(shell du $(DU_EXCLUDE) DEBIAN -ks "$(FW_STAGING_DIR)" | cut -f 1)" >> "$(FW_STAGING_DIR)/DEBIAN/control"$(ECHO_END) 54 | 55 | package-build-deb:: package-build-deb-buildno 56 | $(ECHO_NOTHING)$(FAKEROOT) -r dpkg-deb -b "$(FW_STAGING_DIR)" "$(FW_PROJECT_DIR)/$(FW_PACKAGE_FILENAME).deb" $(STDERR_NULL_REDIRECT)$(ECHO_END) 57 | 58 | else # FW_CAN_PACKAGE == 0 59 | package-build-deb:: 60 | @echo "$(MAKE) package requires you to have a layout/ directory in the project root, containing the basic package structure, or a control file in the project root describing the package."; exit 1 61 | 62 | endif # FW_CAN_PACKAGE 63 | 64 | endif # _FW_TOP_INVOCATION_DONE 65 | 66 | # *-stage calls *-package for backwards-compatibility. 67 | internal-package after-package:: 68 | internal-stage:: internal-package 69 | $(ECHO_NOTHING)[ -d layout ] && rsync -a "layout/" "$(FW_STAGING_DIR)" --exclude "DEBIAN" $(FW_RSYNC_EXCLUDES) || true$(ECHO_END) 70 | 71 | after-stage:: after-package 72 | 73 | before-install:: 74 | after-install:: internal-after-install 75 | internal-after-install:: 76 | 77 | endif # FW_PACKAGING_RULES_LOADED 78 | -------------------------------------------------------------------------------- /PlexATV/theos/include/nlist.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 1991, 1993 3 | * The Regents of the University of California. All rights reserved. 4 | * (c) UNIX System Laboratories, Inc. 5 | * All or some portions of this file are derived from material licensed 6 | * to the University of California by American Telephone and Telegraph 7 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 | * the permission of UNIX System Laboratories, Inc. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions 12 | * are met: 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 3. All advertising materials mentioning features or use of this software 19 | * must display the following acknowledgement: 20 | * This product includes software developed by the University of 21 | * California, Berkeley and its contributors. 22 | * 4. Neither the name of the University nor the names of its contributors 23 | * may be used to endorse or promote products derived from this software 24 | * without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 | * SUCH DAMAGE. 37 | * 38 | * @(#)nlist.h 8.2 (Berkeley) 1/21/94 39 | */ 40 | 41 | #ifndef _NLIST_H_ 42 | #define _NLIST_H_ 43 | 44 | /* 45 | * Symbol table entry format. The #ifdef's are so that programs including 46 | * nlist.h can initialize nlist structures statically. 47 | */ 48 | struct nlist { 49 | #ifdef _AOUT_INCLUDE_ 50 | union { 51 | char *n_name; /* symbol name (in memory) */ 52 | long n_strx; /* file string table offset (on disk) */ 53 | } n_un; 54 | #else 55 | char *n_name; /* symbol name (in memory) */ 56 | #endif 57 | 58 | #define N_UNDF 0x00 /* undefined */ 59 | #define N_ABS 0x02 /* absolute address */ 60 | #define N_TEXT 0x04 /* text segment */ 61 | #define N_DATA 0x06 /* data segment */ 62 | #define N_BSS 0x08 /* bss segment */ 63 | #define N_COMM 0x12 /* common reference */ 64 | #define N_FN 0x1e /* file name */ 65 | 66 | #define N_EXT 0x01 /* external (global) bit, OR'ed in */ 67 | #define N_TYPE 0x1e /* mask for all the type bits */ 68 | unsigned char n_type; /* type defines */ 69 | 70 | char n_other; /* spare */ 71 | #define n_hash n_desc /* used internally by ld(1); XXX */ 72 | short n_desc; /* used by stab entries */ 73 | unsigned long n_value; /* address/value of the symbol */ 74 | }; 75 | 76 | #define N_FORMAT "%08x" /* namelist value format; XXX */ 77 | #define N_STAB 0x0e0 /* mask for debugger symbols -- stab(5) */ 78 | 79 | #include 80 | 81 | __BEGIN_DECLS 82 | int nlist(const char*, struct nlist*); 83 | __END_DECLS 84 | 85 | #endif /* !_NLIST_H_ */ 86 | -------------------------------------------------------------------------------- /PlexATV/theos/makefiles/instance/rules.mk: -------------------------------------------------------------------------------- 1 | .PHONY: before-$(FW_INSTANCE)-all after-$(FW_INSTANCE)-all internal-$(FW_TYPE)-all \ 2 | before-$(FW_INSTANCE)-stage after-$(FW_INSTANCE)-stage internal-$(FW_TYPE)-stage 3 | 4 | OBJ_FILES = $(strip $(patsubst %,%.o,$($(FW_INSTANCE)_FILES) $($(FW_INSTANCE)_OBJCC_FILES) $($(FW_INSTANCE)_LOGOS_FILES) $($(FW_INSTANCE)_OBJC_FILES) $($(FW_INSTANCE)_CC_FILES) $($(FW_INSTANCE)_C_FILES))) 5 | 6 | _OBJC_FILE_COUNT = $(words $(filter %.m.o %.mm.o %.xm.o,$(OBJ_FILES))) 7 | _OBJCC_FILE_COUNT = $(words $(filter %.mm.o %.xm.o,$(OBJ_FILES))) 8 | 9 | ifneq ($($(FW_INSTANCE)_SUBPROJECTS),) 10 | SUBPROJECT_OBJ_FILES = $(foreach d, $($(FW_INSTANCE)_SUBPROJECTS), $(FW_BUILD_DIR)/$(d)/$(FW_OBJ_DIR_NAME)/$(FW_SUBPROJECT_PRODUCT)) 11 | #SUBPROJECT_OBJ_FILES = $(addsuffix /$(FW_OBJ_DIR_NAME)/$(FW_SUBPROJECT_PRODUCT), $(addprefix $(FW_BUILD_DIR)/,$($(FW_INSTANCE)_SUBPROJECTS))) 12 | SUBPROJECT_LDFLAGS = $(shell sort $(foreach d, $($(FW_INSTANCE)_SUBPROJECTS), $(FW_BUILD_DIR)/$(d)/$(FW_OBJ_DIR_NAME)/ldflags) | uniq) 13 | AUXILIARY_LDFLAGS += $(SUBPROJECT_LDFLAGS) 14 | endif 15 | 16 | OBJ_FILES_TO_LINK = $(strip $(addprefix $(FW_OBJ_DIR)/,$(OBJ_FILES)) $($(FW_INSTANCE)_OBJ_FILES) $(SUBPROJECT_OBJ_FILES)) 17 | _OBJ_DIR_STAMPS = $(sort $(foreach o,$(filter $(FW_OBJ_DIR)%,$(OBJ_FILES_TO_LINK)),$(dir $o).stamp)) 18 | 19 | ADDITIONAL_CPPFLAGS += $($(FW_INSTANCE)_CPPFLAGS) 20 | ADDITIONAL_CFLAGS += $($(FW_INSTANCE)_CFLAGS) 21 | ADDITIONAL_OBJCFLAGS += $($(FW_INSTANCE)_OBJCFLAGS) 22 | ADDITIONAL_CCFLAGS += $($(FW_INSTANCE)_CCFLAGS) 23 | ADDITIONAL_OBJCCFLAGS += $($(FW_INSTANCE)_OBJCCFLAGS) 24 | ADDITIONAL_LDFLAGS += $($(FW_INSTANCE)_LDFLAGS) 25 | 26 | # If we have any Objective-C objects, link Foundation and libobjc. 27 | ifneq ($(_OBJC_FILE_COUNT),0) 28 | AUXILIARY_LDFLAGS += -lobjc -framework Foundation -framework CoreFoundation 29 | endif 30 | 31 | # In addition, if we have any Objective-C++, add the ObjC++ linker flags. 32 | ifneq ($(_OBJCC_FILE_COUNT),0) 33 | AUXILIARY_LDFLAGS += -ObjC++ -fobjc-exceptions -fobjc-call-cxx-cdtors 34 | endif 35 | 36 | # Add all frameworks from the type and instance. 37 | AUXILIARY_LDFLAGS += $(foreach framework,$($(FW_TYPE)_FRAMEWORKS),-framework $(framework)) 38 | AUXILIARY_LDFLAGS += $(foreach framework,$($(FW_INSTANCE)_FRAMEWORKS),-framework $(framework)) 39 | 40 | # Add all private frameworks from the type and instance, as well as -F for the private framework dir. 41 | ifneq ($(words $($(FW_TYPE)_PRIVATE_FRAMEWORKS)$($(FW_INSTANCE)_PRIVATE_FRAMEWORKS)),0) 42 | AUXILIARY_OBJCFLAGS += -F/System/Library/PrivateFrameworks 43 | AUXILIARY_LDFLAGS += -F/System/Library/PrivateFrameworks 44 | endif 45 | 46 | AUXILIARY_LDFLAGS += $(foreach framework,$($(FW_TYPE)_PRIVATE_FRAMEWORKS),-framework $(framework)) 47 | AUXILIARY_LDFLAGS += $(foreach framework,$($(FW_INSTANCE)_PRIVATE_FRAMEWORKS),-framework $(framework)) 48 | 49 | before-$(FW_INSTANCE)-all:: 50 | 51 | after-$(FW_INSTANCE)-all:: 52 | 53 | internal-$(FW_TYPE)-all:: before-$(FW_INSTANCE)-all internal-$(FW_TYPE)-all_ after-$(FW_INSTANCE)-all 54 | 55 | before-$(FW_INSTANCE)-stage:: 56 | 57 | after-$(FW_INSTANCE)-stage:: 58 | 59 | internal-$(FW_TYPE)-stage:: before-$(FW_INSTANCE)-stage internal-$(FW_TYPE)-stage_ after-$(FW_INSTANCE)-stage 60 | 61 | define _FW_TEMPLATE_DEFAULT_LINKING_RULE 62 | $$(FW_OBJ_DIR)/$(1): $$(OBJ_FILES_TO_LINK) 63 | ifeq ($$(OBJ_FILES_TO_LINK),) 64 | $$(WARNING_EMPTY_LINKING) 65 | endif 66 | $$(ECHO_LINKING)$$(TARGET_CXX) $$(ALL_LDFLAGS) -o $$@ $$^$$(ECHO_END) 67 | ifeq ($$(DEBUG),) 68 | $$(ECHO_STRIPPING)$$(TARGET_STRIP) $$(TARGET_STRIP_FLAGS) $$@$$(ECHO_END) 69 | endif 70 | ifneq ($$(FW_CODESIGN_COMMANDLINE),) 71 | $$(ECHO_SIGNING)$$(FW_CODESIGN_COMMANDLINE) $$@$$(ECHO_END) 72 | endif 73 | endef 74 | 75 | define _FW_TEMPLATE_NOWARNING_LINKING_RULE 76 | $$(FW_OBJ_DIR)/$(1): $$(OBJ_FILES_TO_LINK) 77 | $$(ECHO_LINKING)$$(TARGET_CXX) $$(ALL_LDFLAGS) -o $$@ $$^$$(ECHO_END) 78 | ifeq ($$(DEBUG),) 79 | $$(ECHO_STRIPPING)$$(TARGET_STRIP) $$(TARGET_STRIP_FLAGS) $$@$$(ECHO_END) 80 | endif 81 | ifneq ($$(FW_CODESIGN_COMMANDLINE),) 82 | $$(ECHO_SIGNING)$$(FW_CODESIGN_COMMANDLINE) $$@$$(ECHO_END) 83 | endif 84 | endef 85 | -------------------------------------------------------------------------------- /PlexATV/Classes/PlexChannelsController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlexChannelsController.m 3 | // plex 4 | // 5 | // Created by ccjensen on 13/04/2011. 6 | // 7 | 8 | #import "PlexChannelsController.h" 9 | #import "Constants.h" 10 | #import 11 | #import "PlexMediaObject+Assets.h" 12 | #import "HWUserDefaults.h" 13 | #import "HWPlexDir.h" 14 | 15 | #define LOCAL_DEBUG_ENABLED 1 16 | 17 | @implementation PlexChannelsController 18 | @synthesize rootContainer; 19 | 20 | 21 | #pragma mark - 22 | #pragma mark Object/Class Lifecycle 23 | - (id)init { 24 | if( (self = [super init]) != nil ) { 25 | [self setListTitle:@"PLEX"]; 26 | 27 | NSString *settingsPng = [[NSBundle bundleForClass:[PlexChannelsController class]] pathForResource:@"PlexIcon" ofType:@"png"]; 28 | BRImage *sp = [BRImage imageWithPath:settingsPng]; 29 | 30 | [self setListIcon:sp horizontalOffset:0.0 kerningFactor:0.15]; 31 | 32 | rootContainer = nil; 33 | [[self list] setDatasource:self]; 34 | return (self); 35 | 36 | } 37 | 38 | return (self); 39 | } 40 | 41 | - (id)initWithRootContainer:(PlexMediaContainer*)container { 42 | self = [self init]; 43 | self.rootContainer = container; 44 | DLog(@"rootCont: %@", self.rootContainer); 45 | return self; 46 | } 47 | 48 | - (void)log:(NSNotificationCenter*)note { 49 | DLog(@"note = %@", note); 50 | } 51 | 52 | - (void)dealloc { 53 | DLog(@"deallocing HWPlexDir"); 54 | [playbackItem release]; 55 | [rootContainer release]; 56 | 57 | [super dealloc]; 58 | } 59 | 60 | 61 | #pragma mark - 62 | #pragma mark Controller Lifecycle behaviour 63 | - (void)wasPushed { 64 | [[MachineManager sharedMachineManager] setMachineStateMonitorPriority:NO]; 65 | [super wasPushed]; 66 | } 67 | 68 | - (void)wasPopped { 69 | [super wasPopped]; 70 | } 71 | 72 | - (void)wasExhumed { 73 | [[MachineManager sharedMachineManager] setMachineStateMonitorPriority:NO]; 74 | [self.list reload]; 75 | [super wasExhumed]; 76 | } 77 | 78 | - (void)wasBuried { 79 | [super wasBuried]; 80 | } 81 | 82 | - (id)previewControlForItem:(long)item { 83 | PlexMediaObject *pmo = [rootContainer.directories objectAtIndex:item]; 84 | return pmo.previewControl; 85 | } 86 | 87 | #define ModifyViewStatusOptionDialog @"ModifyViewStatusOptionDialog" 88 | 89 | - (void)itemSelected:(long)selected; { 90 | PlexMediaObject *pmo = [rootContainer.directories objectAtIndex:selected]; 91 | PlexMediaContainer *channel = [pmo.request query:[pmo.attributes valueForKey:@"path"] callingObject:nil ignorePresets:YES timeout:20 cachePolicy:NSURLRequestUseProtocolCachePolicy]; 92 | 93 | HWPlexDir *menuController = [[HWPlexDir alloc] initWithRootContainer:channel andTabBar:nil]; 94 | [[[BRApplicationStackManager singleton] stack] pushController:menuController]; 95 | 96 | [menuController release]; 97 | } 98 | 99 | 100 | - (float)heightForRow:(long)row { 101 | return 0.0f; 102 | } 103 | 104 | - (long)itemCount { 105 | return [rootContainer.directories count]; 106 | } 107 | 108 | - (id)itemForRow:(long)row { 109 | if(row > [rootContainer.directories count]) 110 | return nil; 111 | 112 | PlexMediaObject *pmo = [rootContainer.directories objectAtIndex:row]; 113 | BRMenuItem *menuItem = [[BRMenuItem alloc] init]; 114 | 115 | NSString *menuItemText = nil; 116 | NSString *path = [pmo.attributes valueForKey:@"path"]; 117 | 118 | if ([path hasSuffix:@"iTunes"]) { 119 | NSString *type = nil; 120 | if ([path hasPrefix:@"/video"]) { 121 | type = @"video"; 122 | } else { 123 | type = @"music"; 124 | } 125 | menuItemText = [NSString stringWithFormat:@"%@ (%@)", [pmo name], type]; 126 | } else { 127 | menuItemText = [pmo name]; 128 | } 129 | 130 | [menuItem setText:menuItemText withAttributes:[[BRThemeInfo sharedTheme] menuItemTextAttributes]]; 131 | [menuItem addAccessoryOfType:1]; 132 | return [menuItem autorelease]; 133 | } 134 | 135 | - (BOOL)rowSelectable:(long)selectable { 136 | return TRUE; 137 | } 138 | 139 | - (id)titleForRow:(long)row { 140 | PlexMediaObject *pmo = [rootContainer.directories objectAtIndex:row]; 141 | return pmo.name; 142 | } 143 | 144 | @end -------------------------------------------------------------------------------- /PlexATV/theos/include/BackRow/BRVoiceOver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This header is generated by class-dump-z 0.2a. 3 | * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3. 4 | * 5 | * Source: /System/Library/PrivateFrameworks/BackRow.framework/BackRow 6 | */ 7 | 8 | #import "BRSingleton.h" 9 | 10 | @class NSArray, NSMutableArray, NSString, NSTimer, BRVoiceOverSpeechManager, NSDictionary; 11 | 12 | @interface BRVoiceOver : BRSingleton { 13 | @private 14 | NSTimer *_focusChangeTimer; // 4 = 0x4 15 | NSTimer *_screenContentTimer; // 8 = 0x8 16 | NSDictionary *_languageToLocale; // 12 = 0xc 17 | NSMutableArray *_focusChain; // 16 = 0x10 18 | BRVoiceOverSpeechManager *_speechManager; // 20 = 0x14 19 | BOOL _isEnabled; // 24 = 0x18 20 | BOOL *_handleFocusChangeCancel; // 28 = 0x1c 21 | int _speechRate; // 32 = 0x20 22 | BOOL _inRereadMode; // 36 = 0x24 23 | id _focusChangeObserver; // 40 = 0x28 24 | id _noFocusChangeObserver; // 44 = 0x2c 25 | NSDictionary *_phoneticsTable; // 48 = 0x30 26 | int _lastEvent; // 52 = 0x34 27 | id _lastFocusedElement; // 56 = 0x38 28 | NSString *_previousContainerString; // 60 = 0x3c 29 | NSMutableArray *_previousContainerStrings; // 64 = 0x40 30 | NSString *_previousSecondaryScreenInfo; // 68 = 0x44 31 | NSString *_previousContextChangeString; // 72 = 0x48 32 | NSArray *_previousElementTraits; // 76 = 0x4c 33 | NSString *_previousTextFieldValue; // 80 = 0x50 34 | NSString *_initialText; // 84 = 0x54 35 | id _initialTextControl; // 88 = 0x58 36 | } 37 | @property (assign, nonatomic) BOOL isEnabled; // G=0x32e55429; S=0x32e560f1; @synthesize=_isEnabled 38 | @property (assign, nonatomic) int speechRate; // G=0x32e563a1; S=0x32e5631d; @synthesize=_speechRate 39 | + (BOOL)isEnabled; // 0x32e55401 40 | + (void)setSingleton:(id)singleton; // 0x32e5541d 41 | + (id)singleton; // 0x32e55411 42 | - (id)init; // 0x32e56d3d 43 | - (void)_chapterMarkersHidden:(id)hidden; // 0x32e564e9 44 | - (void)_chapterMarkersShown:(id)shown; // 0x32e56525 45 | - (void)_clearCachedElementInformation; // 0x32e55cb5 46 | - (void)_coalesceHandleFocusChange:(id)change; // 0x32e55779 47 | - (void)_contextDidChange:(id)_context; // 0x32e55695 48 | - (id)_determineAccessibilityLanguage:(id)language; // 0x32e55a6d 49 | - (id)_determineControlTraits:(id)traits; // 0x32e57075 50 | - (id)_determineKeyboardType:(id)type; // 0x32e55ad5 51 | - (id)_determineScreenChangeLabel:(id)label; // 0x32e5728d 52 | - (id)_determineScreenSecondaryInfo:(id)info; // 0x32e55e45 53 | - (id)_determineTextFieldData:(id)data; // 0x32e55e9d 54 | - (id)_focusChain:(id)chain; // 0x32e55439 55 | - (void)_handleFocusChange:(id)change; // 0x32e576a9 56 | - (id)_handleFocusChangeSpecialCases:(id)cases; // 0x32e5701d 57 | - (void)_handleFocusDidNotChange:(id)_handleFocus; // 0x32e55a0d 58 | - (void)_handleRereadMode; // 0x32e55629 59 | - (void)_handleScreenContentOutput:(id)output; // 0x32e55d65 60 | - (void)_initialize; // 0x32e569cd 61 | - (void)_languageChanged:(id)changed; // 0x32e56619 62 | - (id)_makeFocusChain:(id)chain; // 0x32e56095 63 | - (void)_mediaContentSkipped:(id)skipped; // 0x32e56561 64 | - (void)_mediaPlaybackStarted:(id)started; // 0x32e55c85 65 | - (void)_outputControl:(id)control; // 0x32e57895 66 | - (id)_phoneticLetterForControl:(id)control; // 0x32e55b81 67 | - (id)_replacePasswordBullets:(id)bullets; // 0x32e56f15 68 | - (void)_startSpeechManager; // 0x32e568f5 69 | - (void)_tearDown; // 0x32e566d9 70 | - (void)_updateFocusChain:(id)chain; // 0x32e55c2d 71 | - (void)_updateFocusedElement:(id)element; // 0x32e55a2d 72 | - (void)_updateSpeechRate; // 0x32e563e1 73 | - (void)dealloc; // 0x32e56659 74 | - (void)dispatchSpeechJob:(id)job shouldQueue:(BOOL)queue; // 0x32e57749 75 | - (BOOL)handleEventAction:(id)action; // 0x32e5640d 76 | // declared property getter: - (BOOL)isEnabled; // 0x32e55429 77 | - (void)setInitialText:(id)text forControl:(id)control; // 0x32e55549 78 | // declared property setter: - (void)setIsEnabled:(BOOL)enabled; // 0x32e560f1 79 | // declared property setter: - (void)setSpeechRate:(int)rate; // 0x32e5631d 80 | - (void)speakGreetingMessage; // 0x32e5629d 81 | - (void)speakString:(id)string; // 0x32e554ed 82 | // declared property getter: - (int)speechRate; // 0x32e563a1 83 | - (void)textChanged:(id)changed; // 0x32e57ed1 84 | - (void)updateStatus; // 0x32e56941 85 | @end 86 | 87 | -------------------------------------------------------------------------------- /PlexATV/Classes/Constants.h: -------------------------------------------------------------------------------- 1 | 2 | #define PreferencesDomain @"com.plex.client-plugin" 3 | 4 | 5 | #define PreferencesMachinesExcludedFromServerList @"PreferencesMachinesExcludedFromServerList" 6 | 7 | #define PreferencesViewTypeForTvShows @"PreferencesViewTypeForTvShows" 8 | #define PreferencesViewTypeForMovies @"PreferencesViewTypeForMovies" 9 | 10 | #define PreferencesViewThemeMusicEnabled @"PreferencesViewThemeMusicEnabled" 11 | #define PreferencesViewThemeMusicLoopEnabled @"PreferencesViewThemeMusicLoopEnabled" 12 | #define PreferencesViewListPosterZoomingEnabled @"PreferencesViewListPosterZoomingEnabled" 13 | #define PreferencesViewPreplayFanartEnabled @"PreferencesViewPreplayFanartEnabled" 14 | #define PreferencesViewHiddenSummary @"PreferencesViewHiddenSummary" 15 | 16 | #define PreferencesPlaybackAudioAC3Enabled @"PreferencesPlaybackAudioAC3Enabled" 17 | #define PreferencesPlaybackAudioDTSEnabled @"PreferencesPlaybackAudioDTSEnabled" 18 | #define PreferencesPlaybackVideoQualityProfile @"PreferencesPlaybackVideoQualityProfile" 19 | 20 | #define PreferencesSecuritySettingsLockEnabled @"PreferencesSecuritySettingsLockEnabled" 21 | #define PreferencesSecurityPasscode @"PreferencesSecurityPasscode" 22 | 23 | 24 | 25 | 26 | #define PersistedTabBarLastSelections @"PersistedTabBarLastSelections" 27 | 28 | 29 | 30 | #define TabBarCurrentItemsIdentifier @"current" 31 | #define TabBarCurrentItemsIndex 0 32 | #define TabBarUnwatchedItemsIdentifier @"unwatched" 33 | #define TabBarUnwatchedItemsIndex 1 34 | #define TabBarOtherFiltersItemsIdentifier @"otherfilters" 35 | #define TabBarOtherFiltersItemsIndex 2 36 | 37 | 38 | //additional keyboard commands 39 | #define kBREventRemoteActionPlayPause2 16 40 | 41 | typedef enum { 42 | kATVPlexViewTypeList = 0, 43 | kATVPlexViewTypeGrid, 44 | kATVPlexViewTypeBookcase, 45 | FINAL_kATVPlexViewTypeBookcase_MAX 46 | } ATVPlexViewTypes; 47 | 48 | 49 | typedef enum { 50 | kATVPlexTabBarLastSelectionAll = 0, 51 | kATVPlexTabBarLastSelectionUnwatched, 52 | FINAL_kATVPlexTabBarLastSelection_MAX 53 | } ATVPlexTabBarLastSelection; 54 | 55 | 56 | typedef enum { 57 | kBRMediaPlayerStateStopped = 0, 58 | kBRMediaPlayerStatePaused = 1, 59 | kBRMediaPlayerStateSkipping = 2, 60 | kBRMediaPlayerStatePlaying = 3, 61 | kBRMediaPlayerStateForwardSeeking = 4, 62 | kBRMediaPlayerStateForwardSeekingFast = 5, 63 | kBRMediaPlayerStateForwardSeekingFastest = 6, 64 | kBRMediaPlayerStateBackSeeking = 7, 65 | kBRMediaPlayerStateBackSeekingFast = 8, 66 | kBRMediaPlayerStateBackSeekingFastest = 9, 67 | } BRMediaPlayerState; 68 | 69 | 70 | 71 | //These keyboard types are for the keyboardType property of an instance of BRDeviceKeyboardMessage 72 | typedef enum { 73 | //0 same as 1 74 | kBRDeviceKeyboardTypeFullMainScreen = 1, //full-keyboard (main screen) 75 | kBRDeviceKeyboardTypeFullNumberScreen = 2, //full-keyboard ("123" / number screen) 76 | kBRDeviceKeyboardTypeInternetFull = 3, //full internet keyboard (shortcut for ".com", etc) 77 | kBRDeviceKeyboardTypePasscodeEntry = 4, //passcode entry keyboard (digit keyboard & four character input only) 78 | kBRDeviceKeyboardTypePhoneDial = 5, //phone dial keyboard (digits, +, *, #, wait, etc.) 79 | kBRDeviceKeyboardTypeFullMainScreenDisabledShift = 6, //full-keyboard with disabled shift (main screen) 80 | kBRDeviceKeyboardTypeEmailFull = 7, //full email keyboard (shortcut for "@", etc) 81 | kBRDeviceKeyboardTypeIPAddress = 8, //ip address entry (digits + period) 82 | //9 and above same as 1 83 | } BRDeviceKeyboardType; 84 | 85 | 86 | 87 | //These text entry styles are for the textEntryStyle property of an instance of BRTextEntryControl 88 | typedef enum { 89 | //0 is none 90 | kBRTextEntryStyleFull = 1, //full keyboard 91 | kBRTextEntryStyleCompactWithSpaceLowercaseOnly = 2, //compact keyboard (lowercase, digits, space and symbols). No done button 92 | kBRTextEntryStyleHex = 3, //hex keyboard (1-9, A-F) 93 | kBRTextEntryStyleInternetFull = 4, //full keyboard (with ".com") 94 | kBRTextEntryStyleInternetCurrencyFullWeird = 5, //full keyboard (with ".com", currency and weird buttons). No textfield 95 | kBRTextEntryStyleCompactNoSpace = 6, //compact keyboard (lowercase, digits, uppercase and symbols). No done button 96 | kBRTextEntryStyleNumpad = 7, //numpad keyboard (1-9) 97 | //8 and above is none 98 | } BRTextEntryStyle; -------------------------------------------------------------------------------- /PlexATV/Classes/ProxyMachineDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ProxyMachineDelegate.m 3 | // atvTwo 4 | // 5 | // Created by Frank Bauer on 14.01.11. 6 | // 7 | 8 | #define LOCAL_DEBUG_ENABLED 0 9 | 10 | #import "ProxyMachineDelegate.h" 11 | 12 | @implementation ProxyMachineDelegate 13 | 14 | #pragma mark - 15 | #pragma mark Object/Class Lifecycle 16 | + (ProxyMachineDelegate*)shared { 17 | static ProxyMachineDelegate *_proxyMachineDelegate = nil; 18 | if (_proxyMachineDelegate == nil) { 19 | _proxyMachineDelegate = [[ProxyMachineDelegate alloc] init]; 20 | } 21 | 22 | return _proxyMachineDelegate; 23 | } 24 | 25 | - (id)init { 26 | self = [super init]; 27 | if (self != nil) { 28 | delegates = [[NSMutableArray alloc] initWithCapacity:3]; 29 | } 30 | return self; 31 | } 32 | 33 | - (void)dealloc { 34 | [delegates release]; 35 | [super dealloc]; 36 | } 37 | 38 | - (void)registerDelegate:(id)del { 39 | if ([MachineManager sharedMachineManager].delegate != self) { 40 | #if LOCAL_DEBUG_ENABLED 41 | DLog(@"Hooking up machine Delegate"); 42 | #endif 43 | [[MachineManager sharedMachineManager] setDelegate:self]; 44 | } 45 | 46 | if (![delegates containsObject:del] && del != nil) { 47 | #if LOCAL_DEBUG_ENABLED 48 | DLog(@"Added machine Delegate %@", del); 49 | #endif 50 | [delegates addObject:del]; 51 | 52 | NSArray *mc = [[MachineManager sharedMachineManager] threadSafeMachines]; 53 | for (Machine*m in mc) { 54 | [del machineWasAdded:m]; 55 | } 56 | } 57 | 58 | 59 | } 60 | 61 | - (void)removeAllDelegates { 62 | #if LOCAL_DEBUG_ENABLED 63 | DLog(@"Removing all machine Delegates"); 64 | #endif 65 | [delegates removeAllObjects]; 66 | } 67 | 68 | - (void)removeDelegate:(id)del { 69 | #if LOCAL_DEBUG_ENABLED 70 | DLog(@"Removed machine Delegate %@", del); 71 | #endif 72 | [delegates removeObject:del]; 73 | } 74 | 75 | 76 | 77 | //required 78 | - (void)machineWasAdded:(Machine*)m; { 79 | for (id d in delegates) { 80 | #if LOCAL_DEBUG_ENABLED 81 | DLog(@"Send machineWasAdded to %@", d); 82 | #endif 83 | [d machineWasAdded:m]; 84 | } 85 | } 86 | 87 | - (void)machineWasRemoved:(Machine*)m { 88 | for (id d in delegates) { 89 | #if LOCAL_DEBUG_ENABLED 90 | DLog(@"Send machineWasRemoved to %@", d); 91 | #endif 92 | [d machineWasRemoved:m]; 93 | } 94 | } 95 | 96 | 97 | //optional 98 | - (void)machineWasChanged:(Machine*)m { 99 | for (id d in delegates) { 100 | #if LOCAL_DEBUG_ENABLED 101 | DLog(@"Send machineWasChanged to %@", d); 102 | #endif 103 | if ([d respondsToSelector:@selector(machineWasChanged:)]) { 104 | [d machineWasChanged:m]; 105 | } 106 | } 107 | } 108 | 109 | - (void)machine:(Machine*)m changedConnection:(MachineConnectionBase*)con { 110 | for (id d in delegates) { 111 | #if LOCAL_DEBUG_ENABLED 112 | DLog(@"Send machine:changedConnection to %@", d); 113 | #endif 114 | if ([d respondsToSelector:@selector(machine:changedConnection:)]) { 115 | [d machine:m changedConnection:con]; 116 | } 117 | } 118 | } 119 | 120 | - (void)machine:(Machine*)m updatedInfo:(ConnectionInfoType)updateMask { 121 | for (id d in delegates) { 122 | #if LOCAL_DEBUG_ENABLED 123 | DLog(@"Send machine:updatedInfo to %@", d); 124 | #endif 125 | if ([d respondsToSelector:@selector(machine:updatedInfo:)]) { 126 | [d machine:m updatedInfo:updateMask]; 127 | } 128 | } 129 | } 130 | 131 | - (void)machine:(Machine*)m changedClientTo:(ClientConnection*)cc { 132 | for (id d in delegates) { 133 | #if LOCAL_DEBUG_ENABLED 134 | DLog(@"Send machine:changedClientTo to %@", d); 135 | #endif 136 | if ([d respondsToSelector:@selector(machine:changedClientTo:)]) { 137 | [d machine:m changedClientTo:cc]; 138 | } 139 | } 140 | } 141 | 142 | - (void)machine:(Machine*)m receivedInfoForConnection:(MachineConnectionBase*)con updated:(ConnectionInfoType)updateMask { 143 | for (id d in delegates) { 144 | #if LOCAL_DEBUG_ENABLED 145 | DLog(@"Send machine:receivedInfoForConnection to %@", d); 146 | #endif 147 | if ([d respondsToSelector:@selector(machine:receivedInfoForConnection:updated:)]) { 148 | [d machine:m receivedInfoForConnection:con updated:updateMask]; 149 | } 150 | } 151 | } 152 | 153 | 154 | 155 | @end 156 | -------------------------------------------------------------------------------- /PlexATV/Classes/HWBasicMenu.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | #import "HWBasicMenu.h" 4 | #import "HWPlexDir.h" 5 | #import 6 | #import 7 | #import 8 | 9 | @implementation HWBasicMenu 10 | 11 | 12 | #pragma mark - 13 | #pragma mark Object/Class Lifecycle 14 | - (id)init { 15 | if( (self = [super init]) != nil ) { 16 | 17 | //DLog(@"--- %@ %s", self, _cmd); 18 | 19 | [self setListTitle:@"Server List"]; 20 | 21 | BRImage *sp = [[BRThemeInfo sharedTheme] gearImage]; 22 | 23 | [self setListIcon:sp horizontalOffset:0.0 kerningFactor:0.15]; 24 | 25 | _names = [[NSMutableArray alloc] init]; 26 | 27 | //start the auto detection 28 | [[self list] setDatasource:self]; 29 | } 30 | return (self); 31 | } 32 | 33 | - (void)dealloc { 34 | //DLog(@"--- %@ %s", self, _cmd); 35 | [_names release]; 36 | 37 | [super dealloc]; 38 | } 39 | 40 | 41 | #pragma mark - 42 | #pragma mark Controller Lifecycle behaviour 43 | - (void)wasPushed { 44 | [[MachineManager sharedMachineManager] setMachineStateMonitorPriority:YES]; 45 | [[ProxyMachineDelegate shared] registerDelegate:self]; 46 | [super wasPushed]; 47 | } 48 | 49 | - (void)wasPopped { 50 | [[ProxyMachineDelegate shared] removeDelegate:self]; 51 | [super wasPopped]; 52 | } 53 | 54 | - (void)wasExhumed { 55 | [[MachineManager sharedMachineManager] setMachineStateMonitorPriority:YES]; 56 | [super wasExhumed]; 57 | } 58 | 59 | - (void)wasBuried { 60 | [super wasBuried]; 61 | } 62 | 63 | 64 | - (id)previewControlForItem:(long)item { 65 | BRImage *theImage = [BRImage imageWithPath:[[NSBundle bundleForClass:[HWBasicMenu class]] pathForResource:@"PmsLogo" ofType:@"png"]]; 66 | 67 | 68 | BRImageAndSyncingPreviewController *obj = [[BRImageAndSyncingPreviewController alloc] init]; 69 | 70 | [obj setImage:theImage]; 71 | 72 | return [obj autorelease]; 73 | 74 | } 75 | 76 | - (BOOL)shouldRefreshForUpdateToObject:(id)object { 77 | return YES; 78 | } 79 | 80 | - (void)itemSelected:(long)selected { 81 | if (selected < 0 || selected >= _names.count) return; 82 | Machine *m = [_names objectAtIndex:selected]; 83 | DLog(@"machine selected: %@", m); 84 | 85 | HWPlexDir *menuController = [[HWPlexDir alloc] initWithRootContainer:[m.request rootLevel] andTabBar:nil]; 86 | //menuController.rootContainer = [m.request rootLevel]; 87 | [[[BRApplicationStackManager singleton] stack] pushController:menuController]; 88 | [menuController release]; 89 | } 90 | 91 | - (float)heightForRow:(long)row { 92 | return 50.0f; 93 | } 94 | 95 | - (long)itemCount { 96 | return _names.count; 97 | } 98 | 99 | - (id)itemForRow:(long)row { 100 | if (row >= [_names count] || row < 0) 101 | return nil; 102 | 103 | BRMenuItem *result = [[BRMenuItem alloc] init]; 104 | Machine *m = [_names objectAtIndex:row]; 105 | NSString *name = [NSString stringWithFormat:@"%@", m.serverName, m]; 106 | [result setText:name withAttributes:[[BRThemeInfo sharedTheme] menuItemTextAttributes]]; 107 | [result addAccessoryOfType:m.hostName != nil && ![m.hostName empty]]; //folder 108 | 109 | 110 | return [result autorelease]; 111 | } 112 | 113 | - (BOOL)rowSelectable:(long)selectable { 114 | return TRUE; 115 | } 116 | 117 | - (id)titleForRow:(long)row { 118 | if (row >= [_names count] || row < 0) 119 | return @""; 120 | Machine *m = [_names objectAtIndex:row]; 121 | return m.serverName; 122 | } 123 | 124 | - (void)setNeedsUpdate { 125 | DLog(@"Updating UI"); 126 | // [self updatePreviewController]; 127 | // [self refreshControllerForModelUpdate]; 128 | [self.list reload]; 129 | } 130 | 131 | #pragma mark 132 | #pragma mark Machine Manager Delegate 133 | - (void)machineWasRemoved:(Machine*)m { 134 | DLog(@"Removed %@", m); 135 | [_names removeObject:m]; 136 | } 137 | 138 | - (void)machineWasAdded:(Machine*)m { 139 | if ( !runsServer(m.role) ) return; 140 | if ([_names containsObject:m]) return; 141 | 142 | [_names addObject:m]; 143 | DLog(@"Added %@", m); 144 | 145 | //[m resolveAndNotify:self]; 146 | [self setNeedsUpdate]; 147 | } 148 | 149 | - (void)machineWasChanged:(Machine*)m { 150 | if (m == nil) return; 151 | 152 | if (runsServer(m.role) && ![_names containsObject:m]) { 153 | [self machineWasAdded:m]; 154 | return; 155 | } else if (!runsServer(m.role) && [_names containsObject:m]) { 156 | [_names removeObject:m]; 157 | DLog(@"Removed %@", m); 158 | } else { 159 | DLog(@"Changed %@", m); 160 | } 161 | 162 | [self setNeedsUpdate]; 163 | } 164 | 165 | - (void)machine:(Machine*)m receivedInfoForConnection:(MachineConnectionBase*)con { 166 | } 167 | 168 | - (void)machine:(Machine*)m changedClientTo:(ClientConnection*)cc { 169 | } 170 | @end 171 | --------------------------------------------------------------------------------