OSDN Git Service

Cleanup dvr api headers for exporting
authorJohn Bates <jbates@google.com>
Fri, 26 May 2017 16:00:08 +0000 (09:00 -0700)
committerJohn Bates <jbates@google.com>
Fri, 26 May 2017 18:37:38 +0000 (11:37 -0700)
Bug: b/38379392
Test: ran generate_dvr_api.py
Change-Id: I8f07e0c28da77df7b1beccfad427f445ad59e64a

libs/vr/libdvr/include/dvr/dvr_api.h
libs/vr/libdvr/include/dvr/dvr_display_manager.h
services/vr/virtual_touchpad/Android.bp
services/vr/virtual_touchpad/include/dvr/virtual_touchpad_client.h

index 47a2a60..f05a6fd 100644 (file)
@@ -211,7 +211,7 @@ typedef int (*DvrVSyncClientGetSchedInfoPtr)(DvrVSyncClient* client,
                                              uint32_t* next_vsync_count);
 
 // libs/vr/libvrsensor/include/dvr/pose_client.h
-typedef DvrPoseClient* (*DvrPoseClientCreatePtr)(void);
+typedef DvrPoseClient* (*DvrPoseClientCreatePtr)();
 typedef void (*DvrPoseClientDestroyPtr)(DvrPoseClient* client);
 typedef int (*DvrPoseClientGetPtr)(DvrPoseClient* client, uint32_t vsync_count,
                                    DvrPoseAsync* out_pose);
@@ -222,7 +222,13 @@ typedef int (*DvrPoseClientGetControllerPtr)(DvrPoseClient* client,
                                              DvrPoseAsync* out_pose);
 
 // services/vr/virtual_touchpad/include/dvr/virtual_touchpad_client.h
-typedef DvrVirtualTouchpad* (*DvrVirtualTouchpadCreatePtr)(void);
+
+// Touchpad IDs for *Touch*() and *ButtonState*() calls.
+enum {
+  DVR_VIRTUAL_TOUCHPAD_PRIMARY = 0,
+  DVR_VIRTUAL_TOUCHPAD_VIRTUAL = 1,
+};
+typedef DvrVirtualTouchpad* (*DvrVirtualTouchpadCreatePtr)();
 typedef void (*DvrVirtualTouchpadDestroyPtr)(DvrVirtualTouchpad* client);
 typedef int (*DvrVirtualTouchpadAttachPtr)(DvrVirtualTouchpad* client);
 typedef int (*DvrVirtualTouchpadDetachPtr)(DvrVirtualTouchpad* client);
index 4bb0a2f..26f85a0 100644 (file)
@@ -84,7 +84,7 @@ int dvrSurfaceStateGetSurfaceCount(DvrSurfaceState* surface_state,
                                    size_t* count_out);
 
 // Returns the update flags for the surface at |surface_index| in the state
-// object. The flags may be used to determine what changes, if any, occured to
+// object. The flags may be used to determine what changes, if any, occurred to
 // the surface since the last state update.
 // @return 0 on success. Otherwise returns a negative error value.
 int dvrSurfaceStateGetUpdateFlags(DvrSurfaceState* surface_state,
index 3d5dfb2..b9aa8fe 100644 (file)
@@ -13,10 +13,15 @@ shared_libs = [
     "libutils",
 ]
 
+header_libraries = [
+    "libdvr_headers"
+]
+
 cc_library {
     srcs: src,
     export_include_dirs: ["include"],
     shared_libs: shared_libs,
+    header_libs: header_libraries,
     cppflags: ["-std=c++11"],
     cflags: ["-DLOG_TAG=\"VrVirtualTouchpad\""],
     name: "libvirtualtouchpad",
@@ -42,6 +47,7 @@ cc_test {
     srcs: test_src_files,
     static_libs: test_static_libs,
     shared_libs: test_shared_libs,
+    header_libs: header_libraries,
     cppflags = [
         "-std=c++11",
     ],
@@ -77,6 +83,7 @@ cc_binary {
     srcs: service_src,
     static_libs: service_static_libs,
     shared_libs: service_shared_libs,
+    header_libs: header_libraries,
     cppflags: ["-std=c++11"],
     cflags: [
         "-DLOG_TAG=\"VrVirtualTouchpad\"",
@@ -107,6 +114,7 @@ client_shared_libs = [
 cc_library {
     srcs: client_src,
     shared_libs: client_shared_libs,
+    header_libs: header_libraries,
     cppflags: ["-std=c++11"],
     cflags: ["-DLOG_TAG=\"VirtualTouchpadClient\""],
     host_ldlibs: ["-llog"],
index 08cca1b..15e6687 100644 (file)
@@ -1,17 +1,14 @@
 #ifndef ANDROID_DVR_VIRTUAL_TOUCHPAD_C_CLIENT_H
 #define ANDROID_DVR_VIRTUAL_TOUCHPAD_C_CLIENT_H
 
+#include <dvr/dvr_api.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 typedef struct DvrVirtualTouchpad DvrVirtualTouchpad;
 
-enum {
-  DVR_VIRTUAL_TOUCHPAD_PRIMARY = 0,
-  DVR_VIRTUAL_TOUCHPAD_VIRTUAL = 1,
-};
-
 // Creates a new virtual touchpad client.
 //
 // @return Pointer to the created virtual touchpad client; nullptr on failure.