| [407] | 1 | /* |
|---|
| 2 | * SapphireSettings.h |
|---|
| 3 | * Sapphire |
|---|
| 4 | * |
|---|
| 5 | * Created by pnmerrill on Jun. 23, 2007. |
|---|
| 6 | * Copyright 2007 Sapphire Development Team and/or www.nanopi.net |
|---|
| 7 | * All rights reserved. |
|---|
| 8 | * |
|---|
| 9 | * This program is free software; you can redistribute it and/or modify it under the terms of the GNU |
|---|
| 10 | * General Public License as published by the Free Software Foundation; either version 3 of the License, |
|---|
| 11 | * or (at your option) any later version. |
|---|
| 12 | * |
|---|
| 13 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
|---|
| 14 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|---|
| 15 | * Public License for more details. |
|---|
| 16 | * |
|---|
| 17 | * You should have received a copy of the GNU General Public License along with this program; if not, |
|---|
| 18 | * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 19 | */ |
|---|
| [10] | 20 | |
|---|
| [436] | 21 | #import <SapphireCompatClasses/SapphireMediaMenuController.h> |
|---|
| [261] | 22 | |
|---|
| [377] | 23 | /*! |
|---|
| 24 | * @brief The Settings |
|---|
| 25 | * |
|---|
| 26 | * This class contains all the settings for the frapp. It is also a subclass of SapphireMediaMenuController so it has the ability to provide a UI for them as well. |
|---|
| 27 | */ |
|---|
| 28 | @interface SapphireSettings : SapphireMediaMenuController |
|---|
| [10] | 29 | { |
|---|
| [814] | 30 | NSArray *settings; /*!< @brief Settings for the UI*/ |
|---|
| [470] | 31 | NSMutableDictionary *options; /*!< @brief The settings, in order*/ |
|---|
| 32 | NSString *path; /*!< @brief The persistent store path*/ |
|---|
| 33 | NSDictionary *defaults; /*!< @brief The default settings, in order*/ |
|---|
| [540] | 34 | NSManagedObjectContext *moc; /*!< @brief The context*/ |
|---|
| [648] | 35 | int lastCommand; /*!< @brief The last command issued*/ |
|---|
| [10] | 36 | } |
|---|
| 37 | |
|---|
| [377] | 38 | /*! |
|---|
| 39 | * @brief Get the shared settings object |
|---|
| 40 | * |
|---|
| 41 | * This will not create the shared instance. |
|---|
| 42 | * |
|---|
| 43 | * @return The settings object |
|---|
| 44 | */ |
|---|
| [29] | 45 | + (SapphireSettings *)sharedSettings; |
|---|
| [377] | 46 | |
|---|
| 47 | /*! |
|---|
| 48 | * @brief Allow the shared settings object to be freed |
|---|
| 49 | */ |
|---|
| [29] | 50 | + (void)relinquishSettings; |
|---|
| 51 | |
|---|
| [377] | 52 | |
|---|
| 53 | /*! |
|---|
| 54 | * @brief Create a settings object |
|---|
| 55 | * |
|---|
| 56 | * @param scene The scene |
|---|
| 57 | * @param dictionaryPath The path of the saved setting |
|---|
| [540] | 58 | * @param context The managed object context |
|---|
| [377] | 59 | * @return The settings object |
|---|
| 60 | */ |
|---|
| [540] | 61 | - (id) initWithScene: (BRRenderScene *) scene settingsPath:(NSString *)dictionaryPath context:(NSManagedObjectContext *)context; |
|---|
| [29] | 62 | |
|---|
| [377] | 63 | /*! |
|---|
| 64 | * @brief Returns whether to display unwatched |
|---|
| 65 | * |
|---|
| 66 | * @return YES if set, NO otherwise |
|---|
| 67 | */ |
|---|
| [29] | 68 | - (BOOL)displayUnwatched; |
|---|
| [377] | 69 | |
|---|
| 70 | /*! |
|---|
| 71 | * @brief Returns whether to display favorites |
|---|
| 72 | * |
|---|
| 73 | * @return YES if set, NO otherwise |
|---|
| 74 | */ |
|---|
| [29] | 75 | - (BOOL)displayFavorites; |
|---|
| [377] | 76 | |
|---|
| 77 | /*! |
|---|
| 78 | * @brief Returns whether to display top shows |
|---|
| 79 | * |
|---|
| 80 | * @return YES if set, NO otherwise |
|---|
| 81 | */ |
|---|
| [29] | 82 | - (BOOL)displayTopShows; |
|---|
| [377] | 83 | |
|---|
| 84 | /*! |
|---|
| 85 | * @brief Returns whether to display spoilers |
|---|
| 86 | * |
|---|
| 87 | * @return YES if set, NO otherwise |
|---|
| 88 | */ |
|---|
| [29] | 89 | - (BOOL)displaySpoilers; |
|---|
| [377] | 90 | |
|---|
| 91 | /*! |
|---|
| 92 | * @brief Returns whether to display audio info |
|---|
| 93 | * |
|---|
| 94 | * @return YES if set, NO otherwise |
|---|
| 95 | */ |
|---|
| [318] | 96 | - (BOOL)displayAudio; |
|---|
| [377] | 97 | |
|---|
| 98 | /*! |
|---|
| 99 | * @brief Returns whether to display video info |
|---|
| 100 | * |
|---|
| 101 | * @return YES if set, NO otherwise |
|---|
| 102 | */ |
|---|
| [318] | 103 | - (BOOL)displayVideo; |
|---|
| [377] | 104 | |
|---|
| 105 | /*! |
|---|
| [390] | 106 | * @brief Returns whether to display poster chooser |
|---|
| 107 | * |
|---|
| 108 | * @return YES if set, NO otherwise |
|---|
| 109 | */ |
|---|
| 110 | - (BOOL)displayPosterChooser; |
|---|
| 111 | |
|---|
| 112 | /*! |
|---|
| [377] | 113 | * @brief Returns whether to disable UI quit |
|---|
| 114 | * |
|---|
| 115 | * @return YES if set, NO otherwise |
|---|
| 116 | */ |
|---|
| [62] | 117 | - (BOOL)disableUIQuit; |
|---|
| [377] | 118 | |
|---|
| 119 | /*! |
|---|
| 120 | * @brief Returns whether to disable anonymous reporting |
|---|
| 121 | * |
|---|
| 122 | * @return YES if set, NO otherwise |
|---|
| 123 | */ |
|---|
| [29] | 124 | - (BOOL)disableAnonymousReporting; |
|---|
| [377] | 125 | |
|---|
| 126 | /*! |
|---|
| 127 | * @brief Returns whether to use AC3 passthrough |
|---|
| 128 | * |
|---|
| 129 | * @return YES if set, NO otherwise |
|---|
| 130 | */ |
|---|
| [170] | 131 | - (BOOL)useAC3Passthrough; |
|---|
| [377] | 132 | |
|---|
| 133 | /*! |
|---|
| 134 | * @brief Returns whether to use fast directory switching |
|---|
| 135 | * |
|---|
| 136 | * @return YES if set, NO otherwise |
|---|
| 137 | */ |
|---|
| [196] | 138 | - (BOOL)fastSwitching; |
|---|
| [377] | 139 | |
|---|
| 140 | /*! |
|---|
| [491] | 141 | * @brief Returns whether to use directory based lookup |
|---|
| 142 | * |
|---|
| 143 | * @return YES if set, NO otherwise |
|---|
| 144 | */ |
|---|
| 145 | - (BOOL)dirLookup; |
|---|
| 146 | |
|---|
| 147 | /*! |
|---|
| [795] | 148 | * @brief Returns whether auto-selection for movies/shows is in use |
|---|
| 149 | * |
|---|
| 150 | * @return YES if set, NO otherwise |
|---|
| 151 | */ |
|---|
| 152 | - (BOOL)autoSelection; |
|---|
| 153 | |
|---|
| 154 | /*! |
|---|
| [377] | 155 | * @brief Returns the index of the last predicate used |
|---|
| 156 | * |
|---|
| 157 | * @return The index of the last predicate used |
|---|
| 158 | */ |
|---|
| [196] | 159 | - (int)indexOfLastPredicate; |
|---|
| [377] | 160 | |
|---|
| 161 | /*! |
|---|
| 162 | * @brief Sets the index of the last predicate |
|---|
| 163 | * |
|---|
| 164 | * @param index The index of the last predicate used |
|---|
| 165 | */ |
|---|
| [196] | 166 | - (void)setIndexOfLastPredicate:(int)index; |
|---|
| [10] | 167 | @end |
|---|