2012-12-05 21:30:40 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Markus Goetz <markus@woboq.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
|
2014-01-13 19:16:19 +04:00
|
|
|
* the Free Software Foundation; version 2 of the License.
|
2012-12-05 21:30:40 +04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MIRALL_FOLDERWATCHER_MAC_H
|
|
|
|
#define MIRALL_FOLDERWATCHER_MAC_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
#include <CoreServices/CoreServices.h>
|
|
|
|
|
|
|
|
|
2014-11-10 00:34:07 +03:00
|
|
|
namespace OCC
|
2012-12-05 21:30:40 +04:00
|
|
|
{
|
|
|
|
|
2015-06-29 19:56:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Mac OS X API implementation of FolderWatcher
|
|
|
|
* @ingroup gui
|
2015-06-26 18:07:47 +03:00
|
|
|
*/
|
2012-12-05 21:30:40 +04:00
|
|
|
class FolderWatcherPrivate
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2014-01-13 19:00:41 +04:00
|
|
|
FolderWatcherPrivate(FolderWatcher *p, const QString &path);
|
2012-12-05 21:30:40 +04:00
|
|
|
~FolderWatcherPrivate();
|
|
|
|
|
2013-08-19 19:41:42 +04:00
|
|
|
void addPath(const QString &) {}
|
|
|
|
void removePath(const QString &) {}
|
|
|
|
|
2012-12-05 21:30:40 +04:00
|
|
|
void startWatching();
|
2014-02-18 03:36:41 +04:00
|
|
|
void doNotifyParent(const QStringList &);
|
2012-12-05 21:30:40 +04:00
|
|
|
|
|
|
|
private:
|
2014-01-13 19:00:41 +04:00
|
|
|
FolderWatcher *_parent;
|
2012-12-05 21:30:40 +04:00
|
|
|
|
2014-01-13 19:00:41 +04:00
|
|
|
QString _folder;
|
2012-12-05 21:30:40 +04:00
|
|
|
|
2014-02-19 03:46:48 +04:00
|
|
|
FSEventStreamRef _stream;
|
2012-12-05 21:30:40 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|