[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[myserver-commit] [2774] Separed source code files in packages.
From: |
Giuseppe Scrivano |
Subject: |
[myserver-commit] [2774] Separed source code files in packages. |
Date: |
Sun, 31 Aug 2008 23:22:10 +0000 |
Revision: 2774
http://svn.sv.gnu.org/viewvc/?view=rev&root=myserver&revision=2774
Author: gscrivano
Date: 2008-08-31 23:22:09 +0000 (Sun, 31 Aug 2008)
Log Message:
-----------
Separed source code files in packages. Still not working perfectly.
Modified Paths:
--------------
trunk/myserver/SConstruct
trunk/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
trunk/myserver/binaries/web/cgi-src/post/post.cpp
trunk/myserver/configure.in
trunk/myserver/control/Makefile.am
trunk/myserver/control/control_client.h
trunk/myserver/control/fltkconfig.h
trunk/myserver/control/language.cpp
trunk/myserver/control/language.h
trunk/myserver/control/mimetype.cpp
trunk/myserver/control/mimetype.h
trunk/myserver/control/myserver-configure.cpp
trunk/myserver/control/service.cpp
trunk/myserver/control/vhost.cpp
trunk/myserver/control/vhost.h
trunk/myserver/doxygen
trunk/myserver/src/Makefile.am
trunk/myserver/src/myserver.cpp
trunk/myserver/tests/test_base64.cpp
trunk/myserver/tests/test_connection.cpp
trunk/myserver/tests/test_files_utility.cpp
trunk/myserver/tests/test_filter_chain.cpp
trunk/myserver/tests/test_ftp.cpp
trunk/myserver/tests/test_gzip.cpp
trunk/myserver/tests/test_hashmap.cpp
trunk/myserver/tests/test_homedir.cpp
trunk/myserver/tests/test_http_request.cpp
trunk/myserver/tests/test_http_response.cpp
trunk/myserver/tests/test_md5.cpp
trunk/myserver/tests/test_mem_buff.cpp
trunk/myserver/tests/test_multicast.cpp
trunk/myserver/tests/test_mutex.cpp
trunk/myserver/tests/test_pipe.cpp
trunk/myserver/tests/test_recursive_mutex.cpp
trunk/myserver/tests/test_regex.cpp
trunk/myserver/tests/test_safetime.cpp
trunk/myserver/tests/test_semaphore.cpp
trunk/myserver/tests/test_thread.cpp
trunk/myserver/tests/test_utility.cpp
trunk/myserver/tests/test_xml.cpp
Added Paths:
-----------
trunk/myserver/include/base/
trunk/myserver/include/base/base64/
trunk/myserver/include/base/base64/mime_utils.h
trunk/myserver/include/base/dynamic_lib/
trunk/myserver/include/base/dynamic_lib/dynamiclib.h
trunk/myserver/include/base/file/
trunk/myserver/include/base/file/file.h
trunk/myserver/include/base/file/files_utility.h
trunk/myserver/include/base/hash_map/
trunk/myserver/include/base/hash_map/hash_map.h
trunk/myserver/include/base/home_dir/
trunk/myserver/include/base/home_dir/home_dir.h
trunk/myserver/include/base/md5/
trunk/myserver/include/base/md5/md5.h
trunk/myserver/include/base/mem_buff/
trunk/myserver/include/base/mem_buff/mem_buff.h
trunk/myserver/include/base/multicast/
trunk/myserver/include/base/multicast/multicast.h
trunk/myserver/include/base/pipe/
trunk/myserver/include/base/pipe/pipe.h
trunk/myserver/include/base/process/
trunk/myserver/include/base/process/process.h
trunk/myserver/include/base/process/process_server_manager.h
trunk/myserver/include/base/regex/
trunk/myserver/include/base/regex/myserver_regex.h
trunk/myserver/include/base/safetime/
trunk/myserver/include/base/safetime/safetime.h
trunk/myserver/include/base/socket/
trunk/myserver/include/base/socket/socket.h
trunk/myserver/include/base/socket/ssl_socket.h
trunk/myserver/include/base/ssl/
trunk/myserver/include/base/ssl/ssl.h
trunk/myserver/include/base/string/
trunk/myserver/include/base/string/securestr.h
trunk/myserver/include/base/string/stringutils.h
trunk/myserver/include/base/sync/
trunk/myserver/include/base/sync/event.h
trunk/myserver/include/base/sync/mutex.h
trunk/myserver/include/base/sync/read_write_lock.h
trunk/myserver/include/base/sync/recursive_mutex.h
trunk/myserver/include/base/sync/semaphore.h
trunk/myserver/include/base/thread/
trunk/myserver/include/base/thread/thread.h
trunk/myserver/include/base/utility.h
trunk/myserver/include/base/xml/
trunk/myserver/include/base/xml/xml_parser.h
trunk/myserver/include/conf/
trunk/myserver/include/conf/mime/
trunk/myserver/include/conf/mime/mime_manager.h
trunk/myserver/include/conf/security/
trunk/myserver/include/conf/security/security.h
trunk/myserver/include/conf/security/security_cache.h
trunk/myserver/include/conf/vhost/
trunk/myserver/include/conf/vhost/vhost.h
trunk/myserver/include/conf/vhost/vhost_manager.h
trunk/myserver/include/connection/
trunk/myserver/include/connection/connection.h
trunk/myserver/include/connections_scheduler/
trunk/myserver/include/connections_scheduler/connections_scheduler.h
trunk/myserver/include/connections_scheduler/listen_threads.h
trunk/myserver/include/env/
trunk/myserver/include/env/env.h
trunk/myserver/include/files_cache/
trunk/myserver/include/files_cache/cached_file.h
trunk/myserver/include/files_cache/cached_file_buffer.h
trunk/myserver/include/files_cache/cached_file_factory.h
trunk/myserver/include/filter/
trunk/myserver/include/filter/filter.h
trunk/myserver/include/filter/filters_chain.h
trunk/myserver/include/filter/filters_factory.h
trunk/myserver/include/filter/gzip/
trunk/myserver/include/filter/gzip/gzip.h
trunk/myserver/include/filter/gzip/gzip_decompress.h
trunk/myserver/include/filter/memory_stream.h
trunk/myserver/include/filter/stream.h
trunk/myserver/include/find_data/
trunk/myserver/include/find_data/find_data.h
trunk/myserver/include/http_handler/
trunk/myserver/include/http_handler/cgi/
trunk/myserver/include/http_handler/cgi/cgi.h
trunk/myserver/include/http_handler/fastcgi/
trunk/myserver/include/http_handler/fastcgi/fastcgi.h
trunk/myserver/include/http_handler/isapi/
trunk/myserver/include/http_handler/isapi/isapi.h
trunk/myserver/include/http_handler/mscgi/
trunk/myserver/include/http_handler/mscgi/mscgi.h
trunk/myserver/include/http_handler/mscgi/mscgi_manager.h
trunk/myserver/include/http_handler/scgi/
trunk/myserver/include/http_handler/scgi/scgi.h
trunk/myserver/include/http_handler/wincgi/
trunk/myserver/include/http_handler/wincgi/wincgi.h
trunk/myserver/include/log/
trunk/myserver/include/log/log_manager.h
trunk/myserver/include/plugin/
trunk/myserver/include/plugin/executor/
trunk/myserver/include/plugin/executor/dyn_executor_manager.h
trunk/myserver/include/plugin/executor/dynamic_executor.h
trunk/myserver/include/plugin/filter/
trunk/myserver/include/plugin/filter/dyn_filter.h
trunk/myserver/include/plugin/filter/dyn_filter_file.h
trunk/myserver/include/plugin/filter/dyn_filters_manager.h
trunk/myserver/include/plugin/generic_plugins_manager.h
trunk/myserver/include/plugin/http_command/
trunk/myserver/include/plugin/http_command/dyn_http_command.h
trunk/myserver/include/plugin/http_command/dyn_http_command_manager.h
trunk/myserver/include/plugin/http_manager/
trunk/myserver/include/plugin/http_manager/dyn_http_manager.h
trunk/myserver/include/plugin/http_manager/dyn_http_manager_list.h
trunk/myserver/include/plugin/plugin.h
trunk/myserver/include/plugin/plugins_manager.h
trunk/myserver/include/plugin/plugins_namespace.h
trunk/myserver/include/plugin/plugins_namespace_manager.h
trunk/myserver/include/plugin/protocol/
trunk/myserver/include/plugin/protocol/dynamic_protocol.h
trunk/myserver/include/plugin/protocol/protocols_manager.h
trunk/myserver/include/protocol/
trunk/myserver/include/protocol/control/
trunk/myserver/include/protocol/control/control_errors.h
trunk/myserver/include/protocol/control/control_header.h
trunk/myserver/include/protocol/control/control_protocol.h
trunk/myserver/include/protocol/ftp/
trunk/myserver/include/protocol/ftp/ftp.h
trunk/myserver/include/protocol/ftp/ftp_common.h
trunk/myserver/include/protocol/ftp/ftp_lexer.h
trunk/myserver/include/protocol/ftp/ftp_parser.h
trunk/myserver/include/protocol/http/
trunk/myserver/include/protocol/http/http.h
trunk/myserver/include/protocol/http/http_data_handler.h
trunk/myserver/include/protocol/http/http_data_read.h
trunk/myserver/include/protocol/http/http_dir.h
trunk/myserver/include/protocol/http/http_errors.h
trunk/myserver/include/protocol/http/http_file.h
trunk/myserver/include/protocol/http/http_header.h
trunk/myserver/include/protocol/http/http_header_checker.h
trunk/myserver/include/protocol/http/http_headers.h
trunk/myserver/include/protocol/http/http_request.h
trunk/myserver/include/protocol/http/http_response.h
trunk/myserver/include/protocol/http/http_thread_context.h
trunk/myserver/include/protocol/https/
trunk/myserver/include/protocol/https/https.h
trunk/myserver/include/protocol/protocol.h
trunk/myserver/include/protocol/protocol_buffer.h
trunk/myserver/include/server/
trunk/myserver/include/server/clients_thread.h
trunk/myserver/include/server/server.h
trunk/myserver/src/.deps/
trunk/myserver/src/.deps/myserver-Dev-C++.Po
trunk/myserver/src/.deps/myserver-cached_file.Po
trunk/myserver/src/.deps/myserver-cached_file_buffer.Po
trunk/myserver/src/.deps/myserver-cached_file_factory.Po
trunk/myserver/src/.deps/myserver-cgi.Po
trunk/myserver/src/.deps/myserver-cgi_manager.Po
trunk/myserver/src/.deps/myserver-clients_thread.Po
trunk/myserver/src/.deps/myserver-connection.Po
trunk/myserver/src/.deps/myserver-connections_scheduler.Po
trunk/myserver/src/.deps/myserver-control_header.Po
trunk/myserver/src/.deps/myserver-control_protocol.Po
trunk/myserver/src/.deps/myserver-dyn_executor_manager.Po
trunk/myserver/src/.deps/myserver-dyn_filter.Po
trunk/myserver/src/.deps/myserver-dyn_filter_file.Po
trunk/myserver/src/.deps/myserver-dyn_filters_manager.Po
trunk/myserver/src/.deps/myserver-dyn_http_command.Po
trunk/myserver/src/.deps/myserver-dyn_http_command_manager.Po
trunk/myserver/src/.deps/myserver-dyn_http_manager.Po
trunk/myserver/src/.deps/myserver-dyn_http_manager_list.Po
trunk/myserver/src/.deps/myserver-dynamic_executor.Po
trunk/myserver/src/.deps/myserver-dynamic_protocol.Po
trunk/myserver/src/.deps/myserver-dynamiclib.Po
trunk/myserver/src/.deps/myserver-env.Po
trunk/myserver/src/.deps/myserver-event.Po
trunk/myserver/src/.deps/myserver-fastcgi.Po
trunk/myserver/src/.deps/myserver-file.Po
trunk/myserver/src/.deps/myserver-files_utility.Po
trunk/myserver/src/.deps/myserver-filter.Po
trunk/myserver/src/.deps/myserver-filters_chain.Po
trunk/myserver/src/.deps/myserver-filters_factory.Po
trunk/myserver/src/.deps/myserver-find_data.Po
trunk/myserver/src/.deps/myserver-ftp.Po
trunk/myserver/src/.deps/myserver-ftp_lexer.Po
trunk/myserver/src/.deps/myserver-ftp_parser.Po
trunk/myserver/src/.deps/myserver-generic_plugins_manager.Po
trunk/myserver/src/.deps/myserver-gzip.Po
trunk/myserver/src/.deps/myserver-gzip_decompress.Po
trunk/myserver/src/.deps/myserver-hash_map.Po
trunk/myserver/src/.deps/myserver-home_dir.Po
trunk/myserver/src/.deps/myserver-http.Po
trunk/myserver/src/.deps/myserver-http_data_handler.Po
trunk/myserver/src/.deps/myserver-http_data_read.Po
trunk/myserver/src/.deps/myserver-http_dir.Po
trunk/myserver/src/.deps/myserver-http_errors.Po
trunk/myserver/src/.deps/myserver-http_file.Po
trunk/myserver/src/.deps/myserver-http_header_checker.Po
trunk/myserver/src/.deps/myserver-http_headers.Po
trunk/myserver/src/.deps/myserver-http_request.Po
trunk/myserver/src/.deps/myserver-http_response.Po
trunk/myserver/src/.deps/myserver-http_thread_context.Po
trunk/myserver/src/.deps/myserver-https.Po
trunk/myserver/src/.deps/myserver-isapi.Po
trunk/myserver/src/.deps/myserver-listen_threads.Po
trunk/myserver/src/.deps/myserver-log_manager.Po
trunk/myserver/src/.deps/myserver-md5.Po
trunk/myserver/src/.deps/myserver-mem_buff.Po
trunk/myserver/src/.deps/myserver-memory_stream.Po
trunk/myserver/src/.deps/myserver-mime_manager.Po
trunk/myserver/src/.deps/myserver-mime_utils.Po
trunk/myserver/src/.deps/myserver-mscgi.Po
trunk/myserver/src/.deps/myserver-mscgi_manager.Po
trunk/myserver/src/.deps/myserver-multicast.Po
trunk/myserver/src/.deps/myserver-mutex.Po
trunk/myserver/src/.deps/myserver-myserver.Po
trunk/myserver/src/.deps/myserver-myserver_regex.Po
trunk/myserver/src/.deps/myserver-pipe.Po
trunk/myserver/src/.deps/myserver-plugin.Po
trunk/myserver/src/.deps/myserver-plugins_manager.Po
trunk/myserver/src/.deps/myserver-plugins_namespace.Po
trunk/myserver/src/.deps/myserver-plugins_namespace_manager.Po
trunk/myserver/src/.deps/myserver-process.Po
trunk/myserver/src/.deps/myserver-process_server_manager.Po
trunk/myserver/src/.deps/myserver-protocol.Po
trunk/myserver/src/.deps/myserver-protocol_buffer.Po
trunk/myserver/src/.deps/myserver-protocols_manager.Po
trunk/myserver/src/.deps/myserver-read_write_lock.Po
trunk/myserver/src/.deps/myserver-recursive_mutex.Po
trunk/myserver/src/.deps/myserver-safetime.Po
trunk/myserver/src/.deps/myserver-scgi.Po
trunk/myserver/src/.deps/myserver-securestr.Po
trunk/myserver/src/.deps/myserver-security.Po
trunk/myserver/src/.deps/myserver-security_cache.Po
trunk/myserver/src/.deps/myserver-semaphore.Po
trunk/myserver/src/.deps/myserver-server.Po
trunk/myserver/src/.deps/myserver-socket.Po
trunk/myserver/src/.deps/myserver-ssl.Po
trunk/myserver/src/.deps/myserver-ssl_socket.Po
trunk/myserver/src/.deps/myserver-stream.Po
trunk/myserver/src/.deps/myserver-stringutils.Po
trunk/myserver/src/.deps/myserver-thread.Po
trunk/myserver/src/.deps/myserver-utility.Po
trunk/myserver/src/.deps/myserver-vhost.Po
trunk/myserver/src/.deps/myserver-vhost_manager.Po
trunk/myserver/src/.deps/myserver-wincgi.Po
trunk/myserver/src/.deps/myserver-xml_parser.Po
trunk/myserver/src/base/
trunk/myserver/src/base/Makefile.am
trunk/myserver/src/base/base64/
trunk/myserver/src/base/base64/Makefile.am
trunk/myserver/src/base/base64/mime_utils.cpp
trunk/myserver/src/base/dynamic_lib/
trunk/myserver/src/base/dynamic_lib/Makefile.am
trunk/myserver/src/base/dynamic_lib/dynamiclib.cpp
trunk/myserver/src/base/file/
trunk/myserver/src/base/file/Makefile.am
trunk/myserver/src/base/file/file.cpp
trunk/myserver/src/base/file/files_utility.cpp
trunk/myserver/src/base/hash_map/
trunk/myserver/src/base/hash_map/Makefile.am
trunk/myserver/src/base/hash_map/hash_map.cpp
trunk/myserver/src/base/home_dir/
trunk/myserver/src/base/home_dir/Makefile.am
trunk/myserver/src/base/home_dir/home_dir.cpp
trunk/myserver/src/base/md5/
trunk/myserver/src/base/md5/Makefile.am
trunk/myserver/src/base/md5/md5.cpp
trunk/myserver/src/base/mem_buff/
trunk/myserver/src/base/mem_buff/Makefile.am
trunk/myserver/src/base/mem_buff/mem_buff.cpp
trunk/myserver/src/base/multicast/
trunk/myserver/src/base/multicast/Makefile.am
trunk/myserver/src/base/multicast/multicast.cpp
trunk/myserver/src/base/pipe/
trunk/myserver/src/base/pipe/Makefile.am
trunk/myserver/src/base/pipe/pipe.cpp
trunk/myserver/src/base/process/
trunk/myserver/src/base/process/Makefile.am
trunk/myserver/src/base/process/process.cpp
trunk/myserver/src/base/process/process_server_manager.cpp
trunk/myserver/src/base/regex/
trunk/myserver/src/base/regex/Makefile.am
trunk/myserver/src/base/regex/myserver_regex.cpp
trunk/myserver/src/base/safetime/
trunk/myserver/src/base/safetime/Makefile.am
trunk/myserver/src/base/safetime/safetime.cpp
trunk/myserver/src/base/socket/
trunk/myserver/src/base/socket/Makefile.am
trunk/myserver/src/base/socket/socket.cpp
trunk/myserver/src/base/socket/ssl_socket.cpp
trunk/myserver/src/base/ssl/
trunk/myserver/src/base/ssl/Makefile.am
trunk/myserver/src/base/ssl/ssl.cpp
trunk/myserver/src/base/string/
trunk/myserver/src/base/string/Makefile.am
trunk/myserver/src/base/string/securestr.cpp
trunk/myserver/src/base/string/stringutils.cpp
trunk/myserver/src/base/sync/
trunk/myserver/src/base/sync/Makefile.am
trunk/myserver/src/base/sync/event.cpp
trunk/myserver/src/base/sync/mutex.cpp
trunk/myserver/src/base/sync/read_write_lock.cpp
trunk/myserver/src/base/sync/recursive_mutex.cpp
trunk/myserver/src/base/sync/semaphore.cpp
trunk/myserver/src/base/thread/
trunk/myserver/src/base/thread/Makefile.am
trunk/myserver/src/base/thread/thread.cpp
trunk/myserver/src/base/utility.cpp
trunk/myserver/src/base/xml/
trunk/myserver/src/base/xml/Makefile.am
trunk/myserver/src/base/xml/xml_parser.cpp
trunk/myserver/src/conf/
trunk/myserver/src/conf/Makefile.am
trunk/myserver/src/conf/mime/
trunk/myserver/src/conf/mime/Makefile.am
trunk/myserver/src/conf/mime/mime_manager.cpp
trunk/myserver/src/conf/security/
trunk/myserver/src/conf/security/Makefile.am
trunk/myserver/src/conf/security/security.cpp
trunk/myserver/src/conf/security/security_cache.cpp
trunk/myserver/src/conf/vhost/
trunk/myserver/src/conf/vhost/Makefile.am
trunk/myserver/src/conf/vhost/vhost.cpp
trunk/myserver/src/conf/vhost/vhost_manager.cpp
trunk/myserver/src/connection/
trunk/myserver/src/connection/Makefile.am
trunk/myserver/src/connection/connection.cpp
trunk/myserver/src/connections_scheduler/
trunk/myserver/src/connections_scheduler/Makefile.am
trunk/myserver/src/connections_scheduler/connections_scheduler.cpp
trunk/myserver/src/connections_scheduler/listen_threads.cpp
trunk/myserver/src/env/
trunk/myserver/src/env/Makefile.am
trunk/myserver/src/env/env.cpp
trunk/myserver/src/files_cache/
trunk/myserver/src/files_cache/Makefile.am
trunk/myserver/src/files_cache/cached_file.cpp
trunk/myserver/src/files_cache/cached_file_buffer.cpp
trunk/myserver/src/files_cache/cached_file_factory.cpp
trunk/myserver/src/filter/
trunk/myserver/src/filter/Makefile.am
trunk/myserver/src/filter/filter.cpp
trunk/myserver/src/filter/filters_chain.cpp
trunk/myserver/src/filter/filters_factory.cpp
trunk/myserver/src/filter/gzip/
trunk/myserver/src/filter/gzip/Makefile.am
trunk/myserver/src/filter/gzip/gzip.cpp
trunk/myserver/src/filter/gzip/gzip_decompress.cpp
trunk/myserver/src/filter/memory_stream.cpp
trunk/myserver/src/filter/stream.cpp
trunk/myserver/src/find_data/
trunk/myserver/src/find_data/Makefile.am
trunk/myserver/src/find_data/find_data.cpp
trunk/myserver/src/http_handler/
trunk/myserver/src/http_handler/Makefile.am
trunk/myserver/src/http_handler/cgi/
trunk/myserver/src/http_handler/cgi/Makefile.am
trunk/myserver/src/http_handler/cgi/cgi.cpp
trunk/myserver/src/http_handler/fastcgi/
trunk/myserver/src/http_handler/fastcgi/Makefile.am
trunk/myserver/src/http_handler/fastcgi/fastcgi.cpp
trunk/myserver/src/http_handler/isapi/
trunk/myserver/src/http_handler/isapi/Makefile.am
trunk/myserver/src/http_handler/isapi/isapi.cpp
trunk/myserver/src/http_handler/mscgi/
trunk/myserver/src/http_handler/mscgi/Makefile.am
trunk/myserver/src/http_handler/mscgi/mscgi.cpp
trunk/myserver/src/http_handler/mscgi/mscgi_manager.cpp
trunk/myserver/src/http_handler/scgi/
trunk/myserver/src/http_handler/scgi/Makefile.am
trunk/myserver/src/http_handler/scgi/scgi.cpp
trunk/myserver/src/http_handler/wincgi/
trunk/myserver/src/http_handler/wincgi/Makefile.am
trunk/myserver/src/http_handler/wincgi/wincgi.cpp
trunk/myserver/src/log/
trunk/myserver/src/log/Makefile.am
trunk/myserver/src/log/log_manager.cpp
trunk/myserver/src/plugin/
trunk/myserver/src/plugin/Makefile.am
trunk/myserver/src/plugin/executor/
trunk/myserver/src/plugin/executor/Makefile.am
trunk/myserver/src/plugin/executor/dyn_executor_manager.cpp
trunk/myserver/src/plugin/executor/dynamic_executor.cpp
trunk/myserver/src/plugin/filter/
trunk/myserver/src/plugin/filter/Makefile.am
trunk/myserver/src/plugin/filter/dyn_filter.cpp
trunk/myserver/src/plugin/filter/dyn_filter_file.cpp
trunk/myserver/src/plugin/filter/dyn_filters_manager.cpp
trunk/myserver/src/plugin/generic_plugins_manager.cpp
trunk/myserver/src/plugin/http_command/
trunk/myserver/src/plugin/http_command/Makefile.am
trunk/myserver/src/plugin/http_command/dyn_http_command.cpp
trunk/myserver/src/plugin/http_command/dyn_http_command_manager.cpp
trunk/myserver/src/plugin/http_manager/
trunk/myserver/src/plugin/http_manager/Makefile.am
trunk/myserver/src/plugin/http_manager/dyn_http_manager.cpp
trunk/myserver/src/plugin/http_manager/dyn_http_manager_list.cpp
trunk/myserver/src/plugin/plugin.cpp
trunk/myserver/src/plugin/plugins_manager.cpp
trunk/myserver/src/plugin/plugins_namespace.cpp
trunk/myserver/src/plugin/plugins_namespace_manager.cpp
trunk/myserver/src/plugin/protocol/
trunk/myserver/src/plugin/protocol/Makefile.am
trunk/myserver/src/plugin/protocol/dynamic_protocol.cpp
trunk/myserver/src/plugin/protocol/protocols_manager.cpp
trunk/myserver/src/protocol/
trunk/myserver/src/protocol/Makefile.am
trunk/myserver/src/protocol/control/
trunk/myserver/src/protocol/control/Makefile.am
trunk/myserver/src/protocol/control/control_header.cpp
trunk/myserver/src/protocol/control/control_protocol.cpp
trunk/myserver/src/protocol/ftp/
trunk/myserver/src/protocol/ftp/Makefile.am
trunk/myserver/src/protocol/ftp/ftp.cpp
trunk/myserver/src/protocol/ftp/ftp_lexer.cpp
trunk/myserver/src/protocol/ftp/ftp_lexer.lpp
trunk/myserver/src/protocol/ftp/ftp_parser.cpp
trunk/myserver/src/protocol/ftp/ftp_parser.ypp
trunk/myserver/src/protocol/http/
trunk/myserver/src/protocol/http/Makefile.am
trunk/myserver/src/protocol/http/http.cpp
trunk/myserver/src/protocol/http/http_data_handler.cpp
trunk/myserver/src/protocol/http/http_data_read.cpp
trunk/myserver/src/protocol/http/http_dir.cpp
trunk/myserver/src/protocol/http/http_errors.cpp
trunk/myserver/src/protocol/http/http_file.cpp
trunk/myserver/src/protocol/http/http_header_checker.cpp
trunk/myserver/src/protocol/http/http_headers.cpp
trunk/myserver/src/protocol/http/http_request.cpp
trunk/myserver/src/protocol/http/http_response.cpp
trunk/myserver/src/protocol/http/http_thread_context.cpp
trunk/myserver/src/protocol/https/
trunk/myserver/src/protocol/https/Makefile.am
trunk/myserver/src/protocol/https/https.cpp
trunk/myserver/src/protocol/protocol.cpp
trunk/myserver/src/protocol/protocol_buffer.cpp
trunk/myserver/src/server/
trunk/myserver/src/server/Makefile.am
trunk/myserver/src/server/clients_thread.cpp
trunk/myserver/src/server/server.cpp
Removed Paths:
-------------
trunk/myserver/include/cached_file.h
trunk/myserver/include/cached_file_buffer.h
trunk/myserver/include/cached_file_factory.h
trunk/myserver/include/cgi.h
trunk/myserver/include/clients_thread.h
trunk/myserver/include/connection.h
trunk/myserver/include/connections_scheduler.h
trunk/myserver/include/control_errors.h
trunk/myserver/include/control_header.h
trunk/myserver/include/control_protocol.h
trunk/myserver/include/dyn_executor_manager.h
trunk/myserver/include/dyn_filter.h
trunk/myserver/include/dyn_filter_file.h
trunk/myserver/include/dyn_filters_manager.h
trunk/myserver/include/dyn_http_command.h
trunk/myserver/include/dyn_http_command_manager.h
trunk/myserver/include/dyn_http_manager.h
trunk/myserver/include/dyn_http_manager_list.h
trunk/myserver/include/dynamic_executor.h
trunk/myserver/include/dynamic_protocol.h
trunk/myserver/include/dynamiclib.h
trunk/myserver/include/env.h
trunk/myserver/include/event.h
trunk/myserver/include/fastcgi.h
trunk/myserver/include/file.h
trunk/myserver/include/files_utility.h
trunk/myserver/include/filter.h
trunk/myserver/include/filters_chain.h
trunk/myserver/include/filters_factory.h
trunk/myserver/include/find_data.h
trunk/myserver/include/ftp.h
trunk/myserver/include/ftp_common.h
trunk/myserver/include/ftp_lexer.h
trunk/myserver/include/ftp_parser.h
trunk/myserver/include/generic_plugins_manager.h
trunk/myserver/include/gzip.h
trunk/myserver/include/gzip_decompress.h
trunk/myserver/include/hash_map.h
trunk/myserver/include/home_dir.h
trunk/myserver/include/http.h
trunk/myserver/include/http_data_handler.h
trunk/myserver/include/http_data_read.h
trunk/myserver/include/http_dir.h
trunk/myserver/include/http_errors.h
trunk/myserver/include/http_file.h
trunk/myserver/include/http_header.h
trunk/myserver/include/http_header_checker.h
trunk/myserver/include/http_headers.h
trunk/myserver/include/http_request.h
trunk/myserver/include/http_response.h
trunk/myserver/include/http_thread_context.h
trunk/myserver/include/https.h
trunk/myserver/include/isapi.h
trunk/myserver/include/listen_threads.h
trunk/myserver/include/log_manager.h
trunk/myserver/include/md5.h
trunk/myserver/include/mem_buff.h
trunk/myserver/include/memory_stream.h
trunk/myserver/include/mime_manager.h
trunk/myserver/include/mime_utils.h
trunk/myserver/include/mscgi.h
trunk/myserver/include/mscgi_manager.h
trunk/myserver/include/multicast.h
trunk/myserver/include/mutex.h
trunk/myserver/include/myserver_regex.h
trunk/myserver/include/pipe.h
trunk/myserver/include/plugin.h
trunk/myserver/include/plugins_manager.h
trunk/myserver/include/plugins_namespace.h
trunk/myserver/include/plugins_namespace_manager.h
trunk/myserver/include/process.h
trunk/myserver/include/process_server_manager.h
trunk/myserver/include/protocol.h
trunk/myserver/include/protocol_buffer.h
trunk/myserver/include/protocols_manager.h
trunk/myserver/include/read_write_lock.h
trunk/myserver/include/recursive_mutex.h
trunk/myserver/include/safetime.h
trunk/myserver/include/scgi.h
trunk/myserver/include/securestr.h
trunk/myserver/include/security.h
trunk/myserver/include/security_cache.h
trunk/myserver/include/semaphore.h
trunk/myserver/include/server.h
trunk/myserver/include/socket.h
trunk/myserver/include/ssl.h
trunk/myserver/include/ssl_socket.h
trunk/myserver/include/stream.h
trunk/myserver/include/stringutils.h
trunk/myserver/include/thread.h
trunk/myserver/include/utility.h
trunk/myserver/include/vhost.h
trunk/myserver/include/vhost_manager.h
trunk/myserver/include/wincgi.h
trunk/myserver/include/xml_parser.h
trunk/myserver/src/cached_file.cpp
trunk/myserver/src/cached_file_buffer.cpp
trunk/myserver/src/cached_file_factory.cpp
trunk/myserver/src/cgi.cpp
trunk/myserver/src/clients_thread.cpp
trunk/myserver/src/connection.cpp
trunk/myserver/src/connections_scheduler.cpp
trunk/myserver/src/control_header.cpp
trunk/myserver/src/control_protocol.cpp
trunk/myserver/src/dyn_executor_manager.cpp
trunk/myserver/src/dyn_filter.cpp
trunk/myserver/src/dyn_filter_file.cpp
trunk/myserver/src/dyn_filters_manager.cpp
trunk/myserver/src/dyn_http_command.cpp
trunk/myserver/src/dyn_http_command_manager.cpp
trunk/myserver/src/dyn_http_manager.cpp
trunk/myserver/src/dyn_http_manager_list.cpp
trunk/myserver/src/dynamic_executor.cpp
trunk/myserver/src/dynamic_protocol.cpp
trunk/myserver/src/dynamiclib.cpp
trunk/myserver/src/env.cpp
trunk/myserver/src/event.cpp
trunk/myserver/src/fastcgi.cpp
trunk/myserver/src/file.cpp
trunk/myserver/src/files_utility.cpp
trunk/myserver/src/filter.cpp
trunk/myserver/src/filters_chain.cpp
trunk/myserver/src/filters_factory.cpp
trunk/myserver/src/find_data.cpp
trunk/myserver/src/ftp.cpp
trunk/myserver/src/ftp_lexer.cpp
trunk/myserver/src/ftp_lexer.lpp
trunk/myserver/src/ftp_parser.cpp
trunk/myserver/src/ftp_parser.ypp
trunk/myserver/src/generic_plugins_manager.cpp
trunk/myserver/src/gzip.cpp
trunk/myserver/src/gzip_decompress.cpp
trunk/myserver/src/hash_map.cpp
trunk/myserver/src/home_dir.cpp
trunk/myserver/src/http.cpp
trunk/myserver/src/http_data_handler.cpp
trunk/myserver/src/http_data_read.cpp
trunk/myserver/src/http_dir.cpp
trunk/myserver/src/http_errors.cpp
trunk/myserver/src/http_file.cpp
trunk/myserver/src/http_header_checker.cpp
trunk/myserver/src/http_headers.cpp
trunk/myserver/src/http_request.cpp
trunk/myserver/src/http_response.cpp
trunk/myserver/src/http_thread_context.cpp
trunk/myserver/src/https.cpp
trunk/myserver/src/isapi.cpp
trunk/myserver/src/listen_threads.cpp
trunk/myserver/src/log_manager.cpp
trunk/myserver/src/md5.cpp
trunk/myserver/src/mem_buff.cpp
trunk/myserver/src/memory_stream.cpp
trunk/myserver/src/mime_manager.cpp
trunk/myserver/src/mime_utils.cpp
trunk/myserver/src/mscgi.cpp
trunk/myserver/src/mscgi_manager.cpp
trunk/myserver/src/multicast.cpp
trunk/myserver/src/mutex.cpp
trunk/myserver/src/myserver_regex.cpp
trunk/myserver/src/pipe.cpp
trunk/myserver/src/plugin.cpp
trunk/myserver/src/plugins_manager.cpp
trunk/myserver/src/plugins_namespace.cpp
trunk/myserver/src/plugins_namespace_manager.cpp
trunk/myserver/src/process.cpp
trunk/myserver/src/process_server_manager.cpp
trunk/myserver/src/protocol.cpp
trunk/myserver/src/protocol_buffer.cpp
trunk/myserver/src/protocols_manager.cpp
trunk/myserver/src/read_write_lock.cpp
trunk/myserver/src/recursive_mutex.cpp
trunk/myserver/src/safetime.cpp
trunk/myserver/src/scgi.cpp
trunk/myserver/src/securestr.cpp
trunk/myserver/src/security.cpp
trunk/myserver/src/security_cache.cpp
trunk/myserver/src/semaphore.cpp
trunk/myserver/src/server.cpp
trunk/myserver/src/socket.cpp
trunk/myserver/src/ssl.cpp
trunk/myserver/src/ssl_socket.cpp
trunk/myserver/src/stream.cpp
trunk/myserver/src/stringutils.cpp
trunk/myserver/src/thread.cpp
trunk/myserver/src/utility.cpp
trunk/myserver/src/vhost.cpp
trunk/myserver/src/vhost_manager.cpp
trunk/myserver/src/wincgi.cpp
trunk/myserver/src/xml_parser.cpp
Modified: trunk/myserver/SConstruct
===================================================================
--- trunk/myserver/SConstruct 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/SConstruct 2008-08-31 23:22:09 UTC (rev 2774)
@@ -72,8 +72,17 @@
################
+def get_cpp_files(dir):
+ ret = []
+ for root, dirs, files in os.walk(dir):
+ seq = filter(lambda x : x[-4:] == ".cpp", files)
+ for i in seq:
+ ret.append(root + "/" + i)
+ return ret
+
+
if command == "update_svn":
Execute("svn update")
@@ -235,7 +244,7 @@
env = conf.Finish()
-files = glob.glob('src/*.cpp')
+files = get_cpp_files('src')
files.sort()
if command == "build":
@@ -245,10 +254,10 @@
#Build the Control GUI here.
if buildControlGui:
filesControl = glob.glob('control/*.cpp')
- filesControl.append(["src/file.cpp", "src/files_utility.cpp",
"src/xml_parser.cpp",
- "src/utility.cpp", "src/find_data.cpp", "src/md5.cpp",
"src/mem_buff.cpp",
- "src/ssl_socket.cpp", "src/socket.cpp", "src/mutex.cpp",
"src/thread.cpp",
- "src/stream.cpp", "src/securestr.cpp"])
+ filesControl.append(["src/base/file/file.cpp",
"src/base/file/files_utility.cpp", "src/base/xml/xml_parser.cpp",
+ "src/base/utility.cpp", "src/find_data/find_data.cpp",
"src/base/md5/md5.cpp", "src/base/mem_buff/mem_buff.cpp",
+ "src/base/socket/ssl_socket.cpp",
"src/base/socket/socket.cpp", "src/base/sync/mutex.cpp",
+ "src/base/thread/thread.cpp", "src/filter/stream.cpp",
"src/base/string/securestr.cpp"])
filesControl.sort()
Modified: trunk/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
===================================================================
--- trunk/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp 2008-08-30
13:31:10 UTC (rev 2773)
+++ trunk/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp 2008-08-31
23:22:09 UTC (rev 2774)
@@ -1,7 +1,7 @@
#ifdef WIN32
#include "cgi_manager.h"
#else
-#include "include/mscgi_manager.h"
+#include <include/http_handler/mscgi/mscgi_manager.h>
#endif
int isNumber(char* s)
Modified: trunk/myserver/binaries/web/cgi-src/post/post.cpp
===================================================================
--- trunk/myserver/binaries/web/cgi-src/post/post.cpp 2008-08-30 13:31:10 UTC
(rev 2773)
+++ trunk/myserver/binaries/web/cgi-src/post/post.cpp 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -1,7 +1,7 @@
#ifdef WIN32
#include "cgi_manager.h"
#else
-#include "include/mscgi_manager.h"
+#include <include/http_handler/mscgi/mscgi_manager.h>
#endif
Modified: trunk/myserver/configure.in
===================================================================
--- trunk/myserver/configure.in 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/configure.in 2008-08-31 23:22:09 UTC (rev 2774)
@@ -376,6 +376,56 @@
documentation/english/images/Makefile
documentation/english/style/Makefile
documentation/english/texts/Makefile
+ src/find_data/Makefile
+ src/connection/Makefile
+ src/env/Makefile
+ src/log/Makefile
+ src/conf/Makefile
+ src/conf/mime/Makefile
+ src/conf/security/Makefile
+ src/conf/vhost/Makefile
+ src/connections_scheduler/Makefile
+ src/http_handler/Makefile
+ src/http_handler/wincgi/Makefile
+ src/http_handler/cgi/Makefile
+ src/http_handler/mscgi/Makefile
+ src/http_handler/fastcgi/Makefile
+ src/http_handler/scgi/Makefile
+ src/http_handler/isapi/Makefile
+ src/base/Makefile
+ src/base/file/Makefile
+ src/base/pipe/Makefile
+ src/base/base64/Makefile
+ src/base/mem_buff/Makefile
+ src/base/home_dir/Makefile
+ src/base/multicast/Makefile
+ src/base/sync/Makefile
+ src/base/safetime/Makefile
+ src/base/socket/Makefile
+ src/base/hash_map/Makefile
+ src/base/dynamic_lib/Makefile
+ src/base/process/Makefile
+ src/base/md5/Makefile
+ src/base/ssl/Makefile
+ src/base/xml/Makefile
+ src/base/string/Makefile
+ src/base/regex/Makefile
+ src/base/thread/Makefile
+ src/protocol/Makefile
+ src/protocol/ftp/Makefile
+ src/protocol/control/Makefile
+ src/protocol/https/Makefile
+ src/protocol/http/Makefile
+ src/files_cache/Makefile
+ src/filter/Makefile
+ src/filter/gzip/Makefile
+ src/plugin/Makefile
+ src/plugin/executor/Makefile
+ src/plugin/http_manager/Makefile
+ src/plugin/protocol/Makefile
+ src/plugin/filter/Makefile
+ src/plugin/http_command/Makefile
+ src/server/Makefile
src/Makefile
tests/Makefile
])
Modified: trunk/myserver/control/Makefile.am
===================================================================
--- trunk/myserver/control/Makefile.am 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/Makefile.am 2008-08-31 23:22:09 UTC (rev 2774)
@@ -1,9 +1,9 @@
bin_PROGRAMS = myserver-configure
-myserver_configure_SOURCES = myserver-configure.cpp fltkconfig.cpp service.cpp
progress.cpp vector.cpp ../src/file.cpp ../src/files_utility.cpp
../src/xml_parser.cpp ../src/utility.cpp ../src/find_data.cpp language.cpp
mimetype.cpp vhost.cpp ../src/md5.cpp ../src/mem_buff.cpp control_client.cpp
../src/ssl_socket.cpp ../src/socket.cpp ../src/mutex.cpp ../src/thread.cpp
../src/stream.cpp ../src/securestr.cpp
-
+myserver_configure_SOURCES = control_client.cpp fltkconfig.cpp language.cpp
mimetype.cpp\
+
myserver-configure.cpp progress.cpp
service.cpp vector.cpp vhost.cpp
INCLUDES = $(all_includes)
-myserver_configure_LDFLAGS = $(all_libraries)
+myserver_configure_LDFLAGS = $(all_libraries) ../src/libmyserver.a
myserver_configure_CXXFLAGS = $(CXXFLAGS) $(XML_CFLAGS) $(FLTK_CFLAGS)
-DPREFIX=\"$(prefix)\"
myserver_configure_LDADD = $(XML_LIBS) $(FLTK_LIBS) $(XNET_LIB) $(OPENSSL_LIB)
Modified: trunk/myserver/control/control_client.h
===================================================================
--- trunk/myserver/control/control_client.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/control/control_client.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -17,13 +17,14 @@
#ifndef CONTROL_CLIENT_H
#define CONTROL_CLIENT_H
-#include "../include/socket.h"
-#include "../include/ssl_socket.h"
+#include <include/base/socket/socket.h>
+#include <include/base/socket/ssl_socket.h>
+#include <include/base/file/file.h>
+#include <include/protocol/control/control_errors.h>
+#include <include/base/string/stringutils.h>
+#include <include/base/mem_buff/mem_buff.h>
+
#include "vector.h"
-#include "../include/file.h"
-#include "../include/control_errors.h"
-#include "../include/stringutils.h"
-#include "../include/mem_buff.h"
typedef void (*ControlClientCallback)(void *, unsigned int, unsigned int);
Modified: trunk/myserver/control/fltkconfig.h
===================================================================
--- trunk/myserver/control/fltkconfig.h 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/fltkconfig.h 2008-08-31 23:22:09 UTC (rev 2774)
@@ -22,10 +22,11 @@
#include <FL/Fl_Counter.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/fl_ask.H>
-#include "../include/xml_parser.h"
-#include "../include/stringutils.h"
-#include "../include/md5.h"
-#include "../include/utility.h"
+
+#include <include/base/xml/xml_parser.h>
+#include <include/base/string/stringutils.h>
+#include <include/base/md5/md5.h>
+#include <include/base/utility.h>
#include "service.h"
#include "language.h"
#include "mimetype.h"
Modified: trunk/myserver/control/language.cpp
===================================================================
--- trunk/myserver/control/language.cpp 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/language.cpp 2008-08-31 23:22:09 UTC (rev 2774)
@@ -23,7 +23,7 @@
#include <string.h>
}
-#include "../include/files_utility.h"
+#include <include/base/file/files_utility.h>
// Debug flag. Set this to print (to stdout) xml tags that were not found.
// This will generate the expected xml data that was not found that can
Modified: trunk/myserver/control/language.h
===================================================================
--- trunk/myserver/control/language.h 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/language.h 2008-08-31 23:22:09 UTC (rev 2774)
@@ -17,7 +17,7 @@
#ifndef LANGUAGE_H
#define LANGUAGE_H
-#include "../include/xml_parser.h"
+#include <include/base/xml/xml_parser.h>
void LanguageXMLinit();
void LanguageXMLend();
Modified: trunk/myserver/control/mimetype.cpp
===================================================================
--- trunk/myserver/control/mimetype.cpp 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/mimetype.cpp 2008-08-31 23:22:09 UTC (rev 2774)
@@ -20,9 +20,9 @@
#include <stdlib.h>
}
-#include "../include/file.h"
-#include "../include/stringutils.h"
-#include "../include/xml_parser.h"
+#include <include/base/file/file.h>
+#include <include/base/string/stringutils.h>
+#include <include/base/xml/xml_parser.h>
#include "mimetype.h"
using namespace std;
Modified: trunk/myserver/control/mimetype.h
===================================================================
--- trunk/myserver/control/mimetype.h 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/mimetype.h 2008-08-31 23:22:09 UTC (rev 2774)
@@ -22,8 +22,8 @@
#include <FL/Fl_Choice.H>
#include "vector.h"
-#include "../include/mem_buff.h"
-#include "../include/xml_parser.h"
+#include <include/base/mem_buff/mem_buff.h>
+#include <include/base/xml/xml_parser.h>
///
/// CGI command type numbers.
Modified: trunk/myserver/control/myserver-configure.cpp
===================================================================
--- trunk/myserver/control/myserver-configure.cpp 2008-08-30 13:31:10 UTC
(rev 2773)
+++ trunk/myserver/control/myserver-configure.cpp 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -24,15 +24,15 @@
#include <Fl/fl_ask.H>
#include "language.h"
-#include "../include/stringutils.h"
-#include "../include/xml_parser.h"
-#include "../include/file.h"
-#include "../include/files_utility.h"
+#include <include/base/string/stringutils.h>
+#include <include/base/xml/xml_parser.h>
+#include <include/base/file/file.h>
+#include <include/base/file/files_utility.h>
#include "vector.h"
#include "fltkconfig.h"
#include "language.h"
-# include "../include/find_data.h"
+#include <include/find_data/find_data.h>
extern "C"
{
Modified: trunk/myserver/control/service.cpp
===================================================================
--- trunk/myserver/control/service.cpp 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/service.cpp 2008-08-31 23:22:09 UTC (rev 2774)
@@ -29,8 +29,8 @@
}
#endif
-#include "../include/file.h"
-#include "../include/files_utility.h"
+#include <include/base/file/file.h>
+#include <include/base/file/files_utility.h>
#ifdef WIN32
static DWORD WINAPI consoleWatchDogThread(LPVOID);
Modified: trunk/myserver/control/vhost.cpp
===================================================================
--- trunk/myserver/control/vhost.cpp 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/vhost.cpp 2008-08-31 23:22:09 UTC (rev 2774)
@@ -20,9 +20,9 @@
#include <stdlib.h>
}
-#include "../include/file.h"
-#include "../include/stringutils.h"
-#include "../include/xml_parser.h"
+#include <include/base/file/file.h>
+#include <include/base/string/stringutils.h>
+#include <include/base/xml/xml_parser.h>
#include "vhost.h"
using namespace std;
Modified: trunk/myserver/control/vhost.h
===================================================================
--- trunk/myserver/control/vhost.h 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/control/vhost.h 2008-08-31 23:22:09 UTC (rev 2774)
@@ -22,7 +22,7 @@
#include <FL/Fl_Choice.H>
#include "vector.h"
-#include "../include/mem_buff.h"
+#include <include/base/mem_buff/mem_buff.h>
#include <vector>
using namespace std;
Modified: trunk/myserver/doxygen
===================================================================
--- trunk/myserver/doxygen 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/doxygen 2008-08-31 23:22:09 UTC (rev 2774)
@@ -74,7 +74,7 @@
include \
control
FILE_PATTERNS =
-RECURSIVE = NO
+RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
Copied: trunk/myserver/include/base/base64/mime_utils.h (from rev 2773,
trunk/myserver/include/mime_utils.h)
===================================================================
--- trunk/myserver/include/base/base64/mime_utils.h
(rev 0)
+++ trunk/myserver/include/base/base64/mime_utils.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,51 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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 MIMEUTILS_H
+#define MIMEUTILS_H
+
+char* MimeDecodeMailHeaderField(char *s);
+
+class CBase64Utils
+{
+private:
+ int ErrorCode;
+public:
+ int GetLastError() {return ErrorCode;};
+ CBase64Utils();
+ ~CBase64Utils();
+ char* Decode(const char *in, int *bufsize);
+ char* Encode(const char *in, int bufsize);
+};
+
+class CQPUtils
+{
+private:
+ char* ExpandBuffer(char *buffer, int UsedSize, int *BufSize, int
SingleChar = 1);
+ int ErrorCode;
+public:
+ int GetLastError() {return ErrorCode;};
+ char* Encode(char*in);
+ char* Decode(char*in);
+ CQPUtils();
+ ~CQPUtils();
+};
+
+extern class CBase64Utils base64Utils;
+#endif
+
Property changes on: trunk/myserver/include/base/base64/mime_utils.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/dynamic_lib/dynamiclib.h (from rev 2773,
trunk/myserver/include/dynamiclib.h)
===================================================================
--- trunk/myserver/include/base/dynamic_lib/dynamiclib.h
(rev 0)
+++ trunk/myserver/include/base/dynamic_lib/dynamiclib.h 2008-08-31
23:22:09 UTC (rev 2774)
@@ -0,0 +1,52 @@
+/*
+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 DYNAMICLIBRARY_H
+#define DYNAMICLIBRARY_H
+#include "stdafx.h"
+
+#include <string>
+
+extern "C"
+{
+#ifdef WIN32
+#include <direct.h>
+#endif
+#ifdef HAVE_DL
+#include <dlfcn.h>
+#endif
+}
+
+using namespace std;
+
+class DynamicLibrary
+{
+public:
+ int validHandle();
+ DynamicLibrary();
+ ~DynamicLibrary();
+ int loadLibrary(const char* filename, int globally=0);
+ void* getProc(const char*);
+ int close();
+ const char* getFileName(){return fileName.c_str();}
+private:
+ string fileName;
+ void *handle;
+
+};
+
+#endif
Property changes on: trunk/myserver/include/base/dynamic_lib/dynamiclib.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/file/file.h (from rev 2773,
trunk/myserver/include/file.h)
===================================================================
--- trunk/myserver/include/base/file/file.h (rev 0)
+++ trunk/myserver/include/base/file/file.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,81 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004 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 FILE_H
+#define FILE_H
+
+#include "stdafx.h"
+#include <include/filter/stream.h>
+#include <string>
+
+#ifdef WIN32
+typedef void* FileHandle;
+#endif
+#ifdef NOT_WIN
+typedef long FileHandle;
+#endif
+
+using namespace std;
+
+class File : public Stream
+{
+protected:
+ FileHandle handle;
+ string filename;
+public:
+ static const u_long MYSERVER_OPEN_READ;
+ static const u_long MYSERVER_OPEN_WRITE;
+ static const u_long MYSERVER_OPEN_TEMPORARY;
+ static const u_long MYSERVER_OPEN_HIDDEN;
+ static const u_long MYSERVER_OPEN_ALWAYS;
+ static const u_long MYSERVER_OPEN_IFEXISTS;
+ static const u_long MYSERVER_OPEN_APPEND;
+ static const u_long MYSERVER_CREATE_ALWAYS;
+ static const u_long MYSERVER_NO_INHERIT;
+
+ File();
+ File(char *,int);
+ virtual FileHandle getHandle();
+ virtual int setHandle(FileHandle);
+ virtual int readFromFile(char* ,u_long ,u_long* );
+ virtual int writeToFile(const char* ,u_long ,u_long* );
+ virtual int createTemporaryFile(const char* );
+
+ virtual int openFile(const char*, u_long );
+ virtual int openFile(string const &file, u_long opt)
+ {return openFile(file.c_str(), opt);}
+
+ virtual u_long getFileSize();
+ virtual int setFilePointer(u_long);
+
+ virtual time_t getLastModTime();
+ virtual time_t getCreationTime();
+ virtual time_t getLastAccTime();
+ virtual const char *getFilename();
+ virtual int setFilename(const char*);
+ virtual int setFilename(string const &name)
+ {return setFilename(name.c_str());}
+
+ virtual int operator =(File);
+ virtual int closeFile();
+
+ /*! Inherithed from Stream. */
+ virtual int read(char* buffer, u_long len, u_long *nbr);
+ virtual int write(const char* buffer, u_long len, u_long *nbw);
+
+};
+#endif
Property changes on: trunk/myserver/include/base/file/file.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/file/files_utility.h (from rev 2773,
trunk/myserver/include/files_utility.h)
===================================================================
--- trunk/myserver/include/base/file/files_utility.h
(rev 0)
+++ trunk/myserver/include/base/file/files_utility.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,102 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 2006, 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 FILES_UTILITY_H
+#define FILES_UTILITY_H
+
+#include "stdafx.h"
+#include <include/filter/stream.h>
+#include <include/base/file/file.h>
+#include <string>
+
+using namespace std;
+
+class FilesUtility
+{
+ FileHandle handle;
+ string filename;
+
+private:
+ /*! Don't allow instances for this class. */
+ FilesUtility();
+public:
+ static int getPathRecursionLevel(const char*);
+ static int getPathRecursionLevel(string& filename)
+ {return getPathRecursionLevel(filename.c_str()); }
+
+ static time_t getLastModTime(const char *filename);
+ static time_t getLastModTime(string const &filename)
+ {return getLastModTime(filename.c_str());}
+
+ static time_t getCreationTime(const char *filename);
+ static time_t getCreationTime(string const &filename)
+ {return getCreationTime(filename.c_str());}
+
+ static time_t getLastAccTime(const char *filename);
+ static time_t getLastAccTime(string const &filename)
+ {return getLastAccTime(filename.c_str());}
+
+ static int chown(const char* filename, int uid, int gid);
+ static int chown(string const &filename, int uid, int gid)
+ {return chown(filename.c_str(), uid, gid);}
+
+ static int completePath(char**, int *size, int dontRealloc=0);
+ static int completePath(string &fileName);
+
+ static int isDirectory(const char*);
+ static int isDirectory(string& dir){return isDirectory(dir.c_str());}
+
+ static int isLink(const char*);
+ static int isLink(string& dir){return isLink(dir.c_str());}
+
+ static int getShortFileName(char*,char*,int);
+
+ static int fileExists(const char * );
+ static int fileExists(string const &file)
+ {return fileExists(file.c_str());}
+
+ static int deleteFile(const char * );
+ static int deleteFile(string const &file)
+ {return deleteFile(file.c_str());}
+
+ static int renameFile(const char*, const char*);
+ static int renameFile(string const &before, string const &after)
+ {return renameFile(before.c_str(), after.c_str());}
+
+ static int copyFile(const char*, const char*, int overwrite);
+ static int copyFile(string const &src, string const &dest, int
overwrite)
+ {return copyFile(src.c_str(), dest.c_str(), overwrite);}
+
+ static void getFileExt(char* ext,const char* filename);
+ static void getFileExt(string& ext, string const &filename);
+
+ static void splitPathLength(const char *path, int *dir, int *filename);
+ static void splitPath(const char* path, char* dir, char*filename);
+ static void splitPath(string const &path, string& dir, string&
filename);
+
+ static int getFilenameLength(const char*, int *);
+ static void getFilename(const char* path, char* filename);
+ static void getFilename(string const &path, string& filename);
+
+ static int simpleMakeDirectory(const char *path);
+ static int deleteDirectory(const char *path);
+ static int simpleMakeDirectory(string const &path)
+ { return simpleMakeDirectory(path.c_str()); }
+ static int deleteDirectory(string const &path)
+ { return deleteDirectory(path.c_str()); }
+};
+#endif
Property changes on: trunk/myserver/include/base/file/files_utility.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/hash_map/hash_map.h (from rev 2773,
trunk/myserver/include/hash_map.h)
===================================================================
--- trunk/myserver/include/base/hash_map/hash_map.h
(rev 0)
+++ trunk/myserver/include/base/hash_map/hash_map.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,246 @@
+/*
+MyServer
+Copyright \xA9 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/>.
+*/
+
+//valueType putList( const list <keyType>&, const list <valueType>&);
+//valueType putList( const hashmap <keyType, valueType>&);
+//valueType removeList(const list <keyType>&);
+//valueType removeList(const hashmap <keyType, valueType>&);
+
+#ifndef HASHMAP_H
+#define HASHMAP_H
+
+#include <list>
+#include <vector>
+#include <string>
+
+using namespace std;
+
+//hashmap Hash-Key-Value Struct
+template <typename KeyType, typename ValueType>
+struct Shkv
+{
+ unsigned int hash;
+ KeyType key;
+ ValueType value;
+};
+
+//hashmap Hash-Key-Value Struct
+template <typename ValueType>
+struct Shkv <char*, ValueType>
+{
+ unsigned int hash;
+ string key;
+ ValueType value;
+};
+
+template <typename KeyType, typename ValueType>
+class HashMap;
+
+template <typename KeyType, typename ValueType>
+class MyIterator
+{
+ public:
+
+ template <typename KType, typename VType>
+ friend class HashMap;
+
+ MyIterator();
+ inline KeyType getKey() const;
+
+ inline bool operator==(const MyIterator&) const;
+ inline bool operator!=(const MyIterator&) const;
+ inline ValueType& operator*() const;
+ inline MyIterator& operator++(); //prefix
+ inline MyIterator operator++(int); //postfix
+ inline MyIterator& operator--(); //prefix
+ inline MyIterator operator--(int); //postfix
+ //inline MyIterator operator delete(void*);
+
+ private:
+
+ unsigned int offset;
+ vector< list< Shkv<KeyType, ValueType> > > *vectorPtr;
+ typename vector <unsigned int>::iterator mapIter;
+ typename vector< list< Shkv<KeyType, ValueType> > >::iterator
vectorIter;
+ typename list< Shkv<KeyType, ValueType> >::iterator listIter;
+};
+
+template <typename KeyType, typename ValueType>
+class HashMap
+{
+ public:
+
+ typedef MyIterator<KeyType, ValueType> Iterator;
+
+ HashMap();
+ HashMap(int);
+ HashMap(const float);
+ HashMap(int, const float);
+ inline bool empty(void) const;
+ inline void clear(void);
+ inline int size(void) const;
+ inline Iterator begin(void);
+ inline Iterator back(void);
+ inline Iterator end(void);
+ ValueType remove(const Iterator&);
+ bool containsKey(const KeyType&);
+ ValueType get(const KeyType&);
+ Iterator getI(const KeyType&);
+ ValueType put(KeyType&, const ValueType&);
+ ValueType remove(const KeyType&);
+
+ private:
+
+ Iterator tempIterator;
+ Shkv<KeyType, ValueType> tempShkv;
+ vector < list < Shkv<KeyType, ValueType> > > data;
+ typename list < Shkv<KeyType, ValueType> >::iterator dataIter,
tempdataIter;
+ vector <unsigned int> map;
+ unsigned int offset, tempHash;
+ int capacity, power, mask, load;
+ float highLoadFactor, lowLoadFactor;
+
+ void increaseSize(const int);
+ void decreaseSize(const int);
+ unsigned int hash (const char *, int);
+};
+
+template <typename ValueType>
+class HashMap <string, ValueType>
+{
+ public:
+
+ typedef MyIterator<string, ValueType> Iterator;
+
+ HashMap();
+ HashMap(int);
+ HashMap(const float);
+ HashMap(int, const float);
+ inline bool empty(void) const;
+ inline void clear(void);
+ inline int size(void) const;
+ inline Iterator begin(void);
+ inline Iterator back(void);
+ inline Iterator end(void);
+ ValueType remove(const Iterator&);
+ bool containsKey(const string&);
+ ValueType get(const string&);
+ Iterator getI(const string&);
+ ValueType put(string&, const ValueType&);
+ ValueType remove(const string&);
+
+ private:
+
+ Iterator tempIterator;
+ Shkv<string, ValueType> tempShkv;
+ vector < list < Shkv<string, ValueType> > > data;
+ typename list < Shkv<string, ValueType> >::iterator dataIter,
tempdataIter;
+ vector <unsigned int> map;
+ unsigned int offset, tempHash;
+ int capacity, power, mask, load;
+ float highLoadFactor, lowLoadFactor;
+
+ void increaseSize(const int);
+ void decreaseSize(const int);
+ unsigned int hash (const char *, int);
+};
+
+template <typename ValueType>
+class HashMap <char*, ValueType>
+{
+ public:
+
+ typedef MyIterator<char*, ValueType> Iterator;
+
+ HashMap();
+ HashMap(int);
+ HashMap(const float);
+ HashMap(int, const float);
+ inline bool empty(void) const;
+ inline void clear(void);
+ inline int size(void) const;
+ inline Iterator begin(void);
+ inline Iterator back(void);
+ inline Iterator end(void);
+ ValueType remove(const Iterator&);
+ bool containsKey(const char* const);
+ ValueType get(const char* const);
+ Iterator getI(const char* const);
+ ValueType put(char* const, const ValueType&);
+ ValueType remove(const char* const);
+
+ private:
+
+ Iterator tempIterator;
+ Shkv<char*, ValueType> tempShkv;
+ vector < list < Shkv<char*, ValueType> > > data;
+ typename list < Shkv<char*, ValueType> >::iterator dataIter,
tempdataIter;
+ vector <unsigned int> map;
+ unsigned int offset, tempHash;
+ int capacity, power, mask, load;
+ float highLoadFactor, lowLoadFactor;
+
+ void increaseSize(const int);
+ void decreaseSize(const int);
+ unsigned int hash (const char *, int);
+};
+
+template <typename ValueType>
+class HashMap <void*, ValueType>
+{
+ public:
+
+ typedef MyIterator<void*, ValueType> Iterator;
+
+ HashMap();
+ HashMap(int);
+ HashMap(const float);
+ HashMap(int, const float);
+ inline bool empty(void) const;
+ inline void clear(void);
+ inline int size(void) const;
+ inline Iterator begin(void);
+ inline Iterator back(void);
+ inline Iterator end(void);
+ ValueType remove(const Iterator&);
+ bool containsKey(const void* const);
+ ValueType get(const void* const);
+ Iterator getI(const void* const);
+ ValueType put(void* const, const ValueType&);
+ ValueType remove(const void* const);
+
+ private:
+
+ Iterator tempIterator;
+ Shkv<void*, ValueType> tempShkv;
+ vector < list < Shkv<void*, ValueType> > > data;
+ typename list < Shkv<void*, ValueType> >::iterator dataIter,
tempdataIter;
+ vector <unsigned int> map;
+ unsigned int offset, tempHash;
+ int capacity, power, mask, load;
+ float highLoadFactor, lowLoadFactor;
+
+ void increaseSize(const int);
+ void decreaseSize(const int);
+ unsigned int hash (const char *, int);
+};
+
+#ifndef HASHMAP_CPP
+#include <src/base/hash_map/hash_map.cpp>
+#endif
+
+#endif
Property changes on: trunk/myserver/include/base/hash_map/hash_map.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/home_dir/home_dir.h (from rev 2773,
trunk/myserver/include/home_dir.h)
===================================================================
--- trunk/myserver/include/base/home_dir/home_dir.h
(rev 0)
+++ trunk/myserver/include/base/home_dir/home_dir.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,55 @@
+/*
+MyServer
+Copyright (C) 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/>.
+*/
+
+#ifndef HOME_DIR_H
+#define HOME_DIR_H
+
+#include "stdafx.h"
+#include <include/base/file/file.h>
+#include <include/base/string/stringutils.h>
+#include <include/base/hash_map/hash_map.h>
+#include <include/base/sync/mutex.h>
+#include <string>
+
+using namespace std;
+
+class HomeDir
+{
+public:
+ HomeDir();
+ ~HomeDir();
+
+ void clear();
+ int load();
+ const string *getHomeDir(string& userName);
+ void getHomeDir(string& userName, string& out);
+
+ int isLoaded(){return loaded;}
+
+private:
+ Mutex loadMutex;
+ int loadImpl();
+
+#ifdef WIN32
+ string data;
+#else
+ HashMap<string, string*> data;
+#endif
+ time_t timestamp;
+ int loaded;
+};
+#endif
Property changes on: trunk/myserver/include/base/home_dir/home_dir.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/md5/md5.h (from rev 2773,
trunk/myserver/include/md5.h)
===================================================================
--- trunk/myserver/include/base/md5/md5.h (rev 0)
+++ trunk/myserver/include/base/md5/md5.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,58 @@
+/*
+ MyServer
+ Copyright (C) 2005-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/>.
+ */
+
+
+/*
+ * Based on a public domain implementation:
+ *
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest. This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ *
+ * To compute the message digest of a chunk of bytes, declare an
+ * MD5Context structure, pass it to MD5Init, call MD5Update as
+ * needed on buffers full of bytes, and then call MD5Final, which
+ * will fill a supplied 16-byte array with the digest.
+ */
+#include "stdafx.h"
+
+#ifndef MD5_H
+#define MD5_H
+
+class Md5
+{
+public:
+ Md5();
+ ~Md5();
+ void init();
+ void update(unsigned char const *buf, unsigned long len);
+ void final(unsigned char digest[16]);
+ char* end(char *buf);
+private:
+ unsigned int buf[4];
+ unsigned int bytes[2];
+ unsigned int in[16];
+ void transform(unsigned int buf[4], unsigned int const in[16]);
+};
+
+#endif
Property changes on: trunk/myserver/include/base/md5/md5.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/mem_buff/mem_buff.h (from rev 2773,
trunk/myserver/include/mem_buff.h)
===================================================================
--- trunk/myserver/include/base/mem_buff/mem_buff.h
(rev 0)
+++ trunk/myserver/include/base/mem_buff/mem_buff.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,133 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+Copyright (C) 2004, Guinet Adrien (grainailleur)
+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 MEMBUF_H
+#define MEMBUF_H
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#include "stdafx.h"
+#include <iostream>
+#include <string>
+using namespace std;
+
+#define USE_NEW
+
+
+#define DONT_MATCH_LENGTH // Comment this line to always make the buffer
+ // have the exact length of his data
+ // (involves reallocations => unrecommended)
+#ifdef USE_NEW
+#define mem_alloc(size) (new char[size])
+#define mem_free(pAdr) (delete [] pAdr)
+#else
+#include <stdlib.h>
+#define mem_alloc(size) ((char*) malloc(size))
+#define mem_free(pAdr) (free(pAdr))
+#endif
+
+#define end_str '\0'
+
+class MemBuf
+{
+public:
+ MemBuf();
+ MemBuf(const void* pAdr, u_int size);
+ MemBuf(const MemBuf& srcBuf);
+ MemBuf(MemBuf& srcBuf, int bCopy);
+ ~MemBuf();
+
+ void setExternalBuffer(const void* pAdr, u_int size);
+ int setBuffer(const void* pAdr, u_int size);
+ void setLength(u_int newSize);
+
+ void addBuffer(const void* pAdr, u_int size);
+ void addBuffer(MemBuf *nmb);
+
+ int free();
+
+ u_int find(char c, u_int start = 0);
+ u_int find(MemBuf *smb, u_int start = 0);
+ u_int find(const void* pAdr, u_int size, u_int start = 0);
+ void replace(char what, char by);
+ char& getAt(u_int nIndex);
+ char& operator[](u_int nIndex);
+
+ int getPart(u_int nStart, u_int nEnd, MemBuf& result);
+ int getPartAsString(u_int nStart, u_int nEnd, MemBuf& result);
+
+ char* getBuffersetLength(u_int newSize);
+
+ u_int getLength();
+ u_int getRealLength();
+
+ int isValid();
+
+ char* getBuffer();
+ operator const void*() ;
+ MemBuf operator+ (MemBuf& src);
+ MemBuf operator+ (const char* src);
+ const MemBuf& operator+= (MemBuf& add);
+ const MemBuf& operator+= (const char* pStr);
+ const MemBuf& operator+= (char c) ;
+
+ MemBuf& operator<< (const char* pSrc) ;
+ MemBuf& operator<< (int i) ;
+ MemBuf& operator<< (unsigned int i) ;
+ MemBuf& operator<< (long i) ;
+ MemBuf& operator<< (unsigned long i);
+ MemBuf& operator<< (char c) ;
+ MemBuf& operator<< (unsigned char c) ;
+ MemBuf& operator<< (const MemBuf &src) ;
+ MemBuf& operator<< (const string &src) ;
+ MemBuf& operator=(const MemBuf& src) ;
+ MemBuf& operator=(const char* src);
+
+ u_int m_nSizeLimit; // The maximun size that the buffer can reached ; 0
if none
+ u_int m_nBlockLength; // Minimun size of new allocated blocks during
addings
+ // We assume that
m_nBlockLength < m_nSizeLimit
+
+ void hashMD5(const void* pAdr, u_int nSize);
+ void hashCRC(const void* pAdr, u_int nSize);
+ void hex(const void* pAdr, u_int nSize);
+ void uintToStr(u_int i);
+ void intToStr( int i);
+ u_int strToUint(const char* pAdr);
+ unsigned char hexCharToNumber(unsigned char c);
+ MemBuf hexToData(const void* pAdr, u_int nSize);
+ int strToInt(const char* pAdr);
+ void hex(MemBuf& membuf) ;
+ void hashMD5(MemBuf& membuf);
+ void hashCRC(MemBuf& membuf);
+ void uintToStr(u_int i, char* pBufToUse, u_int nBufSize) ;
+ void xIntToStr(u_int i, int bNegative, char* pBufToUse, u_int
nBufSize);
+ void intToStr(int i, char* pBufToUse, u_int nBufSize);
+
+protected:
+ void xIntToStr(u_int i, int bNegative);
+ void allocBuffer(u_int size);
+ char* m_buffer; // Using of char* instead of void* because the C++
Compilator doesn't know the size of a void* !!!!!
+ u_int m_nSize;
+ u_int m_nRealSize;
+ int m_bCanDelete;
+ static u_int crc32Table[256];
+};
+
+#endif
Property changes on: trunk/myserver/include/base/mem_buff/mem_buff.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/multicast/multicast.h (from rev 2773,
trunk/myserver/include/multicast.h)
===================================================================
--- trunk/myserver/include/base/multicast/multicast.h
(rev 0)
+++ trunk/myserver/include/base/multicast/multicast.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,57 @@
+/*
+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 MULTICAST_H
+#define MULTICAST_H
+
+#include "stdafx.h"
+#include <include/base/hash_map/hash_map.h>
+
+#include <string>
+#include <vector>
+using namespace std;
+
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
+class MulticastRegistry;
+
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
+class Multicast
+{
+public:
+ virtual RET_TYPE updateMulticast(MulticastRegistry<MSG_TYPE, ARG_TYPE,
RET_TYPE>*, MSG_TYPE&, ARG_TYPE) = 0;
+ virtual ~Multicast(){}
+};
+
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
+class MulticastRegistry
+{
+public:
+ void addMulticast(MSG_TYPE, Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*);
+ void removeMulticast(MSG_TYPE, Multicast<MSG_TYPE, ARG_TYPE,
RET_TYPE>*);
+ void notifyMulticast(MSG_TYPE&, ARG_TYPE);
+protected:
+ void removeMulticasts(MSG_TYPE);
+ vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*>*
getHandlers(MSG_TYPE&);
+ void clearMulticastRegistry();
+private:
+ HashMap<MSG_TYPE, vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*>*>
handlers;
+};
+
+
+#include <src/base/multicast/multicast.cpp>
+
+#endif
Property changes on: trunk/myserver/include/base/multicast/multicast.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/pipe/pipe.h (from rev 2773,
trunk/myserver/include/pipe.h)
===================================================================
--- trunk/myserver/include/base/pipe/pipe.h (rev 0)
+++ trunk/myserver/include/base/pipe/pipe.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,51 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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 PIPE_H
+#define PIPE_H
+
+#include "stdafx.h"
+#include <include/filter/stream.h>
+#include <string>
+
+using namespace std;
+
+
+class Pipe : public Stream
+{
+public:
+ Pipe();
+ int create(bool readPipe = true);
+ long getReadHandle();
+ long getWriteHandle();
+ void inverted(Pipe&);
+ virtual int read(char* buffer, u_long len, u_long *nbr);
+ virtual int write(const char* buffer, u_long len, u_long *nbw);
+ void close();
+ void closeRead();
+ void closeWrite();
+ bool pipeTerminated(){return terminated;}
+private:
+ bool terminated;
+#ifdef NOT_WIN
+ int handles[2];
+#else
+ HANDLE readHandle;
+ HANDLE writeHandle;
+#endif
+};
+#endif
Property changes on: trunk/myserver/include/base/pipe/pipe.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/process/process.h (from rev 2773,
trunk/myserver/include/process.h)
===================================================================
--- trunk/myserver/include/base/process/process.h
(rev 0)
+++ trunk/myserver/include/base/process/process.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,75 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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/>.
+*/
+
+#ifndef PROCESS_H
+#define PROCESS_H
+
+#include "stdafx.h"
+
+#include <include/base/file/file.h>
+#include <include/base/sync/mutex.h>
+#include <include/base/string/stringutils.h>
+
+#include <string>
+
+/*!
+ *Structure used for start a new process.
+ */
+struct StartProcInfo
+{
+ /*! STDIN file for new process. */
+ FileHandle stdIn;
+
+ /*! STDOUT file for new process. */
+ FileHandle stdOut;
+
+ /*! STDERR file for new process. */
+ FileHandle stdError;
+
+ string cmdLine;
+ string cwd;
+
+ /*! added for unix support. */
+ string cmd;
+ string arg;
+
+ void *envString;
+};
+
+class Process
+{
+private:
+ int pid;
+public:
+#ifdef HAVE_PTHREAD
+ static Mutex forkMutex;
+ static void forkPrepare();
+ static void forkParent();
+ static void forkChild();
+#endif
+ static void initialize();
+ int execHiddenProcess(StartProcInfo* spi, u_long timeout = 0xFFFFFFFF);
+ int execConcurrentProcess(StartProcInfo* spi);
+ int terminateProcess();
+ int isProcessAlive();
+ static int setuid(u_long);
+ static int setgid(u_long);
+ static int setAdditionalGroups(u_long len, u_long *groups);
+ Process();
+ ~Process();
+};
+#endif
Copied: trunk/myserver/include/base/process/process_server_manager.h (from rev
2773, trunk/myserver/include/process_server_manager.h)
===================================================================
--- trunk/myserver/include/base/process/process_server_manager.h
(rev 0)
+++ trunk/myserver/include/base/process/process_server_manager.h
2008-08-31 23:22:09 UTC (rev 2774)
@@ -0,0 +1,105 @@
+/*
+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 PROCESS_SERVER_MANAGER_H
+#define PROCESS_SERVER_MANAGER_H
+
+#include "stdafx.h"
+#include <include/base/utility.h>
+#include <include/base/socket/socket.h>
+#include <include/connection/connection.h>
+#include <include/base/string/stringutils.h>
+#include <include/base/thread/thread.h>
+#include <include/base/sync/mutex.h>
+#include <include/base/hash_map/hash_map.h>
+#include <string>
+
+using namespace std;
+
+class ProcessServerManager
+{
+public:
+ struct Server
+ {
+ /*! Server executable path. */
+ string path;
+
+ union
+ {
+ unsigned long fileHandle;
+ SOCKET sock;
+ unsigned int value;
+ }DESCRIPTOR;
+
+ Socket socket;
+ string host;
+ Process process;
+ u_short port;
+ struct ServerDomain* sd;
+ bool isLocal;
+
+ void terminate()
+ {
+ if(isLocal)
+ {
+ socket.closesocket();
+ process.terminateProcess();
+ }
+ }
+ };
+
+ struct ServerDomain
+ {
+ string domainName;
+ HashMap<string, Server*> servers;
+ void (*clear)(Server*);
+ ServerDomain()
+ {
+ clear = 0;
+ }
+ };
+
+ ServerDomain* createDomain(const char* name);
+ ServerDomain* getDomain(const char* name);
+ void clear();
+ Server* getServer(const char* domain, const char* name);
+ ProcessServerManager();
+ ~ProcessServerManager();
+ int connect(Socket* sock, Server* server);
+ void setMaxServers(int max){maxServers = max;}
+ int getMaxServers(){return maxServers;}
+ void setInitialPort(u_short port){initialPort = port;}
+ u_short getInitialPort(){return initialPort;}
+ void removeServer(const char* domain, const char* name);
+ void removeDomain(const char* domain);
+ int domainServers(const char* domain);
+ void load();
+ Server* runAndAddServer(const char* domain, const char* name,
+
u_short port = 0);
+ Server* addRemoteServer(const char* domain, const char* name,
+
const char* host, u_short port);
+private:
+ int maxServers;
+ u_short initialPort;
+ int nServers;
+ Mutex mutex;
+ HashMap<string, ServerDomain*> domains;
+ int runServer(Server* server, const char* path, int port = 0);
+ void addServer(Server* server, const char* domain, const char* name);
+};
+
+#endif
Property changes on:
trunk/myserver/include/base/process/process_server_manager.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/regex/myserver_regex.h (from rev 2773,
trunk/myserver/include/myserver_regex.h)
===================================================================
--- trunk/myserver/include/base/regex/myserver_regex.h
(rev 0)
+++ trunk/myserver/include/base/regex/myserver_regex.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,81 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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 MYSERVER_REGEX_H
+#define MYSERVER_REGEX_H
+
+#include "stdafx.h"
+
+#ifdef WIN32
+#define REGEX
+#endif
+
+#ifndef _VC
+extern "C"
+{
+#endif
+
+#include <stdio.h>
+
+#ifdef WIN32
+#include <rxposix.h>
+#elif REGEX
+#include <regex.h>
+#else
+ typedef void* regmatch_t;
+ typedef void* regex_t;
+#endif
+
+#ifndef _VC
+}
+#endif
+
+#include <string>
+using namespace std;
+
+/*!
+*This class is used to manage regular expressions in MyServer.
+*/
+class Regex
+{
+public:
+ Regex();
+ void clone(Regex&);
+ Regex(Regex&);
+ Regex(const char *pattern, int flags);
+ ~Regex();
+ int isCompiled();
+ int compile(const char *pattern, int flags);
+ int exec(const char *string, size_t nmatch, regmatch_t matchptr [],
+ int eflags);
+ void free();
+
+ Regex(string const &pattern, int flags){Regex(pattern.c_str(), flags);}
+ int compile(string const &str, int flags){
+ return compile(str.c_str(), flags );}
+ int exec(string const &str, size_t nmatch, regmatch_t matchptr [],
+ int eflags)
+ {return exec(str.c_str(), nmatch, matchptr, eflags);}
+private:
+ regex_t compiledRegex;
+ regmatch_t match;
+ int compiled;
+ string pattern;
+ int flags;
+};
+
+#endif
Property changes on: trunk/myserver/include/base/regex/myserver_regex.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/safetime/safetime.h (from rev 2773,
trunk/myserver/include/safetime.h)
===================================================================
--- trunk/myserver/include/base/safetime/safetime.h
(rev 0)
+++ trunk/myserver/include/base/safetime/safetime.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,38 @@
+/*
+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 SAFETIME_H
+#define SAFETIME_H
+
+#include "stdafx.h"
+
+#ifdef GETTIMEOFDAY
+#include <sys/time.h>
+#endif
+
+#ifdef WIN32
+#include <direct.h>
+#include <time.h>
+#endif
+
+void myserver_safetime_init();
+void myserver_safetime_destroy();
+struct tm *myserver_localtime(const time_t *timep, tm* res);
+struct tm *myserver_gmtime(const time_t *timep, tm* res);
+
+#endif
+
Property changes on: trunk/myserver/include/base/safetime/safetime.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/socket/socket.h (from rev 2773,
trunk/myserver/include/socket.h)
===================================================================
--- trunk/myserver/include/base/socket/socket.h (rev 0)
+++ trunk/myserver/include/base/socket/socket.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,141 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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/>.
+*/
+
+#ifndef SOCKET_H
+#define SOCKET_H
+
+#include "stdafx.h"
+#include <include/filter/stream.h>
+
+#include <string>
+using namespace std;
+
+#ifndef DO_NOT_USE_SSL
+#include<openssl/ssl.h>
+#include<openssl/crypto.h>
+#include<openssl/lhash.h>
+#include<openssl/err.h>
+#include<openssl/bn.h>
+#include<openssl/pem.h>
+#include<openssl/x509.h>
+#include<openssl/rand.h>
+#endif
+
+#ifdef WIN32
+#ifndef SOCKETLIBINCLUDED
+extern "C"
+{
+#include <Ws2tcpip.h>
+#include <winsock2.h>
+}
+#define SOCKETLIBINCLUDED
+#endif
+#endif
+
+#ifdef NOT_WIN
+extern "C" {
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <unistd.h>
+}
+
+#define SOCKET int
+#define INVALID_SOCKET -1
+#define SD_BOTH SHUT_RDWR
+#endif
+
+#ifdef INET6_ADDRSTRLEN
+#define MAX_IP_STRING_LEN INET6_ADDRSTRLEN
+#else
+#define MAX_IP_STRING_LEN 32
+#endif
+
+typedef unsigned int SocketHandle;
+typedef struct sockaddr_storage MYSERVER_SOCKADDR_STORAGE;
+typedef struct sockaddr_storage MYSERVER_SOCKADDRIN;
+//typedef struct sockaddr_in MYSERVER_SOCKADDRIN;
+//typedef struct sockaddr MYSERVER_SOCKADDR;
+typedef struct sockaddr_storage MYSERVER_SOCKADDR;
+typedef struct hostent MYSERVER_HOSTENT;
+int startupSocketLib(u_short);
+
+class Socket: public Stream
+{
+public:
+ void setServerSocket(Socket*);
+ Socket* getServerSocket();
+
+ static void stopBlockingOperations(bool);
+ SocketHandle getHandle();
+ int setHandle(SocketHandle);
+ static MYSERVER_HOSTENT *gethostbyaddr(char* addr, int len, int type);
+ static MYSERVER_HOSTENT *gethostbyname(const char*);
+ static int gethostname(char*, int);
+ int socket(int, int, int);
+ int bind(MYSERVER_SOCKADDR*, int);
+ int listen(int);
+ Socket();
+ Socket(Socket*);
+ Socket(SocketHandle);
+ Socket accept(MYSERVER_SOCKADDR*, int*);
+ int setsockopt(int,int, const char*,int);
+
+ virtual int connect(MYSERVER_SOCKADDR*, int);
+ virtual int closesocket();
+ virtual int shutdown(int how);
+ virtual int recv(char*, int, int, u_long);
+ virtual int recv(char*, int, int);
+ virtual u_long bytesToRead();
+
+ int ioctlsocket(long, unsigned long*);
+ int send(const char*, int, int);
+ int connect(const char* host, u_short port);
+ int operator==(Socket);
+ int operator=(Socket);
+ int getsockname(MYSERVER_SOCKADDR*,int*);
+ int setNonBlocking(int);
+#ifdef __HURD__
+ virtual int dataOnRead(int sec = 1, int usec = 500);
+#else
+ virtual int dataOnRead(int sec = 0, int usec = 500);
+#endif
+ u_long getThrottling();
+ void setThrottling(u_long);
+ static int getLocalIPsList(string&);
+ /*! Inherithed from Stream. */
+ virtual int read(char* buffer, u_long len, u_long *nbr);
+ virtual int write(const char* buffer, u_long len, u_long *nbw);
+
+protected:
+ SocketHandle socketHandle;
+
+ /*! Pointer to the socket that has accepted this connection. */
+ Socket *serverSocket;
+
+ /*! Send throttling rate. */
+ u_long throttlingRate;
+
+ /*! Stop the sockets system. */
+ static bool denyBlockingOperations;
+
+ virtual int rawSend(const char* buffer, int len, int flags);
+};
+#endif
Property changes on: trunk/myserver/include/base/socket/socket.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/socket/ssl_socket.h (from rev 2773,
trunk/myserver/include/ssl_socket.h)
===================================================================
--- trunk/myserver/include/base/socket/ssl_socket.h
(rev 0)
+++ trunk/myserver/include/base/socket/ssl_socket.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,94 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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/>.
+*/
+
+#ifndef SSL_SOCKET_H
+#define SSL_SOCKET_H
+
+#include "stdafx.h"
+#include <include/base/socket/socket.h>
+#include <include/base/ssl/ssl.h>
+
+#include <string>
+using namespace std;
+
+#ifndef DO_NOT_USE_SSL
+#include<openssl/ssl.h>
+#include<openssl/crypto.h>
+#include<openssl/lhash.h>
+#include<openssl/err.h>
+#include<openssl/bn.h>
+#include<openssl/pem.h>
+#include<openssl/x509.h>
+#include<openssl/rand.h>
+#endif
+
+
+#ifdef NOT_WIN
+extern "C" {
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <unistd.h>
+}
+#endif
+
+class SslSocket : public Socket
+{
+public:
+
+ int setSSLContext(SSL_CTX*);
+ int sslAccept();
+
+#ifndef DO_NOT_USE_SSL
+ int freeSSL();
+ SSL* getSSLConnection();
+#endif
+
+ virtual int closesocket();
+ virtual int shutdown(int how);
+ virtual int connect(MYSERVER_SOCKADDR* sa, int na);
+ virtual int recv(char* buffer,int len,int flags);
+ virtual int rawSend(const char* buffer, int len, int flags);
+ virtual u_long bytesToRead();
+#ifdef __HURD__
+ virtual int dataOnRead(int sec = 1, int usec = 500);
+#else
+ virtual int dataOnRead(int sec = 0, int usec = 500);
+#endif
+
+
+ SslSocket(Socket*);
+ ~SslSocket();
+
+protected:
+ bool externalContext;
+ Socket* socket;
+#ifndef DO_NOT_USE_SSL
+ SSL *sslConnection;
+ SSL_CTX *sslContext;
+ X509 *clientCert;
+
+ /*! This is used only by clients sockets. */
+ SSL_METHOD* sslMethod;
+#endif
+};
+
+
+#endif
Property changes on: trunk/myserver/include/base/socket/ssl_socket.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/ssl/ssl.h (from rev 2773,
trunk/myserver/include/ssl.h)
===================================================================
--- trunk/myserver/include/base/ssl/ssl.h (rev 0)
+++ trunk/myserver/include/base/ssl/ssl.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,74 @@
+/*
+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 SSL_H
+#define SSL_H
+
+#include "stdafx.h"
+
+#ifdef DO_NOT_USE_SSL
+typedef int SSL_CTX;
+typedef int SSL_METHOD;
+#else
+#include <openssl/ssl.h>
+#include <openssl/rsa.h>
+#include <openssl/crypto.h>
+#include <openssl/lhash.h>
+#include <openssl/err.h>
+#include <openssl/bn.h>
+#include <openssl/pem.h>
+#include <openssl/x509.h>
+#include <openssl/rand.h>
+#endif
+
+#include <string>
+
+using namespace std;
+
+class SslContext
+{
+ SSL_CTX* context;
+ SSL_METHOD* method;
+
+ string certificateFile;
+ string privateKeyFile;
+ string password;
+public:
+ SslContext();
+
+ int initialize();
+ int free();
+
+ SSL_CTX* getContext(){return context;}
+ SSL_METHOD* getMethod(){return method;}
+
+ string& getCertificateFile(){return certificateFile;}
+ string& getPrivateKeyFile(){return privateKeyFile;}
+ string& getPassword(){return password;}
+
+ void setCertificateFile(string& c){certificateFile.assign(c);}
+ void setPrivateKeyFile(string& pk){privateKeyFile.assign(pk);}
+ void setPassword(string& p){password.assign(p);}
+
+private:
+ void generateRsaKey();
+};
+
+void initializeSSL();
+void cleanupSSL();
+
+#endif
Property changes on: trunk/myserver/include/base/ssl/ssl.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/string/securestr.h (from rev 2773,
trunk/myserver/include/securestr.h)
===================================================================
--- trunk/myserver/include/base/string/securestr.h
(rev 0)
+++ trunk/myserver/include/base/string/securestr.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,27 @@
+/*
+MyServer
+* strlcpy and strlcat by codingmaster
+Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+Copyright (C) 2004 by codingmaster
+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"
+#ifndef SECURESTR_H
+#define SECURESTR_H
+
+unsigned int myserver_strlcat(char *destination, const char *source, unsigned
int size);
+unsigned int myserver_strlcpy(char *destination, const char *source, unsigned
int size);
+#endif
+
+
Property changes on: trunk/myserver/include/base/string/securestr.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/string/stringutils.h (from rev 2773,
trunk/myserver/include/stringutils.h)
===================================================================
--- trunk/myserver/include/base/string/stringutils.h
(rev 0)
+++ trunk/myserver/include/base/string/stringutils.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,90 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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 STRINGUTILS_H
+#define STRINGUTILS_H
+
+#include "stdafx.h"
+#include <string>
+
+using namespace std;
+
+const char *getRFC822GMTTime(char* out,int len);
+const char *getRFC822GMTTime(const time_t,char* out,int len);
+const char *getRFC822LocalTime(char* out,int len);
+const char *getRFC822LocalTime(const time_t,char* out,int len);
+
+const char *getRFC822GMTTime(string& out,int len);
+const char *getRFC822GMTTime(const time_t, string& out, int len);
+const char *getRFC822LocalTime(string& out,int len);
+const char *getRFC822LocalTime(const time_t, string &out,int len);
+
+int getCharInString(const char*,const char*,int max);
+
+const char* getLocalLogFormatDate(const time_t t, char* out, int len);
+const char* getGMTLogFormatDate(const time_t t, char* out, int len);
+const char* getLocalLogFormatDate(char* out, int len);
+const char* getGMTLogFormatDate(char* out, int len);
+
+const char* getLocalLogFormatDate(const time_t t, string& out, int len);
+const char* getGMTLogFormatDate(const time_t t, string& out, int len);
+const char* getLocalLogFormatDate(string& out, int len);
+const char* getGMTLogFormatDate(string& out, int len);
+
+time_t getTime(const char* str);
+inline time_t getTime(string const& str){ return getTime(str.c_str()); }
+
+void StrTrim(char* str, char* trimChars);
+
+void gotoNextLine(char** cmd);
+
+int hexVal(char c);
+
+void translateEscapeString(char *TargetStr);
+void translateEscapeString(string& TargetStr);
+
+int hexToInt(const char *str);
+inline time_t hexToInt(string const& str){ return hexToInt(str.c_str()); }
+
+int getEndLine(const char* str, int max);
+inline int getEndLine(string const& str, int max)
+ {return getEndLine(str.c_str(), max); }
+
+string trim(string const& s, string const&t = " ");
+string trimLeft ( string const &s , string const &t = " " );
+string trimRight ( string const &s , string const &t = " " );
+
+int stringcmpi(string const &a, string const &b);
+int stringcmp(string const &a, string const &b);
+
+int stringcmpi(string const &a, const char* b);
+int stringcmp(string const &a, const char* b);
+
+#ifdef NOT_WIN
+extern "C" {
+char* strupr(char * string);
+
+#include <string.h>
+}
+#endif
+
+#ifndef strcmpi
+#define strcmpi strcasecmp
+#endif
+
+#endif
+
Property changes on: trunk/myserver/include/base/string/stringutils.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/sync/event.h (from rev 2773,
trunk/myserver/include/event.h)
===================================================================
--- trunk/myserver/include/base/sync/event.h (rev 0)
+++ trunk/myserver/include/base/sync/event.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,50 @@
+/*
+MyServer
+Copyright (C) 2006 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 EVENT_H
+#define EVENT_H
+
+#include "stdafx.h"
+#include <include/base/sync/mutex.h>
+
+#ifdef HAVE_PTHREAD
+ typedef pthread_cond_t EventHandle;
+#else
+ typedef HANDLE EventHandle;
+#endif
+
+class Event
+{
+private:
+ bool initialized;
+ bool broadcast;
+#ifdef HAVE_PTHREAD
+ /*!
+ *Under pthread a condition is associated with a mutex.
+ */
+ pthread_mutex_t mutex;
+#endif
+ EventHandle event;
+public:
+ Event(bool broadcast);
+ ~Event();
+ int init(bool broadcast);
+ int destroy();
+ int wait(u_long id = 0, u_long timeout = 0);
+ int signal(u_long id = 0);
+};
+#endif
Property changes on: trunk/myserver/include/base/sync/event.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/sync/mutex.h (from rev 2773,
trunk/myserver/include/mutex.h)
===================================================================
--- trunk/myserver/include/base/sync/mutex.h (rev 0)
+++ trunk/myserver/include/base/sync/mutex.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,47 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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 MUTEX_H
+#define MUTEX_H
+
+#include "stdafx.h"
+#include <include/base/file/file.h>
+#include <include/base/string/stringutils.h>
+
+#ifdef HAVE_PTHREAD
+ typedef pthread_mutex_t MutexHandle;
+#else
+ typedef HANDLE MutexHandle;
+#endif
+
+class Mutex
+{
+public:
+ Mutex();
+ virtual ~Mutex();
+ virtual int init();
+ int destroy();
+ int lock(u_long id = 0);
+ int unlock(u_long id = 0);
+ bool isLocked();
+ MutexHandle getHandle();
+protected:
+ bool locked;
+ int initialized;
+ MutexHandle mutex;
+};
+#endif
Property changes on: trunk/myserver/include/base/sync/mutex.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/sync/read_write_lock.h (from rev 2773,
trunk/myserver/include/read_write_lock.h)
===================================================================
--- trunk/myserver/include/base/sync/read_write_lock.h
(rev 0)
+++ trunk/myserver/include/base/sync/read_write_lock.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,38 @@
+/*
+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 READ_WRITE_LOCK_H
+#define READ_WRITE_LOCK_H
+
+#include "stdafx.h"
+#include <include/base/sync/semaphore.h>
+
+class ReadWriteLock
+{
+public:
+ ReadWriteLock(int maxReaders);
+ ~ReadWriteLock();
+ void readLock();
+ void readUnlock();
+
+ void writeLock();
+ void writeUnlock();
+private:
+ int maxReaders;
+ Semaphore semaphore;
+};
+#endif
Property changes on: trunk/myserver/include/base/sync/read_write_lock.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/sync/recursive_mutex.h (from rev 2773,
trunk/myserver/include/recursive_mutex.h)
===================================================================
--- trunk/myserver/include/base/sync/recursive_mutex.h
(rev 0)
+++ trunk/myserver/include/base/sync/recursive_mutex.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,32 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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 RECURSIVE_MUTEX_H
+#define RECURSIVE_MUTEX_H
+
+#include "stdafx.h"
+#include <include/base/sync/mutex.h>
+
+
+class RecursiveMutex : public Mutex
+{
+public:
+ RecursiveMutex();
+ virtual ~RecursiveMutex();
+ virtual int init();
+};
+#endif
Property changes on: trunk/myserver/include/base/sync/recursive_mutex.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/sync/semaphore.h (from rev 2773,
trunk/myserver/include/semaphore.h)
===================================================================
--- trunk/myserver/include/base/sync/semaphore.h
(rev 0)
+++ trunk/myserver/include/base/sync/semaphore.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,45 @@
+/*
+MyServer
+Copyright (C) 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/>.
+*/
+
+#ifndef SEMAPHORE_H
+#define SEMAPHORE_H
+
+#include "stdafx.h"
+
+#ifdef HAVE_PTHREAD
+#include <semaphore.h>
+typedef sem_t SemaphoreHandle;
+#else
+typedef HANDLE SemaphoreHandle;
+#endif
+
+class Semaphore
+{
+public:
+ Semaphore(int n);
+ ~Semaphore();
+ int init(int n);
+ int destroy();
+ int lock(u_long id = 0);
+ int unlock(u_long id = 0);
+ SemaphoreHandle *getHandle(){return &semaphore;}
+ int isInitialized(){return initialized;}
+private:
+ int initialized;
+ SemaphoreHandle semaphore;
+};
+#endif
Property changes on: trunk/myserver/include/base/sync/semaphore.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/base/thread/thread.h (from rev 2773,
trunk/myserver/include/thread.h)
===================================================================
--- trunk/myserver/include/base/thread/thread.h (rev 0)
+++ trunk/myserver/include/base/thread/thread.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,48 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 2006, 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 THREAD_H
+#define THREAD_H
+
+#include "stdafx.h"
+#include <include/base/file/file.h>
+#include <include/base/string/stringutils.h>
+
+#ifdef WIN32
+ typedef unsigned int ThreadID;
+#endif
+#ifdef HAVE_PTHREAD
+ typedef pthread_t ThreadID;
+#endif
+
+class Thread
+{
+public:
+ static void wait(u_long);
+ static ThreadID threadID();
+#ifdef WIN32
+ static int create(ThreadID* thread,
+ unsigned int (_stdcall *start_routine)(void *), void * arg);
+#endif
+#ifdef HAVE_PTHREAD
+ static int create(ThreadID* thread, void * (*start_routine)(void *),
+ void * arg);
+#endif
+ static void terminate();
+ static int join(ThreadID);
+};
+#endif
Property changes on: trunk/myserver/include/base/thread/thread.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/utility.h (from rev 2773,
trunk/myserver/include/utility.h)
===================================================================
--- trunk/myserver/include/base/utility.h (rev 0)
+++ trunk/myserver/include/base/utility.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,57 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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/>.
+*/
+
+#ifndef UTILITY_H
+#define UTILITY_H
+
+#include "stdafx.h"
+#include <include/base/file/file.h>
+#include <include/base/string/stringutils.h>
+#include <include/base/process/process.h>
+#include <include/base/thread/thread.h>
+#include <include/base/sync/mutex.h>
+#include <string.h>
+
+using namespace std;
+
+/*!
+*Macros to do simple transformations.
+*/
+#define MYSERVER_KB(x) (x << 10) //x * 1024
+#define MYSERVER_MB(x) (x << 20) //x * 1024 * 1024
+#define MYSERVER_SEC(x) (x * 1000)
+#define OS_WINDOWS_9X 1
+#define OS_WINDOWS_2000 2
+#define OS_WINDOWS_NT3 3
+#define OS_WINDOWS_XP 4
+#define OS_LINUX 100 // Add room for future windows
+
+int preparePrintError();
+int endPrintError();
+
+int getOSVersion();
+u_long getCPUCount();
+u_long getTicks();
+int setcwdBuffer();
+int getdefaultwdlen();
+char *getdefaultwd(char* dwd,int maxlen);
+int getdefaultwd(string&);
+int setcwd(const char * cwd);
+int freecwdBuffer();
+
+
+#endif
Property changes on: trunk/myserver/include/base/utility.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/base/xml/xml_parser.h (from rev 2773,
trunk/myserver/include/xml_parser.h)
===================================================================
--- trunk/myserver/include/base/xml/xml_parser.h
(rev 0)
+++ trunk/myserver/include/base/xml/xml_parser.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,110 @@
+/*
+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 CXMLPARSER_IN
+#define CXMLPARSER_IN
+
+#include "stdafx.h"
+#include <include/base/file/file.h>
+#include <include/base/mem_buff/mem_buff.h>
+extern "C"
+{
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+}
+#include <string>
+
+using namespace std;
+
+/*!
+ *Helper class to memorize a xpath result.
+ */
+class XmlXPathResult
+{
+public:
+ XmlXPathResult(xmlXPathObjectPtr obj){xpathObj = obj;}
+ ~XmlXPathResult(){if(xpathObj)xmlXPathFreeObject(xpathObj);}
+ xmlXPathObjectPtr getObject(){return xpathObj;}
+ xmlNodeSetPtr getNodeSet(){return (xpathObj ? xpathObj->nodesetval : NULL);}
+private:
+ xmlXPathObjectPtr xpathObj;
+};
+
+/*!
+ *This class is used to open a .xml file and read information from it.
+ */
+class XmlParser
+{
+public:
+ static bool startXML();
+ static bool cleanXML();
+ XmlParser();
+ ~XmlParser();
+ xmlDocPtr getDoc();
+ int open(const char* filename, bool useXpath = 0);
+ int open(string const &filename, bool useXpath = 0){return
open(filename.c_str(), useXpath);};
+ int openMemBuf(MemBuf &, bool useXpath = 0);
+
+ char *getValue(const char* field);
+ char *getValue(string const &field){return getValue(field.c_str());};
+ char *getAttr(const char* field, const char *attr);
+ int setValue(const char* field, const char *value);
+ int close();
+
+ int save(const char *filename,int *nbytes = 0);
+ int save(string const &filename,int *nbytes = 0){return
save(filename.c_str(), nbytes);};
+ int saveMemBuf(MemBuf &,int *nbytes = 0);
+
+ void newfile(const char * root);
+ void newfile(string const &root){newfile(root.c_str());};
+ void addChild(const char * name, const char * value);
+ void addChild(string const &name, string& value)
+ {addChild(name.c_str(), value.c_str());};
+ void addGroup(const char * name);
+ void addGroup(string const &name)
+ {addGroup(name.c_str());};
+ void endGroup();
+
+ void setAttr(const char * name, const char * value);
+
+ void setAttr(string& name, string& value)
+ {
+ setAttr(name.c_str(), value.c_str());
+ };
+
+ void addLineFeed();
+ time_t getLastModTime();
+
+ XmlXPathResult* evaluateXpath(string & path){return
evaluateXpath(path.c_str());}
+ XmlXPathResult* evaluateXpath(const char*);
+ bool isXpathEnabled(){return useXpath;}
+private:
+ xmlXPathContextPtr xpathCtx;
+ bool useXpath;
+ xmlDocPtr doc;
+ string buffer;
+ xmlNodePtr cur;
+ xmlNodePtr prevCur;
+ xmlNodePtr lastNode;
+ time_t mtime;
+
+};
+
+#endif
Property changes on: trunk/myserver/include/base/xml/xml_parser.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Deleted: trunk/myserver/include/cached_file.h
===================================================================
--- trunk/myserver/include/cached_file.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/cached_file.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,56 +0,0 @@
-/*
-MyServer
-Copyright (C) 2006 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 CACHED_FILE_H
-#define CACHED_FILE_H
-
-#include "../stdafx.h"
-#include "../include/stream.h"
-#include "../include/file.h"
-#include "../include/cached_file_buffer.h"
-#include <string>
-
-using namespace std;
-
-class CachedFile : public File
-{
-protected:
- u_long fseek;
- CachedFileBuffer* buffer;
-public:
- CachedFile(CachedFileBuffer* buffer);
- virtual FileHandle getHandle();
- virtual int setHandle(FileHandle);
- virtual int readFromFile(char* ,u_long ,u_long* );
- virtual int writeToFile(const char* ,u_long ,u_long* );
- virtual int createTemporaryFile(const char* );
-
- virtual int openFile(const char*, u_long );
- virtual int openFile(string const &file, u_long opt)
- {return openFile(file.c_str(), opt);}
-
- virtual u_long getFileSize();
- virtual int setFilePointer(u_long);
-
- virtual int operator =(CachedFile);
- virtual int closeFile();
-
- /*! Inherithed from Stream. */
- virtual int write(const char* buffer, u_long len, u_long *nbw);
-
-};
-#endif
Deleted: trunk/myserver/include/cached_file_buffer.h
===================================================================
--- trunk/myserver/include/cached_file_buffer.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/cached_file_buffer.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,52 +0,0 @@
-/*
-MyServer
-Copyright (C) 2006, 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 CACHED_FILE_BUFFER_H
-#define CACHED_FILE_BUFFER_H
-
-#include "../stdafx.h"
-#include "../include/stream.h"
-#include "../include/file.h"
-#include "../include/mutex.h"
-#include <string>
-
-using namespace std;
-
-class CachedFileFactory;
-
-class CachedFileBuffer
-{
-public:
- void addRef();
- void decRef();
- void setFactoryToNotify(CachedFileFactory *cff);
- u_long getReferenceCounter();
- u_long getFileSize(){return fileSize;}
- CachedFileBuffer(const char* filename);
- CachedFileBuffer(File* file);
- ~CachedFileBuffer();
- const char* getFilename(){return filename.c_str();}
- const char* getBuffer(){return buffer;}
-protected:
- Mutex mutex;
- char *buffer;
- u_long refCounter;
- u_long fileSize;
- CachedFileFactory *factoryToNotify;
- string filename;
-};
-#endif
Deleted: trunk/myserver/include/cached_file_factory.h
===================================================================
--- trunk/myserver/include/cached_file_factory.h 2008-08-30 13:31:10 UTC
(rev 2773)
+++ trunk/myserver/include/cached_file_factory.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -1,97 +0,0 @@
-/*
-MyServer
-Copyright (C) 2006, 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 CACHED_FILE_FACTORY_H
-#define CACHED_FILE_FACTORY_H
-
-#include "../stdafx.h"
-#include "../include/stream.h"
-#include "../include/hash_map.h"
-#include "../include/file.h"
-#include "../include/mutex.h"
-#include "../include/cached_file.h"
-#include "../include/cached_file_buffer.h"
-#include <string>
-#include <list>
-
-using namespace std;
-
-class CachedFileFactory
-{
-public:
- CachedFileFactory();
- ~CachedFileFactory();
- CachedFileFactory(u_long m);
- void initialize(u_long size);
- void clean();
- void setSize(u_long m){size = m;}
- File *open(const char* file);
- void nullReferences(CachedFileBuffer* cfb);
-
- void setMaxSize(u_long maxSize);
- void setMinSize(u_long minSize);
- u_long getMaxSize();
- u_long getMinSize();
-protected:
-
- u_long purgeRecords();
-
-
- Mutex mutex;
-
- /*! Max elements count for this cache. */
- u_long size;
-
- /*! Size currently used. */
- u_long usedSize;
-
- /*! Number of times the cache was used. */
- u_long used;
-
- /*! Cache creation time. */
- u_long created;
-
- /*! Max size for single file. */
- u_long maxSize;
-
- /*! Min size for single file. */
- u_long minSize;
-
- struct CachedFileFactoryRecord
- {
- CachedFileBuffer* buffer;
- /*! Number of times the cache record was used. */
- u_long used;
-
- /*! Cache record creation time. */
- u_long created;
-
- /*! Last mtime for this file. */
- time_t mtime;
-
- /*! Last time we checked for the mtime of the buffered file. */
- u_long lastModTimeCheck;
-
- /*! This entry is not valid and will be removed when refCount =
0. */
- bool invalidCache;
- };
-
- list<CachedFileFactoryRecord*> buffersToRemove;
- HashMap<char*, CachedFileFactoryRecord*> buffers;
-};
-
-#endif
Deleted: trunk/myserver/include/cgi.h
===================================================================
--- trunk/myserver/include/cgi.h 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/include/cgi.h 2008-08-31 23:22:09 UTC (rev 2774)
@@ -1,37 +0,0 @@
-/*
-MyServer
-Copyright (C) 2002, 2003, 2004, 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 CGI_H
-#define CGI_H
-
-#include "../include/http_response.h"
-#include "../include/http_request.h"
-#include "../include/http_headers.h"
-#include "../include/http_data_handler.h"
-
-class Cgi : public HttpDataHandler
-{
- static int cgiTimeout;
-public:
- static void setTimeout(int);
- static int getTimeout();
- virtual int send(HttpThreadContext*, ConnectionPtr s,
- const char* scriptpath, const char* exec = 0,
- int execute = 0, int onlyHeader = 0);
-};
-#endif
-
Deleted: trunk/myserver/include/clients_thread.h
===================================================================
--- trunk/myserver/include/clients_thread.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/clients_thread.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,110 +0,0 @@
-/*
-MyServer
-Copyright (C) 2002, 2003, 2004, 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/>.
-*/
-
-#ifndef CLIENTS_THREAD_H
-#define CLIENTS_THREAD_H
-#include "../stdafx.h"
-#include "../include/utility.h"
-#include "../include/connection.h"
-#include "../include/security.h"
-#include "../include/http.h"
-#include "../include/mem_buff.h"
-#include "../include/https.h"
-#include "../include/control_protocol.h"
-
-class Ftp;
-
-class ClientsThread
-{
- friend class Server;
-
-#ifdef WIN32
- friend unsigned int __stdcall clients_thread(void* pParam);
-#endif
-#ifdef HAVE_PTHREAD
- friend void* clients_thread(void* pParam);
-#endif
-public:
- enum RETURN_CODE
- {
- /*!
- *Delete the current connection from the connections pool.
- */
- DELETE_CONNECTION = 0,
- /*!
- *Keep the connection in the connections pool waiting for new
data.
- */
- KEEP_CONNECTION = 1,
- /*!
- *The request present in the connection buffer is not complete,
keep
- *data in the buffer and append to it.
- */
- INCOMPLETE_REQUEST = 2,
- /*!
- *The request present in the buffer is not complete, append to
the buffer
- *and check before new data is present.
- */
- INCOMPLETE_REQUEST_NO_WAIT = 3
- };
- MemBuf *getBuffer();
- MemBuf *getBuffer2();
- ClientsThread();
- ~ClientsThread();
- void stop();
- int getTimeout();
- void setTimeout(int);
- int isToDestroy();
- void setToDestroy(int);
- int isStatic();
- int isBusy();
- void setStatic(int);
- int run();
- ThreadID getThreadId(){return tid;}
- int join();
-private:
- ThreadID tid;
- int toDestroy;
- int timeout;
- int initialized;
- int staticThread;
- u_long id;
- int busy;
- int threadIsStopped;
- int threadIsRunning;
- u_long buffersize;
- u_long buffersize2;
- int isRunning();
- int isStopped();
- HttpProtocol* httpParser;
- HttpsProtocol* httpsParser;
- ControlProtocol *controlProtocolParser;
- Ftp *ftpParser;
- MemBuf buffer;
- MemBuf buffer2;
- int controlConnections();
- u_long nBytesToRead;
-};
-
-#ifdef WIN32
-unsigned int __stdcall clients_thread(void* pParam);
-#endif
-
-#ifdef HAVE_PTHREAD
-void* clients_thread(void* pParam);
-#endif
-
-#endif
Copied: trunk/myserver/include/conf/mime/mime_manager.h (from rev 2773,
trunk/myserver/include/mime_manager.h)
===================================================================
--- trunk/myserver/include/conf/mime/mime_manager.h
(rev 0)
+++ trunk/myserver/include/conf/mime/mime_manager.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,147 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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 MIME_MANAGER_H
+#define MIME_MANAGER_H
+
+#include <include/base/utility.h>
+#include <include/base/hash_map/hash_map.h>
+#include <include/protocol/http/http_header_checker.h>
+#include <include/base/sync/read_write_lock.h>
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+extern "C" {
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#ifdef WIN32
+#include <tchar.h>
+#include <io.h>
+#endif
+}
+
+#include <string>
+#include <map>
+#include <list>
+
+using namespace std;
+
+/*!
+*This enum describes all the way that a file is handled by the server.
+*/
+enum CGI_COMMANDS
+{
+ /*! Sends the file as it is; for example an HTML page. */
+ CGI_CMD_SEND,
+
+ /*! Run the cgi_manager program. */
+ CGI_CMD_RUNCGI,
+
+ /*! Run the ISAPI module. */
+ CGI_CMD_RUNISAPI,
+
+ /*! Run the file as a self ISAPI module. */
+ CGI_CMD_EXECUTEISAPI,
+
+ /*! Run the the file as a MSCGI script. */
+ CGI_CMD_RUNMSCGI,
+
+ /*! Handle the file as an executable. */
+ CGI_CMD_EXECUTE,
+
+ /*! Send the file included in the file. */
+ CGI_CMD_SENDLINK,
+
+ /*! Send the file as a WinCGI. */
+ CGI_CMD_EXECUTEWINCGI,
+
+ /*! Send the file using the specified FastCGI server. */
+ CGI_CMD_RUNFASTCGI,
+
+ /*! Send the file as a FastCGI. */
+ CGI_CMD_EXECUTEFASTCGI,
+
+ /*! Send the file using the specified SCGI server. */
+ CGI_CMD_RUNSCGI,
+
+ /*! Send the file as a SCGI. */
+ CGI_CMD_EXECUTESCGI,
+
+ /*! Use an external plugin to handle this MIME type. */
+ CGI_CMD_EXTERNAL
+};
+
+
+struct MimeRecord
+{
+ list<string> filters;
+ string extension;
+ string mimeType;
+ string cmdName;
+ int command;
+ string cgiManager;
+ unsigned int extensionHashCode;
+ HttpHeaderChecker headerChecker;
+ MimeRecord()
+ {headerChecker.clear(); filters.clear(); extension.assign("");
+ mimeType.assign(""); cgiManager.assign(""); cmdName.assign("");
+ command=extensionHashCode = 0;}
+ MimeRecord(MimeRecord&);
+ int addFilter(const char*, int acceptDuplicate = 1);
+ ~MimeRecord();
+ void clear();
+};
+
+class MimeManager
+{
+public:
+ MimeManager();
+ ~MimeManager();
+ u_long getNumMIMELoaded();
+
+ int loadXML(const char *filename);
+ int loadXML(string &filename)
+ {return loadXML(filename.c_str());}
+
+ int saveXML(const char *filename);
+ int saveXML(string &filename)
+ {return saveXML(filename.c_str());}
+
+ int getMIME(char* ext,char *dest,char **dest2);
+ int getMIME(int id,char* ext,char *dest,char **dest2);
+ int getMIME(string& ext,string& dest,string& dest2);
+ int getMIME(int id,string& ext,string& dest,string& dest2);
+ int isLoaded();
+ MimeRecord *getRecord(string const &ext);
+ void clean();
+protected:
+ const char *getFilename();
+ int addRecord(MimeRecord& record);
+ void removeAllRecords();
+ void removeRecord(const string& ext);
+private:
+ int loaded;
+ HashMap<string, MimeRecord*> *data;
+ u_long numMimeTypesLoaded;
+ string *filename;
+ ReadWriteLock rwLock;
+};
+
+#endif
Property changes on: trunk/myserver/include/conf/mime/mime_manager.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/conf/security/security.h (from rev 2773,
trunk/myserver/include/security.h)
===================================================================
--- trunk/myserver/include/conf/security/security.h
(rev 0)
+++ trunk/myserver/include/conf/security/security.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,120 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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 SECURITY_H
+#define SECURITY_H
+
+#include "stdafx.h"
+#include <include/connection/connection.h>
+#include <include/base/xml/xml_parser.h>
+#include <include/base/hash_map/hash_map.h>
+#include <include/protocol/http/http_headers.h>
+
+#ifndef DO_NOT_USE_SSL
+#include<openssl/ssl.h>
+#include<openssl/crypto.h>
+#include<openssl/lhash.h>
+#include<openssl/err.h>
+#include<openssl/bn.h>
+#include<openssl/pem.h>
+#include<openssl/x509.h>
+#include<openssl/rand.h>
+#include<openssl/pem.h>
+#include<openssl/err.h>
+#include<openssl/rsa.h>
+#endif
+
+#include <string>
+
+using namespace std;
+
+/*!
+ *Various permissions flags.
+ */
+
+/*! Current user can read the file. */
+const u_long MYSERVER_PERMISSION_READ = (1<<0);
+
+/*! Current user can write to the file. */
+const u_long MYSERVER_PERMISSION_WRITE = (1<<1);
+
+/*! Current user can execute the file. */
+const u_long MYSERVER_PERMISSION_EXECUTE = (1<<2);
+
+/*! Current user can remove the file. */
+const u_long MYSERVER_PERMISSION_DELETE = (1<<3);
+
+/*! Current user can browse the directory content. */
+const u_long MYSERVER_PERMISSION_BROWSE = (1<<4);
+
+struct SecurityToken
+{
+ /*! User to check for. */
+ const char* user;
+
+ /*! Password provided by the user. */
+ const char* password;
+
+ /*! Directory that the user is in. */
+ const char* directory;
+
+ /*! System directory for the host. */
+ const char* sysdirectory;
+
+ /*! File that the user tried to access. */
+ const char* filename;
+
+ /*!
+ *Password that the user should provide to have access.
+ *This is used in authorization schemes like the HTTP digest,
+ *where the password is not sent in clear on the network.
+ */
+ char *requiredPassword;
+
+ /*! Permission mask that the user will have providing [neededPassword]. */
+ int *providedMask;
+
+ struct HttpThreadContext* td;
+
+ /*! Authorization scheme to use. */
+ char* authType;
+
+ /*! Length for the [authType] allocated string. */
+ int authTypeLen;
+
+ /*! Throttling rate to use with specified user. */
+ int throttlingRate;
+
+ HashMap<string,string*> *otherValues;
+
+ SecurityToken();
+ void reset();
+};
+
+class SecurityManager
+{
+public:
+ SecurityManager();
+ ~SecurityManager();
+ int getErrorFileName(const char *sysDir, int error, string& out,
+ XmlParser* parser = 0);
+ int getPermissionMask(SecurityToken* st, XmlParser* parser = 0);
+private:
+ XmlParser* getParser(const char *sysDir);
+ bool checkActions(HttpThreadContext* td, xmlNode *root);
+};
+#endif
Property changes on: trunk/myserver/include/conf/security/security.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/conf/security/security_cache.h (from rev 2773,
trunk/myserver/include/security_cache.h)
===================================================================
--- trunk/myserver/include/conf/security/security_cache.h
(rev 0)
+++ trunk/myserver/include/conf/security/security_cache.h 2008-08-31
23:22:09 UTC (rev 2774)
@@ -0,0 +1,47 @@
+/*
+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/>.
+*/
+#ifndef SECURITY_CACHE_H
+#define SECURITY_CACHE_H
+#include <include/base/hash_map/hash_map.h>
+#include <include/conf/security/security.h>
+
+#include <string>
+
+using namespace std;
+
+class SecurityCache
+{
+public:
+ SecurityCache();
+ ~SecurityCache();
+ void free();
+ void setMaxNodes(int);
+ int getMaxNodes();
+ XmlParser* getParser(const char* dir, const char* sys, bool useXpath = true);
+ int getSecurityFile(const char* file, const char* sys, string& out);
+ int getPermissionMask(SecurityToken* st);
+ int getErrorFileName(const char *root, int error,
+ const char* sysdirectory, string& out);
+private:
+ /*! Object used to handle security on the server. */
+ SecurityManager sm;
+ /*! Store a list of opened files using a hash dictionary. */
+ HashMap<string, XmlParser*> dictionary;
+ int limit;
+};
+
+#endif
Property changes on: trunk/myserver/include/conf/security/security_cache.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/conf/vhost/vhost.h (from rev 2773,
trunk/myserver/include/vhost.h)
===================================================================
--- trunk/myserver/include/conf/vhost/vhost.h (rev 0)
+++ trunk/myserver/include/conf/vhost/vhost.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -0,0 +1,273 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 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/>.
+*/
+
+#ifndef VHOST_H
+#define VHOST_H
+
+#include "stdafx.h"
+#include <include/base/xml/xml_parser.h>
+#include <include/base/file/file.h>
+#include <include/base/utility.h>
+#include <include/base/regex/myserver_regex.h>
+#include <include/log/log_manager.h>
+#include <include/conf/mime/mime_manager.h>
+#include <include/base/thread/thread.h>
+#include <include/base/hash_map/hash_map.h>
+#include <include/base/sync/mutex.h>
+#include <include/base/ssl/ssl.h>
+#include <include/connections_scheduler/listen_threads.h>
+#include <string>
+#include <list>
+
+
+using namespace std;
+typedef int (*NULL_REFERENCECB)(class Vhost*);
+
+class VhostProtocolData
+{
+public:
+ VhostProtocolData(){}
+ virtual ~VhostProtocolData(){}
+};
+
+class Vhost
+{
+public:
+ friend class VhostManager;
+
+ struct StringRegex
+ {
+ string name;
+ Regex regex;
+ StringRegex() : regex()
+ {}
+ ~StringRegex()
+ {}
+ };
+
+ /*! Get the host name. */
+ const char* getName()
+ {return name.c_str();}
+
+ /*! Set the host name. */
+ void setName(const char* c)
+ {name.assign(c);}
+
+ /*! Get the accesses log file name. */
+ const char* getAccessesLogFileName()
+ {return accessesLogFileName.c_str();}
+
+ /*! Set the accesses log file name. */
+ void setAccessesLogFileName(const char* n)
+ {accessesLogFileName.assign(n);}
+
+ /*! Get the warnings log file name. */
+ const char* getWarningsLogFileName()
+ {return warningsLogFileName.c_str();}
+
+ /*! Set the warnings log file name. */
+ void setWarningsLogFileName(const char* n)
+ {warningsLogFileName.assign(n);}
+
+ /*! Get the system root. */
+ const string& getSystemRoot()
+ {return systemRoot;}
+
+ /*! Set the system root. */
+ void setSystemRoot(const char* n)
+ {systemRoot.assign(n);}
+
+ /*! Get the document root. */
+ const string& getDocumentRoot()
+ {return documentRoot;}
+
+ /*! Set the document root. */
+ void setDocumentRoot(const char* n)
+ {documentRoot.assign(n);}
+
+ /*! Get the access log file options. */
+ const char* getAccessLogOpt()
+ {return accessLogOpt.c_str();}
+
+ /*! Get the warnings log file options. */
+ const char* getWarningLogOpt()
+ {return warningLogOpt.c_str(); }
+
+ /*! Set the access log file options. */
+ void setAccessLogOpt(const char* c)
+ {accessLogOpt.assign(c);}
+
+ /*! Set the warnings log file options. */
+ void setWarningLogOpt(const char* c)
+ {warningLogOpt.assign(c); }
+
+ /*! Get a pointer to the vhost SSL context. */
+ SslContext *getVhostSSLContext()
+ {return &sslContext;}
+
+ /*! Initialize SSL things. */
+ int initializeSSL();
+
+ /*! Clear SSL things. */
+ int freeSSL();
+
+ /*! Clear the data dictionary. */
+ int freeHashedData();
+
+ /*! Generate the RSA key for the SSL context. */
+ void generateRsaKey();
+
+ SSL_CTX* getSSLContext();
+
+
+ /*! Get the list of hosts allowed.*/
+ list<StringRegex*>* getHostList()
+ {return &hostList;}
+
+ /*! List of IPs allowed by the vhost. */
+ list<StringRegex*>* getIpList()
+ {return &ipList;}
+
+ /*! Return the port used by the host. */
+ u_short getPort()
+ {return port;}
+
+ /*! Set the port used by the host. */
+ void setPort(u_short p)
+ {port = p;}
+
+ /*! Get the protocol name for the virtual host. */
+ const char* getProtocolName()
+ {return protocolName.c_str();}
+
+ /*! Set the protocol name for the virtual host. */
+ void setProtocolName(const char *name)
+ {protocolName.assign(name);}
+
+ /*! Get the throttling rate for the virtual host. */
+ u_long getThrottlingRate()
+ {return throttlingRate;}
+
+ /*! Set the throttling rate for the virtual host. */
+ void setThrottlingRate(u_long tr)
+ {throttlingRate = tr;}
+
+ Vhost();
+ ~Vhost();
+
+ const char* getHashedData(const char* name);
+ void addIP(const char *, int);
+ void addHost(const char *, int);
+ void removeIP(const char *);
+ void removeHost(const char *);
+ int areAllHostAllowed();
+ int areAllIPAllowed();
+ void addRef();
+ void removeRef();
+ int getRef();
+ void setRef(int);
+ void clearIPList();
+ void clearHostList();
+ int isHostAllowed(const char*);
+ int isIPAllowed(const char*);
+ void setMaxLogSize(int);
+ int getMaxLogSize();
+ int isMIME();
+ int getDefaultPriority(){return defaultPriority;}
+ void setDefaultPriority(int priority){defaultPriority = priority;}
+ void setNullRefCB(NULL_REFERENCECB);
+ NULL_REFERENCECB getNullRefCB();
+
+ MimeManager* getMIME();
+
+ int openLogFiles(u_long maxlogSize = 0);
+
+ LogManager* getWarningsLog();
+ LogManager* getAccessesLog();
+
+ u_long accessesLogRequestAccess(int id);
+ u_long warningsLogRequestAccess(int id);
+ u_long accessesLogTerminateAccess(int id);
+ u_long warningsLogTerminateAccess(int id);
+
+ int accessesLogWrite(const char*);
+ File* getAccessesLogFile();
+
+ int warningsLogWrite(const char*);
+ File* getWarningsLogFile();
+
+ /*! Get the protocol data. */
+ VhostProtocolData* getProtocolData(){return protocolData;}
+
+ /*! Set the protocol data. */
+ void setProtocolData(VhostProtocolData* data){protocolData = data;}
+private:
+ VhostProtocolData* protocolData;
+ HashMap<string, string*> hashedData;
+ NULL_REFERENCECB nullReferenceCb;
+ Mutex refMutex;
+ LogManager warningsLogFile;
+ LogManager accessesLogFile;
+
+ MimeManager mimeManager;
+
+ /*! The default priority for the connections scheduler. */
+ int defaultPriority;
+
+ /*! How many connections are using this virtual host? */
+ int refCount;
+
+ /*! SSL context. */
+ SslContext sslContext;
+
+ /*! List of hosts allowed by the vhost. */
+ list<StringRegex*> hostList;
+
+ /*! List of IPs allowed by the vhost. */
+ list<StringRegex*> ipList;
+
+ /*! TCP port used to listen on. */
+ u_short port;
+
+ /*! Throttling rate to use with the virtual host. */
+ u_long throttlingRate;
+
+ /*! Protocol used by the vhost. */
+ string protocolName;
+
+ /*! Additional data for log files. Defined in configuration files. */
+ string accessLogOpt;
+ string warningLogOpt;
+
+ /*! Path to the document root. */
+ string documentRoot;
+
+ /*! Path to the system root. */
+ string systemRoot;
+
+ /*! Path to the accesses log file. */
+ string accessesLogFileName;
+
+ /*! Path to the warnings log file. */
+ string warningsLogFileName;
+
+ /*! Description or name of the virtual host. */
+ string name;
+};
+
+
+#endif
Property changes on: trunk/myserver/include/conf/vhost/vhost.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/myserver/include/conf/vhost/vhost_manager.h (from rev 2773,
trunk/myserver/include/vhost_manager.h)
===================================================================
--- trunk/myserver/include/conf/vhost/vhost_manager.h
(rev 0)
+++ trunk/myserver/include/conf/vhost/vhost_manager.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,77 @@
+/*
+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 VHOST_MANAGER_H
+#define VHOST_MANAGER_H
+
+#include "stdafx.h"
+#include <include/conf/vhost/vhost.h>
+
+
+class VhostSource
+{
+public:
+ VhostSource();
+ ~VhostSource();
+ int load();
+ int save();
+ int free();
+ Vhost* getVHost(const char*, const char*, u_short);
+ Vhost* getVHostByNumber(int n);
+ int addVHost(Vhost*);
+private:
+ list<Vhost*> *hostList;
+};
+
+class VhostManager
+{
+public:
+ void setExternalSource(VhostSource* extSource);
+ VhostManager(ListenThreads* lt);
+ ~VhostManager();
+ int getHostsNumber();
+ Vhost* getVHostByNumber(int n);
+ void clean();
+ int removeVHost(int n);
+ int switchVhosts(int n1,int n2);
+ list<Vhost*>* getVHostList();
+
+ /*! Get a pointer to a vhost. */
+ Vhost* getVHost(const char*,const char*,u_short);
+
+ /*! Add an element to the vhost list. */
+ int addVHost(Vhost*);
+
+ /*! Load the virtual hosts list from a xml configuration file. */
+ int loadXMLConfigurationFile(const char *,int maxlogSize = 0);
+
+ /*! Save the virtual hosts list to a xml configuration file. */
+ int saveXMLConfigurationFile(const char *);
+
+ /*! Set the right owner for the log files. */
+ void changeFilesOwner();
+private:
+ ListenThreads* listenThreads;
+ Mutex mutex;
+ VhostSource* extSource;
+
+ /*! List of virtual hosts. */
+ list<Vhost*> hostList;
+};
+
+
+#endif
Property changes on: trunk/myserver/include/conf/vhost/vhost_manager.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/connection/connection.h (from rev 2773,
trunk/myserver/include/connection.h)
===================================================================
--- trunk/myserver/include/connection/connection.h
(rev 0)
+++ trunk/myserver/include/connection/connection.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -0,0 +1,179 @@
+/*
+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 CONNECTION_H
+#define CONNECTION_H
+
+extern "C"
+{
+#include <sys/time.h>
+#include <sys/types.h>
+}
+
+#include <include/base/socket/socket.h>
+#include <include/protocol/protocol_buffer.h>
+#include <include/base/utility.h>
+#include <include/base/mem_buff/mem_buff.h>
+
+class Vhost;
+class ClientsThread;
+
+#include <string>
+
+using namespace std;
+
+/*! Remove the connection due a high server load. */
+#define CONNECTION_REMOVE_OVERLOAD 1
+
+/*! Remove the connection if the administrator decided this. */
+#define CONNECTION_USER_KILL 2
+
+
+class Connection;
+
+typedef Connection* ConnectionPtr;
+
+typedef int (*continuationPROC)(ConnectionPtr a, char *b1, char *b2,
+ int bs1, int bs2, u_long nbtr, u_long id);
+
+
+class Connection
+{
+public:
+ int getPriority();
+ void setPriority(int);
+
+ u_long getID();
+ void setID(u_long);
+
+ void setScheduled(int);
+ int isScheduled();
+ int allowDelete(bool bWait = false);
+
+ u_short getPort();
+ void setPort(u_short);
+
+ u_short getLocalPort();
+ void setLocalPort(u_short);
+
+ const char* getLogin();
+ void setLogin(const char*);
+
+ const char* getPassword();
+ void setPassword(const char*);
+
+ void setnTries(char);
+ char getnTries();
+ void incnTries();
+
+ const char* getIpAddr();
+ void setIpAddr(const char*);
+
+ const char* getLocalIpAddr();
+ void setLocalIpAddr(const char*);
+
+ u_long getTimeout();
+ void setTimeout(u_long);
+
+ /*! Connection socket. */
+ Socket *socket;
+
+ /*! Pointer to an host structure. */
+ Vhost *host;
+
+ int getToRemove();
+ void setToRemove(int);
+
+ int isForceControl();
+ void setForceControl(int);
+
+ /*! This buffer must be used only by the ClientsTHREAD class. */
+ MemBuf connectionBuffer;
+
+ /*! Buffer for the connection struct. Used by protocols. */
+ ProtocolBuffer *protocolBuffer;
+
+ /*! Set the thread that is currently using the connection. */
+ void setActiveThread(ClientsThread* t){thread = t;}
+
+ /*! Get the thread that is using the connection. */
+ ClientsThread* getActiveThread(){return thread;}
+
+ Connection();
+ virtual ~Connection();
+
+ /*! Get the continuation function. */
+ continuationPROC getContinuation(){return continuation;}
+
+ /*! Set a new continuation function. */
+ void setContinuation(continuationPROC newContinuation){continuation =
newContinuation;}
+
+ /*! Check if the connection/connection.has a continuation. */
+ bool hasContinuation(){return continuation ? true : false;}
+protected:
+ ClientsThread *thread;
+
+ /*! Continuation function. */
+ continuationPROC continuation;
+
+ /*! Identifier for the connection. */
+ u_long ID;
+
+ /*! The server/server.has scheduled this connection. */
+ int scheduled;
+
+ /*! Remote port used. */
+ u_short port;
+
+ /*! Login name. */
+ string login;
+
+ /*! Password used to log in. */
+ string password;
+
+ /*! # of tries for an authorized login. */
+ char nTries;
+
+ /*! Remote IP address. */
+ string ipAddr;
+
+ /*! Local IP used to connect to. */
+ string localIpAddr;
+
+ /*! Local port used to connect to. */
+ u_short localPort;
+
+ /*! Current timeout for the connection. */
+ u_long timeout;
+
+ /*
+ *!If nonzero the server is saying to the protocol to remove the connection.
+ *Protocols can not consider this but is a good idea do it to avoid server
+ *overloads.
+ *Reasons to remove the connection are defined at the begin of this file.
+ */
+ int toRemove;
+
+ /*! Force the connection to be parsed. */
+ int forceControl;
+
+ /*! Connection priority, used by the scheduler. */
+ int priority;
+
+};
+
+#endif
Property changes on: trunk/myserver/include/connection/connection.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Deleted: trunk/myserver/include/connection.h
===================================================================
--- trunk/myserver/include/connection.h 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/include/connection.h 2008-08-31 23:22:09 UTC (rev 2774)
@@ -1,179 +0,0 @@
-/*
-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 CONNECTION_H
-#define CONNECTION_H
-
-extern "C"
-{
-#include <sys/time.h>
-#include <sys/types.h>
-}
-
-#include "../include/socket.h"
-#include "../include/protocol_buffer.h"
-#include "../include/utility.h"
-#include "../include/mem_buff.h"
-
-class Vhost;
-class ClientsThread;
-
-#include <string>
-
-using namespace std;
-
-/*! Remove the connection due a high server load. */
-#define CONNECTION_REMOVE_OVERLOAD 1
-
-/*! Remove the connection if the administrator decided this. */
-#define CONNECTION_USER_KILL 2
-
-
-class Connection;
-
-typedef Connection* ConnectionPtr;
-
-typedef int (*continuationPROC)(ConnectionPtr a, char *b1, char *b2,
- int bs1, int bs2, u_long nbtr, u_long id);
-
-
-class Connection
-{
-public:
- int getPriority();
- void setPriority(int);
-
- u_long getID();
- void setID(u_long);
-
- void setScheduled(int);
- int isScheduled();
- int allowDelete(bool bWait = false);
-
- u_short getPort();
- void setPort(u_short);
-
- u_short getLocalPort();
- void setLocalPort(u_short);
-
- const char* getLogin();
- void setLogin(const char*);
-
- const char* getPassword();
- void setPassword(const char*);
-
- void setnTries(char);
- char getnTries();
- void incnTries();
-
- const char* getIpAddr();
- void setIpAddr(const char*);
-
- const char* getLocalIpAddr();
- void setLocalIpAddr(const char*);
-
- u_long getTimeout();
- void setTimeout(u_long);
-
- /*! Connection socket. */
- Socket *socket;
-
- /*! Pointer to an host structure. */
- Vhost *host;
-
- int getToRemove();
- void setToRemove(int);
-
- int isForceControl();
- void setForceControl(int);
-
- /*! This buffer must be used only by the ClientsTHREAD class. */
- MemBuf connectionBuffer;
-
- /*! Buffer for the connection struct. Used by protocols. */
- ProtocolBuffer *protocolBuffer;
-
- /*! Set the thread that is currently using the connection. */
- void setActiveThread(ClientsThread* t){thread = t;}
-
- /*! Get the thread that is using the connection. */
- ClientsThread* getActiveThread(){return thread;}
-
- Connection();
- virtual ~Connection();
-
- /*! Get the continuation function. */
- continuationPROC getContinuation(){return continuation;}
-
- /*! Set a new continuation function. */
- void setContinuation(continuationPROC newContinuation){continuation =
newContinuation;}
-
- /*! Check if the connection has a continuation. */
- bool hasContinuation(){return continuation ? true : false;}
-protected:
- ClientsThread *thread;
-
- /*! Continuation function. */
- continuationPROC continuation;
-
- /*! Identifier for the connection. */
- u_long ID;
-
- /*! The server has scheduled this connection. */
- int scheduled;
-
- /*! Remote port used. */
- u_short port;
-
- /*! Login name. */
- string login;
-
- /*! Password used to log in. */
- string password;
-
- /*! # of tries for an authorized login. */
- char nTries;
-
- /*! Remote IP address. */
- string ipAddr;
-
- /*! Local IP used to connect to. */
- string localIpAddr;
-
- /*! Local port used to connect to. */
- u_short localPort;
-
- /*! Current timeout for the connection. */
- u_long timeout;
-
- /*
- *!If nonzero the server is saying to the protocol to remove the connection.
- *Protocols can not consider this but is a good idea do it to avoid server
- *overloads.
- *Reasons to remove the connection are defined at the begin of this file.
- */
- int toRemove;
-
- /*! Force the connection to be parsed. */
- int forceControl;
-
- /*! Connection priority, used by the scheduler. */
- int priority;
-
-};
-
-#endif
Copied: trunk/myserver/include/connections_scheduler/connections_scheduler.h
(from rev 2773, trunk/myserver/include/connections_scheduler.h)
===================================================================
--- trunk/myserver/include/connections_scheduler/connections_scheduler.h
(rev 0)
+++ trunk/myserver/include/connections_scheduler/connections_scheduler.h
2008-08-31 23:22:09 UTC (rev 2774)
@@ -0,0 +1,117 @@
+/*
+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 CONNECTIONS_SCHEDULER_H
+#define CONNECTIONS_SCHEDULER_H
+
+#include "stdafx.h"
+#include <include/base/socket/socket.h>
+#include <include/connection/connection.h>
+#include <include/base/sync/mutex.h>
+#include <include/base/sync/event.h>
+#include <include/base/sync/semaphore.h>
+#include <include/base/hash_map/hash_map.h>
+#include <include/base/thread/thread.h>
+
+#include <list>
+#include <queue>
+
+#include <event.h>
+
+using namespace std;
+
+#define PRIORITY_CLASSES 3
+
+class ConnectionsSchedulerVisitor
+{
+public:
+ virtual int visitConnection(ConnectionPtr conn, void* param) = 0;
+};
+
+class ConnectionsScheduler
+{
+public:
+ struct ListenerArg
+ {
+ Socket* serverSocket;
+ u_short port;
+ event ev;
+ bool *terminate;
+ Mutex* eventsMutex;
+ ConnectionsScheduler *scheduler;
+ void reset(Socket* sock, u_short p){serverSocket = sock; port = p;}
+ ListenerArg(Socket* sock, u_short p){reset(sock, p);}
+ ListenerArg(){reset(0, 0);}
+ ListenerArg(ListenerArg* l){serverSocket = l->serverSocket; port =
l->port;}
+ };
+
+ struct DispatcherArg
+ {
+ bool terminated;
+ bool terminate;
+ Mutex* mutex;
+ int fd[2];
+ event loopEvent;
+ };
+
+ ConnectionsScheduler();
+ ~ConnectionsScheduler();
+
+ void addNewReadyConnection(ConnectionPtr);
+ void addReadyConnection(ConnectionPtr);
+
+ void addNewWaitingConnection(ConnectionPtr);
+ void addWaitingConnection(ConnectionPtr);
+
+ ConnectionPtr getConnection();
+ void release();
+ void restart();
+ void initialize();
+ void listener(struct ListenerArg* );
+ void removeListener(struct ListenerArg*);
+ int getConnectionsNumber();
+ void removeConnection(ConnectionPtr connection);
+ void terminateConnections();
+ void getConnections(list<ConnectionPtr> &out);
+
+ int accept(ConnectionsSchedulerVisitor*, void*);
+
+ void registerConnectionID(ConnectionPtr);
+
+ u_long getNumTotalConnections();
+
+private:
+ void addWaitingConnectionImpl(ConnectionPtr, int lock);
+ void addReadyConnectionImpl(ConnectionPtr);
+ u_long nTotalConnections;
+ ThreadID dispatchedThreadId;
+ Semaphore *readySemaphore;
+ Mutex readyMutex;
+ Mutex connectionsMutex;
+ Mutex eventsMutex;
+ Mutex eventsSocketMutex;
+ queue<ConnectionPtr> *ready;
+ HashMap<SocketHandle, ConnectionPtr> connections;
+ list<ListenerArg*> listeners;
+ u_long currentPriority;
+ u_long currentPriorityDone;
+ DispatcherArg dispatcherArg;
+ bool releasing;
+};
+
+
+#endif
Property changes on:
trunk/myserver/include/connections_scheduler/connections_scheduler.h
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/myserver/include/connections_scheduler/listen_threads.h (from rev
2773, trunk/myserver/include/listen_threads.h)
===================================================================
--- trunk/myserver/include/connections_scheduler/listen_threads.h
(rev 0)
+++ trunk/myserver/include/connections_scheduler/listen_threads.h
2008-08-31 23:22:09 UTC (rev 2774)
@@ -0,0 +1,61 @@
+/*
+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 LISTEN_THREADS_H
+#define LISTEN_THREADS_H
+#include "stdafx.h"
+#include <include/base/xml/xml_parser.h>
+#include <include/base/sync/mutex.h>
+#include <include/base/hash_map/hash_map.h>
+#include <include/connections_scheduler/connections_scheduler.h>
+
+class ListenThreads
+{
+public:
+ void addListeningThread(u_short port);
+ int initialize(XmlParser* parser);
+ int terminate();
+ /*! Initialize the shutdown phase. */
+ void shutdown(){shutdownStatus = true;}
+ /*! Is it shutdown phase? */
+ bool isShutdown(){return shutdownStatus;}
+ void commitFastReboot();
+ void beginFastReboot();
+ void rollbackFastReboot();
+ ListenThreads();
+private:
+ struct SocketInformation
+ {
+ Socket *ipv4;
+ Socket *ipv6;
+ u_short port;
+ ConnectionsScheduler::ListenerArg laIpv4;
+ ConnectionsScheduler::ListenerArg laIpv6;
+ };
+
+ bool fastRebooting;
+ bool committingFastReboot;
+ list<u_short> frPortsToAdd;
+ list <SocketInformation*> frPortsToRemove;
+
+ bool shutdownStatus;
+ HashMap<u_short, SocketInformation*> usedPorts;
+ XmlParser *languageParser;
+ int createServerAndListener(u_short port);
+ void registerListener(SocketInformation*);
+};
+
+#endif
Property changes on:
trunk/myserver/include/connections_scheduler/listen_threads.h
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: trunk/myserver/include/connections_scheduler.h
===================================================================
--- trunk/myserver/include/connections_scheduler.h 2008-08-30 13:31:10 UTC
(rev 2773)
+++ trunk/myserver/include/connections_scheduler.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -1,117 +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/>.
-*/
-
-#ifndef CONNECTIONS_SCHEDULER_H
-#define CONNECTIONS_SCHEDULER_H
-
-#include "../stdafx.h"
-#include "../include/socket.h"
-#include "../include/connection.h"
-#include "../include/mutex.h"
-#include "../include/event.h"
-#include "../include/semaphore.h"
-#include "../include/hash_map.h"
-#include "../include/thread.h"
-
-#include <list>
-#include <queue>
-
-#include <event.h>
-
-using namespace std;
-
-#define PRIORITY_CLASSES 3
-
-class ConnectionsSchedulerVisitor
-{
-public:
- virtual int visitConnection(ConnectionPtr conn, void* param) = 0;
-};
-
-class ConnectionsScheduler
-{
-public:
- struct ListenerArg
- {
- Socket* serverSocket;
- u_short port;
- event ev;
- bool *terminate;
- Mutex* eventsMutex;
- ConnectionsScheduler *scheduler;
- void reset(Socket* sock, u_short p){serverSocket = sock; port = p;}
- ListenerArg(Socket* sock, u_short p){reset(sock, p);}
- ListenerArg(){reset(0, 0);}
- ListenerArg(ListenerArg* l){serverSocket = l->serverSocket; port =
l->port;}
- };
-
- struct DispatcherArg
- {
- bool terminated;
- bool terminate;
- Mutex* mutex;
- int fd[2];
- event loopEvent;
- };
-
- ConnectionsScheduler();
- ~ConnectionsScheduler();
-
- void addNewReadyConnection(ConnectionPtr);
- void addReadyConnection(ConnectionPtr);
-
- void addNewWaitingConnection(ConnectionPtr);
- void addWaitingConnection(ConnectionPtr);
-
- ConnectionPtr getConnection();
- void release();
- void restart();
- void initialize();
- void listener(struct ListenerArg* );
- void removeListener(struct ListenerArg*);
- int getConnectionsNumber();
- void removeConnection(ConnectionPtr connection);
- void terminateConnections();
- void getConnections(list<ConnectionPtr> &out);
-
- int accept(ConnectionsSchedulerVisitor*, void*);
-
- void registerConnectionID(ConnectionPtr);
-
- u_long getNumTotalConnections();
-
-private:
- void addWaitingConnectionImpl(ConnectionPtr, int lock);
- void addReadyConnectionImpl(ConnectionPtr);
- u_long nTotalConnections;
- ThreadID dispatchedThreadId;
- Semaphore *readySemaphore;
- Mutex readyMutex;
- Mutex connectionsMutex;
- Mutex eventsMutex;
- Mutex eventsSocketMutex;
- queue<ConnectionPtr> *ready;
- HashMap<SocketHandle, ConnectionPtr> connections;
- list<ListenerArg*> listeners;
- u_long currentPriority;
- u_long currentPriorityDone;
- DispatcherArg dispatcherArg;
- bool releasing;
-};
-
-
-#endif
Deleted: trunk/myserver/include/control_errors.h
===================================================================
--- trunk/myserver/include/control_errors.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/control_errors.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,55 +0,0 @@
-/*
-MyServer
-Copyright (C) 2004, 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 CONTROL_ERRORS_H
-#define CONTROL_ERRORS_H
-/*!
- *These are all the errors that the control server can return to a client.
- *Use these definitions instead of hardly-code the value.
- */
-
- /*! The request was accepted and served. */
-#define CONTROL_OK 100
-
- /*! A generic error was encountered. */
-#define CONTROL_ERROR 200
-
- /*! An internal server error happened. */
-#define CONTROL_INTERNAL 201
-
- /*! The Authorization was not accepted. */
-#define CONTROL_AUTH 202
-
- /*! A malformed request was sent. */
-#define CONTROL_MALFORMED 203
-
- /*! A bad command was specified. */
-#define CONTROL_CMD_NOT_FOUND 204
-
- /*! A bad length field was specified. */
-#define CONTROL_BAD_LEN 205
-
- /*! The server is too busy to handle the request. */
-#define CONTROL_SERVER_BUSY 206
-
- /*! The client uses a version of this protocol that we cannot understand. */
-#define CONTROL_BAD_VERSION 207
-
- /*! The requested file doesn't exist on the local FS. */
-#define CONTROL_FILE_NOT_FOUND 208
-
-#endif
Deleted: trunk/myserver/include/control_header.h
===================================================================
--- trunk/myserver/include/control_header.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/control_header.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,46 +0,0 @@
-/*
-MyServer
-Copyright (C) 2002, 2003, 2004 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 CONTROLHEADER_H
-#define CONTROLHEADER_H
-#include "../stdafx.h"
-#include "../include/protocol.h"
-
-class ControlHeader
-{
- char connection[32];
- char command[32];
- char cmdOptions[64];
- char authLogin[64];
- char authPassword[64];
- char version[12];
- int length;
-public:
- void reset();
- char *getOptions();
- char *getVersion();
- char *getConnection();
- int getLength();
- char *getAuthLogin();
- char *getAuthPassword();
- char *getCommand();
- ControlHeader();
- virtual ~ControlHeader();
- int parse_header(char *buffer, int bufferlen, int*);
-};
-
-#endif
Deleted: trunk/myserver/include/control_protocol.h
===================================================================
--- trunk/myserver/include/control_protocol.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/control_protocol.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,65 +0,0 @@
-/*
-MyServer
-Copyright (C) 2004, 2005, 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 CONTROL_PROTOCOL_H
-#define CONTROL_PROTOCOL_H
-#include "../stdafx.h"
-#include "../include/protocol.h"
-#include "../include/control_header.h"
-#include "../include/connections_scheduler.h"
-
-#include <string>
-
-using namespace std;
-
-class ControlProtocol : public Protocol, public ConnectionsSchedulerVisitor
-{
-public:
- virtual int visitConnection(ConnectionPtr, void*);
-
- int sendResponse(char*, int, ConnectionPtr, int, ControlHeader& header,
File* = 0);
- virtual int loadProtocol(XmlParser* languageParser);
- int controlConnection(ConnectionPtr a, char *b1, char *b2, int bs1,
- int bs2, u_long nbtr, u_long id);
- virtual char* registerName(char*,int len);
- ControlProtocol();
- virtual ~ControlProtocol();
-
-protected:
- static char adminLogin[64];
- static char adminPassword[64];
- static int controlEnabled;
-
- int checkAuth(ControlHeader&);
- int showConnections(ConnectionPtr,File* out, char *b1,int bs1,
ControlHeader&);
- int showDynamicProtocols(ConnectionPtr,File* out, char *b1,int bs1,
ControlHeader&);
- int showLanguageFiles(ConnectionPtr, File* out, char *b1,int bs1,
ControlHeader&);
- int killConnection(ConnectionPtr,u_long ID, File* out, char *b1,int bs1,
ControlHeader&);
- int getFile(ConnectionPtr, char*, File* in, File* out,
- char *b1,int bs1, ControlHeader&);
- int putFile(ConnectionPtr,char*, File* in, File* out,
- char *b1,int bs1, ControlHeader&);
- int getVersion(ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
- int addToErrorLog(ConnectionPtr con, const char *b1, int bs1,
ControlHeader&);
- int addToLog(int retCode, ConnectionPtr con, char *b1, int bs1,
ControlHeader&);
- int addToErrorLog(ConnectionPtr con, string& m, ControlHeader& header)
- {
- return addToErrorLog(con, m.c_str(), m.size(), header);
- }
-};
-
-#endif
Deleted: trunk/myserver/include/dyn_executor_manager.h
===================================================================
--- trunk/myserver/include/dyn_executor_manager.h 2008-08-30 13:31:10 UTC
(rev 2773)
+++ trunk/myserver/include/dyn_executor_manager.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -1,50 +0,0 @@
-/*
-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 DYN_EXECUTOR_MANAGER_H
-#define DYN_EXECUTOR_MANAGER_H
-
-#include "../stdafx.h"
-#include "../include/xml_parser.h"
-#include "../include/protocol.h"
-#include "../include/connection.h"
-#include "../include/dynamiclib.h"
-#include "../include/http_headers.h"
-#include "../include/hash_map.h"
-#include "../include/plugin.h"
-#include "../include/plugins_namespace_manager.h"
-#include <string>
-
-class DynamicExecutor;
-
-using namespace std;
-
-class DynExecutorManager : public PluginsNamespaceManager
-{
-public:
- DynExecutorManager();
- virtual ~DynExecutorManager();
- DynamicExecutor* getPlugin(string& name)
- {
- return
(DynamicExecutor*)PluginsNamespaceManager::getPlugin(name);
- }
-protected:
- virtual Plugin* createPluginObject();
-
-};
-
-#endif
Deleted: trunk/myserver/include/dyn_filter.h
===================================================================
--- trunk/myserver/include/dyn_filter.h 2008-08-30 13:31:10 UTC (rev 2773)
+++ trunk/myserver/include/dyn_filter.h 2008-08-31 23:22:09 UTC (rev 2774)
@@ -1,55 +0,0 @@
-/*
-MyServer
-Copyright (C) 2002, 2003, 2004 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 DYNAMIC_FILTER_H
-#define DYNAMIC_FILTER_H
-#include "../stdafx.h"
-#include "../include/stream.h"
-#include "../include/dynamiclib.h"
-#include "../include/xml_parser.h"
-#include "../include/filters_factory.h"
-#include "../include/hash_map.h"
-#include "../include/thread.h"
-#include "../include/mutex.h"
-#include "../include/plugin.h"
-#include "../include/dyn_filter_file.h"
-
-using namespace std;
-
-class DynamicFilter : public Filter
-{
-protected:
- DynamicFilterFile* file;
- u_long id;
-public:
- void setId(u_long);
- u_long getId();
- virtual int getHeader(char* buffer, u_long len, u_long* nbw);
- virtual int getFooter(char* buffer, u_long len, u_long* nbw);
- virtual int read(char* buffer, u_long len, u_long*);
- virtual int write(const char* buffer, u_long len, u_long*);
- virtual int flush(u_long*);
- virtual int modifyData();
- virtual const char* getName(char*, u_long);
- void setParent(Stream*);
- Stream* getParent();
- DynamicFilter(DynamicFilterFile*);
- DynamicFilter(DynamicFilterFile*,Stream*, u_long);
- ~DynamicFilter();
-};
-
-#endif
Deleted: trunk/myserver/include/dyn_filter_file.h
===================================================================
--- trunk/myserver/include/dyn_filter_file.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/dyn_filter_file.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,46 +0,0 @@
-/*
-MyServer
-Copyright (C) 2002, 2003, 2004, 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 DYNAMIC_FILTER_FILE_H
-#define DYNAMIC_FILTER_FILE_H
-
-#include "../stdafx.h"
-#include "../include/stream.h"
-#include "../include/dynamiclib.h"
-#include "../include/xml_parser.h"
-#include "../include/filters_factory.h"
-#include "../include/hash_map.h"
-#include "../include/thread.h"
-#include "../include/mutex.h"
-#include "../include/plugin.h"
-
-using namespace std;
-
-class DynamicFilterFile : public Plugin
-{
-public:
- DynamicFilterFile();
- ~DynamicFilterFile();
- int getHeader(u_long id, Stream* s, char* buffer, u_long len, u_long* nbw);
- int getFooter(u_long id, Stream* s, char* buffer, u_long len, u_long* nbw);
- int read(u_long id, Stream* s, char* buffer, u_long len, u_long*);
- int write(u_long id, Stream* s, const char* buffer, u_long len, u_long*);
- int flush(u_long id, Stream* s, u_long*);
- int modifyData(u_long id, Stream* s);
-};
-
-#endif
Deleted: trunk/myserver/include/dyn_filters_manager.h
===================================================================
--- trunk/myserver/include/dyn_filters_manager.h 2008-08-30 13:31:10 UTC
(rev 2773)
+++ trunk/myserver/include/dyn_filters_manager.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -1,56 +0,0 @@
-/*
-MyServer
-Copyright (C) 2002, 2003, 2004, 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 DYNAMIC_FILTERS_MANAGER_H
-#define DYNAMIC_FILTERS_MANAGER_H
-
-#include "../stdafx.h"
-#include "../include/stream.h"
-#include "../include/dynamiclib.h"
-#include "../include/xml_parser.h"
-#include "../include/filters_factory.h"
-#include "../include/hash_map.h"
-#include "../include/thread.h"
-#include "../include/mutex.h"
-#include "../include/plugin.h"
-#include "../include/dyn_filter_file.h"
-#include "../include/plugins_namespace_manager.h"
-
-using namespace std;
-
-class DynamicFiltersManager : public PluginsNamespaceManager,
- public FiltersFactory::FiltersSource
-{
-public:
- DynamicFiltersManager();
- ~DynamicFiltersManager();
- int registerFilters(FiltersFactory* ff);
- Filter* createFilter(const char* name);
- DynamicFilterFile* getPlugin(string& name)
- {
- return
(DynamicFilterFile*)PluginsNamespaceManager::getPlugin(name);
- }
-protected:
- int add(const char*, XmlParser*, Server*);
- void clear();
-private:
- u_long counter;
- Mutex counterMutex;
-
-};
-
-#endif
Deleted: trunk/myserver/include/dyn_http_command.h
===================================================================
--- trunk/myserver/include/dyn_http_command.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/dyn_http_command.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,48 +0,0 @@
-/*
-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/xml_parser.h"
-#include "../include/protocol.h"
-#include "../include/connection.h"
-#include "../include/dynamiclib.h"
-#include "../include/http_headers.h"
-#include "../include/hash_map.h"
-#include "../include/plugin.h"
-#include "../include/plugins_namespace_manager.h"
-#include <string>
-using namespace std;
-
-class DynamicHttpCommand : public Plugin
-{
-public:
- DynamicHttpCommand();
- virtual ~DynamicHttpCommand();
- int acceptData();
- virtual int send(HttpThreadContext* context, ConnectionPtr lpconnection,
-
string& Uri, int systemrequest = 0,
- int
OnlyHeader = 0, int yetmapped = 0);
-private:
- XmlParser *errorParser;
- string filename;
- DynamicLibrary hinstLib;
-};
-
-#endif
Deleted: trunk/myserver/include/dyn_http_command_manager.h
===================================================================
--- trunk/myserver/include/dyn_http_command_manager.h 2008-08-30 13:31:10 UTC
(rev 2773)
+++ trunk/myserver/include/dyn_http_command_manager.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -1,49 +0,0 @@
-/*
-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/xml_parser.h"
-#include "../include/protocol.h"
-#include "../include/connection.h"
-#include "../include/dynamiclib.h"
-#include "../include/http_headers.h"
-#include "../include/hash_map.h"
-#include "../include/plugin.h"
-#include "../include/plugins_namespace_manager.h"
-#include <string>
-
-class DynamicHttpCommand;
-
-using namespace std;
-
-class DynHttpCommandManager : public PluginsNamespaceManager
-{
-public:
- DynHttpCommandManager();
- virtual ~DynHttpCommandManager();
- DynamicHttpCommand* getPlugin(string& name)
- {
- return
(DynamicHttpCommand*)PluginsNamespaceManager::getPlugin(name);
- }
-protected:
- virtual Plugin* createPluginObject();
-};
-
-#endif
Deleted: trunk/myserver/include/dyn_http_manager.h
===================================================================
--- trunk/myserver/include/dyn_http_manager.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/dyn_http_manager.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,44 +0,0 @@
-/*
-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/xml_parser.h"
-#include "../include/protocol.h"
-#include "../include/connection.h"
-#include "../include/dynamiclib.h"
-#include "../include/http_headers.h"
-#include "../include/hash_map.h"
-#include "../include/plugin.h"
-#include "../include/plugins_namespace_manager.h"
-#include <string>
-using namespace std;
-
-
-class DynamicHttpManager : public Plugin
-{
-public:
- DynamicHttpManager();
- virtual ~DynamicHttpManager();
- virtual int send(HttpThreadContext*, ConnectionPtr s, const char
*filenamePath,
- const char* cgi, int onlyHeader = 0);
-
-};
-
-#endif
Deleted: trunk/myserver/include/dyn_http_manager_list.h
===================================================================
--- trunk/myserver/include/dyn_http_manager_list.h 2008-08-30 13:31:10 UTC
(rev 2773)
+++ trunk/myserver/include/dyn_http_manager_list.h 2008-08-31 23:22:09 UTC
(rev 2774)
@@ -1,49 +0,0 @@
-/*
-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/xml_parser.h"
-#include "../include/protocol.h"
-#include "../include/connection.h"
-#include "../include/dynamiclib.h"
-#include "../include/http_headers.h"
-#include "../include/hash_map.h"
-#include "../include/plugin.h"
-#include "../include/plugins_namespace_manager.h"
-#include <string>
-using namespace std;
-
-class DynamicHttpManager;
-
-class DynHttpManagerList : public PluginsNamespaceManager
-{
-public:
- DynamicHttpManager* getPlugin(string& name)
- {
- return
(DynamicHttpManager*)PluginsNamespaceManager::getPlugin(name);
- }
-
- DynHttpManagerList();
- ~DynHttpManagerList();
-protected:
- virtual Plugin* createPluginObject();
-};
-
-#endif
Deleted: trunk/myserver/include/dynamic_executor.h
===================================================================
--- trunk/myserver/include/dynamic_executor.h 2008-08-30 13:31:10 UTC (rev
2773)
+++ trunk/myserver/include/dynamic_executor.h 2008-08-31 23:22:09 UTC (rev
2774)
@@ -1,46 +0,0 @@
-/*
-MyServer
-Copyright (C) 2007 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
@@ Diff output truncated at 153600 characters. @@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [myserver-commit] [2774] Separed source code files in packages.,
Giuseppe Scrivano <=