summaryrefslogtreecommitdiff
path: root/src/upb_strstream.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2011-07-15 12:05:43 -0700
committerJoshua Haberman <joshua@reverberate.org>2011-07-15 12:05:43 -0700
commit10265aa56b22ac4f04e7ba08330138e4507534e4 (patch)
treee821c85219a10b4ee3df715ab774465fdf87cf1d /src/upb_strstream.h
parent6a1f3a66939308668ab8dce0d195afec16e02af9 (diff)
Directory restructure.
Includes are now via upb/foo.h. Files specific to the protobuf format are now in upb/pb (the core library is concerned with message definitions, handlers, and byte streams, but knows nothing about any particular serializationf format).
Diffstat (limited to 'src/upb_strstream.h')
-rw-r--r--src/upb_strstream.h72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/upb_strstream.h b/src/upb_strstream.h
deleted file mode 100644
index e57406e..0000000
--- a/src/upb_strstream.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * upb - a minimalist implementation of protocol buffers.
- *
- * Copyright (c) 2009-2010 Google Inc. See LICENSE for details.
- * Author: Josh Haberman <jhaberman@gmail.com>
- *
- * This file contains upb_bytesrc and upb_bytesink implementations for
- * upb_string.
- */
-
-#ifndef UPB_STRSTREAM_H
-#define UPB_STRSTREAM_H
-
-#include "upb_bytestream.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* upb_stringsrc **************************************************************/
-
-struct _upb_stringsrc {
- upb_bytesrc bytesrc;
- const char *str;
- size_t len;
-};
-typedef struct _upb_stringsrc upb_stringsrc;
-
-// Create/free a stringsrc.
-void upb_stringsrc_init(upb_stringsrc *s);
-void upb_stringsrc_uninit(upb_stringsrc *s);
-
-// Resets the stringsrc to a state where it will vend the given string. The
-// stringsrc will take a reference on the string, so the caller need not ensure
-// that it outlives the stringsrc. A stringsrc can be reset multiple times.
-void upb_stringsrc_reset(upb_stringsrc *s, const char *str, size_t len);
-
-// Returns the upb_bytesrc* for this stringsrc.
-upb_bytesrc *upb_stringsrc_bytesrc(upb_stringsrc *s);
-
-
-/* upb_stringsink *************************************************************/
-
-struct _upb_stringsink {
- upb_bytesink bytesink;
- char *str;
- size_t len, size;
-};
-typedef struct _upb_stringsink upb_stringsink;
-
-// Create/free a stringsrc.
-void upb_stringsink_init(upb_stringsink *s);
-void upb_stringsink_uninit(upb_stringsink *s);
-
-// Resets the sink's string to "str", which the sink takes ownership of.
-// "str" may be NULL, which will make the sink allocate a new string.
-void upb_stringsink_reset(upb_stringsink *s, char *str, size_t size);
-
-// Releases ownership of the returned string (which is "len" bytes long) and
-// resets the internal string to be empty again (as if reset were called with
-// NULL).
-const char *upb_stringsink_release(upb_stringsink *s, size_t *len);
-
-// Returns the upb_bytesink* for this stringsrc. Invalidated by reset above.
-upb_bytesink *upb_stringsink_bytesink();
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback