mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Reduce Beast public interface and eliminate unused code:
Beast includes a lot of code for encapsulating cross-platform differences which are not used or needed by rippled. Additionally, a lot of that code implements functionality that is available from the standard library. This moves away from custom implementations of features that the standard library provides and reduces the number of platform-specific interfaces andfeatures that Beast makes available. Highlights include: * Use std:: instead of beast implementations when possible * Reduce the use of beast::String in public interfaces * Remove Windows-specific COM and Registry code * Reduce the public interface of beast::File * Reduce the public interface of beast::SystemStats * Remove unused sysctl/getsysinfo functions * Remove beast::Logger
This commit is contained in:
committed by
Vinnie Falco
parent
fefdb32d08
commit
186ca9c235
@@ -36,22 +36,6 @@ namespace beast {
|
||||
*/
|
||||
namespace Process
|
||||
{
|
||||
//==============================================================================
|
||||
enum ProcessPriority
|
||||
{
|
||||
LowPriority = 0,
|
||||
NormalPriority = 1,
|
||||
HighPriority = 2,
|
||||
RealtimePriority = 3
|
||||
};
|
||||
|
||||
/** Changes the current process's priority.
|
||||
|
||||
@param priority the process priority, where
|
||||
0=low, 1=normal, 2=high, 3=realtime
|
||||
*/
|
||||
void setPriority (const ProcessPriority priority);
|
||||
|
||||
/** Kills the current process immediately.
|
||||
|
||||
This is an emergency process terminator that kills the application
|
||||
@@ -63,70 +47,8 @@ namespace Process
|
||||
void terminate();
|
||||
|
||||
//==============================================================================
|
||||
/** Returns true if this application process is the one that the user is
|
||||
currently using.
|
||||
*/
|
||||
bool isForegroundProcess();
|
||||
|
||||
/** Attempts to make the current process the active one.
|
||||
(This is not possible on some platforms).
|
||||
*/
|
||||
void makeForegroundProcess();
|
||||
|
||||
//==============================================================================
|
||||
/** Raises the current process's privilege level.
|
||||
|
||||
Does nothing if this isn't supported by the current OS, or if process
|
||||
privilege level is fixed.
|
||||
*/
|
||||
void raisePrivilege();
|
||||
|
||||
/** Lowers the current process's privilege level.
|
||||
|
||||
Does nothing if this isn't supported by the current OS, or if process
|
||||
privilege level is fixed.
|
||||
*/
|
||||
void lowerPrivilege();
|
||||
|
||||
/** Returns true if this process is being hosted by a debugger. */
|
||||
bool isRunningUnderDebugger();
|
||||
|
||||
//==============================================================================
|
||||
/** Tries to launch the OS's default reader application for a given file or URL. */
|
||||
bool openDocument (const String& documentURL, const String& parameters);
|
||||
|
||||
#if BEAST_WINDOWS || DOXYGEN
|
||||
//==============================================================================
|
||||
/** WINDOWS ONLY - This returns the HINSTANCE of the current module.
|
||||
|
||||
The return type is a void* to avoid being dependent on windows.h - just cast
|
||||
it to a HINSTANCE to use it.
|
||||
|
||||
In a normal BEAST application, this will be automatically set to the module
|
||||
handle of the executable.
|
||||
|
||||
If you've built a DLL and plan to use any BEAST messaging or windowing classes,
|
||||
you'll need to make sure you call the setCurrentModuleInstanceHandle()
|
||||
to provide the correct module handle in your DllMain() function, because
|
||||
the system relies on the correct instance handle when opening windows.
|
||||
*/
|
||||
void* getCurrentModuleInstanceHandle() noexcept;
|
||||
|
||||
/** WINDOWS ONLY - Sets a new module handle to be used by the library.
|
||||
|
||||
The parameter type is a void* to avoid being dependent on windows.h, but it actually
|
||||
expects a HINSTANCE value.
|
||||
|
||||
@see getCurrentModuleInstanceHandle()
|
||||
*/
|
||||
void setCurrentModuleInstanceHandle (void* newHandle) noexcept;
|
||||
#endif
|
||||
|
||||
#if BEAST_MAC || DOXYGEN
|
||||
//==============================================================================
|
||||
/** OSX ONLY - Shows or hides the OSX dock icon for this app. */
|
||||
void setDockIconVisible (bool isVisible);
|
||||
#endif
|
||||
};
|
||||
|
||||
} // beast
|
||||
|
||||
Reference in New Issue
Block a user