michael@0: /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_ipc_UnixFileWatcher_h michael@0: #define mozilla_ipc_UnixFileWatcher_h michael@0: michael@0: #include "UnixFdWatcher.h" michael@0: michael@0: namespace mozilla { michael@0: namespace ipc { michael@0: michael@0: class UnixFileWatcher : public UnixFdWatcher michael@0: { michael@0: public: michael@0: virtual ~UnixFileWatcher(); michael@0: michael@0: nsresult Open(const char* aFilename, int aFlags, mode_t aMode = 0); michael@0: michael@0: // Callback method for successful open requests michael@0: virtual void OnOpened() {}; michael@0: michael@0: protected: michael@0: UnixFileWatcher(MessageLoop* aIOLoop); michael@0: UnixFileWatcher(MessageLoop* aIOLoop, int aFd); michael@0: }; michael@0: michael@0: } michael@0: } michael@0: michael@0: #endif