summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstore/enc.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/libstore/enc.c b/libstore/enc.c
new file mode 100644
index 00000000..02969d6b
--- /dev/null
+++ b/libstore/enc.c
@@ -0,0 +1,38 @@
+/* Store wire encoding/decoding
+
+ Copyright (C) 1996 Free Software Foundation, Inc.
+
+ Written by Miles Bader <miles@gnu.ai.mit.edu>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "store.h"
+
+/* Encode STORE into ENC, or return an error. The contents of ENC may
+ then be return as the value of file_get_storage_info; if for some reason
+ this can't be done, store_enc_dealloc may be used to deallocate the
+ mmemory used by the unsent vectors. */
+error_t store_encode (const struct store *store, struct store_enc *enc);
+
+/* Decode ENC, either returning a new store in STORE, or an error. If
+ nothing else is to be done with ENC, its contents may then be freed using
+ store_enc_dealloc. */
+error_t store_decode (struct store_enc *enc, struct store *store);
+
+/* Deallocate storage used by the fields in ENC (but nothing is done with ENC
+ itself). */
+void store_enc_dealloc (struct store_enc *enc);