/* UsersDataSource */

#import <Cocoa/Cocoa.h>

@interface UsersDataSource : NSObject
{
    NSMutableArray          *_allowedUsers;

    // caches
    NSMutableDictionary     *_allUsersCache;
    NSMutableArray          *_sortedCache;
    NSMutableArray          *_loggedInUsers;
    NSMutableArray          *_realShells;
    
    // flags
    BOOL                    _refreshAllUsersCache;
    BOOL                    _refreshLoggedInUsers;
}

- (void)setAllowedUsers:(NSArray*)allowedUsers;
- (NSArray*)allowedUsersCopy;
- (void)cleanAllowedUsers;

- (NSArray *)_allUsersCacheForcingRebuild:(BOOL)rebuild;
- (NSArray *)_realShells;
- (NSString *)_propertyForKey:(NSString *)key user:(uid_t)UID;

@end
