Home | History | Annotate | Download | only in vms
      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 import android.car.vms.VmsAvailableLayers;
     22 
     23 /**
     24  * @hide
     25  */
     26 interface IVmsSubscriberService {
     27     /**
     28      * Adds a subscriber to notifications only.
     29      * Should be called when a subscriber registers its callback, and before any subscription to a
     30      * layer is made.
     31      */
     32     void addVmsSubscriberToNotifications(
     33             in IVmsSubscriberClient subscriber) = 0;
     34 
     35     /**
     36      * Adds a subscriber to a VMS layer.
     37      */
     38     void addVmsSubscriber(
     39             in IVmsSubscriberClient subscriber,
     40             in VmsLayer layer) = 1;
     41 
     42     /**
     43      * Adds a subscriber to all actively broadcasted layers.
     44      * Publishers will not be notified regarding this request so the state of the service will not
     45      * change.
     46      */
     47     void addVmsSubscriberPassive(in IVmsSubscriberClient subscriber) = 2;
     48 
     49     /**
     50      * Adds a subscriber to a VMS layer from a specific publisher.
     51      */
     52     void addVmsSubscriberToPublisher(
     53             in IVmsSubscriberClient subscriber,
     54             in VmsLayer layer,
     55             int publisherId) = 3;
     56 
     57     /**
     58    * Removes a subscriber to notifications only.
     59      * Should be called when a subscriber unregisters its callback, and after all subscriptions to
     60      * layers are removed.
     61    */
     62     void removeVmsSubscriberToNotifications(
     63             in IVmsSubscriberClient subscriber) = 4;
     64 
     65     /**
     66    * Removes a subscriber to a VMS layer.
     67    */
     68     void removeVmsSubscriber(
     69             in IVmsSubscriberClient subscriber,
     70             in VmsLayer layer) = 5;
     71 
     72     /**
     73      * Removes a subscriber to all actively broadcasted layers.
     74      * Publishers will not be notified regarding this request so the state of the service will not
     75      * change.
     76      */
     77     void removeVmsSubscriberPassive(
     78             in IVmsSubscriberClient subscriber) = 6;
     79 
     80     /**
     81      * Removes a subscriber to a VMS layer from a specific publisher.
     82      */
     83     void removeVmsSubscriberToPublisher(
     84             in IVmsSubscriberClient subscriber,
     85             in VmsLayer layer,
     86             int publisherId) = 7;
     87 
     88     /**
     89      * Returns a list of available layers from the closure of the publishers offerings.
     90      */
     91     VmsAvailableLayers getAvailableLayers() = 8;
     92 
     93     /**
     94      *  Returns a the publisher information for a publisher ID.
     95      */
     96     byte[] getPublisherInfo(in int publisherId) = 9;
     97 }
     98