A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/cgiapp_8hpp_source.html below:

NCBI C++ ToolKit: include/cgi/cgiapp.hpp Source File

1 #ifndef CGI___CGIAPP__HPP 2 #define CGI___CGIAPP__HPP 103  virtual void Init

(

void

);

110  virtual void Exit

(

void

);

116  virtual int Run

(

void

);

168  const char

*

const

* argv);

240  int

ifd,

int

ofd,

int flags

);

245  int

ifd,

int

ofd,

int flags

);

281  virtual void AppStop

(

int

exit_code);

371  void

ProcessHttpReferer(

void

);

387  virtual bool

x_RunFastCGI(

int

*

result

,

unsigned int

def_iter = 10);

389  string

GetFastCGIStandaloneServer(

void

)

const

;

390  bool

GetFastCGIStatLog(

void

)

const

;

391  unsigned int

GetFastCGIIterations(

unsigned int

def_iter)

const

;

392  bool

GetFastCGIComplete_Request_On_Sigterm(

void

)

const

;

394  unsigned int

GetFastCGIWatchFileTimeout(

bool

have_watcher)

const

;

395  int

GetFastCGIWatchFileRestartDelay(

void

)

const

;

396  bool

GetFastCGIChannelErrors(

void

)

const

;

397  bool

GetFastCGIHonorExitRequest(

void

)

const

;

398  bool

GetFastCGIDebug(

void

)

const

;

399  bool

GetFastCGIStopIfFailed(

void

)

const

;

400  unsigned int

GetFastCGIMTMaxThreads(

void

)

const

;

402  static CTime

GetFileModificationTime(

const string

& filename);

404  bool

CheckMemoryLimit(

void

);

407  virtual ICache

* GetCacheStorage(

void

)

const

;

408  virtual bool

IsCachingNeeded(

const CCgiRequest

& request)

const

;

411  void

SaveRequest(

const string

& rid,

const CCgiRequest

& request,

ICache

& cache);

419

eSR_Executable = 111,

426  static

ERestartReason ShouldRestart(

CTime

& mtime,

CCgiWatchFile

* watcher,

int

delay);

443  void

x_AddLBCookie();

447  bool

x_IsSetProcessor(

void

)

const

;

466  bool

m_ShouldExit =

false

;

495  const

std::exception* ex = 0);

501  virtual string

Compose(

void

);

504  virtual void

Submit(

const string

& message);

507  virtual string

Compose_ProgramName (

void

);

508  virtual string

Compose_Timing (

const CTime

& end_time);

509  virtual string

Compose_Entries (

void

);

510  virtual string

Compose_Result (

void

);

511  virtual string

Compose_ErrMessage (

void

);

600  string

GetSelfReferer(

void

)

const

;

617  void

x_InitArgs(

void

)

const

;

628  bool

m_OutputBroken =

false

;

631  bool

m_RequestStartPrinted =

false

;

632  bool

m_ErrorStatus =

false

;

634  bool

m_IsResultReady =

true

;

645  CArgs

&

GetArgs

(

void

) {

if

(!m_CgiArgs) x_InitArgs();

return

*m_CgiArgs; }

646  const CArgs

&

GetArgs

(

void

)

const

{

if

(!m_CgiArgs) x_InitArgs();

return

*m_CgiArgs; }

668  string GetRID

(

void

)

const

{

return

m_RID; }

707

TClientConnIntSeverity;

Base class for request processors.

static CNcbiApplication * Instance(void)

Singleton method.

Writer-based output stream.

BLOB cache read/write/maintenance interface.

bool operator<(const CEquivRange &A, const CEquivRange &B)

std::ofstream out("events_result.xml")

main entry point for tests

void LogRequest(const TReq &req)

virtual EPreparseArgs PreparseArgs(int argc, const char *const *argv)

Check the command line arguments before parsing them.

virtual int Run(void)=0

Run the application.

virtual void Init(void)

Initialize the application.

virtual void AppStop(int exit_code)

Method to be called before application exit.

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

EPreparseArgs

Result of PreparseArgs()

virtual void Exit(void)

Cleanup on application exit.

virtual void AppStart(void)

Method to be called before application start.

EAdminCommand

Admin commands passed through ncbi_admin_cmd argument.

~CCgiProcessorGuard(void)

virtual int OnException(std::exception &e, CNcbiOstream &os)

This method is called if an exception is thrown during the processing of HTTP request.

AutoPtr< char, ArrayDeleter< char > > TBuf

const CNcbiResource & GetResource(void) const

bool GetRequestStartPrinted(void) const

