1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2006-2007 Red Hat, Inc.
4 * Copyright (C) 2014 Chun-wei Fan
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 * Author: Vlad Grecescu <b100dian@gmail.com>
20 * Author: Chun-wei Fan <fanc999@yahoo.com.tw>
24 #ifndef __G_WIN32_FS_MONITOR_UTILS_H__
25 #define __G_WIN32_FS_MONITOR_UTILS_H__
29 #include "gio/glocalfilemonitor.h"
31 #include "gio/gfilemonitor.h"
35 typedef struct _GWin32FSMonitorPrivate GWin32FSMonitorPrivate
;
37 struct _GWin32FSMonitorPrivate
39 OVERLAPPED overlapped
;
40 DWORD buffer_allocated_bytes
;
41 PFILE_NOTIFY_INFORMATION file_notify_buffer
;
42 DWORD buffer_filled_bytes
;
45 wchar_t *wfullpath_with_long_prefix
;
46 wchar_t *wfilename_short
;
47 wchar_t *wfilename_long
;
49 PFILE_NOTIFY_INFORMATION pfni_prev
;
50 /* Needed in the APC where we only have this private struct */
52 GFileMonitorSource
*fms
;
55 enum GWin32FileMonitorFileAlias
57 G_WIN32_FILE_MONITOR_NO_ALIAS
= 0,
58 G_WIN32_FILE_MONITOR_LONG_FILENAME
,
59 G_WIN32_FILE_MONITOR_SHORT_FILENAME
,
60 G_WIN32_FILE_MONITOR_NO_MATCH_FOUND
63 GWin32FSMonitorPrivate
* g_win32_fs_monitor_create (gboolean isfile
);
65 void g_win32_fs_monitor_init (GWin32FSMonitorPrivate
*monitor
,
67 const gchar
*filename
,
70 void g_win32_fs_monitor_finalize (GWin32FSMonitorPrivate
*monitor
);
72 void g_win32_fs_monitor_close_handle (GWin32FSMonitorPrivate
*monitor
);