1 /* 2 * Copyright (C) 2020 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.vms; 18 19 import android.car.vms.IVmsClientCallback; 20 import android.car.vms.VmsAssociatedLayer; 21 import android.car.vms.VmsLayer; 22 import android.car.vms.VmsLayerDependency; 23 import android.car.vms.VmsProviderInfo; 24 import android.car.vms.VmsRegistrationInfo; 25 import android.os.SharedMemory; 26 27 /** 28 * Hidden API for communicating with the Vehicle Map Service message broker. 29 * 30 * @hide 31 */ 32 interface IVmsBrokerService { 33 // Client operations 34 // Restricted to callers with android.car.permission.VMS_SUBSCRIBER 35 // or android.car.permission.VMS_PUBLISHER 36 registerClient( in IBinder token, in IVmsClientCallback callback, boolean legacyClient)37 VmsRegistrationInfo registerClient( 38 in IBinder token, 39 in IVmsClientCallback callback, 40 boolean legacyClient) = 0; 41 42 void unregisterClient(in IBinder token) = 1; 43 getProviderInfo(in IBinder token, int providerId)44 VmsProviderInfo getProviderInfo(in IBinder token, int providerId) = 2; 45 46 // Subscriber operations 47 // Restricted to callers with android.car.permission.VMS_SUBSCRIBER 48 setSubscriptions( in IBinder token, in List<VmsAssociatedLayer> layers)49 void setSubscriptions( 50 in IBinder token, 51 in List<VmsAssociatedLayer> layers) = 3; 52 setMonitoringEnabled(in IBinder token, boolean enabled)53 void setMonitoringEnabled(in IBinder token, boolean enabled) = 4; 54 55 // Publisher operations 56 // Restricted to callers with android.car.permission.VMS_PUBLISHER 57 registerProvider( in IBinder token, in VmsProviderInfo providerInfo)58 int registerProvider( 59 in IBinder token, 60 in VmsProviderInfo providerInfo) = 5; 61 setProviderOfferings( in IBinder token, int providerId, in List<VmsLayerDependency> offerings)62 void setProviderOfferings( 63 in IBinder token, 64 int providerId, 65 in List<VmsLayerDependency> offerings) = 6; 66 publishPacket( in IBinder token, int providerId, in VmsLayer layer, in byte[] packet)67 void publishPacket( 68 in IBinder token, 69 int providerId, 70 in VmsLayer layer, 71 in byte[] packet) = 7; 72 publishLargePacket( in IBinder token, int providerId, in VmsLayer layer, in SharedMemory packet)73 void publishLargePacket( 74 in IBinder token, 75 int providerId, 76 in VmsLayer layer, 77 in SharedMemory packet) = 8; 78 } 79