summaryrefslogtreecommitdiff
path: root/src/lib/eio/eio_sentry.eo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eio/eio_sentry.eo')
-rw-r--r--src/lib/eio/eio_sentry.eo49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/lib/eio/eio_sentry.eo b/src/lib/eio/eio_sentry.eo
new file mode 100644
index 0000000000..e9b39ddc86
--- /dev/null
+++ b/src/lib/eio/eio_sentry.eo
@@ -0,0 +1,49 @@
+import eina_types;
+
+struct Eio.Sentry.Event
+{
+ [[Wraps the data about a monitor event on a file.]]
+ trigger: const(char)*; [[The cause of the event.]]
+ source: const(char)*; [[The original monitored path.]]
+}
+
+class Eio.Sentry (Eo.Base)
+{
+ [[Monitors files and directories for changes.]]
+
+ legacy_prefix: null;
+
+ methods {
+ add {
+ [[Adds a new path to the list of monitored paths.]]
+ params {
+ @in path: const(char)*;
+ }
+ return : bool;
+ }
+ del {
+ [[Removes the given path from the monitored list.]]
+ params {
+ @in path: const(char)*;
+ }
+ }
+ }
+ events {
+ file,created: Eio.Sentry.Event;
+ file,deleted: Eio.Sentry.Event;
+ file,modified: Eio.Sentry.Event;
+ file,closed: Eio.Sentry.Event;
+ directory,created: Eio.Sentry.Event;
+ directory,deleted: Eio.Sentry.Event;
+ directory,modified: Eio.Sentry.Event;
+ directory,closed: Eio.Sentry.Event;
+ self,rename: Eio.Sentry.Event;
+ self,deleted: Eio.Sentry.Event;
+ error: Eio.Sentry.Event;
+ }
+
+ implements {
+ Eo.Base.constructor;
+ Eo.Base.destructor;
+ }
+}