summaryrefslogtreecommitdiff
path: root/osi
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2016-02-23 15:28:35 -0800
committerAndre Eisenbach <eisenbach@google.com>2016-03-25 11:51:33 -0700
commite4bc35bf8bfe06ea174607fde3b645f5f6e9b941 (patch)
treebd7cd8a06ff1df1e6b6e714ad6341d26c49ceda5 /osi
parent11cfdf303c420d14e6cf3e4d2ca856b827ba44cf (diff)
downloadandroid-system-bt-e4bc35bf8bfe06ea174607fde3b645f5f6e9b941.tar.gz
android-system-bt-e4bc35bf8bfe06ea174607fde3b645f5f6e9b941.tar.xz
Add Linux-specific version of metrics.
This patch adds empty metrics implementation for Linux in order to fix build errors. Bug: 27324453 Change-Id: I2f45db6147689bf295176b7ad30a613a7f5a8d9f
Diffstat (limited to 'osi')
-rw-r--r--osi/BUILD.gn1
-rw-r--r--osi/src/metrics_linux.cpp60
2 files changed, 61 insertions, 0 deletions
diff --git a/osi/BUILD.gn b/osi/BUILD.gn
index 28307f3..b0a8f91 100644
--- a/osi/BUILD.gn
+++ b/osi/BUILD.gn
@@ -31,6 +31,7 @@ static_library("osi") {
"src/hash_map.c",
"src/hash_map_utils.c",
"src/list.c",
+ "src/metrics_linux.cpp",
"src/mutex.c",
"src/reactor.c",
"src/ringbuffer.c",
diff --git a/osi/src/metrics_linux.cpp b/osi/src/metrics_linux.cpp
new file mode 100644
index 0000000..f013236
--- /dev/null
+++ b/osi/src/metrics_linux.cpp
@@ -0,0 +1,60 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2016 Google, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+
+#define LOG_TAG "bt_osi_metrics"
+
+extern "C" {
+#include "osi/include/metrics.h"
+}
+
+void metrics_pair_event(uint32_t disconnect_reason, uint64_t timestamp_ms,
+ uint32_t device_class, device_type_t device_type) {
+ //TODO(jpawlowski): implement
+}
+
+void metrics_wake_event(wake_event_type_t type, const char *requestor,
+ const char *name, uint64_t timestamp_ms) {
+ //TODO(jpawlowski): implement
+}
+
+void metrics_scan_event(bool start, const char *initator, scan_tech_t type,
+ uint32_t results, uint64_t timestamp_ms) {
+ //TODO(jpawlowski): implement
+}
+
+void metrics_a2dp_session(int64_t session_duration_sec,
+ const char *disconnect_reason,
+ uint32_t device_class,
+ int32_t media_timer_min_ms,
+ int32_t media_timer_max_ms,
+ int32_t media_timer_avg_ms,
+ int32_t buffer_overruns_max_count,
+ int32_t buffer_overruns_total,
+ float buffer_underruns_average,
+ int32_t buffer_underruns_count) {
+ //TODO(jpawlowski): implement
+}
+
+void metrics_write(int fd, bool clear) {
+ //TODO(jpawlowski): implement
+}
+
+void metrics_print(int fd, bool clear) {
+ //TODO(jpawlowski): implement
+}