2022-01-20 18:27:56 +00:00
|
|
|
// This file Copyright © 2007-2022 Transmission authors and contributors.
|
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2008-03-23 00:56:43 +00:00
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2009-10-11 03:36:50 +00:00
|
|
|
|
|
|
|
@class Torrent;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
|
|
|
@interface GroupsController : NSObject
|
|
|
|
{
|
2021-08-15 09:41:48 +00:00
|
|
|
NSMutableArray* fGroups;
|
2008-03-23 00:56:43 +00:00
|
|
|
}
|
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
@property(nonatomic, class, readonly) GroupsController* groups;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
@property(nonatomic, readonly) NSInteger numberOfGroups;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSInteger)rowValueForIndex:(NSInteger)index;
|
|
|
|
- (NSInteger)indexForRow:(NSInteger)row;
|
2008-03-23 04:36:30 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSString*)nameForIndex:(NSInteger)index;
|
|
|
|
- (void)setName:(NSString*)name forIndex:(NSInteger)index;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSImage*)imageForIndex:(NSInteger)index;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSColor*)colorForIndex:(NSInteger)index;
|
|
|
|
- (void)setColor:(NSColor*)color forIndex:(NSInteger)index;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (BOOL)usesCustomDownloadLocationForIndex:(NSInteger)index;
|
|
|
|
- (void)setUsesCustomDownloadLocation:(BOOL)useCustomLocation forIndex:(NSInteger)index;
|
2008-11-30 19:23:15 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSString*)customDownloadLocationForIndex:(NSInteger)index;
|
|
|
|
- (void)setCustomDownloadLocation:(NSString*)location forIndex:(NSInteger)index;
|
2008-11-30 19:23:15 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (BOOL)usesAutoAssignRulesForIndex:(NSInteger)index;
|
|
|
|
- (void)setUsesAutoAssignRules:(BOOL)useAutoAssignRules forIndex:(NSInteger)index;
|
2008-12-08 03:26:28 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSPredicate*)autoAssignRulesForIndex:(NSInteger)index;
|
|
|
|
- (void)setAutoAssignRules:(NSPredicate*)predicate forIndex:(NSInteger)index;
|
2008-12-13 17:18:28 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)addNewGroup;
|
|
|
|
- (void)removeGroupWithRowIndex:(NSInteger)row;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)moveGroupAtRow:(NSInteger)oldRow toRow:(NSInteger)newRow;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSMenu*)groupMenuWithTarget:(id)target action:(SEL)action isSmall:(BOOL)small;
|
2008-03-23 00:56:43 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSInteger)groupIndexForTorrent:(Torrent*)torrent;
|
2008-03-23 00:56:43 +00:00
|
|
|
@end
|