TreeFrogFramework  1.18
Enumerations | Functions
Tf Namespace Reference

Enumerations

enum  QuotedStrSplitBehavior { SplitWhereverSep = 0, SplitSkipQuotedString }
 
enum  CaseSensitivity { CaseInsensitive = Qt::CaseInsensitive, CaseSensitive = Qt::CaseSensitive }
 
enum  HttpMethod {
  Invalid = 0, Get, Head, Post,
  Options, Put, Delete, Trace,
  Connect, Patch
}
 
enum  HttpStatusCode {
  Continue = 100, SwitchingProtocols = 101, OK = 200, Created = 201,
  Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205,
  PartialContent = 206, MultipleChoices = 300, MovedPermanently = 301, Found = 302,
  SeeOther = 303, NotModified = 304, UseProxy = 305, TemporaryRedirect = 307,
  BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403,
  NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407,
  RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411,
  PreconditionFailed = 412, RequestEntityTooLarge = 413, RequestURITooLong = 414, UnsupportedMediaType = 415,
  RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, InternalServerError = 500, NotImplemented = 501,
  BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HTTPVersionNotSupported = 505
}
 
enum  AjaxOption {
  Asynchronous = 0, ContentType, Encoding, Method,
  Parameters, PostBody, RequestHeaders, EvalJS,
  EvalJSON, SanitizeJSON
}
 
enum  AjaxEvent {
  Create = 100, Uninitialized, Loading, Loaded,
  Interactive, Success, Failure, Complete
}
 
enum  ValidationRule {
  Required = 0, MaxLength, MinLength, IntMax,
  IntMin, DoubleMax, DoubleMin, EmailAddress,
  Url, Date, Time, DateTime,
  Pattern, Custom, RuleCount
}
 
enum  EscapeFlag { Compatible = 0, Quotes, NoQuotes }
 
enum  SortOrder { AscendingOrder = Qt::AscendingOrder, DescendingOrder = Qt::DescendingOrder }
 
enum  AppAttribute {
  ListenPort = 0, InternalEncoding, HttpOutputEncoding, Locale,
  MultiProcessingModule, UploadTemporaryDirectory, SqlDatabaseSettingsFiles, MongoDbSettingsFile,
  SqlQueriesStoredDirectory, DirectViewRenderMode, SystemLogFile, SqlQueryLogFile,
  ApplicationAbortOnFatal, LimitRequestBody, EnableCsrfProtectionModule, EnableHttpMethodOverride,
  SessionName, SessionStoreType, SessionAutoIdRegeneration, SessionLifeTime,
  SessionCookiePath, SessionGcProbability, SessionGcMaxLifeTime, SessionSecret,
  SessionCsrfProtectionKey, MPMThreadMaxAppServers, MPMThreadMaxThreadsPerAppServer, MPMPreforkMaxAppServers,
  MPMPreforkMinAppServers, MPMPreforkSpareAppServers, MPMHybridMaxAppServers, MPMHybridMaxWorkersPerAppServer,
  SystemLogFilePath, SystemLogLayout, SystemLogDateTimeFormat, AccessLogFilePath,
  AccessLogLayout, AccessLogDateTimeFormat, ActionMailerDeliveryMethod, ActionMailerCharacterSet,
  ActionMailerDelayedDelivery, ActionMailerSmtpHostName, ActionMailerSmtpPort, ActionMailerSmtpAuthentication,
  ActionMailerSmtpUserName, ActionMailerSmtpPassword, ActionMailerSmtpEnablePopBeforeSmtp, ActionMailerSmtpPopServerHostName,
  ActionMailerSmtpPopServerPort, ActionMailerSmtpPopServerEnableApop, ActionMailerSendmailCommandLocation, HttpKeepAliveTimeout,
  RedisSettingsFile, LDPreload, JavaScriptPath, ActionMailerSmtpEnableSTARTTLS,
  ListenAddress
}
 
enum  CloseCode {
  NormalClosure = 1000, GoingAway = 1001, ProtocolError = 1002, UnsupportedData = 1003,
  Reserved = 1004, NoStatusRcvd = 1005, AbnormalClosure = 1006, InvalidFramePayloadData = 1007,
  PolicyViolation = 1008, MessageTooBig = 1009, MandatoryExtension = 1010, InternalError = 1011,
  ServiceRestart = 1012, TryAgainLater = 1013, TLSHandshake = 1015
}
 
enum  LogPriority {
  FatalLevel = 0, ErrorLevel, WarnLevel, InfoLevel,
  DebugLevel, TraceLevel
}
 
