ALApplicationTableDataSource.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #import <UIKit/UIKit.h>
  2. #import <libkern/OSAtomic.h>
  3. @class ALApplicationList;
  4. @interface ALApplicationTableDataSource : NSObject <UITableViewDataSource> {
  5. @private
  6. NSMutableArray *_sectionDescriptors;
  7. UITableView *_tableView;
  8. NSBundle *_localizationBundle;
  9. BOOL _loadsAsynchronously;
  10. }
  11. + (NSArray *)standardSectionDescriptors;
  12. + (id)dataSource;
  13. - (id)init;
  14. @property (nonatomic, copy) NSArray *sectionDescriptors;
  15. @property (nonatomic, retain) UITableView *tableView;
  16. @property (nonatomic, retain) NSBundle *localizationBundle;
  17. @property (nonatomic, assign) BOOL loadsAsynchronously;
  18. - (id)cellDescriptorForIndexPath:(NSIndexPath *)indexPath; // NSDictionary if custom cell; NSString if app cell; nil if loading
  19. - (NSString *)displayIdentifierForIndexPath:(NSIndexPath *)indexPath;
  20. - (void)insertSectionDescriptor:(NSDictionary *)sectionDescriptor atIndex:(NSInteger)index;
  21. - (void)removeSectionDescriptorAtIndex:(NSInteger)index;
  22. - (void)removeSectionDescriptorsAtIndexes:(NSIndexSet *)indexSet;
  23. - (BOOL)waitUntilDate:(NSDate *)date forContentInSectionAtIndex:(NSInteger)sectionIndex;
  24. @end
  25. extern const NSString *ALSectionDescriptorTitleKey;
  26. extern const NSString *ALSectionDescriptorFooterTitleKey;
  27. extern const NSString *ALSectionDescriptorPredicateKey;
  28. extern const NSString *ALSectionDescriptorCellClassNameKey;
  29. extern const NSString *ALSectionDescriptorIconSizeKey;
  30. extern const NSString *ALSectionDescriptorSuppressHiddenAppsKey;
  31. extern const NSString *ALSectionDescriptorVisibilityPredicateKey;
  32. extern const NSString *ALItemDescriptorTextKey;
  33. extern const NSString *ALItemDescriptorDetailTextKey;
  34. extern const NSString *ALItemDescriptorImageKey;