Playlist Generator  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
Playlist2/SpotifyPlayer.h
Go to the documentation of this file.
00001 
00006 #import <UIKit/UIKit.h>
00007 #import "MBProgressHUD.h"
00008 #import "CocoaLibSpotify.h"
00009 #import "SPPlaybackManager.h"
00010 #import <MediaPlayer/MediaPlayer.h>
00011 
00012 @interface SpotifyPlayer : UIViewController <SPSessionDelegate, SPSessionPlaybackDelegate, UIActionSheetDelegate, AVAudioSessionDelegate>
00013 {
00014     //UI Elements
00015     IBOutlet UIBarButtonItem *playPauseButton;
00016     IBOutlet UILabel *trackLabel;
00017     IBOutlet UILabel *artistLabel;
00018     IBOutlet UIImageView *coverImageView;
00019     IBOutlet UISlider *progressMeter;
00020     IBOutlet UIToolbar *bottomToolbar;
00021     MBProgressHUD *hud;
00022     MPNowPlayingInfoCenter *nowPlaying;
00023     NSMutableDictionary *nowPlayingInfo;
00024     
00025     //Model Variables
00026     NSArray *trackURIs;
00027     int currentTrackPlayingIndex;
00028     SPPlaybackManager *manager;
00029     NSTimeInterval currentTrackDuration;
00030     NSTimer *timer;
00031 }
00032 
00033 //Model Operations
00039 -(void)setArray:(NSArray *)theArray;
00040 
00047 -(void)loginToSpotifyWithUsername:(NSString *)username andPassword:(NSString *)password;
00048 
00054 -(void)playTrackAtIndex:(NSNumber *)index;
00055 
00061 -(void)getCoverImageForTrack:(SPTrack *)track;
00062 
00068 -(void)timerFireMethod:(NSTimer*)theTimer;
00069 -(void) initAudioSession;
00070 
00071 //UI Actions
00072 -(IBAction)togglePlayPause:(id)sender;
00073 -(IBAction)nextTrack:(id)sender;
00074 -(IBAction)previousTrack:(id)sender;
00075 -(IBAction)movedSlider:(id)sender;
00076 -(IBAction)showActionSheet:(id)sender;
00077 
00078 @end