test servers: convert to static inclusion of plugins
[platform/upstream/libwebsockets.git] / test-server / test-server.h
index cb69d50..29e6717 100644 (file)
@@ -57,6 +57,9 @@ extern int count_pollfds;
 extern volatile int force_exit;
 extern struct lws_context *context;
 extern char *resource_path;
+#if defined(LWS_OPENSSL_SUPPORT) && defined(LWS_HAVE_SSL_CTX_set1_param)
+extern char crl_path[1024];
+#endif
 
 extern void test_server_lock(int care);
 extern void test_server_unlock(int care);
@@ -66,7 +69,23 @@ extern void test_server_unlock(int care);
 #endif
 
 struct per_session_data__http {
-       lws_filefd_type fd;
+       lws_fop_fd_t fop_fd;
+#ifdef LWS_WITH_CGI
+       struct lws_cgi_args args;
+#endif
+#if defined(LWS_WITH_CGI) || !defined(LWS_NO_CLIENT)
+       int reason_bf;
+#endif
+       unsigned int client_finished:1;
+
+
+       struct lws_spa *spa;
+       char result[500 + LWS_PRE];
+       int result_len;
+
+       char filename[256];
+       long file_length;
+       lws_filefd_type post_fd;
 };
 
 /*
@@ -77,48 +96,22 @@ struct per_session_data__http {
  * connection.
  */
 
+#if !defined(DI_HANDLED_BY_PLUGIN)
 struct per_session_data__dumb_increment {
        int number;
 };
+#endif
 
-struct per_session_data__lws_mirror {
-       struct lws *wsi;
-       int ringbuffer_tail;
-};
-
-struct per_session_data__echogen {
-       size_t total;
-       size_t total_rx;
-       int fd;
-       int fragsize;
-       int wr;
-};
-
-struct per_session_data__lws_status {
-       struct per_session_data__lws_status *list;
-       struct timeval tv_established;
-       int last;
-       char ip[270];
-       char user_agent[512];
-       const char *pos;
-       int len;
-};
 
 extern int
 callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user,
              void *in, size_t len);
-extern int
-callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
-                   void *user, void *in, size_t len);
+
+#if !defined(DI_HANDLED_BY_PLUGIN)
 extern int
 callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
                        void *user, void *in, size_t len);
-extern int
-callback_lws_echogen(struct lws *wsi, enum lws_callback_reasons reason,
-                       void *user, void *in, size_t len);
-extern int
-callback_lws_status(struct lws *wsi, enum lws_callback_reasons reason,
-                   void *user, void *in, size_t len);
+#endif
 
 
 extern void