myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [2911] Refactored plugins management, left only generi


From: Daniele Perrone
Subject: [myserver-commit] [2911] Refactored plugins management, left only generic plugin, all different kind of plugins are been removed.
Date: Sun, 26 Oct 2008 15:49:15 +0000

Revision: 2911
          http://svn.sv.gnu.org/viewvc/?view=rev&root=myserver&revision=2911
Author:   dperrone
Date:     2008-10-26 15:49:14 +0000 (Sun, 26 Oct 2008)

Log Message:
-----------
Refactored plugins management, left only generic plugin, all different kind of 
plugins are been removed.

Modified Paths:
--------------
    trunk/myserver/include/plugin/Makefile.am
    trunk/myserver/include/plugin/plugins_manager.h
    trunk/myserver/include/protocol/http/Makefile.am
    trunk/myserver/include/protocol/http/http.h
    trunk/myserver/include/protocol/http/http_data_read.h
    trunk/myserver/include/server/server.h
    trunk/myserver/src/plugin/Makefile.am
    trunk/myserver/src/plugin/plugins_manager.cpp
    trunk/myserver/src/protocol/Makefile.am
    trunk/myserver/src/protocol/control/control_protocol.cpp
    trunk/myserver/src/protocol/http/Makefile.am
    trunk/myserver/src/protocol/http/http.cpp
    trunk/myserver/src/server/server.cpp

Added Paths:
-----------
    trunk/myserver/include/protocol/Makefile
    trunk/myserver/include/protocol/Makefile.in
    trunk/myserver/include/protocol/http/dyn_http_command.h
    trunk/myserver/include/protocol/http/dyn_http_command_manager.h
    trunk/myserver/include/protocol/http/dyn_http_manager.h
    trunk/myserver/include/protocol/http/dyn_http_manager_list.h
    trunk/myserver/include/protocol/protocols_manager.h
    trunk/myserver/src/protocol/http/dyn_http_command.cpp
    trunk/myserver/src/protocol/http/dyn_http_command_manager.cpp
    trunk/myserver/src/protocol/http/dyn_http_manager.cpp
    trunk/myserver/src/protocol/http/dyn_http_manager_list.cpp
    trunk/myserver/src/protocol/protocols_manager.cpp

Removed Paths:
-------------
    trunk/myserver/binaries/plugins/executors/
    trunk/myserver/binaries/plugins/filters/
    trunk/myserver/binaries/plugins/generics/
    trunk/myserver/binaries/plugins/http_commands/
    trunk/myserver/binaries/plugins/http_managers/
    trunk/myserver/binaries/plugins/protocols/
    trunk/myserver/include/plugin/executor/
    trunk/myserver/include/plugin/filter/
    trunk/myserver/include/plugin/generic_plugins_manager.h
    trunk/myserver/include/plugin/http_command/
    trunk/myserver/include/plugin/http_manager/
    trunk/myserver/include/plugin/plugins_namespace.h
    trunk/myserver/include/plugin/plugins_namespace_manager.h
    trunk/myserver/include/plugin/protocol/
    trunk/myserver/src/plugin/executor/
    trunk/myserver/src/plugin/filter/
    trunk/myserver/src/plugin/generic_plugins_manager.cpp
    trunk/myserver/src/plugin/http_command/
    trunk/myserver/src/plugin/http_manager/
    trunk/myserver/src/plugin/plugins_namespace.cpp
    trunk/myserver/src/plugin/plugins_namespace_manager.cpp
    trunk/myserver/src/plugin/protocol/

Modified: trunk/myserver/include/plugin/Makefile.am
===================================================================
--- trunk/myserver/include/plugin/Makefile.am   2008-10-26 14:12:09 UTC (rev 
2910)
+++ trunk/myserver/include/plugin/Makefile.am   2008-10-26 15:49:14 UTC (rev 
2911)
@@ -1,4 +1,4 @@
 pluginincludedir=$(includedir)/myserver/include/plugin
-plugininclude_HEADERS = generic_plugins_manager.h plugin.h plugins_manager.h 
plugins_namespace.h plugins_namespace_manager.h
-SUBDIRS = executor filter http_command http_manager protocol
+plugininclude_HEADERS =  plugin.h plugins_manager.h 
 
+

