Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

62 lines (46 sloc) 1.185 kB
//
// PlayerApplication.h
// campfire-tunes
//
// Created by Jonathan Lipps on 5/21/12.
// Copyright 2012 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "iTunes.h"
#import "Spotify.h"
@class PlayerTrack, PlayerApplication;
enum PlayerType {
PlayerTypeITunes = 'i',
PlayerTypeSpotify = 's'
};
typedef enum PlayerType PlayerType;
@interface PlayerTrack : NSObject {
PlayerType type;
SBObject *nativeTrack;
}
@property (assign) PlayerType type;
@property (assign) SBObject *nativeTrack;
- (PlayerTrack *)init:(id)track withPlayerType:(PlayerType)playerType;
- (NSString *)artist;
- (NSString *)album;
- (NSImage *)artwork;
- (NSString *)name;
- (NSInteger)rating;
- (BOOL)starred;
- (NSString *)url;
- (NSString *)campfireStarEmoji;
- (BOOL)isAdvertisement;
@end
@interface PlayerApplication : NSObject {
PlayerType type;
SBApplication *nativeApp;
}
@property (assign) PlayerType type;
@property (assign) SBApplication *nativeApp;
- (PlayerApplication *)initWithPlayerType:(PlayerType)playerType;
- (BOOL) isRunning;
- (BOOL) isPlaying;
- (NSString *) name;
- (PlayerTrack *) currentTrack;
+ (PlayerApplication *)getActivePlayer;
@end
Jump to Line
Something went wrong with that request. Please try again.