Tactility/TactilityC/Source/tt_service_loader.cpp
Ken Van Hoeylandt fa54eaa58a
TactilityC improvements for tt_app_ functions (#192)
- Renamed `tt_app_context_*` to tt_app_*`
- Renamed `AppContextHandle` to `AppHandle`
- Created `tt_app_start()` and `tt_app_start_with_bundle()`
2025-01-26 00:48:37 +01:00

21 lines
516 B
C++

#include "tt_service_loader.h"
#include <Bundle.h>
#include <service/loader/Loader.h>
extern "C" {
void tt_service_loader_start_app(const char* id, BundleHandle _Nullable bundle) {
auto shared_bundle = std::shared_ptr<tt::Bundle>((tt::Bundle*)bundle);
tt::service::loader::startApp(id, std::move(shared_bundle));
}
void tt_service_loader_stop_app() {
tt::service::loader::stopApp();
}
AppHandle tt_service_loader_get_current_app() {
return tt::service::loader::getCurrentAppContext().get();
}
}