Commit b38d4022504ef3ea03fbc291bf4e9e99bcae3378
1 parent
7466e592
start documenting this whole stuff...well at least add a copyright information in each file
Showing
96 changed files
with
2163 additions
and
27 deletions
1 | +2012-02-20 14:55:46 +0100 Georg Hopp | ||
2 | + | ||
3 | + * start documenting this whole stuff...well at least add a copyright information in each file (HEAD, master) | ||
4 | + | ||
1 | 2012-02-20 10:10:29 +0100 Georg Hopp | 5 | 2012-02-20 10:10:29 +0100 Georg Hopp |
2 | 6 | ||
3 | - * first very crude, not complete, experimental 304 test implementation (HEAD, master) | 7 | + * first very crude, not complete, experimental 304 test implementation (origin/master, origin/HEAD) |
4 | 8 | ||
5 | 2012-02-20 07:55:06 +0100 Georg Hopp | 9 | 2012-02-20 07:55:06 +0100 Georg Hopp |
6 | 10 | ||
7 | - * disconnect on invalid request line (origin/master, origin/HEAD) | 11 | + * disconnect on invalid request line |
8 | 12 | ||
9 | 2012-02-19 20:12:40 +0100 Georg Hopp | 13 | 2012-02-19 20:12:40 +0100 Georg Hopp |
10 | 14 |
1 | /** | 1 | /** |
2 | - * my implementation of a ringbuffer. | 2 | + * \file |
3 | + * My implementation of a ringbuffer. | ||
3 | * It maps a shared memory object twice directly following | 4 | * It maps a shared memory object twice directly following |
4 | * thus make it possible to read and write from any | 5 | * thus make it possible to read and write from any |
5 | * position within the buffer without the nasty wrap | 6 | * position within the buffer without the nasty wrap |
6 | * calculations. | 7 | * calculations. |
7 | * This is achived because the same memory region is mapped | 8 | * This is achived because the same memory region is mapped |
8 | * at the two addresses. | 9 | * at the two addresses. |
10 | + * | ||
11 | + * \author Georg Hopp | ||
12 | + * | ||
13 | + * \copyright | ||
14 | + * Copyright (C) 2012 Georg Hopp | ||
15 | + * | ||
16 | + * This program is free software: you can redistribute it and/or modify | ||
17 | + * it under the terms of the GNU General Public License as published by | ||
18 | + * the Free Software Foundation, either version 3 of the License, or | ||
19 | + * (at your option) any later version. | ||
20 | + * | ||
21 | + * This program is distributed in the hope that it will be useful, | ||
22 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
23 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
24 | + * GNU General Public License for more details. | ||
25 | + * | ||
26 | + * You should have received a copy of the GNU General Public License | ||
27 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
9 | */ | 28 | */ |
10 | -#ifndef __RINGBUFFER_H__ | ||
11 | -#define __RINGBUFFER_H__ | 29 | + |
30 | +#ifndef __CBUF_H__ | ||
31 | +#define __CBUF_H__ | ||
12 | 32 | ||
13 | #include <ctype.h> | 33 | #include <ctype.h> |
14 | #include <string.h> | 34 | #include <string.h> |
@@ -60,6 +80,6 @@ void * cbufIsLocked(Cbuf this); | @@ -60,6 +80,6 @@ void * cbufIsLocked(Cbuf this); | ||
60 | void cbufLock(Cbuf this); | 80 | void cbufLock(Cbuf this); |
61 | void cbufRelease(Cbuf this); | 81 | void cbufRelease(Cbuf this); |
62 | 82 | ||
63 | -#endif // __RINGBUFFER_H__ | 83 | +#endif // __CBUF_H__ |
64 | 84 | ||
65 | // vim: set ts=4 sw=4: | 85 | // vim: set ts=4 sw=4: |
1 | +/** | ||
2 | + * \file | ||
3 | + * My own class implementation for C. It combines a data structure | ||
4 | + * with a set of dynamically linked methods defined by an interface. A | ||
5 | + * dynamically linked method will be called via a selector method which in | ||
6 | + * turn gets the implementation stored in the class. | ||
7 | + * | ||
8 | + * \author Georg Hopp | ||
9 | + * | ||
10 | + * \copyright | ||
11 | + * Copyright (C) 2012 Georg Hopp | ||
12 | + * | ||
13 | + * This program is free software: you can redistribute it and/or modify | ||
14 | + * it under the terms of the GNU General Public License as published by | ||
15 | + * the Free Software Foundation, either version 3 of the License, or | ||
16 | + * (at your option) any later version. | ||
17 | + * | ||
18 | + * This program is distributed in the hope that it will be useful, | ||
19 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | + * GNU General Public License for more details. | ||
22 | + * | ||
23 | + * You should have received a copy of the GNU General Public License | ||
24 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
25 | + */ | ||
26 | + | ||
1 | #ifndef __CLASS_H__ | 27 | #ifndef __CLASS_H__ |
2 | #define __CLASS_H__ | 28 | #define __CLASS_H__ |
3 | 29 | ||
@@ -39,7 +65,7 @@ | @@ -39,7 +65,7 @@ | ||
39 | }; struct class * const _##name = &c_##name | 65 | }; struct class * const _##name = &c_##name |
40 | 66 | ||
41 | /** | 67 | /** |
42 | - * @TODO: actually i use gcc feature ## for variadoc... think about | 68 | + * \todo actually i use gcc feature ## for variadoc... think about |
43 | * a way to make this standard. | 69 | * a way to make this standard. |
44 | */ | 70 | */ |
45 | #define _CALL(object,_iface,method,...) \ | 71 | #define _CALL(object,_iface,method,...) \ |
1 | +/** | ||
2 | + * \file | ||
3 | + * HTTP header class. One Instance represents one header line of | ||
4 | + * an HTTP message. | ||
5 | + * | ||
6 | + * \author Georg Hopp | ||
7 | + * | ||
8 | + * \copyright | ||
9 | + * Copyright (C) 2012 Georg Hopp | ||
10 | + * | ||
11 | + * This program is free software: you can redistribute it and/or modify | ||
12 | + * it under the terms of the GNU General Public License as published by | ||
13 | + * the Free Software Foundation, either version 3 of the License, or | ||
14 | + * (at your option) any later version. | ||
15 | + * | ||
16 | + * This program is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | + * GNU General Public License for more details. | ||
20 | + * | ||
21 | + * You should have received a copy of the GNU General Public License | ||
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
23 | + */ | ||
24 | + | ||
1 | #ifndef __HTTP_HEADER_H__ | 25 | #ifndef __HTTP_HEADER_H__ |
2 | #define __HTTP_HEADER_H__ | 26 | #define __HTTP_HEADER_H__ |
3 | 27 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Generic HTTP message. Parent for request and response. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __HTTP_MESSAGE__ | 24 | #ifndef __HTTP_MESSAGE__ |
2 | #define __HTTP_MESSAGE__ | 25 | #define __HTTP_MESSAGE__ |
3 | 26 |
1 | -#ifndef __HTTP_REQUEST_QUEUE_H__ | ||
2 | -#define __HTTP_REQUEST_QUEUE_H__ | 1 | +/** |
2 | + * \file | ||
3 | + * Holds requests ready for processing. | ||
4 | + * | ||
5 | + * \todo change this to a real queue. | ||
6 | + * | ||
7 | + * \author Georg Hopp | ||
8 | + * | ||
9 | + * \copyright | ||
10 | + * Copyright (C) 2012 Georg Hopp | ||
11 | + * | ||
12 | + * This program is free software: you can redistribute it and/or modify | ||
13 | + * it under the terms of the GNU General Public License as published by | ||
14 | + * the Free Software Foundation, either version 3 of the License, or | ||
15 | + * (at your option) any later version. | ||
16 | + * | ||
17 | + * This program is distributed in the hope that it will be useful, | ||
18 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | + * GNU General Public License for more details. | ||
21 | + * | ||
22 | + * You should have received a copy of the GNU General Public License | ||
23 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
24 | + */ | ||
25 | + | ||
26 | +#ifndef __HTTP_MESSAGE_QUEUE_H__ | ||
27 | +#define __HTTP_MESSAGE_QUEUE_H__ | ||
3 | 28 | ||
4 | #include "class.h" | 29 | #include "class.h" |
5 | #include "http/message.h" | 30 | #include "http/message.h" |
@@ -12,6 +37,6 @@ CLASS(HttpMessageQueue) { | @@ -12,6 +37,6 @@ CLASS(HttpMessageQueue) { | ||
12 | size_t nmsgs; | 37 | size_t nmsgs; |
13 | }; | 38 | }; |
14 | 39 | ||
15 | -#endif /* __HTTP_REQUEST_QUEUE_H__ */ | 40 | +#endif /* __HTTP_MESSAGE_QUEUE_H__ */ |
16 | 41 | ||
17 | // vim: set ts=4 sw=4: | 42 | // vim: set ts=4 sw=4: |
1 | +/** | ||
2 | + * \file | ||
3 | + * Represents one HTTP request. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __HTTP_REQUEST_H__ | 24 | #ifndef __HTTP_REQUEST_H__ |
2 | #define __HTTP_REQUEST_H__ | 25 | #define __HTTP_REQUEST_H__ |
3 | 26 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Parse requests from an input stream. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __HTTP_REQUEST_PARSER_H__ | 24 | #ifndef __HTTP_REQUEST_PARSER_H__ |
2 | #define __HTTP_REQUEST_PARSER_H__ | 25 | #define __HTTP_REQUEST_PARSER_H__ |
3 | 26 | ||
@@ -37,7 +60,6 @@ CLASS(HttpRequestParser) { | @@ -37,7 +60,6 @@ CLASS(HttpRequestParser) { | ||
37 | HttpRequestState state; | 60 | HttpRequestState state; |
38 | }; | 61 | }; |
39 | 62 | ||
40 | -ssize_t httpRequestParserRead(HttpRequestParser, int); | ||
41 | ssize_t httpRequestParserParse(HttpRequestParser, int); | 63 | ssize_t httpRequestParserParse(HttpRequestParser, int); |
42 | void httpRequestParserGetBody(HttpRequestParser); | 64 | void httpRequestParserGetBody(HttpRequestParser); |
43 | 65 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Represents one HTTP response. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __HTTP_RESPONSE_H__ | 24 | #ifndef __HTTP_RESPONSE_H__ |
2 | #define __HTTP_RESPONSE_H__ | 25 | #define __HTTP_RESPONSE_H__ |
3 | 26 | ||
@@ -20,8 +43,6 @@ HttpResponse httpResponse404(); | @@ -20,8 +43,6 @@ HttpResponse httpResponse404(); | ||
20 | HttpResponse httpResponseMe(); | 43 | HttpResponse httpResponseMe(); |
21 | HttpResponse httpResponseImage(int); | 44 | HttpResponse httpResponseImage(int); |
22 | 45 | ||
23 | -//void httpResponseHeaderSet(HttpResponse, const char *, const char *); | ||
24 | - | ||
25 | #endif /* __HTTP_RESPONSE_H__ */ | 46 | #endif /* __HTTP_RESPONSE_H__ */ |
26 | 47 | ||
27 | // vim: set ts=4 sw=4: | 48 | // vim: set ts=4 sw=4: |
1 | +/** | ||
2 | + * \file | ||
3 | + * Write ready responses to an output stream. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * - Copyright (C) 2012 Georg Hopp | ||
9 | + * - | ||
10 | + * - This program is free software: you can redistribute it and/or modify | ||
11 | + * - it under the terms of the GNU General Public License as published by | ||
12 | + * - the Free Software Foundation, either version 3 of the License, or | ||
13 | + * - (at your option) any later version. | ||
14 | + * - | ||
15 | + * - This program is distributed in the hope that it will be useful, | ||
16 | + * - but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * - GNU General Public License for more details. | ||
19 | + * - | ||
20 | + * - You should have received a copy of the GNU General Public License | ||
21 | + * - along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __HTTP_RESPONSE_WRITER_H__ | 24 | #ifndef __HTTP_RESPONSE_WRITER_H__ |
2 | #define __HTTP_RESPONSE_WRITER_H__ | 25 | #define __HTTP_RESPONSE_WRITER_H__ |
3 | 26 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Worker for processing HTTP request, response cycles. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __HTTP_WORKER_H__ | 24 | #ifndef __HTTP_WORKER_H__ |
2 | #define __HTTP_WORKER_H__ | 25 | #define __HTTP_WORKER_H__ |
3 | 26 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Interface definition code. Each interface is a set of selector functions | ||
4 | + * as well as a data structure where the concrete implementation will be stored. | ||
5 | + * This structure is the intergrated in the class that implements the | ||
6 | + * interface. | ||
7 | + * | ||
8 | + * \author Georg Hopp | ||
9 | + * | ||
10 | + * \copyright | ||
11 | + * Copyright (C) 2012 Georg Hopp | ||
12 | + * | ||
13 | + * This program is free software: you can redistribute it and/or modify | ||
14 | + * it under the terms of the GNU General Public License as published by | ||
15 | + * the Free Software Foundation, either version 3 of the License, or | ||
16 | + * (at your option) any later version. | ||
17 | + * | ||
18 | + * This program is distributed in the hope that it will be useful, | ||
19 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | + * GNU General Public License for more details. | ||
22 | + * | ||
23 | + * You should have received a copy of the GNU General Public License | ||
24 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
25 | + */ | ||
26 | + | ||
1 | #ifndef __INTERFACE_H__ | 27 | #ifndef __INTERFACE_H__ |
2 | #define __INTERFACE_H__ | 28 | #define __INTERFACE_H__ |
3 | 29 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Interface for class handling. Defines new, delete and clone selectors | ||
4 | + * which in turn use the ctor, dtor and clone implementation from the | ||
5 | + * class implementation. | ||
6 | + * | ||
7 | + * \author Georg Hopp | ||
8 | + * | ||
9 | + * \copyright | ||
10 | + * Copyright (C) 2012 Georg Hopp | ||
11 | + * | ||
12 | + * This program is free software: you can redistribute it and/or modify | ||
13 | + * it under the terms of the GNU General Public License as published by | ||
14 | + * the Free Software Foundation, either version 3 of the License, or | ||
15 | + * (at your option) any later version. | ||
16 | + * | ||
17 | + * This program is distributed in the hope that it will be useful, | ||
18 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | + * GNU General Public License for more details. | ||
21 | + * | ||
22 | + * You should have received a copy of the GNU General Public License | ||
23 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
24 | + */ | ||
25 | + | ||
1 | #ifndef __INTERFACE_CLASS_H__ | 26 | #ifndef __INTERFACE_CLASS_H__ |
2 | #define __INTERFACE_CLASS_H__ | 27 | #define __INTERFACE_CLASS_H__ |
3 | 28 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Virtual (dynamically bound) methods to get the size of the http intro | ||
4 | + * line. As i have two kinds of http messages (response, request) which | ||
5 | + * need a slitly different handling when turning the data into a string. | ||
6 | + * | ||
7 | + * \author Georg Hopp | ||
8 | + * | ||
9 | + * \copyright | ||
10 | + * Copyright (C) 2012 Georg Hopp | ||
11 | + * | ||
12 | + * This program is free software: you can redistribute it and/or modify | ||
13 | + * it under the terms of the GNU General Public License as published by | ||
14 | + * the Free Software Foundation, either version 3 of the License, or | ||
15 | + * (at your option) any later version. | ||
16 | + * | ||
17 | + * This program is distributed in the hope that it will be useful, | ||
18 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | + * GNU General Public License for more details. | ||
21 | + * | ||
22 | + * You should have received a copy of the GNU General Public License | ||
23 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
24 | + */ | ||
25 | + | ||
1 | #ifndef __HTTP_INTRO_H__ | 26 | #ifndef __HTTP_INTRO_H__ |
2 | #define __HTTP_INTRO_H__ | 27 | #define __HTTP_INTRO_H__ |
3 | 28 |
1 | +/** | ||
2 | + * \file | ||
3 | + * The logger interface. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __INTERFACE_LOGGER_H__ | 24 | #ifndef __INTERFACE_LOGGER_H__ |
2 | #define __INTERFACE_LOGGER_H__ | 25 | #define __INTERFACE_LOGGER_H__ |
3 | 26 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Definition of the observer pattern implementation. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __OBSERVER_H__ | 24 | #ifndef __OBSERVER_H__ |
2 | #define __OBSERVER_H__ | 25 | #define __OBSERVER_H__ |
3 | 26 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Interface whose implementations can read from a stream given as | ||
4 | + * a handle. | ||
5 | + * | ||
6 | + * \author Georg Hopp | ||
7 | + * | ||
8 | + * \copyright | ||
9 | + * Copyright (C) 2012 Georg Hopp | ||
10 | + * | ||
11 | + * This program is free software: you can redistribute it and/or modify | ||
12 | + * it under the terms of the GNU General Public License as published by | ||
13 | + * the Free Software Foundation, either version 3 of the License, or | ||
14 | + * (at your option) any later version. | ||
15 | + * | ||
16 | + * This program is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | + * GNU General Public License for more details. | ||
20 | + * | ||
21 | + * You should have received a copy of the GNU General Public License | ||
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
23 | + */ | ||
24 | + | ||
1 | #ifndef __STREAM_READER_H__ | 25 | #ifndef __STREAM_READER_H__ |
2 | #define __STREAM_READER_H__ | 26 | #define __STREAM_READER_H__ |
3 | 27 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Interface whose implementations can write from a stream given as | ||
4 | + * a handle. | ||
5 | + * | ||
6 | + * \author Georg Hopp | ||
7 | + * | ||
8 | + * \copyright | ||
9 | + * Copyright (C) 2012 Georg Hopp | ||
10 | + * | ||
11 | + * This program is free software: you can redistribute it and/or modify | ||
12 | + * it under the terms of the GNU General Public License as published by | ||
13 | + * the Free Software Foundation, either version 3 of the License, or | ||
14 | + * (at your option) any later version. | ||
15 | + * | ||
16 | + * This program is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | + * GNU General Public License for more details. | ||
20 | + * | ||
21 | + * You should have received a copy of the GNU General Public License | ||
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
23 | + */ | ||
24 | + | ||
1 | #ifndef __STREAM_WRITER_H__ | 25 | #ifndef __STREAM_WRITER_H__ |
2 | #define __STREAM_WRITER_H__ | 26 | #define __STREAM_WRITER_H__ |
3 | 27 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Definition of the subject pattern implementation. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __SUBJECT_H__ | 24 | #ifndef __SUBJECT_H__ |
2 | #define __SUBJECT_H__ | 25 | #define __SUBJECT_H__ |
3 | 26 |
1 | +/** | ||
2 | + * \file | ||
3 | + * A generic logger class and two extended classes, One that logs to | ||
4 | + * stderr and one that logs to the system syslog. | ||
5 | + * | ||
6 | + * \author Georg Hopp | ||
7 | + * | ||
8 | + * \copyright | ||
9 | + * Copyright (C) 2012 Georg Hopp | ||
10 | + * | ||
11 | + * This program is free software: you can redistribute it and/or modify | ||
12 | + * it under the terms of the GNU General Public License as published by | ||
13 | + * the Free Software Foundation, either version 3 of the License, or | ||
14 | + * (at your option) any later version. | ||
15 | + * | ||
16 | + * This program is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | + * GNU General Public License for more details. | ||
20 | + * | ||
21 | + * You should have received a copy of the GNU General Public License | ||
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
23 | + */ | ||
24 | + | ||
1 | #ifndef __LOGGER_H__ | 25 | #ifndef __LOGGER_H__ |
2 | #define __LOGGER_H__ | 26 | #define __LOGGER_H__ |
3 | 27 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Server class. Handles acceptance and closing of connection and uses | ||
4 | + * a class that has to implement the stream reader and writer interface | ||
5 | + * to handle incoming reads and outgoing writes. | ||
6 | + * | ||
7 | + * \author Georg Hopp | ||
8 | + * | ||
9 | + * \copyright | ||
10 | + * Copyright (C) 2012 Georg Hopp | ||
11 | + * | ||
12 | + * This program is free software: you can redistribute it and/or modify | ||
13 | + * it under the terms of the GNU General Public License as published by | ||
14 | + * the Free Software Foundation, either version 3 of the License, or | ||
15 | + * (at your option) any later version. | ||
16 | + * | ||
17 | + * This program is distributed in the hope that it will be useful, | ||
18 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | + * GNU General Public License for more details. | ||
21 | + * | ||
22 | + * You should have received a copy of the GNU General Public License | ||
23 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
24 | + */ | ||
25 | + | ||
1 | #ifndef __SERVER_H__ | 26 | #ifndef __SERVER_H__ |
2 | #define __SERVER_H__ | 27 | #define __SERVER_H__ |
3 | 28 | ||
@@ -7,7 +32,6 @@ | @@ -7,7 +32,6 @@ | ||
7 | #include "class.h" | 32 | #include "class.h" |
8 | #include "socket.h" | 33 | #include "socket.h" |
9 | #include "logger.h" | 34 | #include "logger.h" |
10 | -#include "http/response.h" | ||
11 | 35 | ||
12 | 36 | ||
13 | #define POLL_FD_NSIZE 1024 | 37 | #define POLL_FD_NSIZE 1024 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Functions to handle varios signals send to the application. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #ifndef __SIGNAL_HANDLING_H__ | 24 | #ifndef __SIGNAL_HANDLING_H__ |
2 | #define __SIGNAL_HANDLING_H__ | 25 | #define __SIGNAL_HANDLING_H__ |
3 | 26 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Abstraction layer above BSD sockets. Capsules and simplifies connect | ||
4 | + * accept and listen. | ||
5 | + * | ||
6 | + * \author Georg Hopp | ||
7 | + * | ||
8 | + * \copyright | ||
9 | + * Copyright (C) 2012 Georg Hopp | ||
10 | + * | ||
11 | + * This program is free software: you can redistribute it and/or modify | ||
12 | + * it under the terms of the GNU General Public License as published by | ||
13 | + * the Free Software Foundation, either version 3 of the License, or | ||
14 | + * (at your option) any later version. | ||
15 | + * | ||
16 | + * This program is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | + * GNU General Public License for more details. | ||
20 | + * | ||
21 | + * You should have received a copy of the GNU General Public License | ||
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
23 | + */ | ||
24 | + | ||
1 | #ifndef __SOCKET_H__ | 25 | #ifndef __SOCKET_H__ |
2 | #define __SOCKET_H__ | 26 | #define __SOCKET_H__ |
3 | 27 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #define _POSIX_SOURCE | 23 | #define _POSIX_SOURCE |
2 | #define _POSIX_C_SOURCE 200112L | 24 | #define _POSIX_C_SOURCE 200112L |
3 | #define _GNU_SOURCE | 25 | #define _GNU_SOURCE |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | 24 | ||
3 | #include "cbuf.h" | 25 | #include "cbuf.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "cbuf.h" | 23 | #include "cbuf.h" |
2 | 24 | ||
3 | void | 25 | void |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | 24 | ||
3 | #include "cbuf.h" | 25 | #include "cbuf.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | 24 | ||
3 | #include <string.h> | 25 | #include <string.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "cbuf.h" | 23 | #include "cbuf.h" |
2 | 24 | ||
3 | char * | 25 | char * |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "cbuf.h" | 23 | #include "cbuf.h" |
2 | 24 | ||
3 | char * | 25 | char * |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | 24 | ||
3 | #include "cbuf.h" | 25 | #include "cbuf.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | 24 | ||
3 | #include "cbuf.h" | 25 | #include "cbuf.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "cbuf.h" | 23 | #include "cbuf.h" |
2 | 24 | ||
3 | char | 25 | char |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "cbuf.h" | 23 | #include "cbuf.h" |
2 | 24 | ||
3 | void * | 25 | void * |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "cbuf.h" | 23 | #include "cbuf.h" |
2 | 24 | ||
3 | void | 25 | void |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <string.h> | 23 | #include <string.h> |
2 | 24 | ||
3 | #include "cbuf.h" | 25 | #include "cbuf.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | #include <unistd.h> | 24 | #include <unistd.h> |
3 | #include <errno.h> | 25 | #include <errno.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "cbuf.h" | 23 | #include "cbuf.h" |
2 | 24 | ||
3 | void | 25 | void |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | #include <errno.h> | 25 | #include <errno.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <ctype.h> | 23 | #include <ctype.h> |
2 | 24 | ||
3 | #include "cbuf.h" | 25 | #include "cbuf.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | #include <unistd.h> | 24 | #include <unistd.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Helper functions for class. | ||
4 | + * | ||
5 | + * \todo rename function to fit in the otherwise used scheme. | ||
6 | + * \author Georg Hopp | ||
7 | + * | ||
8 | + * \copyright | ||
9 | + * Copyright (C) 2012 Georg Hopp | ||
10 | + * | ||
11 | + * This program is free software: you can redistribute it and/or modify | ||
12 | + * it under the terms of the GNU General Public License as published by | ||
13 | + * the Free Software Foundation, either version 3 of the License, or | ||
14 | + * (at your option) any later version. | ||
15 | + * | ||
16 | + * This program is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | + * GNU General Public License for more details. | ||
20 | + * | ||
21 | + * You should have received a copy of the GNU General Public License | ||
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
23 | + */ | ||
24 | + | ||
1 | #include <stdarg.h> | 25 | #include <stdarg.h> |
2 | #include <stdlib.h> | 26 | #include <stdlib.h> |
3 | 27 |
1 | +/** | ||
2 | + * \file | ||
3 | + * Disconnect from parent process and let all standard file handles | ||
4 | + * point to /dev/null. | ||
5 | + * | ||
6 | + * \author Georg Hopp | ||
7 | + * | ||
8 | + * \copyright | ||
9 | + * Copyright (C) 2012 Georg Hopp | ||
10 | + * | ||
11 | + * This program is free software: you can redistribute it and/or modify | ||
12 | + * it under the terms of the GNU General Public License as published by | ||
13 | + * the Free Software Foundation, either version 3 of the License, or | ||
14 | + * (at your option) any later version. | ||
15 | + * | ||
16 | + * This program is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | + * GNU General Public License for more details. | ||
20 | + * | ||
21 | + * You should have received a copy of the GNU General Public License | ||
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
23 | + */ | ||
24 | + | ||
1 | #include <stdio.h> /* for printf() and fprintf() */ | 25 | #include <stdio.h> /* for printf() and fprintf() */ |
2 | #include <unistd.h> /* for getopt */ | 26 | #include <unistd.h> /* for getopt */ |
3 | #include <stdlib.h> | 27 | #include <stdlib.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * Interface implementation for HTTP header class. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #include <stdlib.h> | 24 | #include <stdlib.h> |
2 | #include <string.h> | 25 | #include <string.h> |
3 | #include <ctype.h> | 26 | #include <ctype.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <search.h> | 23 | #include <search.h> |
2 | #include <stdlib.h> | 24 | #include <stdlib.h> |
3 | #include <ctype.h> | 25 | #include <ctype.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * Get a header from a tree containing headers by its name. | ||
4 | + * The key for the tree is the hased lowercase header identifier. | ||
5 | + * | ||
6 | + * \author Georg Hopp | ||
7 | + * | ||
8 | + * \copyright | ||
9 | + * Copyright (C) 2012 Georg Hopp | ||
10 | + * | ||
11 | + * This program is free software: you can redistribute it and/or modify | ||
12 | + * it under the terms of the GNU General Public License as published by | ||
13 | + * the Free Software Foundation, either version 3 of the License, or | ||
14 | + * (at your option) any later version. | ||
15 | + * | ||
16 | + * This program is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | + * GNU General Public License for more details. | ||
20 | + * | ||
21 | + * You should have received a copy of the GNU General Public License | ||
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
23 | + */ | ||
24 | + | ||
1 | #include <search.h> | 25 | #include <search.h> |
2 | #include <stdlib.h> | 26 | #include <stdlib.h> |
3 | #include <ctype.h> | 27 | #include <ctype.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * Get the length of the given HttpHeader when converted to string. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #include <sys/types.h> | 24 | #include <sys/types.h> |
2 | 25 | ||
3 | #include "http/header.h" | 26 | #include "http/header.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * Convert the given Header to string. | ||
4 | + * | ||
5 | + * \author Georg Hopp | ||
6 | + * | ||
7 | + * \copyright | ||
8 | + * Copyright (C) 2012 Georg Hopp | ||
9 | + * | ||
10 | + * This program is free software: you can redistribute it and/or modify | ||
11 | + * it under the terms of the GNU General Public License as published by | ||
12 | + * the Free Software Foundation, either version 3 of the License, or | ||
13 | + * (at your option) any later version. | ||
14 | + * | ||
15 | + * This program is distributed in the hope that it will be useful, | ||
16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | + * GNU General Public License for more details. | ||
19 | + * | ||
20 | + * You should have received a copy of the GNU General Public License | ||
21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | + */ | ||
23 | + | ||
1 | #include <string.h> | 24 | #include <string.h> |
2 | 25 | ||
3 | #include "http/header.h" | 26 | #include "http/header.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #ifndef _GNU_SOURCE | 23 | #ifndef _GNU_SOURCE |
2 | #define _GNU_SOURCE | 24 | #define _GNU_SOURCE |
3 | #endif | 25 | #endif |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <string.h> | 23 | #include <string.h> |
2 | #include <stdlib.h> | 24 | #include <stdlib.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <string.h> | 23 | #include <string.h> |
2 | #include <ctype.h> | 24 | #include <ctype.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <string.h> | 23 | #include <string.h> |
2 | 24 | ||
3 | #include "http/message.h" | 25 | #include "http/message.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <search.h> | 23 | #include <search.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | #include <sys/types.h> | 25 | #include <sys/types.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <search.h> | 23 | #include <search.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | #include <stdio.h> | 25 | #include <stdio.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #ifndef __HTTP_MESSAGE_HELPER_C__ | 23 | #ifndef __HTTP_MESSAGE_HELPER_C__ |
2 | #define __HTTP_MESSAGE_HELPER_C__ | 24 | #define __HTTP_MESSAGE_HELPER_C__ |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdarg.h> | 23 | #include <stdarg.h> |
2 | 24 | ||
3 | #include "class.h" | 25 | #include "class.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <stdarg.h> | 24 | #include <stdarg.h> |
3 | #include <string.h> | 25 | #include <string.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <string.h> | 23 | #include <string.h> |
2 | 24 | ||
3 | #include "http/request.h" | 25 | #include "http/request.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <unistd.h> | 23 | #include <unistd.h> |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | #include <stdlib.h> | 25 | #include <stdlib.h> |
@@ -42,7 +64,7 @@ dtor(void * _this) | @@ -42,7 +64,7 @@ dtor(void * _this) | ||
42 | } | 64 | } |
43 | 65 | ||
44 | INIT_IFACE(Class, ctor, dtor, NULL); | 66 | INIT_IFACE(Class, ctor, dtor, NULL); |
45 | -INIT_IFACE(StreamReader, (fptr_streamReaderRead)httpRequestParserRead); | 67 | +INIT_IFACE(StreamReader, (fptr_streamReaderRead)httpRequestParserParse); |
46 | CREATE_CLASS(HttpRequestParser, NULL, IFACE(Class), IFACE(StreamReader)); | 68 | CREATE_CLASS(HttpRequestParser, NULL, IFACE(Class), IFACE(StreamReader)); |
47 | 69 | ||
48 | // vim: set ts=4 sw=4: | 70 | // vim: set ts=4 sw=4: |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | 24 | ||
3 | #include "http/header.h" | 25 | #include "http/header.h" |
1 | -#include <stdlib.h> | ||
2 | -#include <string.h> | 1 | +/** |
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
3 | #include <search.h> | 23 | #include <search.h> |
4 | #include <ctype.h> | 24 | #include <ctype.h> |
5 | #include <stdio.h> | 25 | #include <stdio.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | #include <unistd.h> | 25 | #include <unistd.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <stdarg.h> | 24 | #include <stdarg.h> |
3 | #include <string.h> | 25 | #include <string.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | #include <stdio.h> | 25 | #include <stdio.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | #include <stdio.h> | 25 | #include <stdio.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | #include <stdio.h> | 25 | #include <stdio.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | #include <stdio.h> | 25 | #include <stdio.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdio.h> | 23 | #include <stdio.h> |
2 | #include <unistd.h> | 24 | #include <unistd.h> |
3 | #include <stdlib.h> | 25 | #include <stdlib.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
3 | #include <fcntl.h> | 25 | #include <fcntl.h> |
@@ -26,7 +48,7 @@ httpWorkerProcess(HttpWorker this, int fd) | @@ -26,7 +48,7 @@ httpWorkerProcess(HttpWorker this, int fd) | ||
26 | 48 | ||
27 | for (i=0; i<reqq->nmsgs; i++) { | 49 | for (i=0; i<reqq->nmsgs; i++) { |
28 | /** | 50 | /** |
29 | - * @TODO: for now simply remove request and send not found. | 51 | + * \todo for now simply remove request and send not found. |
30 | * Make this sane. | 52 | * Make this sane. |
31 | */ | 53 | */ |
32 | HttpRequest request = (HttpRequest)(reqq->msgs[i]); | 54 | HttpRequest request = (HttpRequest)(reqq->msgs[i]); |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | 24 | ||
3 | #include "http/worker.h" | 25 | #include "http/worker.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <sys/types.h> | 23 | #include <sys/types.h> |
2 | #include <stdlib.h> | 24 | #include <stdlib.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdarg.h> | 23 | #include <stdarg.h> |
2 | #include <stdlib.h> | 24 | #include <stdlib.h> |
3 | #include <assert.h> | 25 | #include <assert.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "class.h" | 23 | #include "class.h" |
2 | #include "interface/http_intro.h" | 24 | #include "interface/http_intro.h" |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | #include <stdarg.h> | 25 | #include <stdarg.h> |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "class.h" | 23 | #include "class.h" |
2 | #include "interface/observer.h" | 24 | #include "interface/observer.h" |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "class.h" | 23 | #include "class.h" |
2 | #include "interface/stream_reader.h" | 24 | #include "interface/stream_reader.h" |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "class.h" | 23 | #include "class.h" |
2 | #include "interface/stream_writer.h" | 24 | #include "interface/stream_writer.h" |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "class.h" | 23 | #include "class.h" |
2 | #include "interface/subject.h" | 24 | #include "interface/subject.h" |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdarg.h> | 23 | #include <stdarg.h> |
2 | 24 | ||
3 | #include "logger.h" | 25 | #include "logger.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdio.h> | 23 | #include <stdio.h> |
2 | 24 | ||
3 | #include "logger.h" | 25 | #include "logger.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <syslog.h> | 23 | #include <syslog.h> |
2 | 24 | ||
3 | #include "logger.h" | 25 | #include "logger.h" |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <poll.h> /* for select system call and related */ | 23 | #include <poll.h> /* for select system call and related */ |
2 | #include <string.h> /* for memset and stuff */ | 24 | #include <string.h> /* for memset and stuff */ |
3 | #include <stdlib.h> /* for getopt */ | 25 | #include <stdlib.h> /* for getopt */ |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> | 23 | #include <stdlib.h> |
2 | #include <string.h> | 24 | #include <string.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <errno.h> | 23 | #include <errno.h> |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | #include <stdlib.h> | 25 | #include <stdlib.h> |
@@ -24,7 +46,7 @@ serverHandleAccept(Server this) | @@ -24,7 +46,7 @@ serverHandleAccept(Server this) | ||
24 | (this->conns)[acc->handle].worker = clone(this->worker); | 46 | (this->conns)[acc->handle].worker = clone(this->worker); |
25 | 47 | ||
26 | /** | 48 | /** |
27 | - * @TODO: | 49 | + * \todo |
28 | * set worker id---this would better be accomplished | 50 | * set worker id---this would better be accomplished |
29 | * as a worker method. | 51 | * as a worker method. |
30 | * The same is true for server information stuff only | 52 | * The same is true for server information stuff only |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <poll.h> | 23 | #include <poll.h> |
2 | #include <errno.h> | 24 | #include <errno.h> |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | static | 23 | static |
2 | ssize_t | 24 | ssize_t |
3 | serverRead(Server this, unsigned int i) | 25 | serverRead(Server this, unsigned int i) |
@@ -15,10 +37,11 @@ serverRead(Server this, unsigned int i) | @@ -15,10 +37,11 @@ serverRead(Server this, unsigned int i) | ||
15 | 37 | ||
16 | switch ((size = streamReaderRead((this->conns)[fd].worker, fd))) { | 38 | switch ((size = streamReaderRead((this->conns)[fd].worker, fd))) { |
17 | case -2: | 39 | case -2: |
18 | - /* | 40 | + /** |
19 | * normal close: this must be mapped to -2 within the | 41 | * normal close: this must be mapped to -2 within the |
20 | - * underlying read call. Done now in httpRequestParserRead | ||
21 | - * @TODO: make sure all pending writes will be done before | 42 | + * underlying read call. |
43 | + * | ||
44 | + * \todo make sure all pending writes will be done before | ||
22 | * close. | 45 | * close. |
23 | */ | 46 | */ |
24 | /* DROP-THROUGH */ | 47 | /* DROP-THROUGH */ |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include "server.h" | 23 | #include "server.h" |
2 | #include "socket.h" | 24 | #include "socket.h" |
3 | #include "logger.h" | 25 | #include "logger.h" |
@@ -20,7 +42,7 @@ serverRun(Server this) | @@ -20,7 +42,7 @@ serverRun(Server this) | ||
20 | loggerLog(this->logger, LOGGER_INFO, "service started"); | 42 | loggerLog(this->logger, LOGGER_INFO, "service started"); |
21 | 43 | ||
22 | /** | 44 | /** |
23 | - * @TODO: actually this is the main loop of my server. When | 45 | + * \todo actually this is the main loop of my server. When |
24 | * stuff becomes more complicated it might be feasabible to | 46 | * stuff becomes more complicated it might be feasabible to |
25 | * split stuff into separate processes. This will definetly | 47 | * split stuff into separate processes. This will definetly |
26 | * involve some IPC and syncing. Right now as this is actually | 48 | * involve some IPC and syncing. Right now as this is actually |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <signal.h> /* for signal() and signal names */ | 23 | #include <signal.h> /* for signal() and signal names */ |
2 | 24 | ||
3 | volatile int doShutdown; | 25 | volatile int doShutdown; |
@@ -6,7 +28,7 @@ void terminate(int signum) | @@ -6,7 +28,7 @@ void terminate(int signum) | ||
6 | { | 28 | { |
7 | signal(signum, SIG_IGN); | 29 | signal(signum, SIG_IGN); |
8 | /* | 30 | /* |
9 | - * @TODO do logging here | 31 | + * \todo do logging here |
10 | */ | 32 | */ |
11 | doShutdown = 1; | 33 | doShutdown = 1; |
12 | } | 34 | } |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <errno.h> | 23 | #include <errno.h> |
2 | #include <stdlib.h> | 24 | #include <stdlib.h> |
3 | #include <unistd.h> | 25 | #include <unistd.h> |
@@ -24,7 +46,7 @@ ctor(void * _this, va_list * params) | @@ -24,7 +46,7 @@ ctor(void * _this, va_list * params) | ||
24 | strerror(errno)); | 46 | strerror(errno)); |
25 | //exit(EXIT_FAILURE); | 47 | //exit(EXIT_FAILURE); |
26 | /** | 48 | /** |
27 | - * @TODO: uhhhh, here we are leaking memory the socket is not | 49 | + * \todo uhhhh, here we are leaking memory the socket is not |
28 | * initialized correctly and no one notices... | 50 | * initialized correctly and no one notices... |
29 | * Think about a way to prevent this. | 51 | * Think about a way to prevent this. |
30 | * Well maybe we notice in server.... | 52 | * Well maybe we notice in server.... |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <errno.h> /* for errno */ | 23 | #include <errno.h> /* for errno */ |
2 | #include <unistd.h> | 24 | #include <unistd.h> |
3 | 25 | ||
@@ -15,7 +37,7 @@ socketAccept(Sock this, char (*remoteAddr)[16]) | @@ -15,7 +37,7 @@ socketAccept(Sock this, char (*remoteAddr)[16]) | ||
15 | len = sizeof(this->addr); | 37 | len = sizeof(this->addr); |
16 | 38 | ||
17 | /** | 39 | /** |
18 | - * @TODO: Uhh, this is bad. we open a new socket additionally to | 40 | + * \todo Uhh, this is bad. we open a new socket additionally to |
19 | * the one we get from the accept call. | 41 | * the one we get from the accept call. |
20 | * i have to change the socket constructor to be able to create | 42 | * i have to change the socket constructor to be able to create |
21 | * the data structure without creation of a socket at all. | 43 | * the data structure without creation of a socket at all. |
@@ -24,7 +46,7 @@ socketAccept(Sock this, char (*remoteAddr)[16]) | @@ -24,7 +46,7 @@ socketAccept(Sock this, char (*remoteAddr)[16]) | ||
24 | sock = new(Sock, this->log, this->port); | 46 | sock = new(Sock, this->log, this->port); |
25 | close(sock->handle); | 47 | close(sock->handle); |
26 | /** | 48 | /** |
27 | - * @TODO: change port to remote port on success | 49 | + * \todo change port to remote port on success |
28 | */ | 50 | */ |
29 | 51 | ||
30 | /* Wait for a client to connect */ | 52 | /* Wait for a client to connect */ |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> /* for atoi() and exit() */ | 23 | #include <stdlib.h> /* for atoi() and exit() */ |
2 | #include <errno.h> /* for errno */ | 24 | #include <errno.h> /* for errno */ |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdlib.h> /* for atoi() and exit() */ | 23 | #include <stdlib.h> /* for atoi() and exit() */ |
2 | #include <errno.h> /* for errno */ | 24 | #include <errno.h> /* for errno */ |
3 | 25 |
1 | +/** | ||
2 | + * \file | ||
3 | + * | ||
4 | + * \author Georg Hopp | ||
5 | + * | ||
6 | + * \copyright | ||
7 | + * Copyright (C) 2012 Georg Hopp | ||
8 | + * | ||
9 | + * This program is free software: you can redistribute it and/or modify | ||
10 | + * it under the terms of the GNU General Public License as published by | ||
11 | + * the Free Software Foundation, either version 3 of the License, or | ||
12 | + * (at your option) any later version. | ||
13 | + * | ||
14 | + * This program is distributed in the hope that it will be useful, | ||
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | + * GNU General Public License for more details. | ||
18 | + * | ||
19 | + * You should have received a copy of the GNU General Public License | ||
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | + */ | ||
22 | + | ||
1 | #include <stdio.h> | 23 | #include <stdio.h> |
2 | #include <socket.h> | 24 | #include <socket.h> |
3 | #include <string.h> | 25 | #include <string.h> |
Please
register
or
login
to post a comment