1 /* 2 * Copyright (C) 2017 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.IVmsSubscriberClient; 20 import android.car.vms.VmsLayer; 21 22 /** 23 * @hide 24 */ 25 interface IVmsSubscriberService { 26 /** 27 * Subscribes the listener to receive messages from layer/version. 28 */ addVmsSubscriberClientListener( in IVmsSubscriberClient listener, in VmsLayer layer)29 void addVmsSubscriberClientListener( 30 in IVmsSubscriberClient listener, 31 in VmsLayer layer) = 0; 32 33 /** 34 * Subscribes the listener to receive messages from all published layer/version. The 35 * service will not send any subscription notifications to publishers (i.e. this is a passive 36 * subscriber). 37 */ 38 void addVmsSubscriberClientPassiveListener(in IVmsSubscriberClient listener) = 1; 39 40 /** 41 * Tells the VmsSubscriberService a client unsubscribes to layer messages. 42 */ removeVmsSubscriberClientListener( in IVmsSubscriberClient listener, in VmsLayer layer)43 void removeVmsSubscriberClientListener( 44 in IVmsSubscriberClient listener, 45 in VmsLayer layer) = 2; 46 47 /** 48 * Tells the VmsSubscriberService a passive client unsubscribes. This will not unsubscribe 49 * the listener from any specific layer it has subscribed to. 50 */ 51 void removeVmsSubscriberClientPassiveListener( 52 in IVmsSubscriberClient listener) = 3; 53 54 /** 55 * Tells the VmsSubscriberService a client requests the list of available layers. 56 * The service should call the client's onLayersAvailabilityChange in response. 57 */ getAvailableLayers()58 List<VmsLayer> getAvailableLayers() = 4; 59 } 60