Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0afaf49 authored by Michael Sun's avatar Michael Sun Committed by Automerger Merge Worker
Browse files

Merge "floss: metrics: add profile connection metrics handlers" am: 24ce5aa1

parents 4a1fcdde 24ce5aa1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -170,5 +170,10 @@ void LogMetricsDeviceInfoReport(
      .Record();
}

void LogMetricsProfileConnectionAttempt(RawAddress* addr, uint32_t intent, uint32_t profile) {}

void LogMetricsProfileConnectionStateChanged(
    RawAddress* addr, uint32_t intent, uint32_t profile, uint32_t status, uint32_t state) {}

}  // namespace metrics
}  // namespace bluetooth
+5 −0
Original line number Diff line number Diff line
@@ -37,5 +37,10 @@ void LogMetricsDeviceInfoReport(
    uint32_t product_id,
    uint32_t version) {}

void LogMetricsProfileConnectionAttempt(RawAddress* addr, uint32_t intent, uint32_t profile) {}

void LogMetricsProfileConnectionStateChanged(
    RawAddress* addr, uint32_t intent, uint32_t profile, uint32_t status, uint32_t state) {}

}  // namespace metrics
}  // namespace bluetooth
+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ void LogMetricsDeviceInfoReport(
    uint32_t vendor_id_src,
    uint32_t product_id,
    uint32_t version);
void LogMetricsProfileConnectionAttempt(RawAddress* addr, uint32_t intent, uint32_t profile);
void LogMetricsProfileConnectionStateChanged(
    RawAddress* addr, uint32_t intent, uint32_t profile, uint32_t status, uint32_t state);

}  // namespace metrics
}  // namespace bluetooth
+13 −0
Original line number Diff line number Diff line
@@ -59,6 +59,19 @@ void device_info_report(
      &addr, device_type, class_of_device, appearance, vendor_id, vendor_id_src, product_id, version);
}

void profile_connection_attempt(RustRawAddress bt_addr, uint32_t intent, uint32_t profile) {
  RawAddress addr = rusty::CopyFromRustAddress(bt_addr);

  metrics::LogMetricsProfileConnectionAttempt(&addr, intent, profile);
}

void profile_connection_state_changed(
    RustRawAddress bt_addr, uint32_t intent, uint32_t profile, uint32_t status, uint32_t state) {
  RawAddress addr = rusty::CopyFromRustAddress(bt_addr);

  metrics::LogMetricsProfileConnectionStateChanged(&addr, intent, profile, status, state);
}

}  // namespace rust
}  // namespace topshim
}  // namespace bluetooth
+3 −0
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@ void device_info_report(
    uint32_t vendor_id_src,
    uint32_t product_id,
    uint32_t version);
void profile_connection_attempt(RustRawAddress bt_addr, uint32_t intent, uint32_t profile);
void profile_connection_state_changed(
    RustRawAddress bt_addr, uint32_t intent, uint32_t profile, uint32_t status, uint32_t state);

}  // namespace rust
}  // namespace topshim
Loading