1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.car.remoteaccess; 18 19 import android.car.remoteaccess.RemoteTaskClientRegistrationInfo; 20 21 /** @hide */ 22 oneway interface ICarRemoteAccessCallback { 23 /** 24 * Called when the remote task client is successfully registered or the client ID is 25 * updated by CarRemoteAccessService. 26 * 27 * @param info {@code RemoteTaskClientRegistrationInfo} instance which contains service ID, 28 * vehicle ID, processor ID and client ID. 29 */ onClientRegistrationUpdated(in RemoteTaskClientRegistrationInfo info)30 void onClientRegistrationUpdated(in RemoteTaskClientRegistrationInfo info); 31 32 /** 33 * Called when registering the remote task client fails. 34 */ onClientRegistrationFailed()35 void onClientRegistrationFailed(); 36 37 /** 38 * Called when a remote task request is received from the wake-up service. 39 * 40 * @param clientID Client ID that is asked to execute the remote task. 41 * @param taskId ID of the task that is requested by the remote task server. 42 * @param data Extra data passed along with the wake-up request. Can be {@code null}. 43 * @param taskMaxDurationInSec The timeout before the system goes back to the previous power 44 * state. 45 */ onRemoteTaskRequested(in String clientId, in String taskId, in byte[] data, int taskMaxDurationInSec)46 void onRemoteTaskRequested(in String clientId, in String taskId, in byte[] data, 47 int taskMaxDurationInSec); 48 49 /** 50 * Called when the device is about to shutdown. 51 */ onShutdownStarting()52 void onShutdownStarting(); 53 } 54