fs-wrapper.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* fs.defs wrapper code.
  2. Copyright (C) 2008 Free Software Foundation, Inc.
  3. Written by FlÃvio Cruz <flaviocruz@gmail.com>
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation; either version 2, or (at
  7. your option) any later version.
  8. This program is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  15. #ifndef FS_WRAPPER_H
  16. #define FS_WRAPPER_H
  17. /* module that enables lisp to change what
  18. * routines will be run on certain filesystem
  19. * events. this header is specially made
  20. * to be used with swig
  21. */
  22. /* routines that can be set by the middle level */
  23. typedef enum
  24. {
  25. FILE_EXEC,
  26. FILE_CHOWN,
  27. FILE_CHAUTHOR,
  28. FILE_CHMOD,
  29. FILE_CHFLAGS,
  30. FILE_UTIMES,
  31. FILE_SET_SIZE,
  32. FILE_LOCK,
  33. FILE_LOCK_STAT,
  34. FILE_CHECK_ACCESS,
  35. FILE_NOTICE_CHANGES,
  36. FILE_GETCONTROL,
  37. FILE_STATFS,
  38. FILE_SYNC,
  39. FILE_SYNCFS,
  40. FILE_GET_STORAGE_INFO,
  41. FILE_GETLINKNODE,
  42. FILE_GETFH,
  43. DIR_LOOKUP,
  44. DIR_READDIR,
  45. DIR_MKDIR,
  46. DIR_RMDIR,
  47. DIR_UNLINK,
  48. DIR_LINK,
  49. DIR_RENAME,
  50. DIR_MKFILE,
  51. DIR_NOTICE_CHANGES,
  52. FILE_SET_TRANSLATOR,
  53. FILE_GET_TRANSLATOR,
  54. FILE_GET_TRANSLATOR_CNTL,
  55. FILE_GET_FS_OPTIONS,
  56. FILE_REPARENT,
  57. _NUMBER_OF_ROUTINES
  58. } FsRoutine;
  59. /* we could make a function for every handler
  60. * but that would get kinda tedious
  61. * just use a generic pointer
  62. * that will be cast when needed
  63. */
  64. void set_fs_routine (const FsRoutine what, void *fun);
  65. #endif