Deleted: trunk/myserver/include/plugin/generic_plugins_manager.h
===================================================================
--- trunk/myserver/include/plugin/generic_plugins_manager.h     2008-10-26 
14:12:09 UTC (rev 2910)
+++ trunk/myserver/include/plugin/generic_plugins_manager.h     2008-10-26 
15:49:14 UTC (rev 2911)
@@ -1,33 +0,0 @@
-/* -*- mode: c++ -*- */
-/*
-MyServer
-Copyright (C) 2007 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef GENERIC_PLUGINS_MANAGER_H
-#define GENERIC_PLUGINS_MANAGER_H
-
-#include "stdafx.h"
-#include <include/plugin/plugins_namespace_manager.h>
-
-using namespace std;
-
-class GenericPluginsManager : public PluginsNamespaceManager
-{
-public:
-       GenericPluginsManager();
-};
-
-#endif

Modified: trunk/myserver/include/plugin/plugins_manager.h
===================================================================
--- trunk/myserver/include/plugin/plugins_manager.h     2008-10-26 14:12:09 UTC 
(rev 2910)
+++ trunk/myserver/include/plugin/plugins_manager.h     2008-10-26 15:49:14 UTC 
(rev 2911)
@@ -21,7 +21,6 @@
 
 #include "stdafx.h"
 #include <include/plugin/plugin.h>
-#include <include/plugin/plugins_namespace.h>
 #include <include/base/dynamic_lib/dynamiclib.h>
 #include <include/base/hash_map/hash_map.h>
 #include <string>
@@ -33,18 +32,43 @@
 class PluginsManager
 {
 public:
-       Plugin* getPlugin(string& namespacename, string& plugin);
-       Plugin* getPlugin(string& fullname);
+
+       struct PluginOption
+       {
+               PluginOption(PluginOption& po){enabled = po.enabled; global = 
po.global;}
+               PluginOption(){enabled = true; global = false;}
+               bool enabled;
+       bool global;
+       };
        
+       
+       
+       HashMap<string, Plugin*>::Iterator begin(){return plugins.begin();}
+       HashMap<string, Plugin*>::Iterator end(){return plugins.end();}
+       
+       Plugin* getPlugin(string& name);
+       
        int preLoad(Server *server, XmlParser* languageFile, string& resource);
        int load(Server *server, XmlParser* languageFile, string& resource);
        int postLoad(Server *server, XmlParser* languageFile);
        int unLoad(Server *server, XmlParser* languageFile);
-       void addNamespace(PluginsNamespace* namespacename);
-       PluginsNamespace* getNamespace(string &name);
-       PluginsNamespace* removeNamespace(string& name);
+
+       virtual void removePlugin(string& name);
+
+       virtual int addPluginOption(string&, PluginOption&);
+       virtual PluginOption* getPluginOption(string&);
+       
+       virtual Plugin* createPluginObject();
+       
+       PluginsManager();
+       ~PluginsManager();
+       
 private:
-       HashMap<char*, PluginsNamespace*> namespaces;
+       HashMap<string, PluginOption*> pluginsOptions;
+       HashMap<string, Plugin*> plugins;
+       int loadOptions(Server *server, XmlParser* languageFile);
+       int addPlugin(string& file, Server* server, 
+                XmlParser* languageFile, bool global);
 };
 
 #endif

Deleted: trunk/myserver/include/plugin/plugins_namespace.h
===================================================================
--- trunk/myserver/include/plugin/plugins_namespace.h   2008-10-26 14:12:09 UTC 
(rev 2910)
+++ trunk/myserver/include/plugin/plugins_namespace.h   2008-10-26 15:49:14 UTC 
(rev 2911)
@@ -1,70 +0,0 @@
-/* -*- mode: c++ -*- */
-/*
-MyServer
-Copyright (C) 2007, 2008 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef PLUGINS_NAMESPACE_H
-#define PLUGINS_NAMESPACE_H
-
-#include "stdafx.h"
-#include <include/connection/connection.h>
-#include <include/plugin/plugin.h>
-#include <include/base/hash_map/hash_map.h>
-#include <string>
-using namespace std;
-
-class XmlParser;
-class Server;
-
-class PluginsNamespace
-{
-public:
-       struct PluginOption
-       {
-               PluginOption(PluginOption& po){enabled = po.enabled; global = 
po.global;}
-               PluginOption(){enabled = true; global = false;}
-               bool enabled;
-    bool global;
-       };
-
-       HashMap<string, Plugin*>::Iterator begin(){return plugins.begin();}
-       HashMap<string, Plugin*>::Iterator end(){return plugins.end();}
-       string& getName();
-       PluginsNamespace(string name);
-       PluginsNamespace(string& name, PluginsNamespace& clone);
-       Plugin* getPlugin(string& name);
-       virtual int preLoad(Server* server, XmlParser* languageFile, 
-                                                                               
        string& resource) = 0;
-       virtual int load(Server* server, XmlParser* languageFile, 
-                                                                        
string& resource) = 0;
-       virtual int postLoad(Server* server, XmlParser* languageFile);
-       virtual int unLoad(XmlParser* languageFile);
-       virtual ~PluginsNamespace();
-       virtual int addPreloadedPlugin(Plugin*);
-       virtual void removePlugin(string& name);
-       bool isLoaded(){return loaded;}
-
-       virtual int addPluginOption(string&, PluginOption&);
-       virtual PluginOption* getPluginOption(string&);
-protected:
-       HashMap<string, Plugin*> plugins;
-       HashMap<string, PluginOption*> pluginsOptions;
-       void setName(string& name);
-private:
-       bool loaded;
-       string name;
-};
-#endif

Deleted: trunk/myserver/include/plugin/plugins_namespace_manager.h
===================================================================
--- trunk/myserver/include/plugin/plugins_namespace_manager.h   2008-10-26 
14:12:09 UTC (rev 2910)
+++ trunk/myserver/include/plugin/plugins_namespace_manager.h   2008-10-26 
15:49:14 UTC (rev 2911)
@@ -1,45 +0,0 @@
-/* -*- mode: c++ -*- */
-/*
-MyServer
-Copyright (C) 2007, 2008 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef PLUGINS_NAMESPACE_MANAGER_H
-#define PLUGINS_NAMESPACE_MANAGER_H
-
-#include "stdafx.h"
-#include <include/plugin/plugins_namespace.h>
-
-using namespace std;
-
-class PluginsNamespaceManager : public PluginsNamespace
-{
-public:
-       PluginsNamespaceManager(string name);
-
-       virtual int preLoad(Server* server, XmlParser* languageFile, 
-                                                                               
        string& resource);
-       virtual int load(Server* server, XmlParser* languageFile, 
-                                                                        
string& resource);
-
-protected:
-       virtual Plugin* createPluginObject();
-private:
-       int addPlugin(string& file, Server* server, 
-                XmlParser* languageFile, bool global);
-
-};
-
-#endif

Added: trunk/myserver/include/protocol/Makefile
===================================================================
--- trunk/myserver/include/protocol/Makefile                            (rev 0)
+++ trunk/myserver/include/protocol/Makefile    2008-10-26 15:49:14 UTC (rev 
2911)
@@ -0,0 +1,547 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# include/protocol/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/myserver
+pkglibdir = $(libdir)/myserver
+pkgincludedir = $(includedir)/myserver
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+target_triplet = i686-pc-linux-gnu
+subdir = include/protocol
+DIST_COMMON = $(protocolinclude_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/cppunit.m4 \
+       $(top_srcdir)/m4/gnome-pthread-check.m4 \
+       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libxml.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(protocolincludedir)"
+protocolincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(protocolinclude_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/dany/srcprojects/myserver/myserver/missing --run 
aclocal-1.10
+AMTAR = ${SHELL} /home/dany/srcprojects/myserver/myserver/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/dany/srcprojects/myserver/myserver/missing --run 
autoconf
+AUTOHEADER = ${SHELL} /home/dany/srcprojects/myserver/myserver/missing --run 
autoheader
+AUTOMAKE = ${SHELL} /home/dany/srcprojects/myserver/myserver/missing --run 
automake-1.10
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS =   -fPIC -DPIC -I/usr/include/openssl -DHAVE_SSL
+CPP = gcc -E
+CPPFLAGS =  -I/usr/include/libxml2
+CPPUNIT_CFLAGS = 
+CPPUNIT_CONFIG = /usr/bin/cppunit-config
+CPPUNIT_LDFLAGS = -lcppunit
+CPPUNIT_LIBS = -lcppunit -ldl
+CXFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =   -fPIC -DPIC -I/usr/include/openssl -DHAVE_SSL
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DL_LIB = -ldl
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EVENT_LIB = -levent
+EXEEXT = 
+F77 = 
+FFLAGS = 
+GREP = /bin/grep
+HAVE_SSL = yes
+IDN_LIB = 
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS =   -fPIC -DPIC -L/usr/lib
+LEX = ${SHELL} /home/dany/srcprojects/myserver/myserver/missing --run flex
+LEXLIB = 
+LEX_OUTPUT_ROOT = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/dany/srcprojects/myserver/myserver/missing --run 
makeinfo
+MKDIR_P = /bin/mkdir -p
+MYSERVER_VERSION = 0.9.0-rc2
+OBJEXT = o
+OPENSSL_LIB = -lssl -lcrypto
+PACKAGE = myserver
+PACKAGE_BUGREPORT = address@hidden
+PACKAGE_NAME = GNU MyServer
+PACKAGE_STRING = 0.9.0-rc2
+PACKAGE_TARNAME = myserver
+PACKAGE_VERSION = 0.9.0-rc2
+PATH_SEPARATOR = :
+PTHREAD_LIB = -lpthread
+RANLIB = ranlib
+SET_MAKE = 
+SHELL = /bin/bash
+STRIP = strip
+VERSION = 0.9.0-rc2
+XML2_CONFIG = /usr/bin/xml2-config
+XML_CPPFLAGS = -I/usr/include/libxml2
+XML_LIBS = -lxml2
+XNET_LIB = 
+YACC = yacc
+YFLAGS = 
+ZLIB_LIB = -lz
+abs_builddir = /home/dany/srcprojects/myserver/myserver/include/protocol
+abs_srcdir = /home/dany/srcprojects/myserver/myserver/include/protocol
+abs_top_builddir = /home/dany/srcprojects/myserver/myserver
+abs_top_srcdir = /home/dany/srcprojects/myserver/myserver
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = $(SHELL) /home/dany/srcprojects/myserver/myserver/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+make_info = yes
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+root_bindir = ${root_prefix}/bin
+root_prefix = $(DESTDIR)
+root_sbindir = ${root_prefix}/sbin
+root_sysconfdir = ${root_prefix}/etc
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target = i686-pc-linux-gnu
+target_alias = 
+target_cpu = i686
+target_os = linux-gnu
+target_vendor = pc
+top_builddir = ../..
+top_srcdir = ../..
+protocolincludedir = $(includedir)/myserver/include/protocol
+protocolinclude_HEADERS = protocol_buffer.h protocol.h
+SUBDIRS = control ftp http https
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  
include/protocol/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  include/protocol/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-protocolincludeHEADERS: $(protocolinclude_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(protocolincludedir)" || $(MKDIR_P) 
"$(DESTDIR)$(protocolincludedir)"
+       @list='$(protocolinclude_HEADERS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(protocolincludeHEADERS_INSTALL) '$$d$$p' 
'$(DESTDIR)$(protocolincludedir)/$$f'"; \
+         $(protocolincludeHEADERS_INSTALL) "$$d$$p" 
"$(DESTDIR)$(protocolincludedir)/$$f"; \
+       done
+
+uninstall-protocolincludeHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(protocolinclude_HEADERS)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(protocolincludedir)/$$f'"; \
+         rm -f "$(DESTDIR)$(protocolincludedir)/$$f"; \
+       done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); 
\
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(protocolincludedir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-protocolincludeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-protocolincludeHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+       install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-generic clean-libtool \
+       ctags ctags-recursive distclean distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-protocolincludeHEADERS install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-recursive uninstall uninstall-am \
+       uninstall-protocolincludeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/myserver/include/protocol/Makefile.in
===================================================================
--- trunk/myserver/include/protocol/Makefile.in                         (rev 0)
+++ trunk/myserver/include/protocol/Makefile.in 2008-10-26 15:49:14 UTC (rev 
2911)
@@ -0,0 +1,547 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = include/protocol
+DIST_COMMON = $(protocolinclude_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/cppunit.m4 \
+       $(top_srcdir)/m4/gnome-pthread-check.m4 \
+       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libxml.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(protocolincludedir)"
+protocolincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(protocolinclude_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
+CPPUNIT_CONFIG = @CPPUNIT_CONFIG@
+CPPUNIT_LDFLAGS = @CPPUNIT_LDFLAGS@
+CPPUNIT_LIBS = @CPPUNIT_LIBS@
+CXFLAGS = @CXFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DL_LIB = @DL_LIB@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EVENT_LIB = @EVENT_LIB@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_SSL = @HAVE_SSL@
+IDN_LIB = @IDN_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MYSERVER_VERSION = @MYSERVER_VERSION@
+OBJEXT = @OBJEXT@
+OPENSSL_LIB = @OPENSSL_LIB@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_LIB = @PTHREAD_LIB@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XML2_CONFIG = @XML2_CONFIG@
+XML_CPPFLAGS = @XML_CPPFLAGS@
+XML_LIBS = @XML_LIBS@
+XNET_LIB = @XNET_LIB@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_LIB = @ZLIB_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+make_info = @make_info@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+root_bindir = @root_bindir@
+root_prefix = @root_prefix@
+root_sbindir = @root_sbindir@
+root_sysconfdir = @root_sysconfdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+protocolincludedir = $(includedir)/myserver/include/protocol
+protocolinclude_HEADERS = protocol_buffer.h protocol.h
+SUBDIRS = control ftp http https
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  
include/protocol/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  include/protocol/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-protocolincludeHEADERS: $(protocolinclude_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(protocolincludedir)" || $(MKDIR_P) 
"$(DESTDIR)$(protocolincludedir)"
+       @list='$(protocolinclude_HEADERS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(protocolincludeHEADERS_INSTALL) '$$d$$p' 
'$(DESTDIR)$(protocolincludedir)/$$f'"; \
+         $(protocolincludeHEADERS_INSTALL) "$$d$$p" 
"$(DESTDIR)$(protocolincludedir)/$$f"; \
+       done
+
+uninstall-protocolincludeHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(protocolinclude_HEADERS)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(protocolincludedir)/$$f'"; \
+         rm -f "$(DESTDIR)$(protocolincludedir)/$$f"; \
+       done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); 
\
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(protocolincludedir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-protocolincludeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-protocolincludeHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+       install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-generic clean-libtool \
+       ctags ctags-recursive distclean distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-protocolincludeHEADERS install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-recursive uninstall uninstall-am \
+       uninstall-protocolincludeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Modified: trunk/myserver/include/protocol/http/Makefile.am
===================================================================
--- trunk/myserver/include/protocol/http/Makefile.am    2008-10-26 14:12:09 UTC 
(rev 2910)
+++ trunk/myserver/include/protocol/http/Makefile.am    2008-10-26 15:49:14 UTC 
(rev 2911)
@@ -1,4 +1,4 @@
 httpincludedir=$(includedir)/myserver/include/protocol/http
-httpinclude_HEADERS = http_data_handler.h http_data_read.h http_errors.h 
http.h http_header.h http_headers.h http_request.h http_req_security_domain.h 
http_response.h http_thread_context.h
+httpinclude_HEADERS = dyn_http_command.h dyn_http_command_manager.h 
dyn_http_manager.h dyn_http_manager_list.h http_data_handler.h http_data_read.h 
http_errors.h http.h http_header.h http_headers.h http_request.h 
http_req_security_domain.h http_response.h http_thread_context.h
 SUBDIRS = env
 

Copied: trunk/myserver/include/protocol/http/dyn_http_command.h (from rev 2900, 
trunk/myserver/include/plugin/http_command/dyn_http_command.h)
===================================================================
--- trunk/myserver/include/protocol/http/dyn_http_command.h                     
        (rev 0)
+++ trunk/myserver/include/protocol/http/dyn_http_command.h     2008-10-26 
15:49:14 UTC (rev 2911)
@@ -0,0 +1,46 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef DYN_HTTP_COMMAND_H
+#define DYN_HTTP_COMMAND_H
+
+#include "stdafx.h"
+#include <include/base/xml/xml_parser.h>
+#include <include/protocol/protocol.h>
+#include <include/connection/connection.h>
+#include <include/base/dynamic_lib/dynamiclib.h>
+#include <include/protocol/http/http_headers.h>
+#include <include/base/hash_map/hash_map.h>
+#include <string>
+using namespace std;
+
+class DynamicHttpCommand 
+{
+public:
+  DynamicHttpCommand(string&);
+  virtual ~DynamicHttpCommand();
+  string getName();
+  virtual int acceptData() = 0;
+  virtual int send(HttpThreadContext* context, ConnectionPtr lpconnection, 
+                                                                        
string& Uri, int systemrequest = 0, 
+                                                                        int 
OnlyHeader = 0, int yetmapped = 0) = 0;
+private:
+  string name;
+};
+
+#endif

Copied: trunk/myserver/include/protocol/http/dyn_http_command_manager.h (from 
rev 2900, trunk/myserver/include/plugin/http_command/dyn_http_command_manager.h)
===================================================================
--- trunk/myserver/include/protocol/http/dyn_http_command_manager.h             
                (rev 0)
+++ trunk/myserver/include/protocol/http/dyn_http_command_manager.h     
2008-10-26 15:49:14 UTC (rev 2911)
@@ -0,0 +1,58 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef DYN_HTTP_COMMAND_MANAGER_H
+#define DYN_HTTP_COMMAND_MANAGER_H
+
+#include "stdafx.h"
+#include <include/base/xml/xml_parser.h>
+#include <include/protocol/protocol.h>
+#include <include/connection/connection.h>
+#include <include/base/dynamic_lib/dynamiclib.h>
+#include <include/protocol/http/http_headers.h>
+#include <include/base/hash_map/hash_map.h>
+#include <string>
+
+class DynamicHttpCommand;
+
+using namespace std;
+
+class DynHttpCommandManager 
+{
+public:
+  DynHttpCommandManager();
+  virtual ~DynHttpCommandManager();
+  
+  DynamicHttpCommand* getHttpCommand(string& name);
+  
+  HashMap<string, DynamicHttpCommand*>::Iterator begin(){return 
dynamicHttpCommands.begin();}
+  HashMap<string, DynamicHttpCommand*>::Iterator end(){return 
dynamicHttpCommands.end();}
+  
+  
+  void addHttpCommand(string& name, DynamicHttpCommand* httpCommand);
+
+  void addHttpCommand(char* name, DynamicHttpCommand* httpCommand)
+  {
+       string strName(name);
+       addHttpCommand(strName, httpCommand);
+  }
+private:
+       HashMap<string, DynamicHttpCommand*> dynamicHttpCommands;
+};
+
+#endif

Copied: trunk/myserver/include/protocol/http/dyn_http_manager.h (from rev 2899, 
trunk/myserver/include/plugin/http_manager/dyn_http_manager.h)
===================================================================
--- trunk/myserver/include/protocol/http/dyn_http_manager.h                     
        (rev 0)
+++ trunk/myserver/include/protocol/http/dyn_http_manager.h     2008-10-26 
15:49:14 UTC (rev 2911)
@@ -0,0 +1,43 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2005 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef DYN_HTTP_MANAGER_H
+#define DYN_HTTP_MANAGER_H
+
+#include "stdafx.h"
+#include <include/base/xml/xml_parser.h>
+#include <include/protocol/protocol.h>
+#include <include/connection/connection.h>
+#include <include/base/dynamic_lib/dynamiclib.h>
+#include <include/protocol/http/http_headers.h>
+#include <include/base/hash_map/hash_map.h>
+#include <string>
+using namespace std;
+
+
+class DynamicHttpManager 
+{
+public:
+       DynamicHttpManager();
+       virtual ~DynamicHttpManager();
+       virtual int send(HttpThreadContext*, ConnectionPtr s, const char 
*filenamePath,
+                   const char* cgi, int selfExecuted, int onlyHeader = 0) = 0;
+
+};
+
+#endif

Copied: trunk/myserver/include/protocol/http/dyn_http_manager_list.h (from rev 
2899, trunk/myserver/include/plugin/http_manager/dyn_http_manager_list.h)
===================================================================
--- trunk/myserver/include/protocol/http/dyn_http_manager_list.h                
                (rev 0)
+++ trunk/myserver/include/protocol/http/dyn_http_manager_list.h        
2008-10-26 15:49:14 UTC (rev 2911)
@@ -0,0 +1,56 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef DYN_HTTP_MANAGER_LIST_H
+#define DYN_HTTP_MANAGER_LIST_H
+
+#include "stdafx.h"
+#include <include/base/xml/xml_parser.h>
+#include <include/protocol/protocol.h>
+#include <include/connection/connection.h>
+#include <include/base/dynamic_lib/dynamiclib.h>
+#include <include/protocol/http/http_headers.h>
+#include <include/base/hash_map/hash_map.h>
+#include <string>
+using namespace std;
+
+class DynamicHttpManager;
+
+class DynHttpManagerList
+{
+public:
+  DynamicHttpManager* getHttpManager(string& name);
+
+  HashMap<string, DynamicHttpManager*>::Iterator begin(){return 
dynamicHttpManagers.begin();}
+  HashMap<string, DynamicHttpManager*>::Iterator end(){return 
dynamicHttpManagers.end();}
+
+  void addHttpManager(string& name, DynamicHttpManager* httpManager);
+
+  void addHttpManager(char* name, DynamicHttpManager* httpManager)
+  {
+       string strName(name);
+       addHttpManager(strName, httpManager);
+  }
+
+  DynHttpManagerList();
+  ~DynHttpManagerList();
+private:
+       HashMap<string, DynamicHttpManager*> dynamicHttpManagers;
+};
+
+#endif

Modified: trunk/myserver/include/protocol/http/http.h
===================================================================
--- trunk/myserver/include/protocol/http/http.h 2008-10-26 14:12:09 UTC (rev 
2910)
+++ trunk/myserver/include/protocol/http/http.h 2008-10-26 15:49:14 UTC (rev 
2911)
@@ -26,10 +26,10 @@
 #include <include/base/xml/xml_parser.h>
 #include <include/base/thread/thread.h>
 #include <include/base/sync/mutex.h>
-#include <include/plugin/http_command/dyn_http_command_manager.h>
-#include <include/plugin/http_command/dyn_http_command.h>
-#include <include/plugin/http_manager/dyn_http_manager_list.h>
-#include <include/plugin/http_manager/dyn_http_manager.h>
+#include <include/protocol/http/dyn_http_command_manager.h>
+#include <include/protocol/http/dyn_http_command.h>
+#include <include/protocol/http/dyn_http_manager_list.h>
+#include <include/protocol/http/dyn_http_manager.h>
 #include <include/base/multicast/multicast.h>
 #include <include/protocol/http/http_data_handler.h>
 #include <include/base/string/securestr.h>

Modified: trunk/myserver/include/protocol/http/http_data_read.h
===================================================================
--- trunk/myserver/include/protocol/http/http_data_read.h       2008-10-26 
14:12:09 UTC (rev 2910)
+++ trunk/myserver/include/protocol/http/http_data_read.h       2008-10-26 
15:49:14 UTC (rev 2911)
@@ -26,10 +26,10 @@
 #include <include/base/xml/xml_parser.h>
 #include <include/base/thread/thread.h>
 #include <include/base/sync/mutex.h>
-#include <include/plugin/http_command/dyn_http_command_manager.h>
-#include <include/plugin/http_command/dyn_http_command.h>
-#include <include/plugin/http_manager/dyn_http_manager_list.h>
-#include <include/plugin/http_manager/dyn_http_manager.h>
+#include <include/protocol/http/dyn_http_command_manager.h>
+#include <include/protocol/http/dyn_http_command.h>
+#include <include/protocol/http/dyn_http_manager_list.h>
+#include <include/protocol/http/dyn_http_manager.h>
 #include <include/base/multicast/multicast.h>
 #include <include/protocol/http/http_data_handler.h>
 #include <string>

Copied: trunk/myserver/include/protocol/protocols_manager.h (from rev 2899, 
trunk/myserver/include/plugin/protocol/protocols_manager.h)
===================================================================
--- trunk/myserver/include/protocol/protocols_manager.h                         
(rev 0)
+++ trunk/myserver/include/protocol/protocols_manager.h 2008-10-26 15:49:14 UTC 
(rev 2911)
@@ -0,0 +1,54 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef PROTOCOLS_MANAGER_H
+#define PROTOCOLS_MANAGER_H
+#include "stdafx.h"
+#include <include/base/xml/xml_parser.h>
+#include <include/protocol/protocol.h>
+#include <include/connection/connection.h>
+#include <include/base/dynamic_lib/dynamiclib.h>
+#include <include/plugin/plugin.h>
+#include <include/base/hash_map/hash_map.h>
+#include <list>
+#include <string>
+
+using namespace std;
+
+class ProtocolsManager 
+{
+public:
+       ProtocolsManager();
+       ~ProtocolsManager();
+
+  Protocol* getProtocol(string& name);
+
+  void addProtocol(string& name, Protocol* protocol);
+
+  void addProtocol(char* name, Protocol* protocol)
+  {
+    string strName(name);
+    addProtocol(strName, protocol);
+  }
+
+protected:
+  list<Protocol*> staticProtocolsList;
+  HashMap<string, Protocol*> staticProtocols;
+};
+
+#endif

Modified: trunk/myserver/include/server/server.h
===================================================================
--- trunk/myserver/include/server/server.h      2008-10-26 14:12:09 UTC (rev 
2910)
+++ trunk/myserver/include/server/server.h      2008-10-26 15:49:14 UTC (rev 
2911)
@@ -29,18 +29,17 @@
 #include <include/base/sync/event.h>
 #include <include/conf/mime/mime_manager.h>
 #include <include/conf/vhost/vhost_manager.h>
-#include <include/plugin/protocol/protocols_manager.h>
+#include <include/protocol/protocols_manager.h>
 #include <include/connection/connection.h>
 #include <include/log/log_manager.h>
 #include <include/filter/filters_factory.h>
 #include <include/plugin/plugins_manager.h>
-#include <include/plugin/filter/dyn_filters_manager.h>
-#include <include/plugin/filter/dyn_filter.h>
-#include <include/plugin/executor/dyn_executor_manager.h>
+//#include <include/plugin/filter/dyn_filters_manager.h>
+//#include <include/plugin/filter/dyn_filter.h>
+//#include <include/plugin/executor/dyn_executor_manager.h>
 #include <include/base/hash_map/hash_map.h>
 #include <include/base/home_dir/home_dir.h>
 #include <include/base/files_cache/cached_file_factory.h>
-#include <include/plugin/generic_plugins_manager.h>
 #include <include/base/process/process_server_manager.h>
 #include <include/connections_scheduler/listen_threads.h>
 #include <include/base/multicast/multicast.h>
@@ -201,8 +200,8 @@
   HashMap<string, string*> hashedData;
   HashMap<string, void*> globalData;
   FiltersFactory filtersFactory;
-  DynamicFiltersManager filters;
-  DynExecutorManager executors;
+  //DynamicFiltersManager filters;
+  //DynExecutorManager executors;
   u_long uid;
   u_long gid;
   int currentThreadID;
@@ -259,7 +258,6 @@
   string* vhostConfigurationFile;
   string* mimeConfigurationFile;
   PluginsManager pluginsManager;
-  GenericPluginsManager genericPluginsManager;
   ProcessServerManager processServerManager;
   ConnectionsScheduler connectionsScheduler;
   ListenThreads listenThreads;

Modified: trunk/myserver/src/plugin/Makefile.am
===================================================================
--- trunk/myserver/src/plugin/Makefile.am       2008-10-26 14:12:09 UTC (rev 
2910)
+++ trunk/myserver/src/plugin/Makefile.am       2008-10-26 15:49:14 UTC (rev 
2911)
@@ -1,5 +1,4 @@
 lib_LIBRARIES = libplugin.a
-libplugin_a_SOURCES = generic_plugins_manager.cpp plugin.cpp 
plugins_manager.cpp plugins_namespace.cpp plugins_namespace_manager.cpp
-SUBDIRS = executor filter http_command http_manager protocol
+libplugin_a_SOURCES =  plugin.cpp plugins_manager.cpp 
 INCLUDES = $(all_includes)
 

Deleted: trunk/myserver/src/plugin/generic_plugins_manager.cpp
===================================================================
--- trunk/myserver/src/plugin/generic_plugins_manager.cpp       2008-10-26 
14:12:09 UTC (rev 2910)
+++ trunk/myserver/src/plugin/generic_plugins_manager.cpp       2008-10-26 
15:49:14 UTC (rev 2911)
@@ -1,32 +0,0 @@
-/*
-MyServer
-Copyright (C) 2007, 2008 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
-#include <include/plugin/generic_plugins_manager.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/server/server.h>
-#include <string>
-using namespace std;
-
-/*!
- *Constructor for the class.
- */
-GenericPluginsManager::GenericPluginsManager() : 
-  PluginsNamespaceManager("generics")
-{
-
-}