enum  ServerOpCode {
  WebSocketSendText = 0x01, WebSocketSendBinary = 0x02, WebSocketPublishText = 0x03, WebSocketPublishBinary = 0x04,
  MaxServerOpCode
}
 

Functions

T_CORE_EXPORT void setupAppLoggers ()
 
T_CORE_EXPORT void releaseAppLoggers ()
 
T_CORE_EXPORT TWebApplicationapp ()
 
T_CORE_EXPORT TAppSettings * appSettings ()
 
T_CORE_EXPORT const QVariantMap & conf (const QString &configName)
 
T_CORE_EXPORT void msleep (unsigned long msecs)
 
T_CORE_EXPORT void srandXor128 (quint32 seed)
 
T_CORE_EXPORT quint32 randXor128 ()
 
T_CORE_EXPORT uint32_t rand32_r ()
 
T_CORE_EXPORT uint64_t rand64_r ()
 
T_CORE_EXPORT uint64_t random (uint64_t min, uint64_t max)
 
T_CORE_EXPORT uint64_t random (uint64_t max)
 
T_CORE_EXPORT TActionContext * currentContext ()
 
T_CORE_EXPORT TDatabaseContextcurrentDatabaseContext ()
 
T_CORE_EXPORT QSqlDatabase & currentSqlDatabase (int id)
 
T_CORE_EXPORT QMap< QByteArray, const QMetaObject * > * metaObjects ()
 
T_CORE_EXPORT void setupSystemLogger ()
 
T_CORE_EXPORT void releaseSystemLogger ()
 
T_CORE_EXPORT void setupAccessLogger ()
 
T_CORE_EXPORT void releaseAccessLogger ()
 
T_CORE_EXPORT void setupQueryLogger ()
 
T_CORE_EXPORT void releaseQueryLogger ()
 
T_CORE_EXPORT void writeAccessLog (const TAccessLog &log)
 
T_CORE_EXPORT void writeQueryLog (const QString &query, bool success, const QSqlError &error)
 
T_CORE_EXPORT void traceQueryLog (const char *,...)
 

Detailed Description

The Tf namespace contains miscellaneous identifiers used throughout the library of TreeFrog Framework.

Enumeration Type Documentation

Enumerator
Create 
Uninitialized 
Loading 
Loaded 
Interactive 
Success 
Failure 
Complete 
Enumerator
Asynchronous 
ContentType 
Encoding 
Method 
Parameters 
PostBody 
RequestHeaders 
EvalJS 
EvalJSON 
SanitizeJSON 
Enumerator
ListenPort 
InternalEncoding 
HttpOutputEncoding 
Locale 
MultiProcessingModule 
UploadTemporaryDirectory 
SqlDatabaseSettingsFiles 
MongoDbSettingsFile 
SqlQueriesStoredDirectory 
DirectViewRenderMode 
SystemLogFile 
SqlQueryLogFile 
ApplicationAbortOnFatal 
LimitRequestBody 
EnableCsrfProtectionModule 
EnableHttpMethodOverride 
SessionName 
SessionStoreType 
SessionAutoIdRegeneration 
SessionLifeTime 
SessionCookiePath 
SessionGcProbability 
SessionGcMaxLifeTime 
SessionSecret 
SessionCsrfProtectionKey 
MPMThreadMaxAppServers 
MPMThreadMaxThreadsPerAppServer 
MPMPreforkMaxAppServers 
MPMPreforkMinAppServers 
MPMPreforkSpareAppServers 
MPMHybridMaxAppServers 
MPMHybridMaxWorkersPerAppServer 
SystemLogFilePath 
SystemLogLayout 
SystemLogDateTimeFormat 
AccessLogFilePath 
AccessLogLayout 
AccessLogDateTimeFormat 
ActionMailerDeliveryMethod 
ActionMailerCharacterSet 
ActionMailerDelayedDelivery 
ActionMailerSmtpHostName 
ActionMailerSmtpPort 
ActionMailerSmtpAuthentication 
ActionMailerSmtpUserName 
ActionMailerSmtpPassword 
ActionMailerSmtpEnablePopBeforeSmtp 
ActionMailerSmtpPopServerHostName 
ActionMailerSmtpPopServerPort 
ActionMailerSmtpPopServerEnableApop 
ActionMailerSendmailCommandLocation 
HttpKeepAliveTimeout 
RedisSettingsFile 
LDPreload 
JavaScriptPath 
ActionMailerSmtpEnableSTARTTLS 
ListenAddress 
Enumerator
CaseInsensitive 
CaseSensitive 
Enumerator
NormalClosure 
GoingAway 
ProtocolError 
UnsupportedData 
Reserved 
NoStatusRcvd 
AbnormalClosure 
InvalidFramePayloadData 
PolicyViolation 
MessageTooBig 
MandatoryExtension 
InternalError 
ServiceRestart 
TryAgainLater 
TLSHandshake 
Enumerator
Compatible 
Quotes 
NoQuotes 
Enumerator
Invalid 
Get 
Head 
Post 
Options 
Put 
Delete 
Trace 
Connect 
Patch 
Enumerator
Continue 
SwitchingProtocols 
OK 
Created 
Accepted 
NonAuthoritativeInformation 
NoContent 
ResetContent 
PartialContent 
MultipleChoices 
MovedPermanently 
Found 
SeeOther 
NotModified 
UseProxy 
TemporaryRedirect 
BadRequest 
Unauthorized 
PaymentRequired 
Forbidden 
NotFound 
MethodNotAllowed 
NotAcceptable 
ProxyAuthenticationRequired 
RequestTimeout 
Conflict 
Gone 
LengthRequired 
PreconditionFailed 
RequestEntityTooLarge 
RequestURITooLong 
UnsupportedMediaType 
RequestedRangeNotSatisfiable 
ExpectationFailed 
InternalServerError 
NotImplemented 
BadGateway 
ServiceUnavailable 
GatewayTimeout 
HTTPVersionNotSupported 
Enumerator
FatalLevel 

