• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 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;
18 
19 import android.bluetooth.BluetoothDevice;
20 import android.car.projection.ProjectionStatus;
21 import android.car.ICarProjectionKeyEventHandler;
22 import android.car.ICarProjectionStatusListener;
23 import android.content.Intent;
24 import android.os.Bundle;
25 import android.os.Messenger;
26 
27 /**
28  * Binder interface for {@link android.car.CarProjectionManager}.
29  * Check {@link android.car.CarProjectionManager} APIs for expected behavior of each calls.
30  *
31  * @hide
32  */
33 interface ICarProjection {
34     /**
35      * Registers projection runner on projection start with projection service
36      * to create reverse binding.
37      */
38     void registerProjectionRunner(in Intent serviceIntent) = 0;
39 
40     /**
41      * Unregisters projection runner on projection stop with projection service to create
42      * reverse binding.
43      */
44     void unregisterProjectionRunner(in Intent serviceIntent) = 1;
45 
46     /**
47      * Registers projection key event handler.
48      * Re-registering same event handler with different events will cause only events to update.
49      */
registerKeyEventHandler( in ICarProjectionKeyEventHandler eventHandler, in byte[] eventMask)50     void registerKeyEventHandler(
51             in ICarProjectionKeyEventHandler eventHandler, in byte[] eventMask) = 2;
52 
53     /**
54      * Unregisters projection key event handler.
55      */
56     void unregisterKeyEventHandler(in ICarProjectionKeyEventHandler eventHandler) = 3;
57 
58     /**
59      * Starts Wi-Fi access point if it hasn't been started yet for wireless projection and returns
60      * WiFiConfiguration object with access point details.
61      */
startProjectionAccessPoint(in Messenger messenger, in IBinder binder)62     void startProjectionAccessPoint(in Messenger messenger, in IBinder binder) = 4;
63 
64     /**
65      * Stops previously requested Wi-Fi access point.
66      */
67     void stopProjectionAccessPoint(in IBinder binder) = 5;
68 
69     /** Disconnect a Bluetooth profile, and prevent it from reconnecting. */
requestBluetoothProfileInhibit( in BluetoothDevice device, in int profile, in IBinder token)70     boolean requestBluetoothProfileInhibit(
71             in BluetoothDevice device, in int profile, in IBinder token) = 6;
72 
73     /** Undo the effects of requestBluetoothProfileInhibit. */
releaseBluetoothProfileInhibit( in BluetoothDevice device, in int profile, in IBinder token)74     boolean releaseBluetoothProfileInhibit(
75             in BluetoothDevice device, in int profile, in IBinder token) = 7;
76 
77     /** Reports projection status for a given projection receiver app. */
updateProjectionStatus(in ProjectionStatus status, in IBinder token)78     void updateProjectionStatus(in ProjectionStatus status, in IBinder token) = 8;
79 
80     /** Registers projection status listener */
81     void registerProjectionStatusListener(in ICarProjectionStatusListener listener) = 9;
82 
83     /** Unregister projection status listener */
84     void unregisterProjectionStatusListener(in ICarProjectionStatusListener listener) = 10;
85 
86     /**
87      * Returns options for projection receiver app that can be un-packed using
88      * {@link android.car.projection.ProjectionOptions} class.
89      */
getProjectionOptions()90     Bundle getProjectionOptions() = 11;
91 
92     /** Returns a list of available Wi-Fi channels */
getAvailableWifiChannels(int band)93     int[] getAvailableWifiChannels(int band) = 12;
94 }
95