App and Service improvements (#106)

This commit is contained in:
Ken Van Hoeylandt
2024-12-05 22:46:27 +01:00
committed by GitHub
parent e86a11b7e2
commit 50ee77d572
69 changed files with 692 additions and 596 deletions
@@ -0,0 +1,30 @@
#pragma once
#include <string>
namespace tt::service {
class ServiceContext;
typedef void (*ServiceOnStart)(ServiceContext& service);
typedef void (*ServiceOnStop)(ServiceContext& service);
struct ServiceManifest {
/**
* The identifier by which the app is launched by the system and other apps.
*/
std::string id {};
/**
* Non-blocking method to call when service is started.
*/
const ServiceOnStart onStart = nullptr;
/**
* Non-blocking method to call when service is stopped.
*/
const ServiceOnStop onStop = nullptr;
};
} // namespace