// Path: src/main/java/songo/vk/Audio.java
// public class Audio {
// 	public final String artist;
// 	public final String title;
// 	public final String url;
// 	public final int duration;
// 
// 	Audio(String artist, String title, String url, int duration) {
// 		this.artist = artist;
// 		this.title = title;
// 		this.url = url;
// 		this.duration = duration;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(artist, title);
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if(obj == null)
// 			return false;
// 		if(this == obj)
// 			return true;
// 		if(!(obj instanceof Audio))
// 			return false;
// 		Audio a = (Audio) obj;
// 		return artist.equals(a.artist) && title.equals(a.title);
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return Objects.toStringHelper(this)
// 			.add("artist", artist)
// 			.add("title", title)
// 			.add("url", url)
// 			.toString();
// 	}
// }


import com.google.common.eventbus.EventBus;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import songo.annotation.GlobalBus;
import songo.vk.Audio;
package songo.model;


@Singleton
public class Player {
	private final EventBus bus;
	private State state = State.STOPPED;
	private Provider<Audio> audio;
	private final Provider<Decoder> decoderProvider;
	private Decoder decoder;

	public State getState() {
		return state;
	}

	private void setState(State state) {
		this.state = state;
		bus.post(new StateChanged(state));
	}

	@Inject
// Path: src/main/java/songo/vk/Audio.java
// public class Audio {
// 	public final String artist;
// 	public final String title;
// 	public final String url;
// 	public final int duration;
// 
// 	Audio(String artist, String title, String url, int duration) {
// 		this.artist = artist;
// 		this.title = title;
// 		this.url = url;
// 		this.duration = duration;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(artist, title);
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if(obj == null)
// 			return false;
// 		if(this == obj)
// 			return true;
// 		if(!(obj instanceof Audio))
// 			return false;
// 		Audio a = (Audio) obj;
// 		return artist.equals(a.artist) && title.equals(a.title);
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return Objects.toStringHelper(this)
// 			.add("artist", artist)
// 			.add("title", title)
// 			.add("url", url)
// 			.toString();
// 	}
// }


// Path: src/main/java/songo/model/Player.java
import com.google.common.eventbus.EventBus;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import songo.annotation.GlobalBus;
import songo.vk.Audio;

package songo.model;


@Singleton
public class Player {
	private final EventBus bus;
	private State state = State.STOPPED;
	private Provider<Audio> audio;
	private final Provider<Decoder> decoderProvider;
	private Decoder decoder;

	public State getState() {
		return state;
	}

	private void setState(State state) {
		this.state = state;
		bus.post(new StateChanged(state));
	}

	@Inject
	Player(@GlobalBus EventBus bus, Provider<Audio> audio, Provider<Decoder> decoderProvider) {