
#import <Foundation/Foundation.h>
#import "FYXVisit.h"


@protocol FYXVisitDelegate <NSObject>

@optional
/// Delegate callback to notify when a Visit has begun
- (void)didArrive:(FYXVisit *)visit;

/// Delegate callback to notify when a Visit has been updated
- (void)receivedSighting:(FYXVisit *)visit updateTime:(NSDate *)updateTime RSSI:(NSNumber *)RSSI;

/// Delegate callback to notify when a Visit has ended and the beacon has departed
- (void)didDepart:(FYXVisit *)visit;

@end

@interface FYXVisitManager:NSObject

/// Visit Manager Option Keys
extern NSString * const FYXVisitOptionArrivalRSSIKey;
extern NSString * const FYXVisitOptionDepartureRSSIKey;
extern NSString * const FYXVisitOptionDepartureIntervalInSecondsKey;
extern NSString * const FYXvVisitOptionBackgroundDepartureIntervalInSecondsKey;

/// The manager will notify the delegate of any Visit Events
@property(weak, nonatomic) id<FYXVisitDelegate> delegate;

/// The manager will start listening for sightings and notify delegate of visits
- (void)start;

/// The manager will start listening for sightings and notify delegate of visits for the given options
- (void)startWithOptions:(NSDictionary *)options;

/// The manager will stop listening for sightings and stop notifying delegate of visits
- (void)stop;

@end
