/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2012-2013 University of California, Los Angeles
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Jared Lindblom <lindblom@cs.ucla.edu>
 *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
 *         Zhenkai Zhu <zhenkai@cs.ucla.edu>
 */
#ifndef FS_WATCHER_H
#define FS_WATCHER_H

#include <vector>
#include <QFileSystemWatcher>

#include "structs.h"

#include "executor.h"

class FsWatcher : public QObject
{
  Q_OBJECT

public:
  // constructor
  FsWatcher (QString dirPath, QObject* parent = 0);

  // destructor
  ~FsWatcher ();

private slots:
  // handle callback from watcher
  void
  DidDirectoryChanged (QString dirPath);

  /**
   * @brief This even will be triggered either by actual file change or via directory change event
   * (i.e., can happen twice in a row, as well as trigger false alarm)
   */
  void
  DidFileChanged (QString filePath);

private:
  // handle callback from the watcher
  void
  DidDirectoryChanged_Execute (QString dirPath);

  // scan directory and notify callback about any file changes
  void
  ScanDirectory_Notify_Execute (QString dirPath);

  // // reconcile directory, find changes
  // std::vector<sEventInfo>
  // reconcileDirectory (QHash<QString, qint64> fileList, QString dirPath);

  // // calculate checksum
  // QByteArray calcChecksum(QString absFilePath);

  // // print Changes (DEBUG)
  // void printChanges(std::vector<sEventInfo> dirChanges);

private:
  QFileSystemWatcher* m_watcher; // filesystem watcher
  Executor m_executor;

  QString m_dirPath; // monitored path
};

#endif // FILESYSTEMWATCHER_H
