Interface Info |
|---|
public interface IWifiP2pManagerEx |
Southbound API required for integrating Share Engine for non-Huawei devices, which is called when Share Engine directly connects to the device through Wi-Fi Direct. |
Qualifier and Type | Method Name and Description |
|---|---|
int[] | Obtains the list of 5 GHz channels supported by the device. |
void | createGroup(WifiP2pManager.Channel channel, String frequency, WifiP2pManager.ActionListener listener) Creates a peer-to-peer group with a specified frequency as the group owner. |
void | connect(WifiP2pManager.Channel channel, String config, WifiP2pManager.ActionListener listener) Joins a specified peer-to-peer group as a group client. |
void | removeGcGroup(WifiP2pManager.Channel channel, String iface, WifiP2pManager.ActionListener listener) Exits a specified peer-to-peer group as a group client. |
boolean | configIpAddr(String ifName, String ipAddr, String server) Configures DHCP settings as a group client. |
boolean | releaseIpAddr(String ifName) Cancels DHCP settings. |
int | getWifiP2pGroupFreq(WifiP2pGroup p2pGroup) Obtains the frequency of a specified peer-to-peer group. |
Method |
|---|
int[] getChannelListFor5G() |
Obtains the list of 5 GHz channels supported by the device. |
Method |
|---|
void createGroup(WifiP2pManager.Channel channel, String frequency, WifiP2pManager.ActionListener listener) |
Creates a peer-to-peer group with a specified frequency as the group owner. |
Parameters
Name | Description |
|---|---|
channel | Channel. |
frequency | Frequency of the group to create. |
listener | Callback object. |
Method |
|---|
void connect(WifiP2pManager.Channel channel, String config, WifiP2pManager.ActionListener listener) |
Joins a specified peer-to-peer group as a group client. |
Parameters
Name | Description |
|---|---|
channel | Channel. |
Config | Connection information: SSID + "\n" + GO_MAC + "\n" + PASSPHRASE + "\n" + FREQUENCE + "\n" + "1" |
listener | Callback object. |
Method |
|---|
void removeGcGroup(WifiP2pManager.Channel channel, String iface, WifiP2pManager.ActionListener listener) |
Exits a specified peer-to-peer group as a group client. |
Parameters
Name | Description |
|---|---|
channel | Channel. |
iface | P2P API, for example, p2p-p2p-1. |
listener | Callback object. |
Method |
|---|
boolean configIpAddr(String ifName, String ipAddr, String server) |
Configures DHCP settings as a group client. |
Parameters
Name | Description |
|---|---|
ifName | P2P API, for example, p2p-p2p-1. |
ipAddr | IP address of the group owner. |
server | Gateway address. |
Method |
|---|
boolean releaseIpAddr(String ifName) |
Cancels DHCP settings. |
Parameters
Name | Description |
|---|---|
ifName | P2P API, for example, p2p-p2p-1. |
Method |
|---|
int getWifiP2pGroupFreq(WifiP2pGroup p2pGroup) |
Obtains the frequency of a specified peer-to-peer group. |
Parameters
Name | Description |
|---|---|
p2pGroup | Peer-to-peer group. |