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.nearby; 18 19 import android.nearby.IBroadcastListener; 20 import android.nearby.IScanListener; 21 import android.nearby.BroadcastRequestParcelable; 22 import android.nearby.ScanRequest; 23 import android.nearby.PoweredOffFindingEphemeralId; 24 import android.nearby.aidl.IOffloadCallback; 25 26 /** 27 * Interface for communicating with the nearby services. 28 * 29 * @hide 30 */ 31 interface INearbyManager { 32 registerScanListener(in ScanRequest scanRequest, in IScanListener listener, String packageName, @nullable String attributionTag)33 int registerScanListener(in ScanRequest scanRequest, in IScanListener listener, 34 String packageName, @nullable String attributionTag); 35 unregisterScanListener(in IScanListener listener, String packageName, @nullable String attributionTag)36 void unregisterScanListener(in IScanListener listener, String packageName, @nullable String attributionTag); 37 startBroadcast(in BroadcastRequestParcelable broadcastRequest, in IBroadcastListener callback, String packageName, @nullable String attributionTag)38 void startBroadcast(in BroadcastRequestParcelable broadcastRequest, 39 in IBroadcastListener callback, String packageName, @nullable String attributionTag); 40 stopBroadcast(in IBroadcastListener callback, String packageName, @nullable String attributionTag)41 void stopBroadcast(in IBroadcastListener callback, String packageName, @nullable String attributionTag); 42 queryOffloadCapability(in IOffloadCallback callback)43 void queryOffloadCapability(in IOffloadCallback callback) ; 44 setPoweredOffFindingEphemeralIds(in List<PoweredOffFindingEphemeralId> eids)45 void setPoweredOffFindingEphemeralIds(in List<PoweredOffFindingEphemeralId> eids); 46 setPoweredOffModeEnabled(boolean enabled)47 void setPoweredOffModeEnabled(boolean enabled); 48 getPoweredOffModeEnabled()49 boolean getPoweredOffModeEnabled(); 50 } 51