Modified: trunk/myserver/src/plugin/plugins_manager.cpp
===================================================================
--- trunk/myserver/src/plugin/plugins_manager.cpp       2008-10-26 14:12:09 UTC 
(rev 2910)
+++ trunk/myserver/src/plugin/plugins_manager.cpp       2008-10-26 15:49:14 UTC 
(rev 2911)
@@ -18,56 +18,49 @@
 #include "stdafx.h"
 #include <include/plugin/plugins_manager.h>
 #include <include/base/xml/xml_parser.h>
+#include <include/base/find_data/find_data.h>
 #include <include/server/server.h>
 
 #include <string>
 using namespace std;
 
 /*!
- *Get a plugin trough its namespace and its name.
- *\param namespacename The namespace name to use.
- *\param plugin The plugin name.
+ *Default constructor.
  */
-Plugin* PluginsManager::getPlugin(string& namespacename, string& plugin)
+PluginsManager::PluginsManager()
 {
-  PluginsNamespace* pn = namespaces.get((char*)namespacename.c_str());
+       
+}
 
-  if(pn)
-    return pn->getPlugin(plugin);
-  return 0;
+/*!
+ *Destroy the object.
+ */
+PluginsManager::~PluginsManager()
+{
+       
 }
+
 /*!
- *Get a plugin trough its namespace and its name namespace-plugin.
- *\param fullname The plugin complete name.
+ *Get a plugin trough  its name plugin.
+ *\param name The plugin name.
  */
