/* Blinker
   Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org>
   Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
   a blinkenarea.org project */

#ifndef BLINKER_SYNCPRINTER_H
#define BLINKER_SYNCPRINTER_H

#include <string>

#include "Directory.h"
#include "File.h"
#include "InSyncFile.h"
#include "Mgrs.h"
#include "Module.h"
#include "SyncRecv.h"

namespace Blinker {

/// a sync stream printer
class SyncPrinter: public Module, public SyncRecv
{
public:
  /**
   * @brief constructor
   * @param[in] name module name
   * @param[in] mgrs managers
   * @param[in] dirBase base directory
   */
  SyncPrinter(const std::string &name, Mgrs &mgrs, const Directory &dirBase);

  /// virtual destructor
  virtual ~SyncPrinter();

private:
  /// copy constructor disabled
  SyncPrinter(const SyncPrinter &that);

  /// assignment operator disabled
  const SyncPrinter & operator=(const SyncPrinter &that);

public:
  /// check for update of configuration
  virtual void updateConfig();

  /**
   * @brief send synchronization information
   * @param[in] sync sync stream name
   * @param[in] pInfo synchronization information
   */
  virtual void sendInfo(const std::string &sync, Info &info);

protected:
  InSyncFile m_fileInSync; ///< input sync stream name file
}; // class SyncPrinter

} // namespace Blinker

#endif // #ifndef BLINKER_SYNCPRINTER_H

