]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/fsevents.h
xnu-3247.1.106.tar.gz
[apple/xnu.git] / bsd / sys / fsevents.h
index b8508c5773809d38742df0d827bf020ebe1700df..16fb2242585c584ba8d691e1ecde4c8304badca0 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
 #define FSE_CHOWN                8
 #define FSE_XATTR_MODIFIED       9
 #define FSE_XATTR_REMOVED       10
 #define FSE_CHOWN                8
 #define FSE_XATTR_MODIFIED       9
 #define FSE_XATTR_REMOVED       10
+#define FSE_DOCID_CREATED       11
+#define FSE_DOCID_CHANGED       12
 
 
-#define FSE_MAX_EVENTS          11
+#define FSE_MAX_EVENTS          13
 #define FSE_ALL_EVENTS         998
 
 #define FSE_EVENTS_DROPPED     999
 #define FSE_ALL_EVENTS         998
 
 #define FSE_EVENTS_DROPPED     999
 //
 #define FSE_MODE_HLINK         (1 << 31)    // notification is for a hard-link
 #define FSE_MODE_LAST_HLINK    (1 << 30)    // link count == 0 on a hard-link delete 
 //
 #define FSE_MODE_HLINK         (1 << 31)    // notification is for a hard-link
 #define FSE_MODE_LAST_HLINK    (1 << 30)    // link count == 0 on a hard-link delete 
-
+#define FSE_REMOTE_DIR_EVENT   (1 << 29)    // this is a remotely generated directory-level granularity event
+#define FSE_TRUNCATED_PATH     (1 << 28)    // the path for this item had to be truncated
 
 // ioctl's on /dev/fsevents
 
 // ioctl's on /dev/fsevents
-#if defined(__x86_64__) || defined(__ppc64__)
 typedef struct fsevent_clone_args {
     int8_t  *event_list;
     int32_t  num_events;
     int32_t  event_queue_depth;
     int32_t *fd;
 } fsevent_clone_args;
 typedef struct fsevent_clone_args {
     int8_t  *event_list;
     int32_t  num_events;
     int32_t  event_queue_depth;
     int32_t *fd;
 } fsevent_clone_args;
-#else
-typedef struct fsevent_clone_args {
-    int8_t  *event_list;
-    int32_t  pad1;
-    int32_t  num_events;
-    int32_t  event_queue_depth;
-    int32_t *fd;
-    int32_t  pad2;
-} fsevent_clone_args;
-#endif
 
 #define        FSEVENTS_CLONE          _IOW('s', 1, fsevent_clone_args)
 
 
 // ioctl's on the cloned fd
 
 #define        FSEVENTS_CLONE          _IOW('s', 1, fsevent_clone_args)
 
 
 // ioctl's on the cloned fd
-#if defined(__x86_64__) || defined(__ppc64__)
-typedef struct fsevent_dev_filter_args {
-    uint32_t  num_devices;
-    dev_t    *devices;
-} fsevent_dev_filter_args;
-#else
+#pragma pack(push, 4)
 typedef struct fsevent_dev_filter_args {
     uint32_t  num_devices;
     dev_t    *devices;
 typedef struct fsevent_dev_filter_args {
     uint32_t  num_devices;
     dev_t    *devices;
-    int32_t   pad1;
 } fsevent_dev_filter_args;
 } fsevent_dev_filter_args;
-#endif
+#pragma pack(pop)
 
 #define        FSEVENTS_DEVICE_FILTER          _IOW('s', 100, fsevent_dev_filter_args)
 #define        FSEVENTS_WANT_COMPACT_EVENTS    _IO('s', 101)
 #define        FSEVENTS_WANT_EXTENDED_INFO     _IO('s', 102)
 
 #define        FSEVENTS_DEVICE_FILTER          _IOW('s', 100, fsevent_dev_filter_args)
 #define        FSEVENTS_WANT_COMPACT_EVENTS    _IO('s', 101)
 #define        FSEVENTS_WANT_EXTENDED_INFO     _IO('s', 102)
+#define        FSEVENTS_GET_CURRENT_ID         _IOR('s', 103, uint64_t)
 
 
 #ifdef KERNEL
 
 
 #ifdef KERNEL
@@ -143,6 +130,8 @@ void fsevents_init(void);
 int  need_fsevent(int type, vnode_t vp);
 int  add_fsevent(int type, vfs_context_t, ...);
 void fsevent_unmount(struct mount *mp);
 int  need_fsevent(int type, vnode_t vp);
 int  add_fsevent(int type, vfs_context_t, ...);
 void fsevent_unmount(struct mount *mp);
+struct vnode_attr;
+void create_fsevent_from_kevent(vnode_t vp, uint32_t kevents, struct vnode_attr *vap);
 
 // misc utility functions for fsevent info and pathbuffers...
 typedef struct fse_info {
 
 // misc utility functions for fsevent info and pathbuffers...
 typedef struct fse_info {
@@ -155,6 +144,7 @@ typedef struct fse_info {
 } fse_info;
 
 int   get_fse_info(struct vnode *vp, fse_info *fse, vfs_context_t ctx);
 } fse_info;
 
 int   get_fse_info(struct vnode *vp, fse_info *fse, vfs_context_t ctx);
+int   vnode_get_fse_info_from_vap(vnode_t vp, fse_info *fse, struct vnode_attr *vap);
 
 char *get_pathbuff(void);
 void  release_pathbuff(char *path);
 
 char *get_pathbuff(void);
 void  release_pathbuff(char *path);