/*****************************************************************************
 * FVLMPlayer.java FVLC VLC Java RMI Binding
 *****************************************************************************
 *
 * @author : Festastic, <info@festastic.com>
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *
 */

package com.festastic.fvlc.rmi;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface FVLMPlayer extends Remote {

    /**
     * Returns streaming source port number.
     *
     * @param String
     *            name
     * @return int Source Port
     * @throws RemoteException
     */
    public abstract int getSourcePort(String name) throws RemoteException;

    /**
     * Start streaming music file using JVLM instance. name will be key for this
     * streaming session.
     *
     * @param String
     *            name
     * @param String
     *            uri
     * @param String
     *            addr
     * @param int port
     * @return int source port
     * @throws RemoteException
     */
    public abstract String startStream(String name, String uri, final String addr, final int port)
            throws RemoteException;

    /**
     * Stop streaming session.
     *
     * @param String
     *            name
     * @throws RemoteException
     */
    public abstract void stopStream(String name) throws RemoteException;

    /**
     * Toggle Play/Pause stream.
     *
     * @param String
     *            name
     * @param boolean isPlaying
     * @throws RemoteException
     */
    public abstract void toggleStream(String name, boolean isPlaying) throws RemoteException;

    /**
     * Seek stream.
     *
     * @param String
     *            name
     * @param int position
     * @throws RemoteException
     */
    public abstract void seekStream(String name, float position) throws RemoteException;

}