Changeset 990:4b966a296599
- Timestamp:
- 08/05/08 07:02:45 (4 years ago)
- Branch:
- libdodo
- Location:
- trunk
- Files:
-
- 111 edited
-
include/libdodo/cgiBasicExchange.h (modified) (1 diff)
-
include/libdodo/cgiFastExchange.h (modified) (1 diff)
-
include/libdodo/cgiFastServer.h (modified) (3 diffs)
-
include/libdodo/cgiServer.h (modified) (12 diffs)
-
include/libdodo/dataFormatJsonNode.h (modified) (1 diff)
-
include/libdodo/dataFormatJsonNodeEx.h (modified) (1 diff)
-
include/libdodo/dataFormatJsonProcessorEx.h (modified) (1 diff)
-
include/libdodo/dataFormatXmlNode.h (modified) (1 diff)
-
include/libdodo/dataFormatXmlProcessor.h (modified) (9 diffs)
-
include/libdodo/dataFormatXmlProcessorEx.h (modified) (1 diff)
-
include/libdodo/dataShared.h (modified) (1 diff)
-
include/libdodo/dataTplProcessor.h (modified) (4 diffs)
-
include/libdodo/dataTplProcessorEx.h (modified) (1 diff)
-
include/libdodo/dbAccumulator.h (modified) (2 diffs)
-
include/libdodo/dbConnector.h (modified) (4 diffs)
-
include/libdodo/dbMysql.h (modified) (2 diffs)
-
include/libdodo/dbPostgresql.h (modified) (2 diffs)
-
include/libdodo/dbSqlConstructor.h (modified) (4 diffs)
-
include/libdodo/dbSqlConstructorEx.h (modified) (1 diff)
-
include/libdodo/dbSqlite.h (modified) (1 diff)
-
include/libdodo/exceptionBasic.h (modified) (10 diffs)
-
include/libdodo/graphicsImage.h (modified) (9 diffs)
-
include/libdodo/graphicsImageEx.h (modified) (1 diff)
-
include/libdodo/graphicsTransform.h (modified) (2 diffs)
-
include/libdodo/graphicsTransformEx.h (modified) (1 diff)
-
include/libdodo/ioChannel.h (modified) (3 diffs)
-
include/libdodo/ioEvent.h (modified) (2 diffs)
-
include/libdodo/ioFifo.h (modified) (5 diffs)
-
include/libdodo/ioFile.h (modified) (6 diffs)
-
include/libdodo/ioNetworkClient.h (modified) (3 diffs)
-
include/libdodo/ioNetworkConnection.h (modified) (5 diffs)
-
include/libdodo/ioNetworkExchange.h (modified) (3 diffs)
-
include/libdodo/ioNetworkHttp.h (modified) (9 diffs)
-
include/libdodo/ioNetworkServer.h (modified) (4 diffs)
-
include/libdodo/ioNetworkSslClient.h (modified) (1 diff)
-
include/libdodo/ioNetworkSslExchange.h (modified) (2 diffs)
-
include/libdodo/ioNetworkSslExchangeEx.h (modified) (1 diff)
-
include/libdodo/ioNetworkSslServer.h (modified) (1 diff)
-
include/libdodo/ioSsl.h (modified) (1 diff)
-
include/libdodo/ioStdio.h (modified) (2 diffs)
-
include/libdodo/pcProcessCollection.h (modified) (4 diffs)
-
include/libdodo/pcSyncDataCollection.h (modified) (1 diff)
-
include/libdodo/pcSyncProcessDataCollection.h (modified) (1 diff)
-
include/libdodo/pcSyncProcessDataCollectionEx.h (modified) (1 diff)
-
include/libdodo/pcSyncProcessDataSingle.h (modified) (1 diff)
-
include/libdodo/pcSyncProcessDataSingleEx.h (modified) (1 diff)
-
include/libdodo/pcSyncProcessSection.h (modified) (1 diff)
-
include/libdodo/pcSyncProcessStack.h (modified) (1 diff)
-
include/libdodo/pcSyncStack.h (modified) (2 diffs)
-
include/libdodo/pcSyncThreadDataCollection.h (modified) (1 diff)
-
include/libdodo/pcSyncThreadDataCollectionEx.h (modified) (1 diff)
-
include/libdodo/pcSyncThreadDataSingle.h (modified) (1 diff)
-
include/libdodo/pcSyncThreadDataSingleEx.h (modified) (1 diff)
-
include/libdodo/pcSyncThreadSection.h (modified) (1 diff)
-
include/libdodo/pcThreadCollection.h (modified) (3 diffs)
-
include/libdodo/rpcHttpClient.h (modified) (1 diff)
-
include/libdodo/rpcJsonClient.h (modified) (1 diff)
-
include/libdodo/rpcJsonServer.h (modified) (3 diffs)
-
include/libdodo/rpcMethod.h (modified) (2 diffs)
-
include/libdodo/rpcResponse.h (modified) (2 diffs)
-
include/libdodo/rpcServer.h (modified) (1 diff)
-
include/libdodo/rpcValue.h (modified) (2 diffs)
-
include/libdodo/rpcXmlClient.h (modified) (1 diff)
-
include/libdodo/rpcXmlMethod.h (modified) (1 diff)
-
include/libdodo/rpcXmlServer.h (modified) (3 diffs)
-
include/libdodo/rpcXmlValue.h (modified) (1 diff)
-
include/libdodo/toolsCode.h (modified) (2 diffs)
-
include/libdodo/toolsFilesystem.h (modified) (2 diffs)
-
include/libdodo/toolsLibrary.h (modified) (2 diffs)
-
include/libdodo/toolsLogger.h (modified) (3 diffs)
-
include/libdodo/toolsNetwork.h (modified) (3 diffs)
-
include/libdodo/toolsOs.h (modified) (7 diffs)
-
include/libdodo/toolsRegexp.h (modified) (2 diffs)
-
include/libdodo/toolsTime.h (modified) (1 diff)
-
include/libdodo/types.h (modified) (3 diffs)
-
include/libdodo/xexec.h (modified) (5 diffs)
-
src/cgiFastServer.cc (modified) (4 diffs)
-
src/cgiServer.cc (modified) (7 diffs)
-
src/dataFormatXmlProcessor.cc (modified) (3 diffs)
-
src/dataShared.cc (modified) (1 diff)
-
src/dataTplProcessor.cc (modified) (2 diffs)
-
src/dbAccumulator.cc (modified) (7 diffs)
-
src/dbConnector.cc (modified) (2 diffs)
-
src/dbMysql.cc (modified) (1 diff)
-
src/dbSqlConstructor.cc (modified) (3 diffs)
-
src/exceptionBasic.cc (modified) (9 diffs)
-
src/graphicsTransform.cc (modified) (1 diff)
-
src/ioChannel.cc (modified) (1 diff)
-
src/ioEvent.cc (modified) (4 diffs)
-
src/ioFifo.cc (modified) (13 diffs)
-
src/ioFile.cc (modified) (4 diffs)
-
src/ioNetworkConnection.cc (modified) (3 diffs)
-
src/ioNetworkExchange.cc (modified) (1 diff)
-
src/ioNetworkHttp.cc (modified) (10 diffs)
-
src/ioNetworkSslClient.cc (modified) (1 diff)
-
src/ioNetworkSslServer.cc (modified) (1 diff)
-
src/pcSyncProcessDataCollection.cc (modified) (1 diff)
-
src/pcSyncProcessDataSingle.cc (modified) (1 diff)
-
src/pcSyncProcessSection.cc (modified) (1 diff)
-
src/pcSyncThreadDataCollection.cc (modified) (1 diff)
-
src/rpcJsonClient.cc (modified) (2 diffs)
-
src/rpcJsonMethod.cc (modified) (4 diffs)
-
src/rpcJsonResponse.cc (modified) (4 diffs)
-
src/rpcJsonServer.cc (modified) (3 diffs)
-
src/rpcJsonValue.cc (modified) (5 diffs)
-
src/rpcXmlClient.cc (modified) (2 diffs)
-
src/rpcXmlMethod.cc (modified) (1 diff)
-
src/rpcXmlServer.cc (modified) (2 diffs)
-
src/toolsCode.cc (modified) (5 diffs)
-
src/toolsLogger.cc (modified) (2 diffs)
-
src/toolsMisc.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/libdodo/cgiBasicExchange.h
r975 r990 46 46 * @class exchange provides interface to CGI I/O functionality 47 47 */ 48 class exchange : virtual public cgi::exchange, 48 class exchange : virtual public cgi::exchange, 49 49 virtual public io::stdio 50 50 { -
trunk/include/libdodo/cgiFastExchange.h
r984 r990 127 127 private: 128 128 129 FCGX_Request *request; ///< fast CGI descriptor129 FCGX_Request *request; ///< fast CGI descriptor 130 130 }; 131 131 }; -
trunk/include/libdodo/cgiFastServer.h
r979 r990 111 111 * if limit is 0 `listen` never returns 112 112 */ 113 virtual void listen(unsigned long limit =0);113 virtual void listen(unsigned long limit = 0); 114 114 115 115 /** … … 122 122 #ifdef PTHREAD_EXT 123 123 124 bool threading; ///< true use threading124 bool threading; ///< true use threading 125 125 126 unsigned int threadsNum; ///< amount of threads126 unsigned int threadsNum; ///< amount of threads 127 127 128 128 /** … … 132 132 static void *stackThread(void *data); 133 133 134 static pthread_mutex_t acceptM; ///< accept request mutex135 static pthread_mutex_t requestsM; ///< request conter mutex134 static pthread_mutex_t acceptM; ///< accept request mutex 135 static pthread_mutex_t requestsM; ///< request conter mutex 136 136 137 137 #endif 138 138 139 static serverHandler handler; ///< function to be called on new request139 static serverHandler handler; ///< function to be called on new request 140 140 141 static unsigned long limit; ///< limit of requests to serve; if 0 server forever[0 by default]142 static unsigned long requests; ///< counter of requests141 static unsigned long limit; ///< limit of requests to serve; if 0 server forever[0 by default] 142 static unsigned long requests; ///< counter of requests 143 143 }; 144 144 }; -
trunk/include/libdodo/cgiServer.h
r987 r990 68 68 SERVER_ENVIRONMENT_CONTENTLENGTH, 69 69 SERVER_ENVIRONMENT_CONTENTTRANSFERENCODING, 70 SERVER_ENVIRONMENT_HTTPAUTHORIZATION, ///< authentication credentials for HTTP authentication70 SERVER_ENVIRONMENT_HTTPAUTHORIZATION, ///< authentication credentials for HTTP authentication 71 71 SERVER_ENVIRONMENT_HTTPHOST, 72 SERVER_ENVIRONMENT_HTTPUSERAGENT, ///< the user agent string of the user agent73 SERVER_ENVIRONMENT_HTTPCOOKIE, ///< the user agent string of the user agent74 SERVER_ENVIRONMENT_HTTPIFMODIFIEDSINCE, ///< allows a 304 Not Modified to be returned75 SERVER_ENVIRONMENT_HTTPDATE, ///< the date and time that the message was sent76 SERVER_ENVIRONMENT_HTTPACCEPT, ///< content-types that are acceptable by server77 SERVER_ENVIRONMENT_HTTPACCEPTLANGUAGE, ///< acceptable languages for response78 SERVER_ENVIRONMENT_HTTPACCEPTENCODING, ///< acceptable encodings79 SERVER_ENVIRONMENT_HTTPACCEPTCHARSET, ///< character sets that are acceptable80 SERVER_ENVIRONMENT_HTTPACCEPTRANGES, ///< character sets that are acceptable72 SERVER_ENVIRONMENT_HTTPUSERAGENT, ///< the user agent string of the user agent 73 SERVER_ENVIRONMENT_HTTPCOOKIE, ///< the user agent string of the user agent 74 SERVER_ENVIRONMENT_HTTPIFMODIFIEDSINCE, ///< allows a 304 Not Modified to be returned 75 SERVER_ENVIRONMENT_HTTPDATE, ///< the date and time that the message was sent 76 SERVER_ENVIRONMENT_HTTPACCEPT, ///< content-types that are acceptable by server 77 SERVER_ENVIRONMENT_HTTPACCEPTLANGUAGE, ///< acceptable languages for response 78 SERVER_ENVIRONMENT_HTTPACCEPTENCODING, ///< acceptable encodings 79 SERVER_ENVIRONMENT_HTTPACCEPTCHARSET, ///< character sets that are acceptable 80 SERVER_ENVIRONMENT_HTTPACCEPTRANGES, ///< character sets that are acceptable 81 81 SERVER_ENVIRONMENT_HTTPKEEPALIVE, 82 SERVER_ENVIRONMENT_HTTPCONNECTION, ///< what type of connection the user-agent would prefer82 SERVER_ENVIRONMENT_HTTPCONNECTION, ///< what type of connection the user-agent would prefer 83 83 SERVER_ENVIRONMENT_HTTPREFERER, 84 84 SERVER_ENVIRONMENT_HTTPVIA, … … 109 109 enum serverResponseHeaderEnum 110 110 { 111 SERVER_RESPONSEHEADER_ACCEPTRANGES, ///< what partial content range types this server supports112 SERVER_RESPONSEHEADER_AGE, ///< the age the object has been in a proxy cache in seconds113 SERVER_RESPONSEHEADER_ALLOW, ///< valid actions for a specified resource. To be used for a 405 Method not allowed114 SERVER_RESPONSEHEADER_CACHECONTROL, ///< tells all caching mechanisms from server to server whether they may cache this object115 SERVER_RESPONSEHEADER_CONTENTENCODING, ///< the type of encoding used on the data116 SERVER_RESPONSEHEADER_CONTENTLANGUAGE, ///< the language the content is in117 SERVER_RESPONSEHEADER_CONTENTLENGTH, ///< the length of the content in bytes118 SERVER_RESPONSEHEADER_CONTENTLOCATION, ///< an alternate location for the returned data119 SERVER_RESPONSEHEADER_CONTENTDISPOSITION, ///< an opportunity to raise a "File Download" dialog box for a known MIME type120 SERVER_RESPONSEHEADER_CONTENTMD5, ///< an MD5 sum of the content of the response121 SERVER_RESPONSEHEADER_CONTENTRANGE, ///< where in a full body message this partial message belongs122 SERVER_RESPONSEHEADER_CONTENTTYPE, ///< the mime type of this content123 SERVER_RESPONSEHEADER_DATE, ///< the date and time that the message was sent124 SERVER_RESPONSEHEADER_LASTMODIFIED, ///< the last modified date for the requested object125 SERVER_RESPONSEHEADER_LOCATION, ///< used in redirection126 SERVER_RESPONSEHEADER_SERVER, ///< a name for the server127 SERVER_RESPONSEHEADER_WWWAUTHENTICATE, ///< auuthentification request128 SERVER_RESPONSEHEADER_XPOWEREDBY, ///< cgi provider111 SERVER_RESPONSEHEADER_ACCEPTRANGES, ///< what partial content range types this server supports 112 SERVER_RESPONSEHEADER_AGE, ///< the age the object has been in a proxy cache in seconds 113 SERVER_RESPONSEHEADER_ALLOW, ///< valid actions for a specified resource. To be used for a 405 Method not allowed 114 SERVER_RESPONSEHEADER_CACHECONTROL, ///< tells all caching mechanisms from server to server whether they may cache this object 115 SERVER_RESPONSEHEADER_CONTENTENCODING, ///< the type of encoding used on the data 116 SERVER_RESPONSEHEADER_CONTENTLANGUAGE, ///< the language the content is in 117 SERVER_RESPONSEHEADER_CONTENTLENGTH, ///< the length of the content in bytes 118 SERVER_RESPONSEHEADER_CONTENTLOCATION, ///< an alternate location for the returned data 119 SERVER_RESPONSEHEADER_CONTENTDISPOSITION, ///< an opportunity to raise a "File Download" dialog box for a known MIME type 120 SERVER_RESPONSEHEADER_CONTENTMD5, ///< an MD5 sum of the content of the response 121 SERVER_RESPONSEHEADER_CONTENTRANGE, ///< where in a full body message this partial message belongs 122 SERVER_RESPONSEHEADER_CONTENTTYPE, ///< the mime type of this content 123 SERVER_RESPONSEHEADER_DATE, ///< the date and time that the message was sent 124 SERVER_RESPONSEHEADER_LASTMODIFIED, ///< the last modified date for the requested object 125 SERVER_RESPONSEHEADER_LOCATION, ///< used in redirection 126 SERVER_RESPONSEHEADER_SERVER, ///< a name for the server 127 SERVER_RESPONSEHEADER_WWWAUTHENTICATE, ///< auuthentification request 128 SERVER_RESPONSEHEADER_XPOWEREDBY, ///< cgi provider 129 129 }; 130 130 … … 136 136 enum serverStatusCodeEnum 137 137 { 138 SERVER_STATUSCODE_CONTINUE, ///< 100139 SERVER_STATUSCODE_SWITCHINGPROTOCOLS, ///< 101140 SERVER_STATUSCODE_OK, ///< 200141 SERVER_STATUSCODE_CREATED, ///< 201142 SERVER_STATUSCODE_ACCEPTED, ///< 202143 SERVER_STATUSCODE_NONAUTHORITATIVE, ///< 203144 SERVER_STATUSCODE_NOCONTENT, ///< 204145 SERVER_STATUSCODE_RESETCONTENT, ///< 205146 SERVER_STATUSCODE_PARTIALCONTENT, ///< 206147 SERVER_STATUSCODE_MULTIPLECHOISES, ///< 300148 SERVER_STATUSCODE_MOVEDPERMANENTLY, ///< 301149 SERVER_STATUSCODE_FOUND, ///< 302150 SERVER_STATUSCODE_SEEOTHER, ///< 303151 SERVER_STATUSCODE_NOTMODIFIED, ///< 304152 SERVER_STATUSCODE_USEPROXY, ///< 305153 SERVER_STATUSCODE_TEMPORARYREDIRECT, ///< 307154 SERVER_STATUSCODE_BADREQUEST, ///< 400155 SERVER_STATUSCODE_UNAUTHORIZED, ///< 401156 SERVER_STATUSCODE_PAYMENTREQUIRED, ///< 402157 SERVER_STATUSCODE_FORBIDDEN, ///< 403158 SERVER_STATUSCODE_NOTFOUND, ///< 404159 SERVER_STATUSCODE_METHODNOTALLOWED, ///< 405160 SERVER_STATUSCODE_NOTACCEPTABLE, ///< 406161 SERVER_STATUSCODE_PROXYauthenticationREQUIRED, ///< 407162 SERVER_STATUSCODE_REQUESTTIMEOUT, ///< 408163 SERVER_STATUSCODE_CONFLICT, ///< 409164 SERVER_STATUSCODE_GONE, ///< 410165 SERVER_STATUSCODE_LENGTHREQUIRED, ///< 411166 SERVER_STATUSCODE_PRECONDITIONFAILED, ///< 412167 SERVER_STATUSCODE_REQUESTENTITYTOOLARGE, ///< 413168 SERVER_STATUSCODE_REQUESTURITOOLONG, ///< 414169 SERVER_STATUSCODE_UNSUPPORTEDMEDIATYPE, ///< 415170 SERVER_STATUSCODE_REQUESTRANGENOTSATISFIABLE, ///< 416171 SERVER_STATUSCODE_EXPECTATIONFAILED, ///< 417172 SERVER_STATUSCODE_INTERNALSERVERERROR, ///< 500173 SERVER_STATUSCODE_NOTIMPLEMENTED, ///< 501174 SERVER_STATUSCODE_BADGATEWAY, ///< 502175 SERVER_STATUSCODE_SERVICEUNAVAILABLE, ///< 503176 SERVER_STATUSCODE_GATEWAYTIMEOUT, ///< 504177 SERVER_STATUSCODE_HTTPVERSIONNOTSUPPORTED, ///< 505138 SERVER_STATUSCODE_CONTINUE, ///< 100 139 SERVER_STATUSCODE_SWITCHINGPROTOCOLS, ///< 101 140 SERVER_STATUSCODE_OK, ///< 200 141 SERVER_STATUSCODE_CREATED, ///< 201 142 SERVER_STATUSCODE_ACCEPTED, ///< 202 143 SERVER_STATUSCODE_NONAUTHORITATIVE, ///< 203 144 SERVER_STATUSCODE_NOCONTENT, ///< 204 145 SERVER_STATUSCODE_RESETCONTENT, ///< 205 146 SERVER_STATUSCODE_PARTIALCONTENT, ///< 206 147 SERVER_STATUSCODE_MULTIPLECHOISES, ///< 300 148 SERVER_STATUSCODE_MOVEDPERMANENTLY, ///< 301 149 SERVER_STATUSCODE_FOUND, ///< 302 150 SERVER_STATUSCODE_SEEOTHER, ///< 303 151 SERVER_STATUSCODE_NOTMODIFIED, ///< 304 152 SERVER_STATUSCODE_USEPROXY, ///< 305 153 SERVER_STATUSCODE_TEMPORARYREDIRECT, ///< 307 154 SERVER_STATUSCODE_BADREQUEST, ///< 400 155 SERVER_STATUSCODE_UNAUTHORIZED, ///< 401 156 SERVER_STATUSCODE_PAYMENTREQUIRED, ///< 402 157 SERVER_STATUSCODE_FORBIDDEN, ///< 403 158 SERVER_STATUSCODE_NOTFOUND, ///< 404 159 SERVER_STATUSCODE_METHODNOTALLOWED, ///< 405 160 SERVER_STATUSCODE_NOTACCEPTABLE, ///< 406 161 SERVER_STATUSCODE_PROXYauthenticationREQUIRED, ///< 407 162 SERVER_STATUSCODE_REQUESTTIMEOUT, ///< 408 163 SERVER_STATUSCODE_CONFLICT, ///< 409 164 SERVER_STATUSCODE_GONE, ///< 410 165 SERVER_STATUSCODE_LENGTHREQUIRED, ///< 411 166 SERVER_STATUSCODE_PRECONDITIONFAILED, ///< 412 167 SERVER_STATUSCODE_REQUESTENTITYTOOLARGE, ///< 413 168 SERVER_STATUSCODE_REQUESTURITOOLONG, ///< 414 169 SERVER_STATUSCODE_UNSUPPORTEDMEDIATYPE, ///< 415 170 SERVER_STATUSCODE_REQUESTRANGENOTSATISFIABLE, ///< 416 171 SERVER_STATUSCODE_EXPECTATIONFAILED, ///< 417 172 SERVER_STATUSCODE_INTERNALSERVERERROR, ///< 500 173 SERVER_STATUSCODE_NOTIMPLEMENTED, ///< 501 174 SERVER_STATUSCODE_BADGATEWAY, ///< 502 175 SERVER_STATUSCODE_SERVICEUNAVAILABLE, ///< 503 176 SERVER_STATUSCODE_GATEWAYTIMEOUT, ///< 504 177 SERVER_STATUSCODE_HTTPVERSIONNOTSUPPORTED, ///< 505 178 178 }; 179 179 … … 183 183 enum serverPostFileErrEnum 184 184 { 185 SERVER_POSTFILEERR_NONE, ///< everything is OK186 SERVER_POSTFILEERR_ACCESS_DENY, ///< permissions error187 SERVER_POSTFILEERR_BAD_FILE_NAME, ///< filename is too long188 SERVER_POSTFILEERR_NO_SPACE, ///< not enough space to save the file189 SERVER_POSTFILEERR_NO_FILE, ///< file with such name not found185 SERVER_POSTFILEERR_NONE, ///< everything is OK 186 SERVER_POSTFILEERR_ACCESS_DENY, ///< permissions error 187 SERVER_POSTFILEERR_BAD_FILE_NAME, ///< filename is too long 188 SERVER_POSTFILEERR_NO_SPACE, ///< not enough space to save the file 189 SERVER_POSTFILEERR_NO_FILE, ///< file with such name not found 190 190 }; 191 191 … … 200 200 __serverFile(); 201 201 202 dodoString name; ///< real name of the file203 dodoString mime; ///< mimetype of the file204 dodoString tmp_name; ///< path where it was temporary saved[empty, if file is stored in the memory]205 unsigned long size; ///< size of the file206 short error; ///< error code[see serverPostFileErrEnum]207 dodoString data; ///< contains file data[if file is stored in the memory]202 dodoString name; ///< real name of the file 203 dodoString mime; ///< mimetype of the file 204 dodoString tmp_name; ///< path where it was temporary saved[empty, if file is stored in the memory] 205 unsigned long size; ///< size of the file 206 short error; ///< error code[see serverPostFileErrEnum] 207 dodoString data; ///< contains file data[if file is stored in the memory] 208 208 }; 209 209 … … 229 229 __serverCookie(const dodoString &name, const dodoString &value, const dodoString &exDate, const dodoString &path, const dodoString &domain, bool secure); 230 230 231 dodoString name; ///< name of the cookie232 dodoString value; ///< value of the cookie233 234 dodoString expires; ///< expiration date235 dodoString path; ///< cookie path236 dodoString domain; ///< cookie domain237 bool secure; ///< defines cookie security; false by default231 dodoString name; ///< name of the cookie 232 dodoString value; ///< value of the cookie 233 234 dodoString expires; ///< expiration date 235 dodoString path; ///< cookie path 236 dodoString domain; ///< cookie domain 237 bool secure; ///< defines cookie security; false by default 238 238 }; 239 239 … … 245 245 SERVER_REQUESTMETHOD_GET, 246 246 SERVER_REQUESTMETHOD_POST, 247 SERVER_REQUESTMETHOD_GET_POST ///< if POST method and request Url also contains ?name=value&.... format data247 SERVER_REQUESTMETHOD_GET_POST ///< if POST method and request Url also contains ?name=value&.... format data 248 248 }; 249 249 … … 263 263 struct __serverAuthInfo 264 264 { 265 dodoString user; ///< user name266 short type; ///< authenfication type[see cgiAuthTypeEnum]265 dodoString user; ///< user name 266 short type; ///< authenfication type[see cgiAuthTypeEnum] 267 267 }; 268 268 … … 371 371 * specific variables (from POST, GET, ENV or COOKIE) 372 372 */ 373 dodoStringMap POST; ///< POST variables374 dodoStringMap GET; ///< GET variables375 mutable dodoMap<short, dodoString> ENVIRONMENT; ///< environment variables[see cgiEnvironmentEnum]376 dodoStringMap COOKIES; ///< cookies sent by browser377 dodoMap<dodoString, __serverFile, dodoMapStringCompare> FILES; ///< POST files378 dodoMap<short, dodoString> HEADERS; ///< headers that will be printed with printHeaders method373 dodoStringMap POST; ///< POST variables 374 dodoStringMap GET; ///< GET variables 375 mutable dodoMap<short, dodoString> ENVIRONMENT; ///< environment variables[see cgiEnvironmentEnum] 376 dodoStringMap COOKIES; ///< cookies sent by browser 377 dodoMap<dodoString, __serverFile, dodoMapStringCompare> FILES; ///< POST files 378 dodoMap<short, dodoString> HEADERS; ///< headers that will be printed with printHeaders method 379 379 380 380 /** … … 479 479 private: 480 480 481 short returnCode; ///< HTTP return code482 dodoString returnMessage; ///< HTTP return message483 484 bool postFilesInMem; ///< place of POST files485 486 bool autocleanFiles; ///< defines whether to clean POST files in destructor487 488 dodoString postFilesTmpDir; ///< directory for POST files if on they are saved on the disk489 490 dodoList<__serverCookie> cookies; ///< cookies491 int method; ///< request method492 493 dodoString content; ///< contents of the stdin for the POST request494 495 dodoStringArray contenTypeExtensions; ///< contains contentype extension[boundary, modification-date, etc]481 short returnCode; ///< HTTP return code 482 dodoString returnMessage; ///< HTTP return message 483 484 bool postFilesInMem; ///< place of POST files 485 486 bool autocleanFiles; ///< defines whether to clean POST files in destructor 487 488 dodoString postFilesTmpDir; ///< directory for POST files if on they are saved on the disk 489 490 dodoList<__serverCookie> cookies; ///< cookies 491 int method; ///< request method 492 493 dodoString content; ///< contents of the stdin for the POST request 494 495 dodoStringArray contenTypeExtensions; ///< contains contentype extension[boundary, modification-date, etc] 496 496 497 497 /** … … 507 507 static dodoString trim(const dodoString &data); 508 508 509 exchange &cgiIO; ///< SERVER I/O instance510 511 mutable bool headersPrinted; ///< true if headers have been printed512 513 static const char *environmentStatements[SERVER_ENVIRONMENTSTATEMENTS]; ///< names of environment variables[see cgiEnvironmentEnum]514 static const dodoString responseHeaderStatements[SERVER_RESPONSEHEADERSTATEMENTS]; ///< HTTP response headers[see cgiResponseHeaderEnum]515 static const dodoString responseStatusStatements[SERVER_STATUSSTATEMENTS]; ///< HTTP response headers[see cgiStatusCodeEnum]509 exchange &cgiIO; ///< SERVER I/O instance 510 511 mutable bool headersPrinted; ///< true if headers have been printed 512 513 static const char *environmentStatements[SERVER_ENVIRONMENTSTATEMENTS]; ///< names of environment variables[see cgiEnvironmentEnum] 514 static const dodoString responseHeaderStatements[SERVER_RESPONSEHEADERSTATEMENTS]; ///< HTTP response headers[see cgiResponseHeaderEnum] 515 static const dodoString responseStatusStatements[SERVER_STATUSSTATEMENTS]; ///< HTTP response headers[see cgiStatusCodeEnum] 516 516 517 517 /** … … 520 520 struct __internalAuthInfo 521 521 { 522 dodoString user; ///< user name523 dodoString password; ///< user password524 dodoString realm; ///< explanation of the authentication request525 dodoString nonce; ///< server-specified uniquely generated data526 dodoString opaque; ///< server-specified uniquely generated data, which should be returned by the server unchanged527 dodoString cnonce; ///< server-specified uniquely generated data528 dodoString nonceCount; ///< hexadecimal count of the number of requests (including the current request) that the server has sent with the nonce value in this request529 dodoString uri; ///< URI from Request-URI530 dodoString qop; ///< quality of protection531 dodoString response; ///< 32 hex digits. which proves that the user knows a password532 short type; ///< authenfication type[see cgiAuthTypeEnum]522 dodoString user; ///< user name 523 dodoString password; ///< user password 524 dodoString realm; ///< explanation of the authentication request 525 dodoString nonce; ///< server-specified uniquely generated data 526 dodoString opaque; ///< server-specified uniquely generated data, which should be returned by the server unchanged 527 dodoString cnonce; ///< server-specified uniquely generated data 528 dodoString nonceCount; ///< hexadecimal count of the number of requests (including the current request) that the server has sent with the nonce value in this request 529 dodoString uri; ///< URI from Request-URI 530 dodoString qop; ///< quality of protection 531 dodoString response; ///< 32 hex digits. which proves that the user knows a password 532 short type; ///< authenfication type[see cgiAuthTypeEnum] 533 533 }; 534 534 535 __internalAuthInfo authInfo; ///< authentication information535 __internalAuthInfo authInfo; ///< authentication information 536 536 }; 537 537 }; -
trunk/include/libdodo/dataFormatJsonNode.h
r985 r990 230 230 private: 231 231 232 dodoString stringValue; ///< string value of node233 dodoMap<dodoString, node, dodoMapStringCompare> objectValue; ///< object value of node234 dodoArray<node> arrayValue; ///< array value of node235 bool booleanValue; ///< boolean value of node236 long numericValue; ///< numeric value of node237 238 short valueDataType; ///< data type of value232 dodoString stringValue; ///< string value of node 233 dodoMap<dodoString, node, dodoMapStringCompare> objectValue; ///< object value of node 234 dodoArray<node> arrayValue; ///< array value of node 235 bool booleanValue; ///< boolean value of node 236 long numericValue; ///< numeric value of node 237 238 short valueDataType; ///< data type of value 239 239 }; 240 240 }; -
trunk/include/libdodo/dataFormatJsonNodeEx.h
r985 r990 56 56 * explanations for libdodo defined errors 57 57 */ 58 #define DATAFORMATJSONNODEEX_WRONGTYPEREQUESTED_STR "Wrong type was requested. Use proper get* method."59 #define DATAFORMATJSONNODEEX_ARRAYOUTOFRANGE_STR "Array key is out of range."60 #define DATAFORMATJSONNODEEX_MALFORMEDJSON_STR "Malformed json object."58 #define DATAFORMATJSONNODEEX_WRONGTYPEREQUESTED_STR "Wrong type was requested. Use proper get* method." 59 #define DATAFORMATJSONNODEEX_ARRAYOUTOFRANGE_STR "Array key is out of range." 60 #define DATAFORMATJSONNODEEX_MALFORMEDJSON_STR "Malformed json object." 61 61 62 62 /** -
trunk/include/libdodo/dataFormatJsonProcessorEx.h
r985 r990 56 56 * explanations for libdodo defined errors 57 57 */ 58 #define DATAFORMATJSONPROCESSOREX_MALFORMEDJSONNUMERIC_STR "Malformed json object: numeric."59 #define DATAFORMATJSONPROCESSOREX_MALFORMEDJSONNULL_STR "Malformed json object: null."60 #define DATAFORMATJSONPROCESSOREX_MALFORMEDJSONBOOLEAN_STR "Malformed json object: boolean."58 #define DATAFORMATJSONPROCESSOREX_MALFORMEDJSONNUMERIC_STR "Malformed json object: numeric." 59 #define DATAFORMATJSONPROCESSOREX_MALFORMEDJSONNULL_STR "Malformed json object: null." 60 #define DATAFORMATJSONPROCESSOREX_MALFORMEDJSONBOOLEAN_STR "Malformed json object: boolean." 61 61 62 62 /** -
trunk/include/libdodo/dataFormatXmlNode.h
r985 r990 56 56 node(); 57 57 58 dodoString name; ///< name of the node [[tag]]58 dodoString name; ///< name of the node [[tag]] 59 59 60 dodoMap<dodoString, dodoArray<node>, dodoMapStringCompare> children; ///< children60 dodoMap<dodoString, dodoArray<node>, dodoMapStringCompare> children; ///< children 61 61 62 dodoStringMap attributes; ///< attributes62 dodoStringMap attributes; ///< attributes 63 63 64 dodoString value; ///< value of the node64 dodoString value; ///< value of the node 65 65 66 dodoString ns; ///< namespace of the node67 dodoString nsHref; ///< uri "value"68 dodoString nsDef; ///< namespace69 dodoString nsDefHref; ///< namespace URI66 dodoString ns; ///< namespace of the node 67 dodoString nsHref; ///< uri "value" 68 dodoString nsDef; ///< namespace 69 dodoString nsDefHref; ///< namespace URI 70 70 71 bool CDATA; ///< true if CDATA72 bool empty; ///< true if node doesn't have contents : `<node />`71 bool CDATA; ///< true if CDATA 72 bool empty; ///< true if node doesn't have contents : `<node />` 73 73 }; 74 74 }; -
trunk/include/libdodo/dataFormatXmlProcessor.h
r985 r990 62 62 __nodeDef(); 63 63 64 dodoString name; ///< name of the node [[tag]]; if empty - for first - gets root, for children - all[but if children do not have in definition own children]65 66 dodoMap<dodoString, __nodeDef> children; ///< children definitions67 68 long chLimit; ///< limit of children to search for[-1 for unlimit, default]69 bool ignoreChildrenDef; ///< if true - parse all children tree if no children definition is given; false by default70 71 dodoStringArray attributes; ///< node attrributes; if empty - take all72 bool ignoreAttributesDef; ///< if true - parse all attributes if no attributes definition is given; true by default73 74 dodoString ns; ///< node namespace; if empty parser skips namespace specification64 dodoString name; ///< name of the node [[tag]]; if empty - for first - gets root, for children - all[but if children do not have in definition own children] 65 66 dodoMap<dodoString, __nodeDef> children; ///< children definitions 67 68 long chLimit; ///< limit of children to search for[-1 for unlimit, default] 69 bool ignoreChildrenDef; ///< if true - parse all children tree if no children definition is given; false by default 70 71 dodoStringArray attributes; ///< node attrributes; if empty - take all 72 bool ignoreAttributesDef; ///< if true - parse all attributes if no attributes definition is given; true by default 73 74 dodoString ns; ///< node namespace; if empty parser skips namespace specification 75 75 }; 76 76 … … 91 91 __info(const dodoString &version, const dodoString &encoding, const dodoString &root, int compression); 92 92 93 dodoString version; ///< version of XML document94 dodoString encoding; ///< encoding of XML document95 dodoString root; ///< name of the root element of XML document96 97 int compression; ///< compression of XML document93 dodoString version; ///< version of XML document 94 dodoString encoding; ///< encoding of XML document 95 dodoString root; ///< name of the root element of XML document 96 97 int compression; ///< compression of XML document 98 98 }; 99 99 … … 153 153 virtual node processBuffer(const dodoString &buffer); 154 154 155 bool icaseNames; ///< if true ignore case of names[false by default]155 bool icaseNames; ///< if true ignore case of names[false by default] 156 156 157 157 /** … … 207 207 virtual node parse(const __nodeDef &definition); 208 208 209 #ifdef LIBXML2_EXT209 #ifdef LIBXML2_EXT 210 210 211 211 /** … … 253 253 virtual void getNodeInfo(const xmlNodePtr xnode, node &sample); 254 254 255 #endif255 #endif 256 256 257 257 private: 258 258 259 #ifdef LIBXML2_EXT259 #ifdef LIBXML2_EXT 260 260 261 261 /** … … 266 266 typedef int (*xcharCmp)(const xmlChar *one, const xmlChar *two); 267 267 268 xcharCmp cmpFunc; ///< name compare function268 xcharCmp cmpFunc; ///< name compare function 269 269 270 270 /** … … 275 275 xmlNodePtr findNode(const __nodeDef &definition, xmlNodePtr node); 276 276 277 xmlDocPtr document; ///< XML Document278 xmlAttr *attribute; ///< XML attributes277 xmlDocPtr document; ///< XML Document 278 xmlAttr *attribute; ///< XML attributes 279 279 280 280 /** … … 285 285 static void errHandler(void *data, xmlErrorPtr error); 286 286 287 #endif288 289 #define PROCESSOR_STATEMENTS 11287 #endif 288 289 #define PROCESSOR_STATEMENTS 11 290 290 291 291 /** … … 308 308 }; 309 309 310 static const dodoString statements[PROCESSOR_STATEMENTS]; ///< processor statements310 static const dodoString statements[PROCESSOR_STATEMENTS]; ///< processor statements 311 311 }; 312 312 }; -
trunk/include/libdodo/dataFormatXmlProcessorEx.h
r985 r990 55 55 * explanations for libdodo defined errors 56 56 */ 57 #define DATAFORMATXMLPROCESSOREX_EMPTYDOCUMENT_STR "File or buffer doesn't contain XML document."58 #define DATAFORMATXMLPROCESSOREX_NOROOTNODE_STR "XML document doesn't have root node."57 #define DATAFORMATXMLPROCESSOREX_EMPTYDOCUMENT_STR "File or buffer doesn't contain XML document." 58 #define DATAFORMATXMLPROCESSOREX_NOROOTNODE_STR "XML document doesn't have root node." 59 59 60 60 /** -
trunk/include/libdodo/dataShared.h
r978 r990 98 98 protected: 99 99 100 int shm; ///< shared data descriptor101 void *mshared; ///< shared data102 unsigned long size; ///< size of shared data100 int shm; ///< shared data descriptor 101 void *mshared; ///< shared data 102 unsigned long size; ///< size of shared data 103 103 104 char *key; ///< key for the shared data104 char *key; ///< key for the shared data 105 105 }; 106 106 }; -
trunk/include/libdodo/dataTplProcessor.h
r986 r990 46 46 { 47 47 /** 48 * @class cgiProcessor parses template48 * @class processor parses template 49 49 * @note brief reference on usage: 50 50 * syntax: … … 263 263 virtual void clear(); 264 264 265 dodoString tplBasePath; ///< base path for templates[if empty - full/relative path must be defined in preProcess/include]265 dodoString tplBasePath; ///< base path for templates[if empty - full/relative path must be defined in preProcess/include] 266 266 267 267 protected: … … 413 413 virtual dodoArray<unsigned long> detectNewLines(const dodoString &buffer); 414 414 415 dodoArray< dodoArray<unsigned long> > newLinePositions; ///< stack of positions of new lines of templates416 417 dodoStringList processed; ///< files that will be skipped due to the recursion418 419 dodoStringMap global; ///< set of global variables[user-set]420 dodoMap<dodoString, dodoStringArray> globalArray; ///< global user-defined variables(arrays)421 dodoMap<dodoString, dodoStringMap> globalHash; ///< global user-defined variables(hashes)422 dodoMap<dodoString, dodoArray<dodoStringMap> > globalArrayHash; ///< global user-defined variables(array of hashes)423 424 dodoMap<unsigned int, dodoStringMap> local; ///< local variables[occur in `for` block]425 dodoMap<unsigned int, dodoMap<dodoString, dodoStringMap> > localHash; ///< local variables(hashes)[occur in `for` block]426 427 dodoStringMap dodo; ///< auxillary variables[dodo defined][for dodo.*]428 429 bool continueFlag; ///< indicates `continue` state430 431 unsigned int breakDeepness; ///< deepness of the break432 unsigned int loopDeepness; ///< deepness of the loop433 434 unsigned long iterator; ///< amount of iterations of the loop435 436 unsigned int namespaceDeepness; ///< cgi object through what output will be performed437 438 #define PROCESSOR_STATEMENTS 30415 dodoArray< dodoArray<unsigned long> > newLinePositions; ///< stack of positions of new lines of templates 416 417 dodoStringList processed; ///< files that will be skipped due to the recursion 418 419 dodoStringMap global; ///< set of global variables[user-set] 420 dodoMap<dodoString, dodoStringArray> globalArray; ///< global user-defined variables(arrays) 421 dodoMap<dodoString, dodoStringMap> globalHash; ///< global user-defined variables(hashes) 422 dodoMap<dodoString, dodoArray<dodoStringMap> > globalArrayHash; ///< global user-defined variables(array of hashes) 423 424 dodoMap<unsigned int, dodoStringMap> local; ///< local variables[occur in `for` block] 425 dodoMap<unsigned int, dodoMap<dodoString, dodoStringMap> > localHash; ///< local variables(hashes)[occur in `for` block] 426 427 dodoStringMap dodo; ///< auxillary variables[dodo defined][for dodo.*] 428 429 bool continueFlag; ///< indicates `continue` state 430 431 unsigned int breakDeepness; ///< deepness of the break 432 unsigned int loopDeepness; ///< deepness of the loop 433 434 unsigned long iterator; ///< amount of iterations of the loop 435 436 unsigned int namespaceDeepness; ///< cgi object through what output will be performed 437 438 #define PROCESSOR_STATEMENTS 30 439 439 440 440 /** … … 476 476 }; 477 477 478 static const dodoString statements[PROCESSOR_STATEMENTS]; ///< processor statements[for dodo.*, ...]478 static const dodoString statements[PROCESSOR_STATEMENTS]; ///< processor statements[for dodo.*, ...] 479 479 }; 480 480 }; -
trunk/include/libdodo/dataTplProcessorEx.h
r986 r990 57 57 * explanations for libdodo defined errors 58 58 */ 59 #define DATATPLPROCESSOREX_WRONGFORSTATEMENT_STR "Wrong `for` statement."60 #define DATATPLPROCESSOREX_WRONGVARSTATEMENT_STR "In variable statement `}` wasn't closed."61 #define DATATPLPROCESSOREX_DODOISRESERVEDVARNAME_STR "dodo.* is reserved variable name."62 #define DATATPLPROCESSOREX_WRONGASSIGNSTATEMENT_STR "Wrong `assing` statement."63 #define DATATPLPROCESSOREX_WRONGBLOCK_STR "Wrong block construction."64 #define DATATPLPROCESSOREX_NOTCLOSEDBRACKET_STR "Bracket was opened(closed) but not closed(opened)."59 #define DATATPLPROCESSOREX_WRONGFORSTATEMENT_STR "Wrong `for` statement." 60 #define DATATPLPROCESSOREX_WRONGVARSTATEMENT_STR "In variable statement `}` wasn't closed." 61 #define DATATPLPROCESSOREX_DODOISRESERVEDVARNAME_STR "dodo.* is reserved variable name." 62 #define DATATPLPROCESSOREX_WRONGASSIGNSTATEMENT_STR "Wrong `assing` statement." 63 #define DATATPLPROCESSOREX_WRONGBLOCK_STR "Wrong block construction." 64 #define DATATPLPROCESSOREX_NOTCLOSEDBRACKET_STR "Bracket was opened(closed) but not closed(opened)." 65 65 66 66 /** -
trunk/include/libdodo/dbAccumulator.h
r972 r990 59 59 #endif 60 60 61 dodoString where; ///< `where` for the request(can be used as `as` for `callFunction`)62 dodoStringArray fields; ///< `fields` for request(can be used as `fieldsTo` for `insert_select`; as `arguments` for `callFunction`; as `arguments` for `callProcedure`; as `fields`/`field` `createIndex`)63 dodoArray<dodoStringArray> values; ///< `values` for the request(can be used as `fieldsFrom` for `insert_select`)64 dodoString table; ///< `table` for the request(can be used `tableTo` for `insert_select`; as `name` for `callFunction`; as `name` for `callProcedure`)65 dodoString tableTo; ///< `tableTo` for the request66 dodoString order; ///< `order` for the request67 dodoString having; ///< `having` for the request68 dodoString group; ///< `group` for the request69 dodoString limit; ///< `limit` for the result70 dodoString offset; ///< `offset` for the result71 dodoStringArray subQueries; ///< `subquery`72 dodoStringArray joinTables; ///< join tables73 dodoStringArray joinConds; ///< join conditions74 dodoArray<int> joinTypes; ///< join types75 76 __connectionInfo dbInfo; ///< data info to connect to the server77 78 int qType; ///< type of operation79 int qShift; ///< additional actions[see accumulatorAddEnum]61 dodoString where; ///< `where` for the request(can be used as `as` for `callFunction`) 62 dodoStringArray fields; ///< `fields` for request(can be used as `fieldsTo` for `insert_select`; as `arguments` for `callFunction`; as `arguments` for `callProcedure`; as `fields`/`field` `createIndex`) 63 dodoArray<dodoStringArray> values; ///< `values` for the request(can be used as `fieldsFrom` for `insert_select`) 64 dodoString table; ///< `table` for the request(can be used `tableTo` for `insert_select`; as `name` for `callFunction`; as `name` for `callProcedure`) 65 dodoString tableTo; ///< `tableTo` for the request 66 dodoString order; ///< `order` for the request 67 dodoString having; ///< `having` for the request 68 dodoString group; ///< `group` for the request 69 dodoString limit; ///< `limit` for the result 70 dodoString offset; ///< `offset` for the result 71 dodoStringArray subQueries; ///< `subquery` 72 dodoStringArray joinTables; ///< join tables 73 dodoStringArray joinConds; ///< join conditions 74 dodoArray<int> joinTypes; ///< join types 75 76 __connectionInfo dbInfo; ///< data info to connect to the server 77 78 int qType; ///< type of operation 79 int qShift; ///< additional actions[see accumulatorAddEnum] 80 80 81 81 #ifndef DB_WO_XEXEC 82 82 83 int &operType; ///< xexec operation84 85 void *executor; ///< class that executed hook83 int &operType; ///< xexec operation 84 85 void *executor; ///< class that executed hook 86 86 87 87 #endif … … 282 282 virtual void cleanCollected(); 283 283 284 bool show; ///< if true try to get result from the request[select]285 286 __xexecDbAccumulatorCollectedData collectedData; ///< data collected for xexec284 bool show; ///< if true try to get result from the request[select] 285 286 __xexecDbAccumulatorCollectedData collectedData; ///< data collected for xexec 287 287 }; 288 288 }; -
trunk/include/libdodo/dbConnector.h
r965 r990 85 85 __tuples(); 86 86 87 dodoArray<dodoStringArray> rows; ///< rows of data88 dodoStringArray fields; ///< names of fields87 dodoArray<dodoStringArray> rows; ///< rows of data 88 dodoStringArray fields; ///< names of fields 89 89 }; 90 90 … … 110 110 __connectionInfo(const dodoString &db, const dodoString &host, const dodoString &user, const dodoString &password, const dodoString &path=__dodostring__, int port=0); 111 111 112 dodoString db; ///< database name113 dodoString host; ///< hostname114 dodoString user; ///< username115 dodoString password; ///< password116 dodoString path; ///< path to db or unix socket117 unsigned int port; ///< port112 dodoString db; ///< database name 113 dodoString host; ///< hostname 114 dodoString user; ///< username 115 dodoString password; ///< password 116 dodoString path; ///< path to db or unix socket 117 unsigned int port; ///< port 118 118 }; 119 119 … … 135 135 class connector 136 136 #ifndef DB_WO_XEXEC 137 : public xexec137 : public xexec 138 138 #endif 139 139 { … … 334 334 virtual void exec(const dodoString &query = __dodostring__, bool result = false) = 0; 335 335 336 bool reconnect; ///< if true tries to reconect in case when `exec` failed with connection error[true by default]336 bool reconnect; ///< if true tries to reconect in case when `exec` failed with connection error[true by default] 337 337 338 338 protected: 339 339 340 bool connected; ///< true if connected to the db340 bool connected; ///< true if connected to the db 341 341 }; 342 342 }; -
trunk/include/libdodo/dbMysql.h
r976 r990 53 53 struct __mysqlSslOptions 54 54 { 55 dodoString key; ///< pathname to the key file56 dodoString cert; ///< pathname to the certificate file57 dodoString ca; ///< pathname to the certificate authority file58 dodoString capath; ///< pathname to a directory that contains trusted SSL CA certificates in pem format59 dodoString cipher; ///< allowed SSL ciphers55 dodoString key; ///< pathname to the key file 56 dodoString cert; ///< pathname to the certificate file 57 dodoString ca; ///< pathname to the certificate authority file 58 dodoString capath; ///< pathname to a directory that contains trusted SSL CA certificates in pem format 59 dodoString cipher; ///< allowed SSL ciphers 60 60 }; 61 61 … … 172 172 private: 173 173 174 bool empty; ///< true id mysqlRes is empty174 bool empty; ///< true id mysqlRes is empty 175 175 176 MYSQL *mysqlHandle; ///< DB handle177 MYSQL_RES *mysqlResult; ///< handle to result176 MYSQL *mysqlHandle; ///< DB handle 177 MYSQL_RES *mysqlResult; ///< handle to result 178 178 179 unsigned long type; ///< connection type179 unsigned long type; ///< connection type 180 180 }; 181 181 }; -
trunk/include/libdodo/dbPostgresql.h
r976 r990 163 163 enum encodingIdentefiersEnum 164 164 { 165 PG_SQL_ASCII = 0,/* SQL/ASCII */166 PG_EUC_JP,/* EUC for Japanese */167 PG_EUC_CN,/* EUC for Chinese */168 PG_EUC_KR,/* EUC for Korean */169 PG_EUC_TW,/* EUC for Taiwan */170 PG_JOHAB,/* EUC for Korean JOHAB */171 PG_UTF8,/* Unicode UTF8 */172 PG_MULE_INTERNAL,/* Mule internal code */173 PG_LATIN1,/* ISO-8859-1 Latin 1 */174 PG_LATIN2,/* ISO-8859-2 Latin 2 */175 PG_LATIN3,/* ISO-8859-3 Latin 3 */176 PG_LATIN4,/* ISO-8859-4 Latin 4 */177 PG_LATIN5,/* ISO-8859-9 Latin 5 */178 PG_LATIN6,/* ISO-8859-10 Latin6 */179 PG_LATIN7,/* ISO-8859-13 Latin7 */180 PG_LATIN8,/* ISO-8859-14 Latin8 */181 PG_LATIN9,/* ISO-8859-15 Latin9 */182 PG_LATIN10,/* ISO-8859-16 Latin10 */183 PG_WIN1256,/* windows-1256 */184 PG_WIN1258,/* Windows-1258 */185 PG_WIN866,/* (MS-DOS CP866) */186 PG_WIN874,/* windows-874 */187 PG_KOI8R,/* KOI8-R */188 PG_WIN1251,/* windows-1251 */189 PG_WIN1252,/* windows-1252 */190 PG_ISO_8859_5,/* ISO-8859-5 */191 PG_ISO_8859_6,/* ISO-8859-6 */192 PG_ISO_8859_7,/* ISO-8859-7 */193 PG_ISO_8859_8,/* ISO-8859-8 */194 PG_WIN1250,/* windows-1250 */195 PG_WIN1253,/* windows-1253 */196 PG_WIN1254,/* windows-1254 */197 PG_WIN1255,/* windows-1255 */198 PG_WIN1257,/* windows-1257 */199 /* PG_ENCODING_BE_LAST points to the above entry */200 201 /* followings are for client encoding only */202 PG_SJIS,/* Shift JIS (Winindows-932) */203 PG_BIG5,/* Big5 (Windows-950) */204 PG_GBK,/* GBK (Windows-936) */205 PG_UHC,/* UHC (Windows-949) */206 PG_GB18030,/* GB18030 */207 208 _PG_LAST_ENCODING_/* mark only */165 PG_SQL_ASCII = 0, /* SQL/ASCII */ 166 PG_EUC_JP, /* EUC for Japanese */ 167 PG_EUC_CN, /* EUC for Chinese */ 168 PG_EUC_KR, /* EUC for Korean */ 169 PG_EUC_TW, /* EUC for Taiwan */ 170 PG_JOHAB, /* EUC for Korean JOHAB */ 171 PG_UTF8, /* Unicode UTF8 */ 172 PG_MULE_INTERNAL, /* Mule internal code */ 173 PG_LATIN1, /* ISO-8859-1 Latin 1 */ 174 PG_LATIN2, /* ISO-8859-2 Latin 2 */ 175 PG_LATIN3, /* ISO-8859-3 Latin 3 */ 176 PG_LATIN4, /* ISO-8859-4 Latin 4 */ 177 PG_LATIN5, /* ISO-8859-9 Latin 5 */ 178 PG_LATIN6, /* ISO-8859-10 Latin6 */ 179 PG_LATIN7, /* ISO-8859-13 Latin7 */ 180 PG_LATIN8, /* ISO-8859-14 Latin8 */ 181 PG_LATIN9, /* ISO-8859-15 Latin9 */ 182 PG_LATIN10, /* ISO-8859-16 Latin10 */ 183 PG_WIN1256, /* windows-1256 */ 184 PG_WIN1258, /* Windows-1258 */ 185 PG_WIN866, /* (MS-DOS CP866) */ 186 PG_WIN874, /* windows-874 */ 187 PG_KOI8R, /* KOI8-R */ 188 PG_WIN1251, /* windows-1251 */ 189 PG_WIN1252, /* windows-1252 */ 190 PG_ISO_8859_5, /* ISO-8859-5 */ 191 PG_ISO_8859_6, /* ISO-8859-6 */ 192 PG_ISO_8859_7, /* ISO-8859-7 */ 193 PG_ISO_8859_8, /* ISO-8859-8 */ 194 PG_WIN1250, /* windows-1250 */ 195 PG_WIN1253, /* windows-1253 */ 196 PG_WIN1254, /* windows-1254 */ 197 PG_WIN1255, /* windows-1255 */ 198 PG_WIN1257, /* windows-1257 */ 199 /* PG_ENCODING_BE_LAST points to the above entry */ 200 201 /* followings are for client encoding only */ 202 PG_SJIS, /* Shift JIS (Winindows-932) */ 203 PG_BIG5, /* Big5 (Windows-950) */ 204 PG_GBK, /* GBK (Windows-936) */ 205 PG_UHC, /* UHC (Windows-949) */ 206 PG_GB18030, /* GB18030 */ 207 208 _PG_LAST_ENCODING_ /* mark only */ 209 209 }; 210 210 211 const static dodoString encodingStatements[POSTGRESQL_ENCODINGSTATEMENTS]; ///< encoding string representation according to encodingIdentefiersEnum211 const static dodoString encodingStatements[POSTGRESQL_ENCODINGSTATEMENTS]; ///< encoding string representation according to encodingIdentefiersEnum 212 212 #endif 213 213 … … 217 217 struct __blob 218 218 { 219 unsigned int reference; ///< reference in request220 const dodoString *value; ///< pointer to blob value219 unsigned int reference; ///< reference in request 220 const dodoString *value; ///< pointer to blob value 221 221 }; 222 222 223 dodoList<__blob> blobs; ///< references to blob data223 dodoList<__blob> blobs; ///< references to blob data 224 224 225 225 private: 226 226 227 bool empty; ///< true id pgResult is empty228 229 PGconn *pgHandle; ///< DB handle230 PGresult *pgResult; ///< handlde to result227 bool empty; ///< true id pgResult is empty 228 229 PGconn *pgHandle; ///< DB handle 230 PGresult *pgResult; ///< handlde to result 231 231 }; 232 232 }; -
trunk/include/libdodo/dbSqlConstructor.h
r976 r990 55 55 56 56 /** 57 * @class sqlConstructor provide construction of SQL request57 * @class constructor provide construction of SQL request 58 58 * @note all data become escaped and framed with '. Names of fields are not framed with ` to prevent cases as `count(*)`, etc. 59 59 * If you want to prevent data framing define preventFraming sqlConstructor class propertie as true but remember … … 101 101 protected: 102 102 103 dodoMap<dodoString, dodoMap<dodoString, short, dodoMapICaseStringCompare>, dodoMapICaseStringCompare> fieldTypes; ///< hash of 'db:table' => 'field => 'type''104 105 dodoString request; ///< SQL statement103 dodoMap<dodoString, dodoMap<dodoString, short, dodoMapICaseStringCompare>, dodoMapICaseStringCompare> fieldTypes; ///< hash of 'db:table' => 'field => 'type'' 104 105 dodoString request; ///< SQL statement 106 106 107 107 /** … … 157 157 virtual void additionalCollect(unsigned int qTypeToCheck, const dodoString &collectedString); 158 158 159 #define SQLCONSTRUCTOR_STATEMENTS 21159 #define SQLCONSTRUCTOR_STATEMENTS 21 160 160 161 161 /** … … 187 187 }; 188 188 189 static const dodoString statements[SQLCONSTRUCTOR_STATEMENTS]; ///< sqlConstructor statements190 191 static const dodoString sqlAddArr[ACCUMULATOR_ADDREQUESTSTATEMENTS]; ///< additional statements(`where`, `limit`, ...)192 193 static const dodoString sqlQStArr[SUBREQUESTSTATEMENTS]; ///< statements for complex queries(`union`, ...)194 195 static const dodoString sqlJoinArr[JOINTYPESTSTATEMENTS]; ///< statements for `join` queries189 static const dodoString statements[SQLCONSTRUCTOR_STATEMENTS]; ///< sqlConstructor statements 190 191 static const dodoString sqlAddArr[ACCUMULATOR_ADDREQUESTSTATEMENTS]; ///< additional statements(`where`, `limit`, ...) 192 193 static const dodoString sqlQStArr[SUBREQUESTSTATEMENTS]; ///< statements for complex queries(`union`, ...) 194 195 static const dodoString sqlJoinArr[JOINTYPESTSTATEMENTS]; ///< statements for `join` queries 196 196 }; 197 }; 197 }; 198 198 }; 199 199 }; -
trunk/include/libdodo/dbSqlConstructorEx.h
r986 r990 54 54 * explanations for libdodo defined errors 55 55 */ 56 #define DBSQLCONSTRUCTOREX_EMPTYREQUEST_STR "Query is empty. Are you sure?"57 #define DBSQLCONSTRUCTOREX_UNKNOWNJOINTYPE_STR "Unknown join type."56 #define DBSQLCONSTRUCTOREX_EMPTYREQUEST_STR "Query is empty. Are you sure?" 57 #define DBSQLCONSTRUCTOREX_UNKNOWNJOINTYPE_STR "Unknown join type." 58 58 59 59 /** -
trunk/include/libdodo/dbSqlite.h
r976 r990 147 147 struct __blob 148 148 { 149 unsigned int reference; ///< reference in request150 const dodoString *value; ///< pointer to blob value149 unsigned int reference; ///< reference in request 150 const dodoString *value; ///< pointer to blob value 151 151 }; 152 152 153 dodoList<__blob> blobs; ///< references to blob data153 dodoList<__blob> blobs; ///< references to blob data 154 154 155 155 private: 156 156 157 sqlite3 *sqliteHandle; ///< DB handle158 sqlite3_stmt *sqliteResult; ///< handlde to result157 sqlite3 *sqliteHandle; ///< DB handle 158 sqlite3_stmt *sqliteResult; ///< handlde to result 159 159 160 bool empty; ///< true if liteStmt is empty160 bool empty; ///< true if liteStmt is empty 161 161 }; 162 162 }; -
trunk/include/libdodo/exceptionBasic.h
r986 r990 129 129 }; 130 130 131 #define BASEEX_MODULES 48132 133 #ifdef DL_EXT131 #define BASEEX_MODULES 48 132 133 #ifdef DL_EXT 134 134 135 135 /** … … 138 138 struct __basicMod 139 139 { 140 char name[64]; ///< name of the library141 char discription[256]; ///< discription of the library142 char hook[64]; ///< name of the function in module that will be as a hook143 short module; ///< for what module handler should be set[see errorModuleEnum]140 char name[64]; ///< name of the library 141 char discription[256]; ///< discription of the library 142 char hook[64]; ///< name of the function in module that will be as a hook 143 short module; ///< for what module handler should be set[see errorModuleEnum] 144 144 }; 145 145 … … 155 155 typedef void (*deinitBaseExModule)(); 156 156 157 #endif157 #endif 158 158 159 159 class basic; … … 171 171 */ 172 172 class basic : public std::exception, 173 public singleton<basic>173 public singleton<basic> 174 174 { 175 175 friend class singleton<basic>; … … 180 180 * constructor 181 181 */ 182 basic() throw ();182 basic() throw (); 183 183 184 184 public: … … 195 195 * @param message defines custom message that might clarify the exception 196 196 */ 197 basic(int errModule, int functionID, int errnoSource, int baseErrno, const dodoString &baseErrstr, unsigned long line, const dodoString &file, const dodoString &message = __dodostring__) throw ();197 basic(int errModule, int functionID, int errnoSource, int baseErrno, const dodoString &baseErrstr, unsigned long line, const dodoString &file, const dodoString &message = __dodostring__) throw (); 198 198 199 199 /** 200 200 * destructor 201 201 */ 202 ~basic() throw ();202 ~basic() throw (); 203 203 204 204 /** … … 210 210 * return error string 211 211 */ 212 virtual const char *what() const throw ();213 214 int errModule; ///< module where exception has been thrown215 int funcID; ///< function where exception has been thrown[see *Ex.h headers for IDs]216 int errnoSource; ///< the source of the error code and of the error string217 218 int baseErrno; ///< error code219 dodoString baseErrstr; ///< error string220 221 unsigned long line; ///< line where exception has been thrown222 dodoString file; ///< file where exception has been thrown223 224 dodoString message; ///< custom message that might clarify the exception212 virtual const char *what() const throw (); 213 214 int errModule; ///< module where exception has been thrown 215 int funcID; ///< function where exception has been thrown[see *Ex.h headers for IDs] 216 int errnoSource; ///< the source of the error code and of the error string 217 218 int baseErrno; ///< error code 219 dodoString baseErrstr; ///< error string 220 221 unsigned long line; ///< line where exception has been thrown 222 dodoString file; ///< file where exception has been thrown 223 224 dodoString message; ///< custom message that might clarify the exception 225 225 226 226 /** … … 250 250 static void unsetErrorHandlers(); 251 251 252 #ifdef DL_EXT252 #ifdef DL_EXT 253 253 254 254 /** … … 278 278 static bool setErrorHandlers(const dodoString &path, void *data, void *toInit = NULL); 279 279 280 #endif280 #endif 281 281 282 282 protected: 283 283 284 static errorHandler handlersEx[BASEEX_MODULES]; ///< exception handlers285 286 static bool handlerSetEx[BASEEX_MODULES]; ///< map of set handlers287 288 static void *handlerDataEx[BASEEX_MODULES]; ///< data that will be passed to the handler289 290 #ifdef DL_EXT291 292 static void *handlesEx[BASEEX_MODULES]; ///< handles to the libraries293 294 static bool handlesOpenedEx[BASEEX_MODULES]; //< map of the opened libraries295 296 #endif284 static errorHandler handlersEx[BASEEX_MODULES]; ///< exception handlers 285 286 static bool handlerSetEx[BASEEX_MODULES]; ///< map of set handlers 287 288 static void *handlerDataEx[BASEEX_MODULES]; ///< data that will be passed to the handler 289 290 #ifdef DL_EXT 291 292 static void *handlesEx[BASEEX_MODULES]; ///< handles to the libraries 293 294 static bool handlesOpenedEx[BASEEX_MODULES]; //< map of the opened libraries 295 296 #endif 297 297 298 298 /** … … 325 325 protected: 326 326 327 #ifdef PTHREAD_EXT328 329 static pthread_mutex_t keeper; ///< mutex330 331 #endif327 #ifdef PTHREAD_EXT 328 329 static pthread_mutex_t keeper; ///< mutex 330 331 #endif 332 332 }; 333 333 334 static syncThreadSection keeper; ///< lock334 static syncThreadSection keeper; ///< lock 335 335 336 336 /** -
trunk/include/libdodo/graphicsImage.h
r980 r990 68 68 void *executor); 69 69 70 ImageInfo *imInfo; ///< image info handler71 Image *imHandle; ///< image handler72 73 int &operType; ///< xexec operation74 75 void *executor; ///< class that executed hook76 }; 77 78 #define IMAGE_MAPPINGSTATEMENTS 370 ImageInfo *imInfo; ///< image info handler 71 Image *imHandle; ///< image handler 72 73 int &operType; ///< xexec operation 74 75 void *executor; ///< class that executed hook 76 }; 77 78 #define IMAGE_MAPPINGSTATEMENTS 3 79 79 80 80 /** … … 88 88 }; 89 89 90 #define IMAGE_PIXELSIZESTATEMENTS 690 #define IMAGE_PIXELSIZESTATEMENTS 6 91 91 92 92 /** … … 95 95 enum imagePixelSizeEnum 96 96 { 97 IMAGE_PIXELSIZE_CHAR, ///< 8 bits98 IMAGE_PIXELSIZE_SHORT, ///< 16 bits99 IMAGE_PIXELSIZE_INT, ///< 32(16 on some CPUs) bits100 IMAGE_PIXELSIZE_LONG, ///< 32(32 on some CPUs) bits101 IMAGE_PIXELSIZE_FLOAT, ///< 32 bits102 IMAGE_PIXELSIZE_DOUBLE, ///< 64 bits103 }; 104 105 #define IMAGE_ENCODERSTATEMENTS 697 IMAGE_PIXELSIZE_CHAR, ///< 8 bits 98 IMAGE_PIXELSIZE_SHORT, ///< 16 bits 99 IMAGE_PIXELSIZE_INT, ///< 32(16 on some CPUs) bits 100 IMAGE_PIXELSIZE_LONG, ///< 32(32 on some CPUs) bits 101 IMAGE_PIXELSIZE_FLOAT, ///< 32 bits 102 IMAGE_PIXELSIZE_DOUBLE, ///< 64 bits 103 }; 104 105 #define IMAGE_ENCODERSTATEMENTS 6 106 106 107 107 /** … … 118 118 }; 119 119 120 #define IMAGE_COMPRESSIONSTATEMENTS 8120 #define IMAGE_COMPRESSIONSTATEMENTS 8 121 121 122 122 /** … … 130 130 IMAGE_COMPRESSION_RLE, 131 131 IMAGE_COMPRESSION_ZIP, 132 IMAGE_COMPRESSION_JPEG, ///< only for JPEG133 IMAGE_COMPRESSION_LOSSLESSJPEG, ///< only for JPEG134 IMAGE_COMPRESSION_JPEG2000, ///< only for JPEG132 IMAGE_COMPRESSION_JPEG, ///< only for JPEG 133 IMAGE_COMPRESSION_LOSSLESSJPEG, ///< only for JPEG 134 IMAGE_COMPRESSION_JPEG2000, ///< only for JPEG 135 135 }; 136 136 … … 140 140 struct __imageInfo 141 141 { 142 void *data; ///< 2D array of pixels143 unsigned long width; ///< width of the image144 unsigned long height; ///< height of the image145 short mapping; ///< type of mapping[see imageMappingEnum]146 short pixelSize; ///< type of pixel142 void *data; ///< 2D array of pixels 143 unsigned long width; ///< width of the image 144 unsigned long height; ///< height of the image 145 short mapping; ///< type of mapping[see imageMappingEnum] 146 short pixelSize; ///< type of pixel 147 147 }; 148 148 … … 152 152 struct __imageSize 153 153 { 154 unsigned long width; ///< width of the image155 unsigned long height; ///< height of the image154 unsigned long width; ///< width of the image 155 unsigned long height; ///< height of the image 156 156 }; 157 157 … … 266 266 protected: 267 267 268 ExceptionInfo *exInfo; ///< exception info handler269 270 __xexecImageCollectedData collectedData; ///< data collected for xexec268 ExceptionInfo *exInfo; ///< exception info handler 269 270 __xexecImageCollectedData collectedData; ///< data collected for xexec 271 271 272 272 private: 273 273 274 static const char *mappingStArr[IMAGE_MAPPINGSTATEMENTS]; ///< image mapping statements275 static const StorageType pixelSizeStArr[IMAGE_PIXELSIZESTATEMENTS]; ///< pixel type statements276 static const char *encoderStArr[IMAGE_ENCODERSTATEMENTS]; ///< image encoder277 static const CompressionType compressionStArr[IMAGE_COMPRESSIONSTATEMENTS]; ///< image compression274 static const char *mappingStArr[IMAGE_MAPPINGSTATEMENTS]; ///< image mapping statements 275 static const StorageType pixelSizeStArr[IMAGE_PIXELSIZESTATEMENTS]; ///< pixel type statements 276 static const char *encoderStArr[IMAGE_ENCODERSTATEMENTS]; ///< image encoder 277 static const CompressionType compressionStArr[IMAGE_COMPRESSIONSTATEMENTS]; ///< image compression 278 278 }; 279 279 … … 297 297 private: 298 298 299 bool initialized; ///< true if environment was initialized in the object299 bool initialized; ///< true if environment was initialized in the object 300 300 }; 301 301 -
trunk/include/libdodo/graphicsImageEx.h
r980 r990 52 52 * explanations for libdodo defined errors 53 53 */ 54 #define GRAPHICSIMAGEEX_BADINFO_STR "Bad information for image was provided."55 #define GRAPHICSIMAGEEX_EMPTYIMAGE_STR "The image is empty. It was either closed or not opened."56 #define GRAPHICSIMAGEEX_LONGPATH_STR "Path to image is too long."54 #define GRAPHICSIMAGEEX_BADINFO_STR "Bad information for image was provided." 55 #define GRAPHICSIMAGEEX_EMPTYIMAGE_STR "The image is empty. It was either closed or not opened." 56 #define GRAPHICSIMAGEEX_LONGPATH_STR "Path to image is too long." 57 57 58 58 /** -
trunk/include/libdodo/graphicsTransform.h
r980 r990 48 48 { 49 49 /** 50 * @enum transformRotateDir AngEnum defines rotation options50 * @enum transformRotateDirectionAngleEnum defines rotation options 51 51 */ 52 52 enum transformRotateDirectionAngleEnum … … 118 118 protected: 119 119 120 image *im; ///< image to perform transformations120 image *im; ///< image to perform transformations 121 121 }; 122 122 -
trunk/include/libdodo/graphicsTransformEx.h
r980 r990 50 50 * explanations for libdodo defined errors 51 51 */ 52 #define GRAPHICSTRANSFORMEX_EMPTYIMAGE_STR "The image is empty. It was either closed or not opened."52 #define GRAPHICSTRANSFORMEX_EMPTYIMAGE_STR "The image is empty. It was either closed or not opened." 53 53 54 54 /** -
trunk/include/libdodo/ioChannel.h
r979 r990 71 71 __xexecIoChannelCollectedData(int &operType, void *executor); 72 72 73 dodoString buffer; ///< data buffer73 dodoString buffer; ///< data buffer 74 74 75 int &operType; ///< xexec operation75 int &operType; ///< xexec operation 76 76 77 void *executor; ///< class that executed hook77 void *executor; ///< class that executed hook 78 78 }; 79 79 … … 155 155 virtual void flush() = 0; 156 156 157 unsigned long inSize; ///< size of data block for read* operations158 unsigned long outSize; ///< size of data block for write* operations157 unsigned long inSize; ///< size of data block for read* operations 158 unsigned long outSize; ///< size of data block for write* operations 159 159 160 160 protected: … … 184 184 virtual void _writeStream(const char * const data) = 0; 185 185 186 bool opened; ///< true if I/O *session* is opened186 bool opened; ///< true if I/O *session* is opened 187 187 188 188 #ifndef IO_WO_XEXEC 189 189 190 __xexecIoChannelCollectedData collectedData; ///< data collected for xexec190 __xexecIoChannelCollectedData collectedData; ///< data collected for xexec 191 191 192 192 #endif -
trunk/include/libdodo/ioEvent.h
r979 r990 50 50 struct __eventInOutDescriptors 51 51 { 52 int position; ///< identificator of the pair52 int position; ///< identificator of the pair 53 53 54 int in; ///< input stream55 int out; ///< output stream54 int in; ///< input stream 55 int out; ///< output stream 56 56 }; 57 57 … … 128 128 protected: 129 129 130 dodoArray<__eventInOutDescriptors> desc; ///< stream pairs130 dodoArray<__eventInOutDescriptors> desc; ///< stream pairs 131 131 132 int descs; ///< descriptors counter132 int descs; ///< descriptors counter 133 133 }; 134 134 }; -
trunk/include/libdodo/ioFifo.h
r979 r990 66 66 { 67 67 public: 68 68 69 69
