XII Release 0.1.0
Loading...
Searching...
No Matches
xiiFileserverApp Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <Fileserve.h>

Inheritance diagram for xiiFileserverApp:
[legend]

Public Types

using SUPER = xiiApplication
Public Types inherited from xiiApplication
enum class  Execution : xiiUInt8 { Continue = 0U , Quit }
 Defines the possible return values for the xiiApplication::Run() function. More...

Public Member Functions

virtual xiiResult BeforeCoreSystemsStartup () override
virtual void AfterCoreSystemsStartup () override
 Copyright (c) Theophilus Eriata. All Rights Reserved.
virtual void BeforeCoreSystemsShutdown () override
virtual xiiApplication::Execution Run () override
void FileserverEventHandlerConsole (const xiiFileserverEvent &e)
 Copyright (c) Theophilus Eriata. All Rights Reserved.
void FileserverEventHandler (const xiiFileserverEvent &e)
void ShaderMessageHandler (xiiFileserveClientContext &ref_ctxt, xiiRemoteMessage &ref_msg, xiiRemoteInterface &ref_clientChannel, xiiDelegate< void(const char *)> logActivity)
void SetStyleSheet ()
Public Member Functions inherited from xiiApplication
 xiiApplication (xiiStringView sAppName)
 Constructor.
virtual ~xiiApplication ()
 Virtual destructor.
void SetApplicationName (xiiStringView sAppName)
 Changes the application name.
const xiiString & GetApplicationName () const
 Returns the application name.
virtual void BeforeHighLevelSystemsShutdown ()
virtual void AfterHighLevelSystemsShutdown ()
 Called after xiiStartup::ShutdownHighLevelSystems() has been executed.
virtual void AfterCoreSystemsShutdown ()
virtual void BeforeEnterBackground ()
virtual void BeforeEnterForeground ()
void SetReturnCode (xiiInt32 iReturnCode)
xiiInt32 GetReturnCode () const
 Returns the currently set value that the application will return to the OS.
virtual const char * TranslateReturnCode () const
 If the return code is not zero, this function might be called to get a string to print the error code in human readable form.
void SetCommandLineArguments (xiiUInt32 uiArgumentCount, const char **pArguments)
xiiUInt32 GetArgumentCount () const
const char * GetArgument (xiiUInt32 uiArgument) const
 Returns one of the command line arguments that was passed to the application.
const char ** GetArgumentsArray () const
 Returns the complete array of command line arguments that were passed to the application.
void EnableMemoryLeakReporting (bool bEnable)
bool IsMemoryLeakReportingEnabled () const
virtual void RequestQuit ()
XII_ALWAYS_INLINE bool WasQuitRequested () const
 Returns whether RequestQuit() was called.

Public Attributes

xiiUInt32 m_uiSleepCounter = 0
xiiUInt32 m_uiConnections = 0
xiiTime m_CloseAppTimeout
xiiTime m_TimeTillClosing

Additional Inherited Members

Static Public Member Functions inherited from xiiApplication
static xiiApplication * GetApplicationInstance ()
 Returns the one instance of xiiApplication that is available.
Protected Attributes inherited from xiiApplication
bool m_bWasQuitRequested = false

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

A stand-alone application for the xiiFileServer.

If XII_USE_QT is defined, the GUI from the EditorPluginFileserve is used. Otherwise the server runs as a console application.

If the command line option "-fs_wait_timeout seconds" is specified, the server will wait for a limited time for any client to connect and close automatically, if no connection is established. Once a client connects, the timeout becomes irrelevant. If the command line option "-fs_close_timeout seconds" is specified, the application will automatically shut down when no client is connected anymore and a certain timeout is reached. Once a client connects, the timeout is reset. This timeout has no effect as long as no client has connected.

Member Function Documentation

◆ AfterCoreSystemsStartup()

void xiiFileserverApp::AfterCoreSystemsStartup ( )
overridevirtual

Copyright (c) Theophilus Eriata. All Rights Reserved.

Reimplemented from xiiApplication.

◆ BeforeCoreSystemsShutdown()

void xiiFileserverApp::BeforeCoreSystemsShutdown ( )
overridevirtual

This function is called after the application main loop has run for the last time, before engine deinitialization.

Override this function to do application specific deinitialization that still requires a running engine. After this function returns xiiStartup::ShutdownCoreSystems() is called and thus everything, including allocators, is shut down. To shut down entire subsystems, you should, however, use the features provided by xiiStartup and xiiSubSystem.

Reimplemented from xiiApplication.

◆ BeforeCoreSystemsStartup()

xiiResult xiiFileserverApp::BeforeCoreSystemsStartup ( )
overridevirtual

This function is called before any kind of engine initialization is done.

Override this function to be able to configure subsystems, before they are initialized. After this function returns, xiiStartup::StartupCoreSystems() is automatically called. If you need to set up custom allocators, this is the place to do this.

Reimplemented from xiiApplication.

◆ Run()

xiiApplication::Execution xiiFileserverApp::Run ( )
overridevirtual

Main run function which is called periodically. This function must be overridden.

Return Execution::Quit when the application should quit. You may set a return code via SetReturnCode() beforehand.

Implements xiiApplication.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Tools/Fileserve/Fileserve.h
  • /home/runner/work/XII/XII/Source/Tools/Fileserve/App.cpp
  • /home/runner/work/XII/XII/Source/Tools/Fileserve/Console.cpp
  • /home/runner/work/XII/XII/Source/Tools/Fileserve/Fileserve.cpp