From dd9d49d5a99516957618f155ce1ecfd51678c586 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Fri, 23 Mar 2012 18:43:15 +0100 Subject: [PATCH] made all class and interface basics to a small lib. This is the first one. All other parts will become libs too. Right now these are only static libs but this way its easy to split them out if needed --- configure.ac | 2 +- include/class.h | 121 +------------------------ include/class/class.h | 125 ++++++++++++++++++++++++++ include/{ => class}/interface.h | 6 +- include/{ => class}/interface/class.h | 10 +-- include/interface/auth.h | 2 +- include/interface/hashable.h | 2 +- include/interface/logger.h | 2 +- src/Makefile.am | 8 +- src/auth/ldap.c | 1 - src/cbuf.c | 1 - src/class/Makefile.am | 8 ++ src/{ => class}/interface.c | 2 +- src/{ => class}/interface/class.c | 4 +- src/class/libclass.a | Bin 0 -> 17066 bytes src/credential.c | 1 - src/hash.c | 1 - src/hash/add.c | 2 +- src/hash_value.c | 2 +- src/http/cookie.c | 2 +- src/http/header.c | 1 - src/http/message.c | 1 - src/http/message/queue.c | 1 - src/http/parser.c | 1 - src/http/parser/header.c | 1 - src/http/parser/parse.c | 2 +- src/http/parser/post_vars.c | 2 +- src/http/parser/request_vars.c | 2 +- src/http/request.c | 1 - src/http/response.c | 1 - src/http/response/304.c | 1 - src/http/response/403.c | 1 - src/http/response/404.c | 1 - src/http/response/asset.c | 1 - src/http/response/login_form.c | 1 - src/http/response/randval.c | 1 - src/http/response/session.c | 1 - src/http/worker.c | 1 - src/http/worker/add_common_header.c | 1 - src/http/worker/process.c | 1 - src/http/writer.c | 1 - src/http/writer/write.c | 1 - src/logger.c | 2 +- src/server.c | 1 - src/server/close_conn.c | 2 +- src/server/handle_accept.c | 2 +- src/session.c | 1 - src/session/add.c | 2 +- src/session/delete.c | 2 +- src/socket.c | 2 +- src/socket/accept.c | 2 +- src/socket/connect.c | 2 +- src/socket/listen.c | 2 +- src/stream.c | 1 - src/taskrambler.c | 2 +- src/utils/http.c | 2 +- 56 files changed, 173 insertions(+), 179 deletions(-) create mode 100644 include/class/class.h rename include/{ => class}/interface.h (95%) rename include/{ => class}/interface/class.h (90%) create mode 100644 src/class/Makefile.am rename src/{ => class}/interface.c (98%) rename src/{ => class}/interface/class.c (96%) create mode 100644 src/class/libclass.a diff --git a/configure.ac b/configure.ac index f526f52..1cc1e30 100644 --- a/configure.ac +++ b/configure.ac @@ -38,5 +38,5 @@ AC_TYPE_SIZE_T #AC_FUNC_MALLOC AC_CHECK_FUNCS([memset]) -AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile src/class/Makefile tests/Makefile]) AC_OUTPUT diff --git a/include/class.h b/include/class.h index d08e85f..6c07bbc 100644 --- a/include/class.h +++ b/include/class.h @@ -1,124 +1,9 @@ -/** - * \file - * My own class implementation for C. It combines a data structure - * with a set of dynamically linked methods defined by an interface. A - * dynamically linked method will be called via a selector method which in - * turn gets the implementation stored in the class. - * - * \author Georg Hopp - * - * \copyright - * Copyright © 2012 Georg Hopp - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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, see . - */ - #ifndef __CLASS_H__ #define __CLASS_H__ -#include -#include -#include -#include - -#include "interface.h" - -#ifndef _ISOC99_SOURCE -#define _ISOC99_SOURCE -#endif - -#define CLASS_MAGIC 0xFEFE - -#define CLASS(name) \ - struct c_##name; \ - typedef struct c_##name * name; \ - extern struct class * const _##name; \ - struct c_##name - -#define EXTENDS(parent) \ - const char _[sizeof(struct c_##parent)] - -#define _NULL NULL -#define CREATE_CLASS(name,_parent,...) \ - static struct class c_##name; \ - static class_ptr _classInit_(void) { \ - c_##name.parent = _##_parent; \ - c_##name.init = NULL; \ - return &c_##name; \ - } \ - static struct class c_##name = { \ - CLASS_MAGIC, \ - NULL, \ - sizeof(struct c_##name), \ - _classInit_, \ - INIT_IFACE_IMPL(__VA_ARGS__) \ - }; struct class * const _##name = &c_##name - -#define INIT_CLASS(class) ((class)->init? (class)->init() : (class)) -#define GET_CLASS(object) (INIT_CLASS(*(class_ptr *)((object) - sizeof(void*)))) -#define IFACE_GET(class,iface) (interfaceGet(&((class)->impl),(iface))) -#define HAS_PARENT(class) (NULL != ((class)->parent) && INIT_CLASS((class)->parent)) - -/** - * \todo actually i use gcc feature ## for variadoc... think about - * a way to make this standard. - */ -#define _CALL(_class,_iface,method,...) \ - do { \ - class_ptr class = _class; \ - iface = (struct i_##_iface *)IFACE_GET(class, &i_##_iface); \ - while ((NULL == iface || NULL == iface->method) && HAS_PARENT(class)) { \ - class = class->parent; \ - iface = (struct i_##_iface *)IFACE_GET(class, &i_##_iface); \ - } \ - assert(NULL != iface->method); \ - } while(0) - -#define CALL(object,_iface,method,...) \ - do { \ - struct i_##_iface * iface; \ - _CALL(GET_CLASS(object), _iface, method, ##__VA_ARGS__); \ - iface->method(object, ##__VA_ARGS__); \ - } while(0) - -#define RETCALL(object,_iface,method,ret,...) \ - do { \ - struct i_##_iface * iface; \ - _CALL(GET_CLASS(object), _iface, method, ##__VA_ARGS__); \ - ret = iface->method(object, ##__VA_ARGS__); \ - } while(0) - -#define PARENTCALL(object,_iface,method,...) \ - do { \ - struct i_##_iface * iface; \ - class_ptr pc_class = GET_CLASS((object)); \ - assert(HAS_PARENT(pc_class)); \ - _CALL(pc_class->parent, _iface, method, ##__VA_ARGS__); \ - iface->method(object, ##__VA_ARGS__); \ - } while(0) - - -struct class; -typedef struct class * class_ptr; -typedef class_ptr (* fptr_classInit)(void); -struct class { - const int magic; - class_ptr parent; - size_t object_size; - fptr_classInit init; - struct iface_impl impl; -}; +#include "class/class.h" +#include "class/interface.h" +#include "class/interface/class.h" #endif // __CLASS_H__ diff --git a/include/class/class.h b/include/class/class.h new file mode 100644 index 0000000..1b6fd79 --- /dev/null +++ b/include/class/class.h @@ -0,0 +1,125 @@ +/** + * \file + * My own class implementation for C. It combines a data structure + * with a set of dynamically linked methods defined by an interface. A + * dynamically linked method will be called via a selector method which in + * turn gets the implementation stored in the class. + * + * \author Georg Hopp + * + * \copyright + * Copyright © 2012 Georg Hopp + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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, see . + */ + +#ifndef __CLASS_CLASS_H__ +#define __CLASS_CLASS_H__ + +#include +#include +#include +#include + +#include "class/interface.h" + +#ifndef _ISOC99_SOURCE +#define _ISOC99_SOURCE +#endif + +#define CLASS_MAGIC 0xFEFE + +#define CLASS(name) \ + struct c_##name; \ + typedef struct c_##name * name; \ + extern struct class * const _##name; \ + struct c_##name + +#define EXTENDS(parent) \ + const char _[sizeof(struct c_##parent)] + +#define _NULL NULL +#define CREATE_CLASS(name,_parent,...) \ + static struct class c_##name; \ + static class_ptr _classInit_(void) { \ + c_##name.parent = _##_parent; \ + c_##name.init = NULL; \ + return &c_##name; \ + } \ + static struct class c_##name = { \ + CLASS_MAGIC, \ + NULL, \ + sizeof(struct c_##name), \ + _classInit_, \ + INIT_IFACE_IMPL(__VA_ARGS__) \ + }; struct class * const _##name = &c_##name + +#define INIT_CLASS(class) ((class)->init? (class)->init() : (class)) +#define GET_CLASS(object) (INIT_CLASS(*(class_ptr *)((object) - sizeof(void*)))) +#define IFACE_GET(class,iface) (interfaceGet(&((class)->impl),(iface))) +#define HAS_PARENT(class) (NULL != ((class)->parent) && INIT_CLASS((class)->parent)) + +/** + * \todo actually i use gcc feature ## for variadoc... think about + * a way to make this standard. + */ +#define _CALL(_class,_iface,method,...) \ + do { \ + class_ptr class = _class; \ + iface = (struct i_##_iface *)IFACE_GET(class, &i_##_iface); \ + while ((NULL == iface || NULL == iface->method) && HAS_PARENT(class)) { \ + class = class->parent; \ + iface = (struct i_##_iface *)IFACE_GET(class, &i_##_iface); \ + } \ + assert(NULL != iface->method); \ + } while(0) + +#define CALL(object,_iface,method,...) \ + do { \ + struct i_##_iface * iface; \ + _CALL(GET_CLASS(object), _iface, method, ##__VA_ARGS__); \ + iface->method(object, ##__VA_ARGS__); \ + } while(0) + +#define RETCALL(object,_iface,method,ret,...) \ + do { \ + struct i_##_iface * iface; \ + _CALL(GET_CLASS(object), _iface, method, ##__VA_ARGS__); \ + ret = iface->method(object, ##__VA_ARGS__); \ + } while(0) + +#define PARENTCALL(object,_iface,method,...) \ + do { \ + struct i_##_iface * iface; \ + class_ptr pc_class = GET_CLASS((object)); \ + assert(HAS_PARENT(pc_class)); \ + _CALL(pc_class->parent, _iface, method, ##__VA_ARGS__); \ + iface->method(object, ##__VA_ARGS__); \ + } while(0) + + +struct class; +typedef struct class * class_ptr; +typedef class_ptr (* fptr_classInit)(void); +struct class { + const int magic; + class_ptr parent; + size_t object_size; + fptr_classInit init; + struct iface_impl impl; +}; + +#endif // __CLASS_CLASS_H__ + +// vim: set ts=4 sw=4: diff --git a/include/interface.h b/include/class/interface.h similarity index 95% rename from include/interface.h rename to include/class/interface.h index 34c3fcb..941f43c 100644 --- a/include/interface.h +++ b/include/class/interface.h @@ -24,8 +24,8 @@ * along with this program. If not, see . */ -#ifndef __INTERFACE_H__ -#define __INTERFACE_H__ +#ifndef __CLASS_INTERFACE_H__ +#define __CLASS_INTERFACE_H__ #include @@ -54,6 +54,6 @@ typedef struct iface_impl * iface_impl_ptr; extern iface_ptr interfaceGet(iface_impl_ptr, const iface_ptr); -#endif // __INTERFACE_H__ +#endif // __CLASS_INTERFACE_H__ // vim: set ts=4 sw=4: diff --git a/include/interface/class.h b/include/class/interface/class.h similarity index 90% rename from include/interface/class.h rename to include/class/interface/class.h index b0fd2ad..98cbdbd 100644 --- a/include/interface/class.h +++ b/include/class/interface/class.h @@ -23,13 +23,13 @@ * along with this program. If not, see . */ -#ifndef __INTERFACE_CLASS_H__ -#define __INTERFACE_CLASS_H__ +#ifndef __CLASS_INTERFACE_CLASS_H__ +#define __CLASS_INTERFACE_CLASS_H__ #include -#include "class.h" -#include "interface.h" +#include "class/class.h" +#include "class/interface.h" typedef int (* fptr_ctor)(void *, va_list *); typedef void (* fptr_dtor)(void *); @@ -52,6 +52,6 @@ extern void * classClone(void *); #define delete(object) classDelete((void **)&(object)) #define clone(object) classClone((void *)(object)) -#endif // __INTERFACE_CLASS_H__ +#endif // __CLASS_INTERFACE_CLASS_H__ // vim: set ts=4 sw=4: diff --git a/include/interface/auth.h b/include/interface/auth.h index ed552e7..ec55000 100644 --- a/include/interface/auth.h +++ b/include/interface/auth.h @@ -30,7 +30,7 @@ #include -#include "interface.h" +#include "class.h" #include "credential.h" typedef int (* fptr_authenticate)(void *, Credential); diff --git a/include/interface/hashable.h b/include/interface/hashable.h index 18b9ae3..a4dbc49 100644 --- a/include/interface/hashable.h +++ b/include/interface/hashable.h @@ -24,7 +24,7 @@ #ifndef __INTERFACE_HASHABLE_H__ #define __INTERFACE_HASHABLE_H__ -#include "interface.h" +#include "class.h" typedef unsigned long (* fptr_hashableGetHash)(void *); typedef void (* fptr_hashableHandleDouble)(void *, void *); diff --git a/include/interface/logger.h b/include/interface/logger.h index c55876c..9f02f02 100644 --- a/include/interface/logger.h +++ b/include/interface/logger.h @@ -26,7 +26,7 @@ #include -#include "interface.h" +#include "class.h" #include "logger.h" typedef void (* fptr_log)(void *, logger_level, const char * const); diff --git a/src/Makefile.am b/src/Makefile.am index de4d510..3386774 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,8 @@ ACLOCAL_AMFLAGS = -I m4 -IFACE = interface/class.c interface/stream_reader.c interface/logger.c \ +IFACE = interface/stream_reader.c interface/logger.c \ interface/stream_writer.c interface/http_intro.c \ - interface/subject.c interface/observer.c interface.c + interface/subject.c interface/observer.c SOCKET = socket.c socket/accept.c socket/connect.c socket/listen.c STREAM = stream.c stream/read.c stream/write.c HASH = hash.c hash/add.c hash/get.c hash/delete.c \ @@ -67,4 +67,6 @@ taskrambler_SOURCES = taskrambler.c \ $(WRITER) $(RESP) $(HEADER) $(PARSER) $(WORKER) $(CB) \ $(UTILS) $(MSGQ) $(SESSION) $(STREAM) $(HASH) $(AUTH) taskrambler_CFLAGS = -Wall -I ../include/ -taskrambler_LDFLAGS = -lrt -lssl -lldap +taskrambler_LDFLAGS = -L./class -lclass -lrt -lssl -lldap + +SUBDIRS = class diff --git a/src/auth/ldap.c b/src/auth/ldap.c index fb7bf0e..28f37d2 100644 --- a/src/auth/ldap.c +++ b/src/auth/ldap.c @@ -29,7 +29,6 @@ #include "auth/ldap.h" #include "class.h" #include "credential.h" -#include "interface/class.h" #include "interface/auth.h" #include "utils/memory.h" diff --git a/src/cbuf.c b/src/cbuf.c index fdf77db..0ee216d 100644 --- a/src/cbuf.c +++ b/src/cbuf.c @@ -34,7 +34,6 @@ #include #include "class.h" -#include "interface/class.h" #include "utils/memory.h" #include "cbuf.h" diff --git a/src/class/Makefile.am b/src/class/Makefile.am new file mode 100644 index 0000000..c457e13 --- /dev/null +++ b/src/class/Makefile.am @@ -0,0 +1,8 @@ +ACLOCAL_AMFLAGS = -I m4 + +AM_CFLAGS = -Wall -I ../include/ + +noinst_LIBRARIES = libclass.a + +libclass_a_SOURCES = interface.c interface/class.c +libclass_a_CFLAGS = -Wall -I ../../include/ diff --git a/src/interface.c b/src/class/interface.c similarity index 98% rename from src/interface.c rename to src/class/interface.c index 9d4d6b9..661561b 100644 --- a/src/interface.c +++ b/src/class/interface.c @@ -23,7 +23,7 @@ #include #include -#include "interface.h" +#include "class/interface.h" #include "commons.h" static diff --git a/src/interface/class.c b/src/class/interface/class.c similarity index 96% rename from src/interface/class.c rename to src/class/interface/class.c index cfdcf83..0113902 100644 --- a/src/interface/class.c +++ b/src/class/interface/class.c @@ -24,8 +24,8 @@ #include #include -#include "class.h" -#include "interface/class.h" +#include "class/class.h" +#include "class/interface/class.h" const struct interface i_Class = { diff --git a/src/class/libclass.a b/src/class/libclass.a new file mode 100644 index 0000000000000000000000000000000000000000..0892538f9b6bf8d214f987289b3e4672f2a91c29 GIT binary patch literal 17066 zcmdU0d2pP?mG5sxBYiq7jV*kD*)YZjl96X5`G5l3DA=;cK#Ypm8wYkX8cCyr$dWu7 z$$}~zj1fd@oS;pdizVePQVB^<Z7S1rk95hGN+e*bq`|vd%$p))ea;8@#!^@7Mj_ zH$AP9IgSYc*352G*_i3iey1Cq`$d&EtRjno?CYoKHG znpNDRz2XC{S8NJ-9u3+gPpwyZN>HWz@_fBTS6kGXYM$DjoOn4oal^6X#K_U){?=p3 z{R;mkT2B&12vaABI+?t<^+Yx*wVIDl)jTkDJaYIHrKi3LLGMoPd$o?Fy-3oYO&(}{ zmgGR{i!~3l_%~0DG@!0!ZhtX(;OgjuFyvo-%90aLBq#ps7-;Z3(c*iC7wU+2N0h`J zedl2?JZL)nFgbC=beJHs_uX(z<;sZ}BOs%+qlR_leUD=X3H5$4YdI4`7C zSH4VvvqCdPgsIZ=w$y^VY7sRjDwUcQCn;z?uWCyzY-uS)dv!#GeWN!-(rQ)}kkPnz zNma3Kv#A@Ki*9qMn?%2j%M(QEXZ0W@I4`UR9w`nJ!99;hVxEkD(3EmI{|d zXho}#uc?q}E72{_UkWzvWZEPCe!@z%oM>qI{X`f==c5{0%v8garhFCgAEH`0J$gO9aiLKjp=|_n<72_7i7yDy_U2B!wn-RHr%uqOFD+&V{L=$=({m7n^!J znM$DY8ob9*7D+!RhS|Wq2ACI`OfrRr&}7RT-4=gMQ*DMy{902xR5_$Ze6U7*t>NDY z2&o$>_q^X#&!Sv!5yard;|coLH_+KX(v?Z*JxC=+hO-IUu@XIgw7N<{x0_~KkooP6r0Wz?yUm&=O0N(q z35!ZSY1jxGjY@q>fbG_+f=OLS+hrDy)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?h2%vFC3s9DAeSM=Uw^xV~-i+v9p|2L9j7z~9cBos3JK<7*u}Mm8Z0I{3Q`ta6M) zjXkbAEF62Tj4RA93GmzVcs1khJa$<8_IUTsz&|kq|F0~5%;U}Uhx7*rk7<mi;#ooTh;>~3p77){i&5o*{Ot|Af2!_kg!a7N;SPm=XqRy z=hQO}IXWQ2w45VE{@J|lFSqz%&#O$gIXM2q8j}2W6*&mq~-kRx}XKJDQ0JbvE6&u97(2mb-f|CWQ_#yHMVNMg^I4XK{vQt&64{=S1B zXE{e593fMrS4k21d7!Ovy-!w%lX{C7I|!;F8?!4EP%<>2z(dYW+zhpW2B z^A0ZOh?gumvPYrAPc0nlLFVh%4t|LJ7Pj6C;C~rHC@pgEy#`hdjHA2#K3#3$P<4X& z*E#s5Y{w=?{=IC^c86c&{Jn$A|9RfjHse0i^dgel_ByBzs){*pKY))oBR zPJc-EIr7Dyk2&~W!>*pO%D2Ola&sB7u&y{aq*k@XOn}=`)jKu2Y#DkIq$J>=FIpCh??V;VKj7B6Luv^cmtckK=?>+1gj DkHC$E literal 0 HcmV?d00001 diff --git a/src/credential.c b/src/credential.c index 873877b..663cfe2 100644 --- a/src/credential.c +++ b/src/credential.c @@ -27,7 +27,6 @@ #include "credential.h" #include "class.h" -#include "interface/class.h" #include "utils/memory.h" diff --git a/src/hash.c b/src/hash.c index 8956144..bb2fb7a 100644 --- a/src/hash.c +++ b/src/hash.c @@ -27,7 +27,6 @@ #include "hash.h" #include "class.h" -#include "interface/class.h" static int diff --git a/src/hash/add.c b/src/hash/add.c index 5226862..32e9101 100644 --- a/src/hash/add.c +++ b/src/hash/add.c @@ -24,7 +24,7 @@ #include "hash.h" #include "interface/hashable.h" -#include "interface/class.h" +#include "class.h" static inline diff --git a/src/hash_value.c b/src/hash_value.c index c69a169..0df0ecb 100644 --- a/src/hash_value.c +++ b/src/hash_value.c @@ -29,7 +29,7 @@ #include "utils/hash.h" #include "utils/memory.h" #include "commons.h" -#include "interface/class.h" +#include "class.h" #include "interface/hashable.h" static diff --git a/src/http/cookie.c b/src/http/cookie.c index 412f463..29ca5a7 100644 --- a/src/http/cookie.c +++ b/src/http/cookie.c @@ -26,7 +26,7 @@ #include #include "cookie.h" -#include "interface/class.h" +#include "class.h" #include "interface/hashable" #include "utils/hash.h" diff --git a/src/http/header.c b/src/http/header.c index 999b878..8067569 100644 --- a/src/http/header.c +++ b/src/http/header.c @@ -25,7 +25,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/header.h" #include "interface/hashable.h" diff --git a/src/http/message.c b/src/http/message.c index 611f9de..663d710 100644 --- a/src/http/message.c +++ b/src/http/message.c @@ -31,7 +31,6 @@ #include #include "class.h" -#include "interface/class.h" #include "hash.h" #include "http/message.h" #include "utils/memory.h" diff --git a/src/http/message/queue.c b/src/http/message/queue.c index ceb4496..72dcf34 100644 --- a/src/http/message/queue.c +++ b/src/http/message/queue.c @@ -23,7 +23,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/message/queue.h" diff --git a/src/http/parser.c b/src/http/parser.c index be34cce..28e57c8 100644 --- a/src/http/parser.c +++ b/src/http/parser.c @@ -25,7 +25,6 @@ #include #include "class.h" -#include "interface/class.h" #include "interface/stream_reader.h" #include "http/parser.h" diff --git a/src/http/parser/header.c b/src/http/parser/header.c index 0944305..4f226f3 100644 --- a/src/http/parser/header.c +++ b/src/http/parser/header.c @@ -25,7 +25,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/header.h" #include "http/parser.h" #include "http/message.h" diff --git a/src/http/parser/parse.c b/src/http/parser/parse.c index 397c352..f392ede 100644 --- a/src/http/parser/parse.c +++ b/src/http/parser/parse.c @@ -24,7 +24,7 @@ #include "http/parser.h" #include "http/header.h" -#include "interface/class.h" +#include "class.h" #include "interface/http_intro.h" #include "cbuf.h" #include "stream.h" diff --git a/src/http/parser/post_vars.c b/src/http/parser/post_vars.c index 517133f..fe01658 100644 --- a/src/http/parser/post_vars.c +++ b/src/http/parser/post_vars.c @@ -27,7 +27,7 @@ #include "http/request.h" #include "hash_value.h" #include "hash.h" -#include "interface/class.h" +#include "class.h" /** * \todo this is very similar to other pair parsing diff --git a/src/http/parser/request_vars.c b/src/http/parser/request_vars.c index d0b47a1..cb82a08 100644 --- a/src/http/parser/request_vars.c +++ b/src/http/parser/request_vars.c @@ -28,7 +28,7 @@ #include "http/request.h" #include "hash_value.h" #include "hash.h" -#include "interface/class.h" +#include "class.h" void httpParserRequestVars(HttpParser this) diff --git a/src/http/request.c b/src/http/request.c index 4cd4c14..097a62e 100644 --- a/src/http/request.c +++ b/src/http/request.c @@ -26,7 +26,6 @@ #include #include "class.h" -#include "interface/class.h" #include "interface/http_intro.h" #include "http/request.h" diff --git a/src/http/response.c b/src/http/response.c index a53cd0d..d1b9d45 100644 --- a/src/http/response.c +++ b/src/http/response.c @@ -27,7 +27,6 @@ #include #include "class.h" -#include "interface/class.h" #include "interface/http_intro.h" #include "http/response.h" diff --git a/src/http/response/304.c b/src/http/response/304.c index a5ea639..81519a7 100644 --- a/src/http/response/304.c +++ b/src/http/response/304.c @@ -23,7 +23,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/response.h" #include "http/message.h" diff --git a/src/http/response/403.c b/src/http/response/403.c index 7256a3e..b1ef08f 100644 --- a/src/http/response/403.c +++ b/src/http/response/403.c @@ -26,7 +26,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/response.h" #include "http/message.h" diff --git a/src/http/response/404.c b/src/http/response/404.c index fd3fae3..1947de1 100644 --- a/src/http/response/404.c +++ b/src/http/response/404.c @@ -26,7 +26,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/response.h" #include "http/message.h" diff --git a/src/http/response/asset.c b/src/http/response/asset.c index 1ab4937..b0c58f2 100644 --- a/src/http/response/asset.c +++ b/src/http/response/asset.c @@ -28,7 +28,6 @@ #include #include "class.h" -#include "interface/class.h" #include "stream.h" #include "http/response.h" diff --git a/src/http/response/login_form.c b/src/http/response/login_form.c index e0e6374..f01063d 100644 --- a/src/http/response/login_form.c +++ b/src/http/response/login_form.c @@ -27,7 +27,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/response.h" #include "http/message.h" diff --git a/src/http/response/randval.c b/src/http/response/randval.c index d9eb0b7..b98449e 100644 --- a/src/http/response/randval.c +++ b/src/http/response/randval.c @@ -27,7 +27,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/response.h" #include "http/message.h" diff --git a/src/http/response/session.c b/src/http/response/session.c index 924fa87..396b6a6 100644 --- a/src/http/response/session.c +++ b/src/http/response/session.c @@ -27,7 +27,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/response.h" #include "http/message.h" diff --git a/src/http/worker.c b/src/http/worker.c index 5b8c36d..f64ccdb 100644 --- a/src/http/worker.c +++ b/src/http/worker.c @@ -34,7 +34,6 @@ #include "http/parser.h" #include "http/writer.h" -#include "interface/class.h" #include "interface/stream_reader.h" #include "interface/stream_writer.h" diff --git a/src/http/worker/add_common_header.c b/src/http/worker/add_common_header.c index 99472cf..981c4da 100644 --- a/src/http/worker/add_common_header.c +++ b/src/http/worker/add_common_header.c @@ -24,7 +24,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/message.h" #include "http/header.h" diff --git a/src/http/worker/process.c b/src/http/worker/process.c index 29ccbd7..60b22dd 100644 --- a/src/http/worker/process.c +++ b/src/http/worker/process.c @@ -28,7 +28,6 @@ #include #include "class.h" -#include "interface/class.h" #include "interface/auth.h" #include "http/worker.h" diff --git a/src/http/writer.c b/src/http/writer.c index a2f94ca..0c381e8 100644 --- a/src/http/writer.c +++ b/src/http/writer.c @@ -23,7 +23,6 @@ #include #include "class.h" -#include "interface/class.h" #include "interface/stream_writer.h" #include "http/message/queue.h" diff --git a/src/http/writer/write.c b/src/http/writer/write.c index 9639eea..5942242 100644 --- a/src/http/writer/write.c +++ b/src/http/writer/write.c @@ -24,7 +24,6 @@ #include #include "class.h" -#include "interface/class.h" #include "http/message.h" #include "http/writer.h" #include "cbuf.h" diff --git a/src/logger.c b/src/logger.c index d7237fd..6519f95 100644 --- a/src/logger.c +++ b/src/logger.c @@ -23,7 +23,7 @@ #include #include "logger.h" -#include "interface/class.h" +#include "class.h" #include "interface/logger.h" const diff --git a/src/server.c b/src/server.c index e01f044..5f43eb0 100644 --- a/src/server.c +++ b/src/server.c @@ -31,7 +31,6 @@ #include "server.h" #include "socket.h" #include "logger.h" -#include "interface/class.h" #include "utils/memory.h" diff --git a/src/server/close_conn.c b/src/server/close_conn.c index 7347669..33d2dd4 100644 --- a/src/server/close_conn.c +++ b/src/server/close_conn.c @@ -24,7 +24,7 @@ #include #include "server.h" -#include "interface/class.h" +#include "class.h" #include "stream.h" void diff --git a/src/server/handle_accept.c b/src/server/handle_accept.c index bd10a93..9e20aa1 100644 --- a/src/server/handle_accept.c +++ b/src/server/handle_accept.c @@ -28,7 +28,7 @@ #include "http/worker.h" #include "server.h" -#include "interface/class.h" +#include "class.h" #include "interface/logger.h" #include "stream.h" diff --git a/src/session.c b/src/session.c index 6b205d0..b768da4 100644 --- a/src/session.c +++ b/src/session.c @@ -29,7 +29,6 @@ #include "session.h" #include "class.h" -#include "interface/class.h" #include "utils/hash.h" #include "utils/memory.h" diff --git a/src/session/add.c b/src/session/add.c index ae635eb..f6a9d2c 100644 --- a/src/session/add.c +++ b/src/session/add.c @@ -23,7 +23,7 @@ #include #include "session.h" -#include "interface/class.h" +#include "class.h" static diff --git a/src/session/delete.c b/src/session/delete.c index f8a8ba4..33d203d 100644 --- a/src/session/delete.c +++ b/src/session/delete.c @@ -23,7 +23,7 @@ #include #include "session.h" -#include "interface/class.h" +#include "class.h" static diff --git a/src/socket.c b/src/socket.c index f3e2a27..8f761d0 100644 --- a/src/socket.c +++ b/src/socket.c @@ -26,7 +26,7 @@ #include "socket.h" #include "logger.h" -#include "interface/class.h" +#include "class.h" #include "interface/logger.h" static diff --git a/src/socket/accept.c b/src/socket/accept.c index a51cae5..f8b5a4e 100644 --- a/src/socket/accept.c +++ b/src/socket/accept.c @@ -24,7 +24,7 @@ #include #include "socket.h" -#include "interface/class.h" +#include "class.h" #include "interface/logger.h" Sock diff --git a/src/socket/connect.c b/src/socket/connect.c index 7e0d19b..04bab48 100644 --- a/src/socket/connect.c +++ b/src/socket/connect.c @@ -24,7 +24,7 @@ #include // for errno #include "socket.h" -#include "interface/class.h" +#include "class.h" #include "interface/logger.h" diff --git a/src/socket/listen.c b/src/socket/listen.c index 0e54132..418a1d0 100644 --- a/src/socket/listen.c +++ b/src/socket/listen.c @@ -24,7 +24,7 @@ #include // for errno #include "socket.h" -#include "interface/class.h" +#include "class.h" #include "interface/logger.h" diff --git a/src/stream.c b/src/stream.c index 3168d92..827a0c8 100644 --- a/src/stream.c +++ b/src/stream.c @@ -24,7 +24,6 @@ #include #include "class.h" -#include "interface/class.h" #include "stream.h" diff --git a/src/taskrambler.c b/src/taskrambler.c index faf9888..9b731d5 100644 --- a/src/taskrambler.c +++ b/src/taskrambler.c @@ -40,7 +40,7 @@ #include "http/worker.h" #include "auth/ldap.h" -#include "interface/class.h" +#include "class.h" #include "interface/logger.h" #include "utils/signalHandling.h" diff --git a/src/utils/http.c b/src/utils/http.c index 36ab048..e24ce9d 100644 --- a/src/utils/http.c +++ b/src/utils/http.c @@ -28,7 +28,7 @@ #include "http/request.h" #include "http/response.h" -#include "interface/class.h" +#include "class.h" #include "commons.h"