41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Exit.hpp
|
|
Date: 2022-1-30
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#include "ETriggerLevel.hpp"
|
|
#include "IExitSubscriber.hpp"
|
|
|
|
namespace Aurora::Exit
|
|
{
|
|
/**
|
|
* @brief Registers @param callback to the registry to subscribe to @param level events
|
|
* @param level
|
|
* @param callback
|
|
* @return
|
|
*/
|
|
AUKN_SYM bool ExitHandlerAdd(ETriggerLevel level, const AuSPtr<IExitSubscriber> &pSubscriber);
|
|
|
|
/**
|
|
* @brief Removes all exit handlers by pointer
|
|
* @param callback
|
|
* @return
|
|
*/
|
|
AUKN_SYM void ExitHandlerRemove(const AuSPtr<IExitSubscriber> &pSubscriber);
|
|
|
|
/**
|
|
* @brief Used from within callbacks to determine if the application is shutting down.
|
|
* @return
|
|
*/
|
|
AUKN_SYM bool IsAppRunning();
|
|
|
|
/**
|
|
* @brief Used from within eSigTerminate callbacks to prevent automatic shutdown of the application
|
|
* @return
|
|
*/
|
|
AUKN_SYM void CancelExit();
|
|
} |