![]() |
ServerHandler Class Reference#include <ServerHandler.h>
Collaboration diagram for ServerHandler: ![]()
Detailed DescriptionFile ......... ServerHandler.h Published .... 2004-07-13 Author ....... grymse@alhem.net
Definition at line 33 of file ServerHandler.h. Constructor & Destructor Documentation
File ......... ServerHandler.cpp Published .... 2004-07-13 Author ....... grymse@alhem.net Definition at line 30 of file ServerHandler.cpp. 00031 :SocketHandler() 00032 ,m_config(filename) 00033 ,m_db(GetString("database/host"),GetString("database/user"),GetString("database/password"),GetString("database/database")) 00034 ,m_mime(GetString("mime/filename")) 00035 { 00036 }
Member Function Documentation
Definition at line 44 of file ServerHandler.cpp. References Configuration::Find(), BaseXMLFile::GetProperty(), BaseXMLFile::GetRootElement(), m_config, and BaseXMLFile::SetCurrent(). Referenced by ServerSocket::Init(), and main(). 00045 { 00046 xmlNodePtr p = m_config.Find(m_config.GetRootElement(),path); 00047 if (p) 00048 { 00049 m_config.SetCurrent(p); 00050 std::string str = m_config.GetProperty("value"); 00051 return atoi(str.c_str()); 00052 } 00053 else 00054 { 00055 fprintf(stderr,"config path not found: %s\n",path.c_str()); 00056 } 00057 return 0; 00058 }
Definition at line 61 of file ServerHandler.cpp. References Configuration::Find(), BaseXMLFile::GetProperty(), BaseXMLFile::GetRootElement(), m_config, and BaseXMLFile::SetCurrent(). Referenced by main(), and Deliver::Run(). 00062 { 00063 xmlNodePtr p = m_config.Find(m_config.GetRootElement(),path); 00064 if (p) 00065 { 00066 m_config.SetCurrent(p); 00067 std::string str = m_config.GetProperty("value"); 00068 return str; 00069 } 00070 fprintf(stderr,"config path not found: %s\n",path.c_str()); 00071 return ""; 00072 }
Definition at line 75 of file ServerHandler.cpp. References Configuration::Find(), BaseXMLFile::GetProperty(), BaseXMLFile::GetRootElement(), m_config, and BaseXMLFile::SetCurrent(). Referenced by main(). 00076 { 00077 xmlNodePtr p = m_config.Find(m_config.GetRootElement(),path); 00078 std::string str; 00079 if (p) 00080 { 00081 m_config.SetCurrent(p); 00082 str = m_config.GetProperty("value"); 00083 if (str.size() && (str[0] == '1' || 00084 str[0] == 'y' || str[0] == 'Y' || 00085 str[0] == 't' || str[0] == 'T')) 00086 { 00087 return true; 00088 } 00089 return false; 00090 } 00091 fprintf(stderr,"config path not found: %s\n",path.c_str()); 00092 return false; 00093 }
Definition at line 96 of file ServerHandler.cpp. References Mime::GetMimeFromExtension(), and m_mime. Referenced by Deliver::Run(). 00097 { 00098 return m_mime.GetMimeFromExtension(ext); 00099 }
Definition at line 45 of file ServerHandler.h. References m_db. Referenced by Deliver::Run(). 00045 { return &m_db; }
Member Data Documentation
Definition at line 48 of file ServerHandler.h. Referenced by GetBoolean(), GetInt(), and GetString().
The documentation for this class was generated from the following files: |