From aec001267650c8f942a2a85268e0fb38f9dc2968 Mon Sep 17 00:00:00 2001 From: Chris Darroch Date: Tue, 16 Apr 2019 12:54:37 -0700 Subject: [PATCH] remove unused notification types on Linux and Mac The PreModify and FileDeleted event notification types are only used on Windows, or not at all, so we can remove them from the Mac and Linux implementations. This is akin to the changes made in fc85024193ba0a06dad12f620d6518b97f008779 to remove the NotificationMapping class on Mac and Linux. Note that we do still send PreDelete event notifications, and per the comments in GVFS/GVFS.Virtualization/FileSystemCallbacks.cs, the FileSystemVirtualizers currently expect to only receive either PreDelete or FileDeleted events, but not both, so removing the FileDeleted type should align with this expectation. --- ProjFS.Linux/PrjFSLib.Linux.Managed/CallbackDelegates.cs | 7 ------- ProjFS.Linux/PrjFSLib.Linux.Managed/NotificationType.cs | 2 -- ProjFS.Mac/PrjFSLib.Mac.Managed/CallbackDelegates.cs | 7 ------- ProjFS.Mac/PrjFSLib.Mac.Managed/NotificationType.cs | 2 -- 4 files changed, 18 deletions(-) diff --git a/ProjFS.Linux/PrjFSLib.Linux.Managed/CallbackDelegates.cs b/ProjFS.Linux/PrjFSLib.Linux.Managed/CallbackDelegates.cs index 8467ac79..ca10e6e7 100644 --- a/ProjFS.Linux/PrjFSLib.Linux.Managed/CallbackDelegates.cs +++ b/ProjFS.Linux/PrjFSLib.Linux.Managed/CallbackDelegates.cs @@ -35,9 +35,6 @@ namespace PrjFSLib.Linux public delegate Result NotifyFilePreConvertToFullEvent( string relativePath); - public delegate Result NotifyPreModifyEvent( - string relativePath); - // Informational post-event notifications public delegate void NotifyNewFileCreatedEvent( string relativePath, @@ -52,8 +49,4 @@ namespace PrjFSLib.Linux public delegate void NotifyFileModified( string relativePath); - - public delegate void NotifyFileDeleted( - string relativePath, - bool isDirectory); } diff --git a/ProjFS.Linux/PrjFSLib.Linux.Managed/NotificationType.cs b/ProjFS.Linux/PrjFSLib.Linux.Managed/NotificationType.cs index f9bf7a88..78db748a 100644 --- a/ProjFS.Linux/PrjFSLib.Linux.Managed/NotificationType.cs +++ b/ProjFS.Linux/PrjFSLib.Linux.Managed/NotificationType.cs @@ -14,8 +14,6 @@ namespace PrjFSLib.Linux HardLinkCreated = 0x00000100, PreConvertToFull = 0x00001000, - PreModify = 0x10000001, FileModified = 0x10000002, - FileDeleted = 0x10000004, } } diff --git a/ProjFS.Mac/PrjFSLib.Mac.Managed/CallbackDelegates.cs b/ProjFS.Mac/PrjFSLib.Mac.Managed/CallbackDelegates.cs index cf81bdea..3d5cdab3 100644 --- a/ProjFS.Mac/PrjFSLib.Mac.Managed/CallbackDelegates.cs +++ b/ProjFS.Mac/PrjFSLib.Mac.Managed/CallbackDelegates.cs @@ -51,9 +51,6 @@ namespace PrjFSLib.Mac public delegate Result NotifyFilePreConvertToFullEvent( string relativePath); - public delegate Result NotifyPreModifyEvent( - string relativePath); - // Informational post-event notifications public delegate void NotifyNewFileCreatedEvent( string relativePath, @@ -69,8 +66,4 @@ namespace PrjFSLib.Mac public delegate void NotifyFileModified( string relativePath); - - public delegate void NotifyFileDeleted( - string relativePath, - bool isDirectory); } diff --git a/ProjFS.Mac/PrjFSLib.Mac.Managed/NotificationType.cs b/ProjFS.Mac/PrjFSLib.Mac.Managed/NotificationType.cs index cd3a1a5e..b9df3758 100644 --- a/ProjFS.Mac/PrjFSLib.Mac.Managed/NotificationType.cs +++ b/ProjFS.Mac/PrjFSLib.Mac.Managed/NotificationType.cs @@ -15,8 +15,6 @@ namespace PrjFSLib.Mac HardLinkCreated = 0x00000100, PreConvertToFull = 0x00001000, - PreModify = 0x10000001, FileModified = 0x10000002, - FileDeleted = 0x10000004, } }