aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFavoritesController.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPFavoritesController.h')
-rw-r--r--Source/SPFavoritesController.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/Source/SPFavoritesController.h b/Source/SPFavoritesController.h
index 1b9f0aca..095e1cd0 100644
--- a/Source/SPFavoritesController.h
+++ b/Source/SPFavoritesController.h
@@ -25,6 +25,8 @@
#import "SPSingleton.h"
+@class SPTreeNode;
+
/**
* @class SPFavoritesController SPFavoritesController.h
*
@@ -35,17 +37,31 @@
*/
@interface SPFavoritesController : SPSingleton
{
- NSMutableDictionary *favorites;
+ SPTreeNode *favoritesTree;
+ NSMutableDictionary *favoritesData;
+
+ pthread_mutex_t writeLock;
+ pthread_mutex_t favoritesLock;
}
/**
- * @property favorites Favorites data dictionary
+ * @property favoritesTree
+ */
+@property (readonly) SPTreeNode *favoritesTree;
+
+/**
+ * @property favoritesData Favorites data dictionary
*/
-@property (readonly) NSMutableDictionary *favorites;
+@property (readonly) NSMutableDictionary *favoritesData;
+ (SPFavoritesController *)sharedFavoritesController;
- (void)saveFavorites;
- (void)reloadFavoritesWithSave:(BOOL)save;
+- (SPTreeNode *)addGroupNodeWithName:(NSString *)name asChildOfNode:(SPTreeNode *)parent;
+- (SPTreeNode *)addFavoriteNodeWithData:(NSDictionary *)data asChildOfNode:(SPTreeNode *)parent;
+
+- (void)removeFavoriteNode:(SPTreeNode *)node;
+
@end