summaryrefslogtreecommitdiff
path: root/libs/networking
diff options
context:
space:
mode:
authorgeronimo <geronimo013@gmx.de>2012-07-31 04:55:28 (GMT)
committergeronimo <geronimo013@gmx.de>2012-07-31 04:55:28 (GMT)
commit1d4bb88ac1927be040d1900bb2e1b0788e648b44 (patch)
tree77ee9def3d30d9234ba5d9f1064e656dc2f30e00 /libs/networking
parentcedb1ef9230b87b7f92bbec39970a0fccb49bb56 (diff)
downloadcmp-1d4bb88ac1927be040d1900bb2e1b0788e648b44.tar.gz
cmp-1d4bb88ac1927be040d1900bb2e1b0788e648b44.tar.bz2
fixed error in mediainfo-scanner, removed all code::blocks stuff, as it resulted being not reliable
Diffstat (limited to 'libs/networking')
-rw-r--r--libs/networking/.dep.inc5
-rw-r--r--libs/networking/networking.cbp87
-rw-r--r--libs/networking/networking.depend1
-rw-r--r--libs/networking/networking.layout54
-rw-r--r--libs/networking/poll.sample53
-rw-r--r--libs/networking/src/ServerConfig.cc12
6 files changed, 6 insertions, 206 deletions
diff --git a/libs/networking/.dep.inc b/libs/networking/.dep.inc
deleted file mode 100644
index 4560e55..0000000
--- a/libs/networking/.dep.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# This code depends on make tool being used
-DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES}))
-ifneq (${DEPFILES},)
-include ${DEPFILES}
-endif
diff --git a/libs/networking/networking.cbp b/libs/networking/networking.cbp
deleted file mode 100644
index 9fbdf1b..0000000
--- a/libs/networking/networking.cbp
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
- <FileVersion major="1" minor="6" />
- <Project>
- <Option title="CMP.libs.networking" />
- <Option pch_mode="2" />
- <Option compiler="gcc" />
- <Build>
- <Target title="Debug">
- <Option output="networking" prefix_auto="1" extension_auto="1" />
- <Option working_dir="" />
- <Option object_output="obj/Debug/" />
- <Option type="2" />
- <Option compiler="gcc" />
- <Option createDefFile="1" />
- <Compiler>
- <Add option="-Wall" />
- <Add option="-g" />
- </Compiler>
- </Target>
- <Target title="Release">
- <Option output="networking" prefix_auto="1" extension_auto="1" />
- <Option working_dir="" />
- <Option object_output="obj/Release/" />
- <Option type="2" />
- <Option compiler="gcc" />
- <Option createDefFile="1" />
- <Compiler>
- <Add option="-Wall" />
- <Add option="-O2" />
- </Compiler>
- <Linker>
- <Add option="-s" />
- </Linker>
- </Target>
- </Build>
- <Compiler>
- <Add option="-std=gnu++0x -fomit-frame-pointer -fPIC -pthread -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration" />
- <Add option="-D_REENTRANT" />
- <Add option="-D_GNU_SOURCE=1" />
- <Add directory="../vdr/include" />
- <Add directory="../util/include" />
- <Add directory="../IO/include" />
- <Add directory="include" />
- </Compiler>
- <Unit filename="include/AbstractSocket.h" />
- <Unit filename="include/Authorization.h" />
- <Unit filename="include/ClientSocket.h" />
- <Unit filename="include/ConnectionHandler.h" />
- <Unit filename="include/ConnectionPoint.h" />
- <Unit filename="include/Credentials.h" />
- <Unit filename="include/HTTPAuthorizationRequest.h" />
- <Unit filename="include/HTTPFileResponse.h" />
- <Unit filename="include/HTTPMessage.h" />
- <Unit filename="include/HTTPRequest.h" />
- <Unit filename="include/HTTPRequestHandler.h" />
- <Unit filename="include/HTTPResponse.h" />
- <Unit filename="include/HTTPServer.h" />
- <Unit filename="include/HTTPStatus.h" />
- <Unit filename="include/Principal.h" />
- <Unit filename="include/ServerConfig.h" />
- <Unit filename="include/ServerSocket.h" />
- <Unit filename="src/AbstractSocket.cc" />
- <Unit filename="src/Authorization.cc" />
- <Unit filename="src/ClientSocket.cc" />
- <Unit filename="src/ConnectionHandler.cc" />
- <Unit filename="src/ConnectionPoint.cc" />
- <Unit filename="src/Credentials.cc" />
- <Unit filename="src/HTTPAuthorizationRequest.cc" />
- <Unit filename="src/HTTPFileResponse.cc" />
- <Unit filename="src/HTTPMessage.cc" />
- <Unit filename="src/HTTPRequest.cc" />
- <Unit filename="src/HTTPRequestHandler.cc" />
- <Unit filename="src/HTTPResponse.cc" />
- <Unit filename="src/HTTPServer.cc" />
- <Unit filename="src/HTTPStatus.cc" />
- <Unit filename="src/Principal.cc" />
- <Unit filename="src/ServerConfig.cc" />
- <Unit filename="src/ServerSocket.cc" />
- <Extensions>
- <code_completion />
- <envvars />
- <lib_finder disable_auto="1" />
- <debugger />
- </Extensions>
- </Project>
-</CodeBlocks_project_file>
diff --git a/libs/networking/networking.depend b/libs/networking/networking.depend
deleted file mode 100644
index c4ac310..0000000
--- a/libs/networking/networking.depend
+++ /dev/null
@@ -1 +0,0 @@
-# depslib dependency file v1.0
diff --git a/libs/networking/networking.layout b/libs/networking/networking.layout
deleted file mode 100644
index e4e1faa..0000000
--- a/libs/networking/networking.layout
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_layout_file>
- <ActiveTarget name="Debug" />
- <File name="src/ServerConfig.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="1670" topLine="0" />
- </Cursor>
- </File>
- <File name="include/HTTPResponse.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="0" topLine="0" />
- </Cursor>
- </File>
- <File name="src/ConnectionHandler.cc" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="12222" topLine="271" />
- </Cursor>
- </File>
- <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="0" topLine="0" />
- </Cursor>
- </File>
- <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="0" topLine="0" />
- </Cursor>
- </File>
- <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="0" topLine="0" />
- </Cursor>
- </File>
- <File name="src/HTTPMessage.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="0" topLine="0" />
- </Cursor>
- </File>
- <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="0" topLine="0" />
- </Cursor>
- </File>
- <File name="include/ServerConfig.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="1684" topLine="0" />
- </Cursor>
- </File>
- <File name="src/ConnectionPoint.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="0" topLine="0" />
- </Cursor>
- </File>
-</CodeBlocks_layout_file>
diff --git a/libs/networking/poll.sample b/libs/networking/poll.sample
deleted file mode 100644
index a252b7d..0000000
--- a/libs/networking/poll.sample
+++ /dev/null
@@ -1,53 +0,0 @@
-EXAMPLES
-
- Checking for Events on a Stream
-
- The following example opens a pair of STREAMS devices and then waits for either one to become writable. This example proceeds as follows:
-
- 1. Sets the timeout parameter to 500 milliseconds.
- 2. Opens the STREAMS devices /dev/dev0 and /dev/dev1, and then polls them, specifying POLLOUT and POLLWRBAND as the events of interest.
- The STREAMS device names /dev/dev0 and /dev/dev1 are only examples of how STREAMS devices can be named; STREAMS naming conventions may vary among systems conforming to the IEEE Std 1003.1-2001.
- 3. Uses the ret variable to determine whether an event has occurred on either of the two STREAMS. The poll() function is given 500 milliseconds to wait for an event to occur (if it has not occurred prior to the poll() call).
- 4. Checks the returned value of ret. If a positive value is returned, one of the following can be done:
- 1. Priority data can be written to the open STREAM on priority bands greater than 0, because the POLLWRBAND event occurred on the open STREAM ( fds[0] or fds[1]).
- 2. Data can be written to the open STREAM on priority-band 0, because the POLLOUT event occurred on the open STREAM ( fds[0] or fds[1]).
- 5. If the returned value is not a positive value, permission to write data to the open STREAM (on any priority band) is denied.
- 6. If the POLLHUP event occurs on the open STREAM ( fds[0] or fds[1]), the device on the open STREAM has disconnected.
-
- #include <stropts.h>
- #include <poll.h>
- ...
- struct pollfd fds[2];
- int timeout_msecs = 500;
- int ret;
- int i;
-
-
- /* Open STREAMS device. */
- fds[0].fd = open("/dev/dev0", ...);
- fds[1].fd = open("/dev/dev1", ...);
- fds[0].events = POLLOUT | POLLWRBAND;
- fds[1].events = POLLOUT | POLLWRBAND;
-
-
- ret = poll(fds, 2, timeout_msecs);
-
-
- if (ret > 0) {
- /* An event on one of the fds has occurred. */
- for (i=0; i<2; i++) {
- if (fds[i].revents & POLLWRBAND) {
- /* Priority data may be written on device number i. */
- ...
- }
- if (fds[i].revents & POLLOUT) {
- /* Data may be written on device number i. */
- ...
- }
- if (fds[i].revents & POLLHUP) {
- /* A hangup has occurred on device number i. */
- ...
- }
- }
- }
-
diff --git a/libs/networking/src/ServerConfig.cc b/libs/networking/src/ServerConfig.cc
index 8fb7f0f..29e12d9 100644
--- a/libs/networking/src/ServerConfig.cc
+++ b/libs/networking/src/ServerConfig.cc
@@ -1,25 +1,25 @@
/**
* ======================== legal notice ======================
- *
+ *
* File: ServerConfig.cc
* Created: 8. Juli 2012, 06
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libnetworking: classes for tcp/ip sockets and http-protocol handling
- *
+ *
* CMP - compound media player
- *
+ *
* is a client/server mediaplayer intended to play any media from any workstation
* without the need to export or mount shares. cmps is an easy to use backend
* with a (ready to use) HTML-interface. Additionally the backend supports
* authentication via HTTP-digest authorization.
* cmpc is a client with vdr-like osd-menues.
- *
+ *
* Copyright (c) 2012 Reinhard Mantey, some rights reserved!
* published under Creative Commons by-sa
* For details see http://creativecommons.org/licenses/by-sa/3.0/
- *
+ *
* The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp
- *
+ *
* --------------------------------------------------------------
*/
#include <ServerConfig.h>