-Plugin* PluginsManager::getPlugin(string& fullname)
+Plugin* PluginsManager::getPlugin(string& name)
 {
-  size_t sep = fullname.find('-', 0);
-  if(sep != string::npos)
-  {
-    string namespacename(fullname.substr(0, sep - 1));
-    string plugin(fullname.substr(sep + 1, fullname.length()));
-    
-    return getPlugin(namespacename, plugin);
-  }
-  return 0;
+  return plugins.get(name);
 }
   
 /*!
- *Preload the plugins.
+ *Load the plugin soptions.
  *\param server The server object to use.
  *\param languageFile The language file to use to get errors and warnings 
  *messages.
- *\param resource The resource to use to load plugins.
  */
-int PluginsManager::preLoad(Server *server, XmlParser* languageFile, 
-                            string& resource)
+int PluginsManager::loadOptions(Server *server, XmlParser* languageFile)
 {
   xmlDocPtr xmlDoc;
   int ret = 0;
   XmlParser* configuration;
-  HashMap<char*, PluginsNamespace*>::Iterator it = namespaces.begin();
-
+  
   configuration = server->getConfiguration();
   
   xmlDoc = configuration->getDoc();
@@ -79,7 +72,7 @@
         {
           string namespaceName;
           string pluginName;
-          PluginsNamespace::PluginOption po;
+          PluginsManager::PluginOption po;
           
           if(!xmlStrcmp(node->name, (const xmlChar *)"PLUGIN"))
           {
@@ -92,13 +85,6 @@
                 if(properties->children && properties->children->content)
                   pluginName.assign((char*)properties->children->content);
               }
-        
-              if(!xmlStrcmp(properties->name, (const xmlChar *)"namespace"))
-              {
-                if(properties->children && properties->children->content)
-                  namespaceName.assign((char*)properties->children->content);
-              }
-              
               properties = properties->next;
             }
             
@@ -110,39 +96,168 @@
                 po.global = strcmpi("YES", (const 
char*)internal->children->content) ? false : true;
             }
 
