Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clean up protocols

  • Loading branch information...
commit 169846f0d661dbf366e74e9fa49c1d5ac5a23a7d 1 parent d99be79
@tomcool420 authored
View
54 SMFBookcaseDelegateDatasource.h
@@ -0,0 +1,54 @@
+//
+// SMFBookcaseDelegateDatasource.h
+// SMFramework
+//
+// Created by Thomas Cool on 7/13/11.
+// Copyright 2011 tomcool.org. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@class SMFBookcaseController;
+/**
+ *Datasource protocol for the SMFBookcaseController
+ */
+@protocol SMFBookcaseControllerDatasource
+/**
+ *@param bookcaseController the bookcase asking for the header
+ *@return a string containing the title for the controller
+ */
+- (NSString *)headerTitleForBookcaseController:(SMFBookcaseController *)bookcaseController;
+/**
+ *@param bookcaseController the bookcase
+ *@return the number of shelves on your bookcase
+ */
+- (NSInteger)numberOfShelfsInBookcaseController:(SMFBookcaseController *)bookcaseController;
+/**
+ *@param bookcaseController the bookcase
+ *@param index the index of the shelf for which to return a datastore provider
+ *@return the datastoreprovider with the posters
+ *
+ */
+- (BRPhotoDataStoreProvider *)bookcaseController:(SMFBookcaseController *)bookcaseController datastoreProviderForShelfAtIndex:(NSInteger)index;
+@optional
+/**
+ *@param bookcaseController the bookcase
+ *@return an image to be displayed in the top right corner
+ */
+- (BRImage *)headerIconForBookcaseController:(SMFBookcaseController *)bookcaseController;
+/**
+ *@param bookcaseController the bookcase
+ *@param index the index of the shelf for which to return a title
+ *@return the title for the shelf at index: index
+ */
+- (NSString *)bookcaseController:(SMFBookcaseController *)bookcaseController titleForShelfAtIndex:(NSInteger)index;
+@end
+
+@protocol SMFBookcaseControllerDelegate
+#ifndef NOSHELF
+-(BOOL)bookcaseController:(SMFBookcaseController *)bookcaseController allowSelectionForShelf:(id)shelfControl atIndex:(NSInteger)index;
+@optional
+-(void)bookcaseController:(SMFBookcaseController *)bookcaseController selectionWillOccurInShelf:(id)shelfControl atIndex:(NSInteger)index;
+-(void)bookcaseController:(SMFBookcaseController *)bookcaseController selectionDidOccurInShelf:(id)shelfControl atIndex:(NSInteger)index;
+#endif
+@end
View
83 SMFFolderBrowserDelegate.h
@@ -0,0 +1,83 @@
+//
+// SMFFolderBrowserDelegate.h
+// SMFramework
+//
+// Created by Thomas Cool on 7/13/11.
+// Copyright 2011 tomcool.org. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+@class SMFFolderBrowser;
+/**
+ *Delegate for SMFFolderBrowser
+ *
+ *Only has one required method: hasActionForFile:
+ *All other methods are checked before being called as to avoid exceptions
+ */
+@protocol SMFFolderBrowserDelegate
+
+/**
+ * Checks to see if the delegate can handle this file
+ */
+-(BOOL)hasActionForFile:(NSString *)path;
+
+@optional
+/**
+ *Standard default action execution
+ *if hasActionForFile: returns `YES`, you should at least implement this method
+ *@param browser browser calling the delegate
+ * can be used to push controllers: `[[browser stack]pushController:newController]`
+ *@param path path to the file called
+ */
+-(void)browser:(SMFFolderBrowser *)browser executeActionForFile:(NSString *)path;
+
+/**
+ *Action called when pressing the right arrow on the remote
+ *@param browser browser calling the delegate
+ * can be used to push controllers: `[[browser stack]pushController:newController]`
+ *@param path path to the file called
+ *@see browser:executeActionForFile:
+ */
+-(void)browser:(SMFFolderBrowser *)browser executeRightActionForFile:(NSString *)path;
+
+/**
+ *Action called when pressing the left arrow on the remote
+ *@param browser browser calling the delegate
+ * can be used to push controllers: `[[browser stack]pushController:newController]`
+ *@param path path to the file called
+ *@see browser:executeActionForFile:
+ */
+-(void)browser:(SMFFolderBrowser *)browser executeLeftActionForFile:(NSString *)path;
+
+/**
+ *Action called when pressing the select button on the remote (center button)
+ *@bug Warning: Not implemented yet, use browser:executeActionForFile: instead
+ *@param browser browser calling the delegate
+ * can be used to push controllers: `[[browser stack]pushController:newController]`
+ *@param path path to the file called
+ *@see browser:executeActionForFile:
+ */
+-(void)browser:(SMFFolderBrowser *)browser executeSelectActionForFile:(NSString *)path;
+
+/**
+ *Action called when pressing playpause on the NEW remotes
+ *if hasActionForFile: returns `YES`, you should at least implement this method
+ *@param browser browser calling the delegate
+ * can be used to push controllers: `[[browser stack]pushController:newController]`
+ *@param path path to the file called
+ *@see browser:executeActionForFile:
+ */
+-(void)browser:(SMFFolderBrowser *)browser executePlayPauseActionForFile:(NSString *)path;
+
+///---
+///@name deprecated
+///---
+
+-(void)executeActionForFile:(NSString *)path;
+-(void)executeRightActionForFile:(NSString *)path;
+-(void)executeLeftActionForFile:(NSString *)path;
+-(void)executeSelectActionForFile:(NSString *)path;
+-(void)executePlayPauseActionForFile:(NSString *)path;
+
+
+@end
View
42 SMFMoviePreviewDelegateDatasource.h
@@ -0,0 +1,42 @@
+//
+// SMFMoviePreviewDelegateDatasource.h
+// SMFramework
+//
+// Created by Thomas Cool on 7/13/11.
+// Copyright 2011 tomcool.org. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "Backrow/AppleTV.h"
+
+@protocol SMFMoviePreviewControllerDatasource
+-(NSString *)title;
+-(NSString *)subtitle;
+-(NSString *)summary;
+-(NSArray *)headers;
+-(NSArray *)columns;
+-(NSString *)rating;
+-(BRImage *)coverArt;
+-(BRPhotoDataStoreProvider *)providerForShelf;
+
+@optional
+-(NSString *)shelfTitle;
+-(NSArray *)buttons;
+-(NSString *)posterPath;
+@end
+
+@class SMFMoviePreviewController;
+@protocol SMFMoviePreviewControllerDelegate
+//If a delegate responds to a method...
+//it needs to implement the sounds for selection itself
+//See SMFThemeInfo or BRSoundHandler
+-(void)controller:(SMFMoviePreviewController *)c selectedControl:(BRControl *)ctrl;
+@optional
+-(void)controller:(SMFMoviePreviewController *)c buttonSelectedAtIndex:(int)index;
+-(void)controller:(SMFMoviePreviewController *)c switchedFocusTo:(BRControl *)newControl;
+-(void)controller:(SMFMoviePreviewController *)c shelfLastIndex:(long)index;
+-(void)controllerSwitchToNext:(SMFMoviePreviewController *)c ;
+-(void)controllerSwitchToPrevious:(SMFMoviePreviewController *)c ;
+-(BOOL)controllerCanSwitchToNext:(SMFMoviePreviewController *)c ;
+-(BOOL)controllerCanSwitchToPrevious:(SMFMoviePreviewController *)c;
+@end
View
2  SMFSettingPreferences.h
@@ -6,7 +6,7 @@
// Copyright 2010 tomcool.org. All rights reserved.
//
-#import <BackRow/BackRow.h>
+#import "Backrow/AppleTV.h"
@protocol SMFSettingPreferences
Please sign in to comment.
Something went wrong with that request. Please try again.