summaryrefslogtreecommitdiff
path: root/decoders/http/http_decoder_string.h
diff options
context:
space:
mode:
authorlijia <[email protected]>2024-10-27 18:08:00 +0800
committerlijia <[email protected]>2024-11-08 11:23:16 +0800
commit627cfac992c52e3c7950355c0d447764056a5276 (patch)
treeafb5f8f462d964a764dbb071f5cfadad199cbe4d /decoders/http/http_decoder_string.h
parentd0a868591470a4a9d71a65a5d540058e72c8d92c (diff)
httpv2.0 rebase onto develop-2.0dev-http-v2.0
Diffstat (limited to 'decoders/http/http_decoder_string.h')
-rw-r--r--decoders/http/http_decoder_string.h73
1 files changed, 0 insertions, 73 deletions
diff --git a/decoders/http/http_decoder_string.h b/decoders/http/http_decoder_string.h
deleted file mode 100644
index 83721e9..0000000
--- a/decoders/http/http_decoder_string.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#pragma once
-
-#include "stellar/http.h"
-
-enum string_state {
- STRING_STATE_INIT,
- STRING_STATE_REFER,
- STRING_STATE_CACHE,
- STRING_STATE_COMMIT,
-};
-
-/* state transition diagram
- * +----------+
- * | |
- * \|/ |
- * +------+ |
- * | init | |
- * +------+ |
- * | |
- * +---->| |
- * | \|/ |
- * | +-------+ |
- * | | refer |--+ |
- * | +-------+ | |
- * | | | |
- * | \|/ | |
- * | +-------+ | |
- * +--| cache | | |
- * +-------+ | |
- * | | |
- * |<------+ |
- * \|/ |
- * +--------+ |
- * | commit | |
- * +--------+ |
- * | |
- * \|/ |
- * +--------+ |
- * | reset |----+
- * +--------+
- */
-
-
-//http decoder string
-struct http_decoder_string {
- hstring refer; // shallow copy
- hstring cache; // deep copy
- hstring commit;
-
- enum string_state state;
- size_t max_cache_size;
-};
-
-void http_decoder_string_refer(struct http_decoder_string *rstr,
- const char *at, size_t length);
-
-void http_decoder_string_cache(struct http_decoder_string *rstr);
-
-void http_decoder_string_commit(struct http_decoder_string *rstr);
-
-void http_decoder_string_reset(struct http_decoder_string *rstr);
-
-void http_decoder_string_init(struct http_decoder_string *rstr,
- size_t max_cache_size);
-
-void http_decoder_string_reinit(struct http_decoder_string *rstr);
-
-enum string_state http_decoder_string_state(const struct http_decoder_string *rstr);
-
-int http_decoder_string_get(const struct http_decoder_string *rstr, char **name, size_t *name_len);
-
-void http_decoder_string_dump(struct http_decoder_string *rstr, const char *desc);
- \ No newline at end of file