139f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius/*
239f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * Copyright 2016 The Android Open Source Project
339f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius *
439f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * Licensed under the Apache License, Version 2.0 (the "License");
539f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * you may not use this file except in compliance with the License.
639f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * You may obtain a copy of the License at
739f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius *
839f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius *      http://www.apache.org/licenses/LICENSE-2.0
939f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius *
1039f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * Unless required by applicable law or agreed to in writing, software
1139f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * distributed under the License is distributed on an "AS IS" BASIS,
1239f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1339f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * See the License for the specific language governing permissions and
1439f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * limitations under the License.
1539f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius */
1639f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius
1739f588f8ed81654c382f8396af394d42824f5cbbRoshan Piuspackage android.hardware.wifi.supplicant@1.0;
1839f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius
1939f588f8ed81654c382f8396af394d42824f5cbbRoshan Piusimport ISupplicantNetwork;
2039f588f8ed81654c382f8396af394d42824f5cbbRoshan Piusimport ISupplicantP2pNetworkCallback;
2139f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius
2239f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius/**
238c6a8772f7fc3bdc75d7f07c519869bef501a748Roshan Pius * Interface exposed by the supplicant for each P2P mode network
2439f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius * configuration it controls.
2539f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius */
2639f588f8ed81654c382f8396af394d42824f5cbbRoshan Piusinterface ISupplicantP2pNetwork extends ISupplicantNetwork {
2739f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius  /**
2839f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * Register for callbacks from this network.
2939f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   *
3039f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * These callbacks are invoked for events that are specific to this network.
3139f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * Registration of multiple callback objects is supported. These objects must
3239f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * be automatically deleted when the corresponding client process is dead or
3339f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * if this network is removed.
3439f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   *
3539f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * @param callback An instance of the |ISupplicantP2pNetworkCallback| HIDL
3639f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   *        interface object.
3739f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * @return status P2ptus of the operation.
3839f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   *         Possible status codes:
3939f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   *         |SupplicantP2ptusCode.SUCCESS|,
4039f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   *         |SupplicantP2ptusCode.FAILURE_UNKNOWN|,
4139f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   *         |SupplicantP2ptusCode.FAILURE_NETWORK_INVALID|
4239f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   */
4339f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius  registerCallback(ISupplicantP2pNetworkCallback callback)
4439f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius      generates (SupplicantStatus status);
4509f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius
4609f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  /**
4709f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * Getters for the various network params.
4809f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   */
4909f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  /**
5009f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * Get SSID for this network.
5109f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *
5209f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return status Status of the operation.
5309f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         Possible status codes:
5409f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.SUCCESS|,
5509f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
5609f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return ssid value set.
5709f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   */
5809f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  getSsid() generates (SupplicantStatus status, Ssid ssid);
5909f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius
6009f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  /**
6109f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * Get the BSSID set for this network.
6209f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *
6309f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return status Status of the operation.
6409f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         Possible status codes:
6509f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.SUCCESS|,
6609f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
6709f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return bssid value set.
6809f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   */
6909f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  getBssid() generates (SupplicantStatus status, Bssid bssid);
7009f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius
7109f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  /**
7209f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * Check if the network is currently active one.
7309f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *
7409f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return status Status of the operation.
7509f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         Possible status codes:
7609f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.SUCCESS|,
7709f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
7809f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return isCurrent true if current, false otherwise.
7909f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   */
8009f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  isCurrent() generates (SupplicantStatus status, bool isCurrent);
8109f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius
8209f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  /**
8309f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * Check if the network is marked persistent.
8409f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *
8509f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return status Status of the operation.
8609f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         Possible status codes:
8709f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.SUCCESS|,
8809f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
8909f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return isPersistent true if persistent, false otherwise.
9009f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   */
9109f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  isPersistent() generates (SupplicantStatus status, bool isPersistent);
9209f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius
9309f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  /**
9409f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * Check if the device is the group owner of the network.
9509f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *
9609f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return status Status of the operation.
9709f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         Possible status codes:
9809f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.SUCCESS|,
9909f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
10009f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   * @return isGo true if group owner, false otherwise.
10109f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius   */
10209f2ce3b3e26504e15615b202a6722cee2c35f58Roshan Pius  isGo() generates (SupplicantStatus status, bool isGo);
10394b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius
10494b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius  /**
10594b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * Set the list of P2P Clients in a persistent group (GO).
10694b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * This is a list of P2P Clients (P2P Device Address) that have joined
10794b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * the persistent group. This is maintained on the GO for persistent
10894b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * group entries (disabled == 2).
10994b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *
11094b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * @param clients MAC address of the clients.
11194b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * @return status Status of the operation.
11294b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *         Possible status codes:
11394b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *         |SupplicantStatusCode.SUCCESS|,
11494b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *         |SupplicantP2ptusCode.FAILURE_UNKNOWN|,
11594b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
11694b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   */
11794b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius  setClientList(vec<MacAddress> clients) generates (SupplicantStatus status);
11894b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius
11994b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius  /**
12094b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * Get the list of P2P Clients in a persistent group (GO).
12194b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * This is a list of P2P Clients (P2P Device Address) that have joined
12294b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * the persistent group. This is maintained on the GO for persistent
12394b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * group entries (disabled == 2).
12494b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *
12594b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * @return status Status of the operation.
12694b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *         Possible status codes:
12794b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *         |SupplicantStatusCode.SUCCESS|,
12894b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *         |SupplicantP2ptusCode.FAILURE_UNKNOWN|,
12994b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
13094b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   * @return clients MAC address of the clients.
13194b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius   */
13294b4bdca75380220919dbcd7a5ff84782e988a2aRoshan Pius  getClientList() generates (SupplicantStatus status, vec<MacAddress> clients);
13339f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius};
134