1 package android.car.telemetry; 2 3 import android.car.telemetry.ICarTelemetryReportListener; 4 import android.car.telemetry.ICarTelemetryReportReadyListener; 5 import android.os.ResultReceiver; 6 7 /** 8 * Internal binder interface for {@code CarTelemetryService}, used by {@code CarTelemetryManager}. 9 * 10 * @hide 11 */ 12 interface ICarTelemetryService { 13 14 /** 15 * Adds telemetry MetricsConfigs to CarTelemetryService. Status code is sent to 16 * CarTelemetryManager via ResultReceiver. 17 */ addMetricsConfig(in String metricsConfigName, in byte[] metricsConfig, in ResultReceiver callback)18 void addMetricsConfig(in String metricsConfigName, in byte[] metricsConfig, 19 in ResultReceiver callback); 20 21 /** 22 * Removes a MetricsConfig based on the name. This will also remove outputs produced by the 23 * MetricsConfig. 24 */ removeMetricsConfig(in String metricsConfigName)25 void removeMetricsConfig(in String metricsConfigName); 26 27 /** 28 * Removes all MetricsConfigs. This will also remove all MetricsConfig outputs. 29 */ removeAllMetricsConfigs()30 void removeAllMetricsConfigs(); 31 32 /** 33 * Sends finished telemetry reports or errors associated with the given name using the 34 * {@code ICarTelemetryServiceListener}. 35 */ getFinishedReport(in String metricsConfigName, in ICarTelemetryReportListener listener)36 void getFinishedReport(in String metricsConfigName, in ICarTelemetryReportListener listener); 37 38 /** 39 * Sends all finished telemetry reports or errors using the {@code ICarTelemetryReportListener}. 40 */ getAllFinishedReports(in ICarTelemetryReportListener listener)41 void getAllFinishedReports(in ICarTelemetryReportListener listener); 42 43 /** 44 * Registers a listener for receiving notifications when a report or telemetry error is ready. 45 */ setReportReadyListener(in ICarTelemetryReportReadyListener listener)46 void setReportReadyListener(in ICarTelemetryReportReadyListener listener); 47 48 /** 49 * Clears listener to stop receiving notifications when a report or telemetry error is ready. 50 */ clearReportReadyListener()51 void clearReportReadyListener(); 52 }