/* Network-Integrated Multimedia Middleware (NMM)
 * http://www.motama.com/nmm.html
 *
 * Copyright (C) 2006-2007
 * Motama GmbH, Saarbruecken, Germany
 * http://www.motama.com
 *
 * This file is part of NMM. 
 * 
 * NMM 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; only version 2 of the License.      
 * 
 * NMM 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 NMM; if not, write to the Free Software Foundation,    
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

#include "IController.idl"

module NMM {

  interface ISourceSynchronizer;

  /** Interface of a source controller.
   * This is the interface of a controller which provides synchronization for a source node.
   */
  interface ISourceController : IController {
    /** Set the master skew.
     * This method sets the skew between audio and video output.
     * The video output is presented later than the audio output by the given skew interval.
     *
     * @param skew Master skew
     * @return SUCCESS
     */
    void setMasterSkew(in Interval skew);

    /** Set the start time for this controller.
     * This method sets the start time for the controller. With the help of a start time, the nodes
     * can be told to start at e.g. 1 seconds after instantiating the Clock. This avoids scheduling
     * problems as one node would always be started some time after the other.
     */
    void setStartTime(in Time time);

    /** Set the source synchronizer.
     * This method is called by the synchronizer when a controller has been added.
     * The controller uses the given interface to communicate with the synchronizer.
     *
     * @param value Interface to the synchronizer
     * @return SUCCESS
     */
    Result setSourceSynchronizer(in ISourceSynchronizer* value);

    /** Set whether this controller is the source synchronization master.
     * This method is called by the synchronizer when a controller has been added.
     *
     * @param master @c true if the controller is the source synchronization master, @c false otherwise
     */
    void setSyncMaster(in nmm_bool master);
  };
}
