[Box Backup-commit] COMMIT r3461 - box/trunk/lib/common

subversion at boxbackup.org subversion at boxbackup.org
Mon Dec 15 23:26:22 GMT 2014


Author: chris
Date: 2014-12-15 23:26:21 +0000 (Mon, 15 Dec 2014)
New Revision: 3461

Removed:
   box/trunk/lib/common/EventWatchFilesystemObject.cpp
   box/trunk/lib/common/EventWatchFilesystemObject.h
Log:
Remove unused files.


Deleted: box/trunk/lib/common/EventWatchFilesystemObject.cpp
===================================================================
--- box/trunk/lib/common/EventWatchFilesystemObject.cpp	2014-12-12 23:24:32 UTC (rev 3460)
+++ box/trunk/lib/common/EventWatchFilesystemObject.cpp	2014-12-15 23:26:21 UTC (rev 3461)
@@ -1,112 +0,0 @@
-// --------------------------------------------------------------------------
-//
-// File
-//		Name:    EventWatchFilesystemObject.cpp
-//		Purpose: WaitForEvent compatible object for watching directories
-//		Created: 12/3/04
-//
-// --------------------------------------------------------------------------
-
-#include "Box.h"
-
-#include <errno.h>
-#include <fcntl.h>
-
-#ifdef HAVE_UNISTD_H
-	#include <unistd.h>
-#endif
-
-#include "EventWatchFilesystemObject.h"
-#include "autogen_CommonException.h"
-#include "Logging.h"
-
-#include "MemLeakFindOn.h"
-
-
-// --------------------------------------------------------------------------
-//
-// Function
-//	Name:    EventWatchFilesystemObject::EventWatchFilesystemObject
-//		 (const char *)
-//	Purpose: Constructor -- opens the file object
-//	Created: 12/3/04
-//
-// --------------------------------------------------------------------------
-EventWatchFilesystemObject::EventWatchFilesystemObject(const char *Filename)
-#ifdef HAVE_KQUEUE
-	: mDescriptor(::open(Filename, O_RDONLY /*O_EVTONLY*/, 0))
-#endif
-{
-#ifdef HAVE_KQUEUE
-	if(mDescriptor == -1)
-	{
-		BOX_LOG_SYS_ERROR("EventWatchFilesystemObject: "
-			"Failed to open file '" << Filename << "'");
-		THROW_EXCEPTION(CommonException, OSFileOpenError)
-	}
-#else
-	THROW_EXCEPTION(CommonException, KQueueNotSupportedOnThisPlatform)
-#endif
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Function
-//	Name:    EventWatchFilesystemObject::~EventWatchFilesystemObject()
-//	Purpose: Destructor
-//	Created: 12/3/04
-//
-// --------------------------------------------------------------------------
-EventWatchFilesystemObject::~EventWatchFilesystemObject()
-{
-	if(mDescriptor != -1)
-	{
-		::close(mDescriptor);
-	}
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Function
-//	Name:    EventWatchFilesystemObject::EventWatchFilesystemObject
-//		 (const EventWatchFilesystemObject &)
-//	Purpose: Copy constructor
-//	Created: 12/3/04
-//
-// --------------------------------------------------------------------------
-EventWatchFilesystemObject::EventWatchFilesystemObject(
-	const EventWatchFilesystemObject &rToCopy)
-	: mDescriptor(::dup(rToCopy.mDescriptor))
-{
-	if(mDescriptor == -1)
-	{
-		THROW_EXCEPTION(CommonException, OSFileError)
-	}
-}
-
-
-#ifdef HAVE_KQUEUE
-// --------------------------------------------------------------------------
-//
-// Function
-//	Name:    EventWatchFilesystemObject::FillInKEvent(struct kevent &, int)
-//	Purpose: For WaitForEvent
-//	Created: 12/3/04
-//
-// --------------------------------------------------------------------------
-void EventWatchFilesystemObject::FillInKEvent(struct kevent &rEvent,
-	int Flags) const
-{
-	EV_SET(&rEvent, mDescriptor, EVFILT_VNODE, EV_CLEAR,
-		NOTE_DELETE | NOTE_WRITE, 0, (void*)this);
-}
-#else
-void EventWatchFilesystemObject::FillInPoll(int &fd, short &events,
-	int Flags) const
-{
-	THROW_EXCEPTION(CommonException, KQueueNotSupportedOnThisPlatform)
-}
-#endif
-

Deleted: box/trunk/lib/common/EventWatchFilesystemObject.h
===================================================================
--- box/trunk/lib/common/EventWatchFilesystemObject.h	2014-12-12 23:24:32 UTC (rev 3460)
+++ box/trunk/lib/common/EventWatchFilesystemObject.h	2014-12-15 23:26:21 UTC (rev 3461)
@@ -1,48 +0,0 @@
-// --------------------------------------------------------------------------
-//
-// File
-//		Name:    EventWatchFilesystemObject.h
-//		Purpose: WaitForEvent compatible object for watching directories
-//		Created: 12/3/04
-//
-// --------------------------------------------------------------------------
-
-#ifndef EVENTWATCHFILESYSTEMOBJECT__H
-#define EVENTWATCHFILESYSTEMOBJECT__H
-
-#ifdef HAVE_KQUEUE
-	#include <sys/event.h>
-#endif
-
-
-// --------------------------------------------------------------------------
-//
-// Class
-//		Name:    EventWatchFilesystemObject
-//		Purpose: WaitForEvent compatible object for watching files and directories
-//		Created: 12/3/04
-//
-// --------------------------------------------------------------------------
-class EventWatchFilesystemObject
-{
-public:
-	EventWatchFilesystemObject(const char *Filename);
-	~EventWatchFilesystemObject();
-	EventWatchFilesystemObject(const EventWatchFilesystemObject &rToCopy);
-private:
-	// Assignment not allowed
-	EventWatchFilesystemObject &operator=(const EventWatchFilesystemObject &);
-public:
-
-#ifdef HAVE_KQUEUE
-	void FillInKEvent(struct kevent &rEvent, int Flags = 0) const;
-#else
-	void FillInPoll(int &fd, short &events, int Flags = 0) const;
-#endif
-
-private:
-	int mDescriptor;
-};
-
-#endif // EventWatchFilesystemObject__H
-




More information about the Boxbackup-commit mailing list