Severe error events that will presumably lead the app to abort.

ErrorLevel 

Error events that might still allow the app to continue running.

WarnLevel 

Potentially harmful situations.

InfoLevel 

Informational messages that highlight the progress of the app.

DebugLevel 

Informational events that are most useful to debug the app.

TraceLevel 

Finer-grained informational events than the DEBUG.

Enumerator
SplitWhereverSep 
SplitSkipQuotedString 
Enumerator
WebSocketSendText 
WebSocketSendBinary 
WebSocketPublishText 
WebSocketPublishBinary 
MaxServerOpCode 
Enumerator
AscendingOrder 
DescendingOrder 
Enumerator
Required 
MaxLength 
MinLength 
IntMax 
IntMin 
DoubleMax 
DoubleMin 
EmailAddress 
Url 
Date 
Time 
DateTime 
Pattern 
Custom 
RuleCount 

Function Documentation

TWebApplication * Tf::app ( )

Returns a global pointer referring to the unique application object.

TAppSettings * Tf::appSettings ( )

Returns a global pointer referring to the unique application settings object.

const QVariantMap & Tf::conf ( const QString &  configName)

Returns the map associated with config file configName in 'conf' directory.

TActionContext * Tf::currentContext ( )
TDatabaseContext * Tf::currentDatabaseContext ( )
QSqlDatabase & Tf::currentSqlDatabase ( int  id)
QMap< QByteArray, const QMetaObject * > * Tf::metaObjects ( )
void Tf::msleep ( unsigned long  msecs)

Causes the current thread to sleep for msecs milliseconds.

uint32_t Tf::rand32_r ( )
uint64_t Tf::rand64_r ( )
uint64_t Tf::random ( uint64_t  min,
uint64_t  max 
)

Random number generator in the range from min to max.

uint64_t Tf::random ( uint64_t  max)

Random number generator in the range from 0 to max.

quint32 Tf::randXor128 ( )

Returns a value between 0 and UINT_MAX, the next number in the current sequence of xorshift random integers.

This function is thread-safe.

void Tf::releaseAccessLogger ( )
void Tf::releaseAppLoggers ( )

Releases all the loggers.

This function is for internal use only.

void Tf::releaseQueryLogger ( )
void Tf::releaseSystemLogger ( )
void Tf::setupAccessLogger ( )
void Tf::setupAppLoggers ( )

Sets up all the loggers set in the logger.ini.

This function is for internal use only.

void Tf::setupQueryLogger ( )
void Tf::setupSystemLogger ( )
void Tf::srandXor128 ( quint32  seed)

Sets the argument seed to be used to generate a new random number sequence of xorshift random integers to be returned by randXor128().

This function is thread-safe.

void Tf::traceQueryLog ( const char *  msg,
  ... 
)
void Tf::writeAccessLog ( const TAccessLog &  log)
void Tf::writeQueryLog ( const QString &  query,
bool  success,
const QSqlError &  error 
)