// Path: src/com/nixus/raop/core/Service.java
// public interface Service {
// 
//     /**
//      * Start the Service
//      * @param context the ServiceContext for this Service
//      */
//     public void startService(ServiceContext context);
// 
//     /**
//      * Stop the Service
//      * @param context the ServiceContext for this Service (same as was passed into start)
//      */
//     public void stopService(ServiceContext context);
// 
//     /**
//      * Return the ServiceContext that was passed into {@link #startService}
//      */
//     public ServiceContext getContext();
// 
//     /**
//      * Return a Map describing the state of this Service, for serialization back to any
//      * client that needs to know (eg webplayer) - so values should be serializable objects,
//      * eg Lists, Maps or simple objects. If no useful state, return null.
//      */
//     public Map<String,Object> reportState();
// 
// }
// 
// Path: src/com/nixus/raop/player/Player.java
// public interface Player extends Service {
// 
// 
// 
// 
//     /**
//      * Set the current volume
//      * @param volume the volume, between 0 and 100
//      */
// 
//     public void setVolume(int volume);
// 
//     /**
//      * Return the current volume
//      * @return the volume, between 0 and 100
//      */
// 
//     public int getVolume();
// 
//     //-------------------------------------------------------------------------------
// 
//     /**
//      * Get the collection of speakers that could be used by this Player and that
//      * aren't currently in use elsewhere.
//      */
//     public Collection<Speaker> getAvailableSpeakers();
// 
//     /**
//      * Add a Speaker to the Player. Should only be called by {@link Speaker#setPlayer}.
//      */
//     public void addSpeaker(Speaker speaker);
// 
//     /**
//      * Remove a Speaker to the Player. Should only be called by {@link Speaker#setPlayer}.
//      */
//     public void removeSpeaker(Speaker speaker);
// 
//     /**
//      * Return the list of {@link Speaker} objects current in use by this Player
//      */
//     public Collection<Speaker> getSpeakers();
// 
// 
//     /**
//      * Return the revision number. This should be increased every time the Player's state is
//      * updated.
//      */
//     public int getRevision();
// 
//     /**
//      * Return a nice name for this Player for display to the user
//      */
//     public String getDisplayName();
// 
// }


import com.nixus.raop.core.Service;
import com.nixus.raop.player.Player;
package com.nixus.raop.speaker;



/**
 * A Speaker is an output device, which may be a local JavaSound speaker,
 * an Airtunes speaker, a network speaker or similar. A {@link Player} has
 * one or more speakers and a {@link Speaker} may be assigned to exactly
 * one Player, or unassigned. Writing to a Speaker should <b>never</b> throw
 * an Exception of any sort - instead the internal {@link #getException Exception}
 * should be set. This is reset when the Speaker is opened.
 */
public interface Speaker extends Service {

    /**
     * Return the number of ms delay for this speaker, between a packet
     * being written and it being heard
     */
    public int getDelay();

    /**
     * Return the size of the speaker buffer in bytes.
     */
    public int getBufferSize();

    /**
     * Return a nice name for the Speaker for display to the user
     */
    public String getDisplayName();

    /**
     * Return a unique ID for the speaker
     */
    int getUniqueId();

    /**
     * Returns true if this speaker can have its gain adjusted
     */
    public boolean hasGain();

    /**
     * Set the gain of this speaker. A value of NaN means "no audio".
     * If this method fails, set the Error.
     */
    public void setGain(float gain);

    /**
     * Set the player for the speaker. This method should
     * call {@link Player#removeSpeaker} on the old player
     * and {@link Player#addSpeaker} on the new one, and
     * anyone moving speakers between players should call
     * this method rather than those methods directly.
     */
// Path: src/com/nixus/raop/core/Service.java
// public interface Service {
// 
//     /**
//      * Start the Service
//      * @param context the ServiceContext for this Service
//      */
//     public void startService(ServiceContext context);
// 
//     /**
//      * Stop the Service
//      * @param context the ServiceContext for this Service (same as was passed into start)
//      */
//     public void stopService(ServiceContext context);
// 
//     /**
//      * Return the ServiceContext that was passed into {@link #startService}
//      */
//     public ServiceContext getContext();
// 
//     /**
//      * Return a Map describing the state of this Service, for serialization back to any
//      * client that needs to know (eg webplayer) - so values should be serializable objects,
//      * eg Lists, Maps or simple objects. If no useful state, return null.
//      */
//     public Map<String,Object> reportState();
// 
// }
// 
// Path: src/com/nixus/raop/player/Player.java
// public interface Player extends Service {
// 
// 
// 
// 
//     /**
//      * Set the current volume
//      * @param volume the volume, between 0 and 100
//      */
// 
//     public void setVolume(int volume);
// 
//     /**
//      * Return the current volume
//      * @return the volume, between 0 and 100
//      */
// 
//     public int getVolume();
// 
//     //-------------------------------------------------------------------------------
// 
//     /**
//      * Get the collection of speakers that could be used by this Player and that
//      * aren't currently in use elsewhere.
//      */
//     public Collection<Speaker> getAvailableSpeakers();
// 
//     /**
//      * Add a Speaker to the Player. Should only be called by {@link Speaker#setPlayer}.
//      */
//     public void addSpeaker(Speaker speaker);
// 
//     /**
//      * Remove a Speaker to the Player. Should only be called by {@link Speaker#setPlayer}.
//      */
//     public void removeSpeaker(Speaker speaker);
// 
//     /**
//      * Return the list of {@link Speaker} objects current in use by this Player
//      */
//     public Collection<Speaker> getSpeakers();
// 
// 
//     /**
//      * Return the revision number. This should be increased every time the Player's state is
//      * updated.
//      */
//     public int getRevision();
// 
//     /**
//      * Return a nice name for this Player for display to the user
//      */
//     public String getDisplayName();
// 
// }


// Path: src/com/nixus/raop/speaker/Speaker.java
import com.nixus.raop.core.Service;
import com.nixus.raop.player.Player;

package com.nixus.raop.speaker;



/**
 * A Speaker is an output device, which may be a local JavaSound speaker,
 * an Airtunes speaker, a network speaker or similar. A {@link Player} has
 * one or more speakers and a {@link Speaker} may be assigned to exactly
 * one Player, or unassigned. Writing to a Speaker should <b>never</b> throw
 * an Exception of any sort - instead the internal {@link #getException Exception}
 * should be set. This is reset when the Speaker is opened.
 */
public interface Speaker extends Service {

    /**
     * Return the number of ms delay for this speaker, between a packet
     * being written and it being heard
     */
    public int getDelay();

    /**
     * Return the size of the speaker buffer in bytes.
     */
    public int getBufferSize();

    /**
     * Return a nice name for the Speaker for display to the user
     */
    public String getDisplayName();

    /**
     * Return a unique ID for the speaker
     */
    int getUniqueId();

    /**
     * Returns true if this speaker can have its gain adjusted
     */
    public boolean hasGain();

    /**
     * Set the gain of this speaker. A value of NaN means "no audio".
     * If this method fails, set the Error.
     */
    public void setGain(float gain);

    /**
     * Set the player for the speaker. This method should
     * call {@link Player#removeSpeaker} on the old player
     * and {@link Player#addSpeaker} on the new one, and
     * anyone moving speakers between players should call
     * this method rather than those methods directly.
     */
    public void setPlayer(Player player);