aboutsummaryrefslogtreecommitdiff
path: root/apps/sensor_world
diff options
context:
space:
mode:
authorBrian Duddie <bduddie@google.com>2017-03-22 16:13:24 -0700
committerBrian Duddie <bduddie@google.com>2017-03-27 12:10:12 -0700
commit9d5b500a223ef73560f0dce38f50b809bde5dd0d (patch)
treefedf7f1a6cb628a7582046060313ba5ea71f78d9 /apps/sensor_world
parent341292509cfde0f859d89bda4ca5d55fc9772e64 (diff)
downloadchre-9d5b500a223ef73560f0dce38f50b809bde5dd0d.tar.gz
Rework Nanoapp model
Unify Nanoapp into a single monolithic object that directly exposes the common interfaces implemented in core and platform. As a result of this, PlatformNanoapp will no longer exist as a separate entity from Nanoapp. In preparation for dynamic app support, refactor static nanoapp loading to construct a UniquePtr<Nanoapp> and transfer ownership to the EventLoop when starting a nanoapp. This commit includes the first look at the nanoapp support library which will be used for external nanoapps implemented as dynamic shared objects. Test: run chre_test_client with MessageWorld, and run the Linux simulator Change-Id: Ic17f2c48c3156d1e5bb255b1c6a188908123d5df
Diffstat (limited to 'apps/sensor_world')
-rw-r--r--apps/sensor_world/sensor_world.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/sensor_world/sensor_world.cc b/apps/sensor_world/sensor_world.cc
index f0846264..738c86b6 100644
--- a/apps/sensor_world/sensor_world.cc
+++ b/apps/sensor_world/sensor_world.cc
@@ -25,8 +25,6 @@
#define LOG_TAG "[SensorWorld]"
#ifdef CHRE_NANOAPP_INTERNAL
-#include "chre/platform/platform_static_nanoapp_init.h"
-
namespace chre {
namespace {
#endif // CHRE_NANOAPP_INTERNAL
@@ -260,9 +258,11 @@ void nanoappStop() {
}
#ifdef CHRE_NANOAPP_INTERNAL
-} // namespace
+} // anonymous namespace
+} // namespace chre
-PLATFORM_STATIC_NANOAPP_INIT(SensorWorld);
+#include "chre/util/nanoapp/app_id.h"
+#include "chre/platform/static_nanoapp_init.h"
-} // namespace chre
+CHRE_STATIC_NANOAPP_INIT(SensorWorld, chre::kSensorWorldAppId, 0);
#endif // CHRE_NANOAPP_INTERNAL