36 lines
853 B
C++
36 lines
853 B
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> &callback);
|
||
|
|
||
|
/**
|
||
|
* @brief Removes all exit handlers by pointer
|
||
|
* @param callback
|
||
|
* @return
|
||
|
*/
|
||
|
AUKN_SYM void ExitHandlerRemove(const AuSPtr<IExitSubscriber> &callback);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @brief Used from within callbacks to determine if the application is shutting down.
|
||
|
* @return
|
||
|
*/
|
||
|
AUKN_SYM bool IsAppRunning();
|
||
|
}
|