-            if(!namespaceName.length() || !pluginName.length())
+            if(!pluginName.length())
             {
               string error;
-              error.assign("Warning: invalid namespace or plugin name in 
PLUGIN block");
-              server->logWriteln(error.c_str(), ERROR);     
+              error.assign("Warning: invalid plugin name in PLUGIN block");
+              server->logWriteln(error.c_str(), ERROR);   
+              ret = -1;  
             }
             else
             {
-              PluginsNamespace* ns = getNamespace(namespaceName);
-              if(!ns)
-              {
-                string error;
-                error.assign("Warning: invalid namespace name");
-                server->logWriteln(error.c_str(), ERROR);     
-              }
-              else
-                ns->addPluginOption(pluginName, po);
-
+                addPluginOption(pluginName, po);
             }
 
           }
         }
 
-  while(it != namespaces.end())
+  return ret;
+  
+}
+
+
+/*!
+ *Preload sequence, called when all the plugins are not yet loaded.
+ *\param server The server object to use.
+ *\param languageFile The language file to use to retrieve warnings/errors 
+ *messages.
+ *\param resource The resource location to use to load plugins, in this 
+ *implementation it is a directory name.
+ */
+int PluginsManager::preLoad(Server* server, XmlParser* languageFile, 
+                                     string& resource)
+{
+  FindData fdir;
+  FindData flib;
+  string filename;
+  string completeFileName;  
+  int ret;
+
+  loadOptions(server,languageFile);
+  
+  filename.assign(resource);
+
+  
+
+  ret = fdir.findfirst(filename.c_str());  
+  
+  if(ret == -1)
   {
-    ret |= (*it)->preLoad(server, languageFile, resource);
-    it++;
+    return ret;  
   }
+
+  ret = 0;
+
+  do
+  {  
+       string dirname(filename);
+       
+       dirname.append("/");
+       dirname.append(fdir.name);
+    if(fdir.name[0]=='.')
+      continue;
+      
+    
+    ret = flib.findfirst(dirname.c_str());  
+  
+       if(ret == -1)
+         continue;
+       
+       do
+       {
+         string name(flib.name);
+      PluginsManager::PluginOption *po;
+      if(flib.name[0]=='.')
+       continue;
+          /*!
+     *Do not consider file other than dynamic libraries.
+     */
+#ifdef WIN32
+      if(!strstr(flib.name,".dll"))
+#endif
+#ifdef NOT_WIN
+      if(!strstr(flib.name,".so"))
+#endif    
+        continue;
+      completeFileName.assign(filename);
+      
+      if((fdir.name[0] != '/') && (fdir.name[0] != '\\')) 
+        completeFileName.append("/");
+      completeFileName.append(fdir.name);
+      
+      if((flib.name[0] != '/') && (flib.name[0] != '\\')) 
+        completeFileName.append("/");
+      completeFileName.append(flib.name);
+
+#ifdef WIN32
+      name = name.substr(0, name.length() - 4);
+#endif
+#ifdef NOT_WIN
+      name = name.substr(0, name.length() - 3);
+#endif
+      po = getPluginOption(name);
+    
+       if(!po || po->enabled)
+         ret |= addPlugin(completeFileName, server, languageFile, po && 
po->global);
+
+     }while(!flib.findnext());
+   }while(!fdir.findnext());
+  fdir.findclose();
+  flib.findclose();
   return ret;
-  
 }
 
 /*!
+ *Create the appropriate object to keep a plugin.
+ */
+Plugin* PluginsManager::createPluginObject()
+{
+  return new Plugin();
+}
+
+/*!
+ *Add a plugin.
+ *\param file The plugin file name.
+ *\param server The server object to use.
+ *\param languageFile The language file to use to retrieve warnings/errors 
+ *messages.
+ *\param global Specify if the library should be loaded globally.
+ */
+int PluginsManager::addPlugin(string& file, Server* server, 
+                                       XmlParser* languageFile, bool global)
+{
+  Plugin *plugin = createPluginObject();
+  string logBuf;
+  string name;
+  const char* namePtr;
+
+  if(plugin->preLoad(file, server, languageFile, global))
+  {
+    delete plugin;
+    return 1;
+  }
+  namePtr = plugin->getName(0, 0);
+
+  if(namePtr)
+    name.assign(namePtr);
+  else
+  {
+    delete plugin;
+    return 1;
+  }
+    
+  plugins.put(name, plugin);
+
+  logBuf.assign(languageFile->getValue("MSG_LOADED"));
+  logBuf.append(" ");
+  logBuf.append(file);
+  logBuf.append(" --> ");
+  logBuf.append(name);
+  server->logWriteln( logBuf.c_str() );
+  return 0;
+}
+
+/*!
  *Load the plugins.
  *\param server The server object to use.
  *\param languageFile The language file to use to get errors and warnings 
@@ -152,15 +267,13 @@
 int PluginsManager::load(Server *server, XmlParser* languageFile, 
                          string& resource)
 {
-  int ret = 0;
-  HashMap<char*, PluginsNamespace*>::Iterator it = namespaces.begin();
-
-  while(it != namespaces.end())
+  HashMap<string, Plugin*>::Iterator it = plugins.begin();
+  while(it != plugins.end())
   {
-    ret |= (*it)->load(server, languageFile, resource);
+    (*it)->load(resource, server, languageFile);
     it++;
   }
-  return ret;
+  return 0;
   
 }
 
@@ -172,16 +285,13 @@
  */
 int PluginsManager::postLoad(Server *server, XmlParser* languageFile)
 {
-  int ret = 0;
-  HashMap<char*, PluginsNamespace*>::Iterator it = namespaces.begin();
-
-  while(it != namespaces.end())
+  HashMap<string, Plugin*>::Iterator it = plugins.begin();
+  while(it != plugins.end())
   {
-    ret |= (*it)->postLoad(server, languageFile);
+    (*it)->postLoad(server, languageFile);
     it++;
   }
-
-  return ret;
+  return 0;
 }
 
 /*!
@@ -192,44 +302,57 @@
  */
 int PluginsManager::unLoad(Server *server, XmlParser* languageFile)
 {
-  int ret = 0;
+  HashMap<string, Plugin*>::Iterator it = plugins.begin();
+  HashMap<string, PluginOption*>::Iterator poit = pluginsOptions.begin();
 
-  HashMap<char*, PluginsNamespace*>::Iterator it = namespaces.begin();
-
-  while(it != namespaces.end())
+  while(it != plugins.end())
   {
-    ret |= (*it)->unLoad(languageFile);
+    (*it)->unLoad(languageFile);
+    delete *it;
     it++;
   }
 
-  namespaces.clear();
-  return ret;
+  while(poit != pluginsOptions.end())
+  {
+    delete *poit;
+    poit++;
+  }
+
+  plugins.clear();
+  pluginsOptions.clear();
+  return 0;
 }
 
 /*!
- *Add a new namespace to the plugins system.
- *\param newnamespace The namespace to add.
+ *Remove a plugin  without clean it.
+ *\param name The plugin to remove.
  */
-void PluginsManager::addNamespace(PluginsNamespace* newnamespace)
+void PluginsManager::removePlugin(string& name)
 {
-  removeNamespace(newnamespace->getName());
-  namespaces.put((char*)newnamespace->getName().c_str(), newnamespace);
+  plugins.remove(name);
 }
 
 /*!
- *Get a namespace by its name.
- *\param name The namespace name.
+ *Add a plugin option structure.
+ *\param plugin The plugin name.
+ *\param po The options for the plugin.
  */
