summaryrefslogtreecommitdiff
path: root/node.h
diff options
context:
space:
mode:
authorSergiu Ivanov <unlimitedscolobb@gmail.com>2008-07-22 18:10:44 +0300
committerSergiu Ivanov <unlimitedscolobb@gmail.com>2008-07-22 18:10:44 +0300
commit13fa6563250dcd4b2d1a54f15aba1bb7d8aace28 (patch)
treef70c733622bd20dada164bf6b072c4bfb7bc22e4 /node.h
parentef6b6263abd1d58ebefe3c8b751c9148459c9638 (diff)
Added the possibility to propagate translators onto directories. Fixed bugs.
Now the user can enter directories using the following command: cd dir,,x All files in this directory will then be implicitly translated by translator 'x'; in other words, if there is a file 'file' in directory 'dir', after executing the command mentioned above, and after running cat file the user will obtain the content of 'file' translated by 'x'. Also fixed several rather serious bugs in lookup of file names of the type 'file,,x'.
Diffstat (limited to 'node.h')
-rw-r--r--node.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/node.h b/node.h
index 584aa9f3d..72c244e8c 100644
--- a/node.h
+++ b/node.h
@@ -165,4 +165,33 @@ node_unlink_file
char * name
);
/*----------------------------------------------------------------------------*/
+/*Sets the given translator on the supplied node*/
+/*This function will normally be called from netfs_attempt_lookup, therefore
+ it's better that the caller should provide the parent node for `node`.*/
+error_t
+node_set_translator
+ (
+ node_t * dir,
+ node_t * node,
+ const char * trans /*set this on `name`*/
+ );
+/*----------------------------------------------------------------------------*/
+/*Kill the topmost translator for this node*/
+/*This function will normally be called from netfs_attempt_lookup, therefore
+ it's better that the caller should provide the parent node for `node`.*/
+error_t
+node_kill_translator
+ (
+ node_t * dir,
+ node_t * node
+ );
+/*----------------------------------------------------------------------------*/
+/*Kills all translators on the current node or on all underlying nodes it the
+ current node is a directory*/
+void
+node_kill_all_translators
+ (
+ node_t * node
+ );
+/*----------------------------------------------------------------------------*/
#endif /*__NODE_H__*/