void SetOutputBroken(bool val)

const CCgiContext & GetContext(void) const

Get current server context. Throw exception if the context is not set.

void SetRequestStartPrinted(bool val)

bool IsFastCGI(void) const override

Return TRUE if it is running as a "fast" CGI.

map< string, string, PNocase > TTrailer

void SetErrorStatus(bool val)

shared_ptr< CCgiContext > m_Context

CCgiStreamWrapperWriter * m_Writer

bool GetOutputBroken(void) const

void SetRequestFlags(int flags)

Set cgi parsing flag.

void AbortChunkedTransfer(void)

const CNcbiOstream & GetOutputStream(void) const

friend class CCgiRequestProcessor

CDiagFactory * FindDiagFactory(const string &key)

CAtomicCounter m_Iteration

virtual void ConfigureDiagFormat(CCgiContext &context)

CCgiApplication(const SBuildInfo &build_info=NCBI_SBUILDINFO_DEFAULT())

unique_ptr< CNcbiOstream > m_OutputStream

virtual void ConfigureDiagnostics(CCgiContext &context)

typedef NCBI_PARAM_TYPE(CGI, DisableTrackingCookie) TCGI_DisableTrackingCookie

string m_MediaRangeParams

Media range parameters.

int m_RequestFlags

Bit flags for CCgiRequest.

CCgiContext & GetContext(void)

Get current server context. Throw exception if the context is not set.

virtual void ConfigureDiagDestination(CCgiContext &context)

CCgiProcessorGuard(CTls< CCgiRequestProcessor > &proc)

virtual ICgiSessionStorage * GetSessionStorage(CCgiSessionParameters &params) const

Get instance of CGI session storage interface.

void SetRID(const string &val)

bool IsSetArgs(void) const

void RegisterDiagFactory(const string &key, CDiagFactory *fact)

CCgiApplication(const CCgiApplication &)

CCgiApplication::SAcceptEntry TAcceptEntry

void SetInputStream(CNcbiIstream *in)

unique_ptr< CNcbiResource > m_Resource

CCgiWatchFile(const string &filename, int limit=1024)

void SetCacheStream(CNcbiOstream &stream)

CNcbiResource & x_GetResource(void) const

virtual void OnEvent(EEvent event, int status)

This method is called after each request, or when the CGI is forced to skip a request,...

CNcbiOstream & GetOutputStream(void)

float m_Quality

Quality factor or "1" if not set (or not numeric).

bool GetErrorStatus(void) const

map< string, string > TParams

friend void s_ScheduleFastCGIExit(void)

CTls< CCgiRequestProcessor > * m_Proc

EStreamMode GetWriterMode(void)

void x_OnEvent(EEvent event, int status)

virtual void ConfigureDiagThreshold(CCgiContext &context)

const CCgiApplication & GetApp(void) const

virtual bool ProcessAdminRequest(EAdminCommand cmd)

Process admin command passed through ncbi_admin_cmd argument.

CCgiContext & x_GetContext(void) const

void SetHTTPStatus(unsigned int status, const string &reason=kEmptyStr)

Set HTTP status code in the current request context and in the current CHttpResponse if one exists.

virtual CCgiContext * CreateContext(CNcbiArguments *args=0, CNcbiEnvironment *env=0, CNcbiIstream *inp=0, CNcbiOstream *out=0, int ifd=-1, int ofd=-1)

Factory method for the Context object construction.

CNcbiResource & GetResource(void)

unique_ptr< CCookieAffinity > m_Caf

CCgiApplication::TAcceptEntries TAcceptEntries

void SetWriterMode(EStreamMode mode)

bool IsSetOutputStream(void) const

virtual void FASTCGI_ScheduleExit(void)

Schedule Fast-CGI loop to end as soon as possible, after safely finishing the currently processed req...

ELogOpt GetLogOpt(void) const

CCgiApplication & GetApp(void)

string GetRID(void) const

TDiagFactoryMap m_DiagFactories

ELogOpt

Analyze registry settings ([CGI] Log) and return current logging option.

virtual bool ValidateSynchronizationToken(void)

Validate synchronization token (cross-site request forgery prevention).

const CArgs & GetArgs(void) const

const CCgiContext & GetContext(void) const

friend class CCgiStatistics

virtual CCgiStatistics * CreateStat()

Class factory for statistics class.

void SetRequestId(const string &rid, bool is_done)

virtual void ProcessHelpRequest(const string &format)

Process help request: set content type, print usage informations etc.

virtual CNcbiResource * LoadResource(void)

bool IsSetInputStream(void) const