-PluginsNamespace* PluginsManager::getNamespace(string &name)
+int PluginsManager::addPluginOption(string& plugin, PluginOption& po)
 {
-  return namespaces.get((char*)name.c_str());
+  PluginOption* newPo = new PluginOption(po);
+  PluginOption* oldPo = pluginsOptions.put(plugin, newPo);
+
+  if(oldPo)
+    delete oldPo;
+
+  return 0;
 }
 
 /*!
- *Remove a namespace by its name.
- *\param name The namespace name.
+ *Return a pluginOption.
+ *\param name The plugin name.
  */
-PluginsNamespace* PluginsManager::removeNamespace(string& name)
+PluginsManager::PluginOption* PluginsManager::getPluginOption(string& plugin)
 {
-  return namespaces.remove((char*)name.c_str());
-}
+  return pluginsOptions.get(plugin);
+}
\ No newline at end of file

Deleted: trunk/myserver/src/plugin/plugins_namespace.cpp
===================================================================
--- trunk/myserver/src/plugin/plugins_namespace.cpp     2008-10-26 14:12:09 UTC 
(rev 2910)
+++ trunk/myserver/src/plugin/plugins_namespace.cpp     2008-10-26 15:49:14 UTC 
(rev 2911)
@@ -1,180 +0,0 @@
-/*
-MyServer
-Copyright (C) 2007, 2008 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
-#include <include/plugin/plugins_namespace.h>
-#include <string>
-using namespace std;
-
-/*!
- *Constructor for the class.
- *\param name A name for the namespace.
- */
-PluginsNamespace::PluginsNamespace(string name)
-{
-  this->name.assign(name);
-  loaded = false;
-}
-
-/*!
- *Destroy the object.
- */
-PluginsNamespace::~PluginsNamespace()
-{
-  unLoad(0);
-  loaded = false;
-}
-
-
-/*!
- *Constructor for the class.
- *\param name A name for the namespace.
- *\param clone Another namespace to copy plugins from.  
- *A plugin can exist only in a namespace at once, this constructor will clean 
- *up automatically the clone namespace.
- */
-PluginsNamespace::PluginsNamespace(string& name, PluginsNamespace& clone) 
-{
-  this->name.assign(name);
-  HashMap<string, Plugin*>::Iterator it = clone.plugins.begin();
-  while(it != clone.plugins.end())
-  {
-    string name((*it)->getName(0, 0));
-    plugins.put(name, *it);
-    it++;
-  }
-  loaded = clone.loaded;
-
-}
-
-/*!
- *Get the namespace name.
- */
-string& PluginsNamespace::getName()
-{
-  return name;
-}
-
-/*!
- *Get a plugin by its name.
- *\param name The plugin name.
- */
-Plugin* PluginsNamespace::getPlugin(string &name)
-{
-  return plugins.get((char*)name.c_str());
-}
-
-/*!
- *Post load sequence, called when all the plugins are loaded.
- *\param server The server object to use.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
- */
-int PluginsNamespace::postLoad(Server* server, XmlParser* languageFile)
-{
-  HashMap<string, Plugin*>::Iterator it = plugins.begin();
-  while(it != plugins.end())
-  {
-    (*it)->postLoad(server, languageFile);
-    it++;
-  }
-  loaded = true;
-  return 0;
-}
-
-/*!
- *Unload the namespace.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
- */
-int PluginsNamespace::unLoad(XmlParser* languageFile)
-{
-  HashMap<string, Plugin*>::Iterator it = plugins.begin();
-  HashMap<string, PluginOption*>::Iterator poit = pluginsOptions.begin();
-
-  while(it != plugins.end())
-  {
-    (*it)->unLoad(languageFile);
-    delete *it;
-    it++;
-  }
-
-  while(poit != pluginsOptions.end())
-  {
-    delete *poit;
-    poit++;
-  }
-
-  loaded = false;
-  plugins.clear();
-  pluginsOptions.clear();
-  return 0;
-}
-
-/*!
- *Set a name for the namespace.
- *\param name The new name for the namespace.
- */
-void PluginsNamespace::setName(string& name)
-{
-  this->name.assign(name);
-}
-
-/*!
- *Add a plugin that is already preloaded to the namespace.
- *\param plugin The plugin to add.
- */
-int PluginsNamespace::addPreloadedPlugin(Plugin* plugin)
-{
-  string name(plugin->getName(0, 0));
-  plugins.put(name, plugin);
-  return 0;
-}
-
-/*!
- *Remove a plugin from the namespace without clean it.
- *\param name The plugin to remove.
- */
-void PluginsNamespace::removePlugin(string& name)
-{
-  plugins.remove(name);
-}
-
-/*!
- *Add a plugin option structure to the namespace.
- *\param plugin The plugin name.
- *\param po The options for the plugin.
- */
-int PluginsNamespace::addPluginOption(string& plugin, PluginOption& po)
-{
-  PluginOption* newPo = new PluginOption(po);
-  PluginOption* oldPo = pluginsOptions.put(plugin, newPo);
-
-  if(oldPo)
-    delete oldPo;
-
-  return 0;
-}
-
-/*!
- *Remove a plugin from the namespace without clean it.
- *\param name The plugin to remove.
- */
-PluginsNamespace::PluginOption* PluginsNamespace::getPluginOption(string& 
plugin)
-{
-  return pluginsOptions.get(plugin);
-}

Deleted: trunk/myserver/src/plugin/plugins_namespace_manager.cpp
===================================================================
--- trunk/myserver/src/plugin/plugins_namespace_manager.cpp     2008-10-26 
14:12:09 UTC (rev 2910)
+++ trunk/myserver/src/plugin/plugins_namespace_manager.cpp     2008-10-26 
15:49:14 UTC (rev 2911)
@@ -1,176 +0,0 @@
-/*
-MyServer
-Copyright (C) 2007, 2008 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
-#include <include/plugin/plugins_namespace_manager.h>
-#include <include/base/find_data/find_data.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/server/server.h>
-#include <string>
-using namespace std;
-
-/*!
- *Constructor for the class.
- *\param name The name for this namespace.
- */
-PluginsNamespaceManager::PluginsNamespaceManager(string name) : 
-  PluginsNamespace(name)
-{
-
-}
-
-/*!
- *Create the appropriate object to keep a plugin.
- */
-Plugin* PluginsNamespaceManager::createPluginObject()
-{
-  return new Plugin();
-}
-
-/*!
- *Add a plugin to the namespace.
- *\param file The plugin file name.
- *\param server The server object to use.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
- *\param global Specify if the library should be loaded globally.
- */
-int PluginsNamespaceManager::addPlugin(string& file, Server* server, 
-                                       XmlParser* languageFile, bool global)
-{
-  Plugin *plugin = createPluginObject();
-  string logBuf;
-  string name;
-  const char* namePtr;
-
-  if(plugin->preLoad(file, server, languageFile, global))
-  {
-    delete plugin;
-    return 1;
-  }
-  namePtr = plugin->getName(0, 0);
-
-  if(namePtr)
-    name.assign(namePtr);
-  else
-  {
-    delete plugin;
-    return 1;
-  }
-    
-  plugins.put(name, plugin);
-
-  logBuf.assign(languageFile->getValue("MSG_LOADED"));
-  logBuf.append(" ");
-  logBuf.append(file);
-  logBuf.append(" --> ");
-  logBuf.append(name);
-  server->logWriteln( logBuf.c_str() );
-  return 0;
-}
-
-
-/*!
- *Preload sequence, called when all the plugins are not yet loaded.
- *\param server The server object to use.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
- *\param resource The resource location to use to load plugins, in this 
- *implementation it is a directory name.
- */
-int PluginsNamespaceManager::preLoad(Server* server, XmlParser* languageFile, 
-                                     string& resource)
-{
-  FindData fd;
-  string filename;
-  string completeFileName;  
-  int ret;
-
-  filename.assign(resource);
-  filename.append("/");
-  filename.append(getName());
-
-  ret = fd.findfirst(filename.c_str());  
-  
-  if(ret == -1)
-  {
-    return ret;  
-  }
-
-  ret = 0;
-
-  do
-  {  
-    string name(fd.name);
-    PluginsNamespace::PluginOption *po;
-
-    if(fd.name[0]=='.')
-      continue;
-    /*!
-     *Do not consider file other than dynamic libraries.
-     */
-#ifdef WIN32
-    if(!strstr(fd.name,".dll"))
-#endif
-#ifdef NOT_WIN
-    if(!strstr(fd.name,".so"))
-#endif    
-      continue;
-
-    completeFileName.assign(filename);
-    if((fd.name[0] != '/') && (fd.name[0] != '\\')) 
-      completeFileName.append("/");
-    completeFileName.append(fd.name);
-
-#ifdef WIN32
-    name = name.substr(0, name.length() - 4);
-#endif
-#ifdef NOT_WIN
-    name = name.substr(0, name.length() - 3);
-#endif
-
-    po = getPluginOption(name);
-    
-    if(!po || po->enabled)
-      ret |= addPlugin(completeFileName, server, languageFile, po && 
po->global);
-  }while(!fd.findnext());
-  fd.findclose();
-
-  return ret;
-}
-
-/*!
- *Load sequence, called when all the plugins are loaded.
- *\param server The server object to use.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
- *\param resource The resource location to use to load plugins, in this 
- *implementation it is a directory name.
- */
-int PluginsNamespaceManager::load(Server* server, XmlParser* languageFile, 
-                                     string& resource)
-{
-  HashMap<string, Plugin*>::Iterator it = plugins.begin();
-  while(it != plugins.end())
-  {
-    (*it)->load(resource, server, languageFile);
-    it++;
-  }
-  return 0;
-
-
-}

