1 /**
2  * Copyright (c) 2023, 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.net.thread;
18 
19 import android.net.thread.ActiveOperationalDataset;
20 import android.net.thread.ChannelMaxPower;
21 import android.net.thread.IActiveOperationalDatasetReceiver;
22 import android.net.thread.IOperationalDatasetCallback;
23 import android.net.thread.IOperationReceiver;
24 import android.net.thread.IScheduleMigrationReceiver;
25 import android.net.thread.IStateCallback;
26 import android.net.thread.PendingOperationalDataset;
27 
28 /**
29 * Interface for communicating with ThreadNetworkControllerService.
30 * @hide
31 */
32 interface IThreadNetworkController {
registerStateCallback(in IStateCallback callback)33     void registerStateCallback(in IStateCallback callback);
unregisterStateCallback(in IStateCallback callback)34     void unregisterStateCallback(in IStateCallback callback);
registerOperationalDatasetCallback(in IOperationalDatasetCallback callback)35     void registerOperationalDatasetCallback(in IOperationalDatasetCallback callback);
unregisterOperationalDatasetCallback(in IOperationalDatasetCallback callback)36     void unregisterOperationalDatasetCallback(in IOperationalDatasetCallback callback);
37 
join(in ActiveOperationalDataset activeOpDataset, in IOperationReceiver receiver)38     void join(in ActiveOperationalDataset activeOpDataset, in IOperationReceiver receiver);
scheduleMigration(in PendingOperationalDataset pendingOpDataset, in IOperationReceiver receiver)39     void scheduleMigration(in PendingOperationalDataset pendingOpDataset, in IOperationReceiver receiver);
leave(in IOperationReceiver receiver)40     void leave(in IOperationReceiver receiver);
41 
setTestNetworkAsUpstream(in String testNetworkInterfaceName, in IOperationReceiver receiver)42     void setTestNetworkAsUpstream(in String testNetworkInterfaceName, in IOperationReceiver receiver);
setChannelMaxPowers(in ChannelMaxPower[] channelMaxPowers, in IOperationReceiver receiver)43     void setChannelMaxPowers(in ChannelMaxPower[] channelMaxPowers, in IOperationReceiver receiver);
44 
getThreadVersion()45     int getThreadVersion();
createRandomizedDataset(String networkName, IActiveOperationalDatasetReceiver receiver)46     void createRandomizedDataset(String networkName, IActiveOperationalDatasetReceiver receiver);
47 
setEnabled(boolean enabled, in IOperationReceiver receiver)48     void setEnabled(boolean enabled, in IOperationReceiver receiver);
49 }
50