CNcbiResource & GetResource(void)

Get server 'resource'. Throw exception if the resource is not set.

void SetContext(shared_ptr< CCgiContext > context)

CCgiApplication & m_CgiApp

const CNcbiResource & GetResource(void) const

Get server 'resource'. Throw exception if the resource is not set.

void SetOutputStream(CNcbiOstream *out)

const CNcbiIstream & GetInputStream(void) const

bool IsSetContext(void) const

virtual CCgiServerContext * LoadServerContext(CCgiContext &context)

virtual void ProcessVersionRequest(EVersionType ver_type)

Process version request: set content type, print version informations etc.

virtual CCgiContext * CreateContextWithFlags(CNcbiArguments *args, CNcbiEnvironment *env, CNcbiIstream *inp, CNcbiOstream *out, int ifd, int ofd, int flags)

The same as CreateContext(), but allows for a custom set of flags to be specified in the CCgiRequest ...

CCgiContext & GetContext(void)

void SetResultReady(bool val)

unsigned int GetFCgiIteration(void) const

Get the # of currently processed HTTP request.

list< SAcceptEntry > TAcceptEntries

CRef< CTls< CCgiRequestProcessor > > m_Processor

CCgiContext * CreateContextWithFlags_Default(CCgiRequestProcessor &processor, CNcbiArguments *args, CNcbiEnvironment *env, CNcbiIstream *inp, CNcbiOstream *out, int ifd, int ofd, int flags)

Default implementation of CreateContextWithFlags.

Client_Connection_Interruption_Okay

virtual int ProcessRequest(CCgiContext &context)=0

This is the method you should override.

void ParseAcceptHeader(TAcceptEntries &entries) const

Parse "Accept:" header, put entries to the list, more specific first.

void SetCafService(CCookieAffinity *caf)

Attach cookie affinity service interface.

map< string, CDiagFactory * > TDiagFactoryMap

unique_ptr< CArgs > m_CgiArgs

CCgiStreamWrapper(CNcbiOstream &out)

Client_Connection_Interruption_Severity

virtual string GetDefaultLogPath(void) const

Get default path for the log files.

CNcbiIstream & GetInputStream(void)

bool GetResultReady(void) const

CCgiApplication & operator=(const CCgiApplication &)

TParams m_AcceptParams

Accept parameters.

void VerifyCgiContext(CCgiContext &context)

Check CGI context for possible problems, throw exception with HTTP status set if something is wrong.

void FinishChunkedTransfer(const TTrailer *trailer)

unique_ptr< CNcbiIstream > m_InputStream

@ eAdmin_HealthZ

Report health for this CGI as kubernetes expects.

@ eAdmin_Health

Report health for this CGI only.

@ eAdmin_Unknown

Unrecognized command.

@ eAdmin_HealthDeep

Report health for this CGI and any services used by it.

@ eAdmin_LiveZ

Report if this CGI is alive as kubernetes expects.

@ eAdmin_ReadyZ

Report readyness for this CGI as kubernetes expects.

@ eException

An exception occured during the request processing.

@ eExitRequest

FCGI forced to exit by client's 'exitfastcgi' request.

@ eExit

No more iterations, exiting (called the very last)

@ eWaiting

Periodic awakening while waiting for the next request.

@ eError

The HTTP request was processed, non-zero exit code.

@ eEndRequest

HTTP request processed, all results sent to client.

@ eExecutable

FCGI forced to exit as its modif. time has changed.

@ eWatchFile

FCGI forced to exit as its "watch file" has changed.

@ eExitOnFail

[FastCGI].StopIfFailed set, and the iteration failed

@ eSuccess

The HTTP request was processed, with zero exit code.

TValue Get(void) const THROWS_NONE

Get atomic counter value.

EDiagSev

Severity level for the posted diagnostics.

#define NCBI_PARAM_DECL_EXPORT(expname, type, section, name)

Same as NCBI_PARAM_DECL but with export specifier (e.g.

#define NCBI_PARAM_ENUM_DECL_EXPORT(expname, type, section, name)

Same as NCBI_PARAM_ENUM_DECL but with export specifier (e.g.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

void Reset(void)

Reset thread local storage.

#define NCBI_SBUILDINFO_DEFAULT()

The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format

const struct ncbi::grid::netcache::search::fields::KEY key

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Process information in the NCBI Registry, including working with configuration files.

std::istream & in(std::istream &in_, double &x_)

This class allows to add build info (date and tag) to application version.

static CS_CONTEXT * context

static wxAcceleratorEntry entries[3]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4