Modified: trunk/myserver/src/protocol/Makefile.am
===================================================================
--- trunk/myserver/src/protocol/Makefile.am     2008-10-26 14:12:09 UTC (rev 
2910)
+++ trunk/myserver/src/protocol/Makefile.am     2008-10-26 15:49:14 UTC (rev 
2911)
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libprotocol.a
-libprotocol_a_SOURCES = protocol_buffer.cpp protocol.cpp
+libprotocol_a_SOURCES = protocol_buffer.cpp protocol.cpp protocols_manager.cpp
 SUBDIRS = control ftp http https
 INCLUDES = $(all_includes)
 

Modified: trunk/myserver/src/protocol/control/control_protocol.cpp
===================================================================
--- trunk/myserver/src/protocol/control/control_protocol.cpp    2008-10-26 
14:12:09 UTC (rev 2910)
+++ trunk/myserver/src/protocol/control/control_protocol.cpp    2008-10-26 
15:49:14 UTC (rev 2911)
@@ -22,7 +22,6 @@
 #include <include/server/server.h>
 #include <include/base/find_data/find_data.h>
 #include <include/base/string/securestr.h>
-#include <include/plugin/protocol/protocols_manager.h>
 #include <include/protocol/control/control_errors.h>
 #include <include/base/string/stringutils.h>
 #include <include/base/file/files_utility.h>
@@ -517,11 +516,6 @@
     knownCommand = 1;
     ret = showLanguageFiles(a, Ofile, b1, bs1, header);
   }
-  else if(!strcmp(command, "SHOWDYNAMICPROTOCOLS"))
-  {
-    knownCommand = 1;
-    ret = showDynamicProtocols(a, Ofile, b1, bs1, header);
-  }
   else if(!strcmp(command, "VERSION"))
   {
     knownCommand = 1;
@@ -811,40 +805,8 @@
   return 0;
 }
 
-/*!
- *List all the dynamic protocols used by the server.
- */
-int ControlProtocol::showDynamicProtocols(ConnectionPtr a, File* out, 
-                                          char *b1,int bs1, ControlHeader& 
header)
-{
-  int i = 0;
-  u_long nbw;
-  int ret;
-  HashMap<string, Plugin*>::Iterator it = 
-    Server::getInstance()->getProtocolsManager()->begin();
 
-  for(; it != Server::getInstance()->getProtocolsManager()->end(); it++)
-  {
-    DynamicProtocol* dp = (DynamicProtocol*) *it;
-#ifdef HAVE_SNPRINTF
-    snprintf(b1, bs1, "%s\r\n", dp->getName(0, 0) );
 
-#else
-    sprintf(b1, "%s\r\n", dp->getName(0, 0) );
-#endif
-   
-    ret = out->writeToFile(b1, strlen(b1), &nbw);
-    if(ret)
-    {
-      strcpy(b1, "Control: Error while writing to file");
-      addToErrorLog(a, b1, strlen(b1), header);
-      return CONTROL_INTERNAL;
-    }
-    i++;
-  }
-  return 0;
-}
-
 /*!
  *Return the requested file to the client.
  */

Modified: trunk/myserver/src/protocol/http/Makefile.am
===================================================================
--- trunk/myserver/src/protocol/http/Makefile.am        2008-10-26 14:12:09 UTC 
(rev 2910)
+++ trunk/myserver/src/protocol/http/Makefile.am        2008-10-26 15:49:14 UTC 
(rev 2911)
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libhttp.a
-libhttp_a_SOURCES = http.cpp http_data_handler.cpp http_data_read.cpp 
http_errors.cpp http_headers.cpp http_request.cpp http_req_security_domain.cpp 
http_response.cpp http_thread_context.cpp
+libhttp_a_SOURCES = http.cpp http_data_handler.cpp http_data_read.cpp 
http_errors.cpp http_headers.cpp http_request.cpp http_req_security_domain.cpp 
http_response.cpp http_thread_context.cpp dyn_http_manager.cpp 
dyn_http_manager_list.cpp dyn_http_command.cpp dyn_http_command_manager.cpp
 SUBDIRS = env
 INCLUDES = $(all_includes)
 

Copied: trunk/myserver/src/protocol/http/dyn_http_command.cpp (from rev 2900, 
trunk/myserver/src/plugin/http_command/dyn_http_command.cpp)
===================================================================
--- trunk/myserver/src/protocol/http/dyn_http_command.cpp                       
        (rev 0)
+++ trunk/myserver/src/protocol/http/dyn_http_command.cpp       2008-10-26 
15:49:14 UTC (rev 2911)
@@ -0,0 +1,45 @@
+/*
+MyServer
+Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <include/protocol/http/dyn_http_command.h>
+#include <include/server/server.h>
+
+
+
+/*!
+ *Default constructor.
+ */
+DynamicHttpCommand::DynamicHttpCommand(string& name) 
+{
+  this->name = name;
+}
+
+/*!
+ *Default constructor.
+ */
+string DynamicHttpCommand::getName() 
+{
+  return name;
+}
+
+/*!
+ *Destroy the object.
+ */
+DynamicHttpCommand::~DynamicHttpCommand()
+{
+}
+

Copied: trunk/myserver/src/protocol/http/dyn_http_command_manager.cpp (from rev 
2900, trunk/myserver/src/plugin/http_command/dyn_http_command_manager.cpp)
===================================================================
--- trunk/myserver/src/protocol/http/dyn_http_command_manager.cpp               
                (rev 0)
+++ trunk/myserver/src/protocol/http/dyn_http_command_manager.cpp       
2008-10-26 15:49:14 UTC (rev 2911)
@@ -0,0 +1,58 @@
+/*
+MyServer
+Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include <include/protocol/http/dyn_http_command_manager.h>
+#include <include/protocol/http/dyn_http_command.h>
+
+#include <string>
+
+
+/*!
+ *Initialize the object.
+ */
+DynHttpCommandManager::DynHttpCommandManager()
+{
+
+}
+
+/*!
+ *Destroy the object.
+ */
+DynHttpCommandManager::~DynHttpCommandManager()
+{
+
+}
+
+/*!
+ *Get the DynamicHttpCommand.
+ *\param name http command name.
+ */
+DynamicHttpCommand* DynHttpCommandManager::getHttpCommand(string& name)
+{
+  return dynamicHttpCommands.get(name);
+}
+
+/*!
+ *Add the DynamicHttpCommand.
+ *\param name http command name.
+ *\param httpManager http command to add.
+ */
+void DynHttpCommandManager::addHttpCommand(string& name, DynamicHttpCommand* 
httpCommand)
+{
+  dynamicHttpCommands.put(name,httpCommand);
+}
\ No newline at end of file

Copied: trunk/myserver/src/protocol/http/dyn_http_manager.cpp (from rev 2899, 
trunk/myserver/src/plugin/http_manager/dyn_http_manager.cpp)
===================================================================
--- trunk/myserver/src/protocol/http/dyn_http_manager.cpp                       
        (rev 0)
+++ trunk/myserver/src/protocol/http/dyn_http_manager.cpp       2008-10-26 
15:49:14 UTC (rev 2911)
@@ -0,0 +1,42 @@
+/*
+MyServer
+Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include <include/protocol/http/dyn_http_manager.h>
+#include <include/base/xml/xml_parser.h>
+#include <include/server/server.h>
+
+#include <string>
+
+
+/*!
+ *Default constructor.
+ */
+DynamicHttpManager::DynamicHttpManager() 
+{
+
+}
+
+/*!
+ *Destroy the object.
+ */
+DynamicHttpManager::~DynamicHttpManager()
+{
+
+}
+
+

Copied: trunk/myserver/src/protocol/http/dyn_http_manager_list.cpp (from rev 
2899, trunk/myserver/src/plugin/http_manager/dyn_http_manager_list.cpp)
===================================================================
--- trunk/myserver/src/protocol/http/dyn_http_manager_list.cpp                  
        (rev 0)
