X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/97eb97cd6af1e3019980ed380a6cbaf1feae0abe..57e47909ea593126a1055a5b077e7531c2fafb30:/AudioscrobblerController.h?ds=sidebyside diff --git a/AudioscrobblerController.h b/AudioscrobblerController.h index 6b62360..a2dc6c4 100644 --- a/AudioscrobblerController.h +++ b/AudioscrobblerController.h @@ -13,13 +13,30 @@ #import +typedef enum { + AudioscrobblerIdleStatus = -1, + AudioscrobblerRequestingHandshakeStatus, + AudioscrobblerCompletedHandshakeStatus, + AudioscrobblerSubmittingTracksStatus, + AudioscrobblerWaitingIntervalStatus +} AudioscrobblerStatus; + @interface AudioscrobblerController : NSObject { BOOL _handshakeCompleted; + AudioscrobblerStatus _currentStatus; + NSMutableArray *_tracks, *_submitTracks; + NSDate *_delayDate; + NSString *_md5Challenge, *_lastStatus; + NSURL *_postURL; NSMutableData *_responseData; } + (AudioscrobblerController *)sharedController; +- (NSString *)lastStatus; - (void)attemptHandshake; +- (void)attemptHandshake:(BOOL)force; - (BOOL)handshakeCompleted; +- (void)submitTrack:(NSString *)title artist:(NSString *)artist album:(NSString *)album length:(int)length; +- (void)submitTracks; @end