Refactor app access (#205)
- Use `tt::app::` functions to start/stop apps and get current app(context) instead of using loader everywhere - Removed `tt_service_loader.*` from TactilityC - Created `tt_app_stop()` for TactilityC - Bumped version to 0.3.0 to prepare for upcoming release
This commit is contained in:
committed by
GitHub
parent
68e34ca740
commit
6337458992
@@ -27,4 +27,8 @@ void tt_app_start_with_bundle(const char* appId, BundleHandle parameters) {
|
||||
tt::app::start(appId, std::shared_ptr<tt::Bundle>((tt::Bundle*)parameters));
|
||||
}
|
||||
|
||||
void tt_app_stop() {
|
||||
tt::app::stop();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#include "tt_service_loader.h"
|
||||
#include <Tactility/Bundle.h>
|
||||
#include <Tactility/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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user