+++ trunk/myserver/src/protocol/http/dyn_http_manager_list.cpp  2008-10-26 
15:49:14 UTC (rev 2911)
@@ -0,0 +1,60 @@
+/*
+MyServer
+Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include <include/protocol/http/dyn_http_manager_list.h>
+#include <include/protocol/http/dyn_http_manager.h>
+#include <include/server/server.h>
+
+#include <string>
+
+
+/*!
+ *Initialize the object.
+ */
+DynHttpManagerList::DynHttpManagerList() 
+{
+
+}
+
+/*!
+ *Destroy the object.
+ */
+DynHttpManagerList::~DynHttpManagerList()
+{
+
+}
+
+/*!
+ *Get the DynamicHttpManagers.
+ *\param name http manager name.
+ */
+DynamicHttpManager* DynHttpManagerList::getHttpManager(string& name)
+{
+  return dynamicHttpManagers.get(name);
+}
+
+/*!
+ *Add the DynamicHttpManagers.
+ *\param name http manager name.
+ *\param httpManager http manager to add.
+ */
+void DynHttpManagerList::addHttpManager(string& name, DynamicHttpManager* 
httpManager)
+{
+  dynamicHttpManagers.put(name,httpManager);
+}
+

Modified: trunk/myserver/src/protocol/http/http.cpp
===================================================================
--- trunk/myserver/src/protocol/http/http.cpp   2008-10-26 14:12:09 UTC (rev 
2910)
+++ trunk/myserver/src/protocol/http/http.cpp   2008-10-26 15:49:14 UTC (rev 
2911)
@@ -86,11 +86,11 @@
     HttpRequestHeader::Entry *connection = td->request.other.get("Connection");
     string methods("OPTIONS, GET, POST, HEAD, DELETE, PUT");
 
-    HashMap<string, Plugin*>::Iterator it = staticHttp.dynCmdManager.begin();
+    HashMap<string, DynamicHttpCommand*>::Iterator it = 
staticHttp.dynCmdManager.begin();
     while(it != staticHttp.dynCmdManager.end())
     {
       methods.append(", ");
-      methods.append((*it)->getName(0, 0));
+      methods.append((*it)->getName());
       it++;
     }
 
@@ -958,8 +958,103 @@
                        data.c_str(), td->mime->selfExecuted, onlyHeader);
       return ret;
     }
-    else if (td->mime && (manager = staticHttp.dynManagerList.getPlugin 
(td->mime->cmdName)))
+    else if (td->mime && (manager = staticHttp.dynManagerList.getHttpManager 
(td->mime->cmdName)))
     {
+      int allowScgi = 1;
+      const char *dataH = td->connection->host->getHashedData("ALLOW_SCGI");
+      if(dataH)
+      {
+        if(!strcmpi(dataH, "YES"))
+          allowScgi = 1;
+        else
+          allowScgi = 0;
+      }
+      if(!allowScgi || !(permissions & MYSERVER_PERMISSION_EXECUTE))
+      {
+        return sendAuth();
+      }
+      ret = scgi->send(td, td->connection, td->filenamePath.c_str(),
+                       data.c_str(), 1, onlyHeader);
+      return ret;
+    }
+    else if(!td->mime->cmdName.compare ("SENDLINK"))
+    {
+      u_long nbr;
+      char* linkpath;
+      char* pathInfo;
+      int linkpathSize;
+      File h;
+      int allowSendlink = 1;
+      const char *dataH =
+        td->connection->host->getHashedData("ALLOW_SEND_LINK");
+
+      if(dataH)
+      {
+        if(!strcmpi(dataH, "YES"))
+          allowSendlink = 1;
+        else
+          allowSendlink = 0;
+      }
+
+      if(!allowSendlink || !(permissions & MYSERVER_PERMISSION_READ))
+      {
+        return sendAuth();
+      }
+
+      if(h.openFile(td->filenamePath.c_str(),
+                    File::MYSERVER_OPEN_IFEXISTS|File::MYSERVER_OPEN_READ))
+      {
+        return raiseHTTPError(500);
+      }
+
+      linkpathSize = h.getFileSize() + td->pathInfo.length() + 1;
+
+      if(linkpathSize > MYSERVER_KB(10))
+        linkpathSize = MYSERVER_KB(10);
+
+      linkpath=new char[linkpathSize];
+
+      if(linkpath == 0)
+      {
+        return sendHTTPhardError500();
+      }
+
+      if(h.read(linkpath, linkpathSize, &nbr))
+      {
+        h.close();
+        delete [] linkpath;
+        return raiseHTTPError(500);/*!Internal server error*/
+      }
+
+      h.close();
+      linkpath[nbr]='\0';
+
+      pathInfo = new char[td->pathInfo.length() + 1];
+
+      if(pathInfo == 0)
+      {
+        delete [] linkpath;
+        return raiseHTTPError(500);/*!Internal server error*/
+      }
+      strcpy(pathInfo, td->pathInfo.c_str());
+      translateEscapeString(pathInfo);
+      strncat(linkpath, pathInfo,strlen(linkpath));
+
+      if(nbr)
+      {
+        string uri;
+        uri.assign(linkpath);
+        ret = sendHTTPResource(uri, systemrequest, onlyHeader, 1);
+      }
+      else
+        ret = raiseHTTPError(404);
+
+      delete [] linkpath;
+      delete [] pathInfo;
+      return ret;
+    }
+    else if ((manager = 
staticHttp.dynManagerList.getHttpManager(td->mime->cmdName)))
+    {
       int allowExternal = 1;
       const char *dataH =
         td->connection->host->getHashedData ("ALLOW_EXTERNAL_COMMANDS");
@@ -1250,7 +1345,7 @@
     FilesUtility::temporaryFileName(td->id, td->inputDataPath);
     FilesUtility::temporaryFileName(td->id, td->outputDataPath);
 
-    dynamicCommand = staticHttp.dynCmdManager.getPlugin(td->request.cmd);
+    dynamicCommand = staticHttp.dynCmdManager.getHttpCommand(td->request.cmd);
 
     /* If the used method supports POST data, read it.  */
     if((!td->request.cmd.compare("POST")) ||
@@ -2201,9 +2296,6 @@
   HttpFile::load(configurationFileManager);
   HttpDir::load(configurationFileManager);
 
-  
Server::getInstance()->getPluginsManager()->addNamespace(&staticHttp.dynCmdManager);
-  
Server::getInstance()->getPluginsManager()->addNamespace(&staticHttp.dynManagerList);
-
   /*! Determine the min file size that will use GZIP compression.  */
   data = configurationFileManager->getValue("GZIP_THRESHOLD");
   if(data)

Copied: trunk/myserver/src/protocol/protocols_manager.cpp (from rev 2899, 
trunk/myserver/src/plugin/protocol/protocols_manager.cpp)
===================================================================
--- trunk/myserver/src/protocol/protocols_manager.cpp                           
(rev 0)
+++ trunk/myserver/src/protocol/protocols_manager.cpp   2008-10-26 15:49:14 UTC 
(rev 2911)
@@ -0,0 +1,66 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include <include/protocol/protocols_manager.h>
+#include <include/base/xml/xml_parser.h>
+#include <include/server/server.h>
+#include <string>
+#include <algorithm>
+#include <cctype> 
+
+
+
+/*!
+ *Class constructor.
+ */
+ProtocolsManager::ProtocolsManager() 
+{
+
+}
+
+/*!
+ *Class destructor.
+ */
+ProtocolsManager::~ProtocolsManager()
+{
+
+}
+
+/*!
+ *Return a protocol by its name.
+ */
+Protocol* ProtocolsManager::getProtocol(string& name)
+{
+  return staticProtocols.get(name);
+}
+
+/*!
+ *Add a static protocol to the list.
+ */
+void ProtocolsManager::addProtocol(string& name, Protocol* protocol)
+{
+  std::transform(name.begin(),
+                 name.end(),
+                 name.begin(),
+                 static_cast < int(*)(int) > (tolower) );
+
+  staticProtocols.put(name, protocol);
+  staticProtocolsList.push_back(protocol);
+}
+
+

Modified: trunk/myserver/src/server/server.cpp
===================================================================
--- trunk/myserver/src/server/server.cpp        2008-10-26 14:12:09 UTC (rev 
2910)
+++ trunk/myserver/src/server/server.cpp        2008-10-26 15:49:14 UTC (rev 
2911)
@@ -526,10 +526,10 @@
   }
 
 
-  getPluginsManager()->addNamespace(&executors);
-  getPluginsManager()->addNamespace(&protocols);
-  getPluginsManager()->addNamespace(&filters);
-  getPluginsManager()->addNamespace(&genericPluginsManager);
+  //getPluginsManager()->addNamespace(&executors);
+  //getPluginsManager()->addNamespace(&protocols);
+  //getPluginsManager()->addNamespace(&filters);
+  //getPluginsManager()->addNamespace(&genericPluginsManager);
 
   getPluginsManager()->preLoad(this, &languageParser, *externalPath);
   getPluginsManager()->load(this, &languageParser, *externalPath);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]