src/transport_test.h
branchnew-lib-errors
changeset 219 cefec18b8268
parent 218 5229a5d098b2
--- a/src/transport_test.h	Thu May 28 00:35:02 2009 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#ifndef TRANSPORT_TEST_H
-#define TRANSPORT_TEST_H
-
-/**
- * @file
- *
- * Dummy transport implemention for local testing.
- */
-#include "transport.h"
-
-/**
- * The opaque transport state
- */
-struct transport_test;
-
-/**
- * Construct a new, empty, connected transport_test.
- */
-struct transport_test* transport_test_create (struct transport_info *info);
-
-/**
- * A transport_test is a valid transport, this performs the cast
- */
-transport_t* transport_test_cast (struct transport_test *tp);
-
-/**
- * Invoke the transport's user callbacks for the given event mask, unless masked out.
- */
-void transport_test_event (struct transport_test *tp, short what);
-
-/**
- * Adds a data buffer to the recieve buffer.
- *
- * The given data is copied.
- *
- * If events are enabled, they are triggered.
- */
-void transport_test_push_buf (struct transport_test *tp, const char *buf, size_t len);
-
-/**
- * Add a string to the recieve buffer using transport_test_push_buf()
- */
-void transport_test_push_str (struct transport_test *tp, const char *str);
-
-/**
- * Maximum length of a formatted string pushed
- */
-#define TRANSPORT_TEST_FMT_MAX 4096
-
-/**
- * Add a formatted string to the recieve buffer
- *
- * @see TRANSPORT_TEST_FMT_MAX
- */
-void transport_test_push_fmt (struct transport_test *tp, const char *fmt, ...);
-
-/**
- * Set EOF on recv.
- */
-void transport_test_push_eof (struct transport_test *tp);
-
-/**
- * Get the send buffer contents as a single buffer, free() after use.
- *
- * This clears the send buffer, so this doesn't return the same data twice.
- */
-void transport_test_pull_buf (struct transport_test *tp, char **buf_ptr, size_t *len_ptr);
-
-/**
- * Send async error
- */
-void transport_test_async_error (struct transport_test *tp, const error_t *err);
-
-/**
- * Destroy the transport buffer, releasing any buffers we allocated ourself
- */
-void transport_test_destroy (struct transport_test *tp);
-
-#endif /* TRANSPORT_TEST_H */