public class WifiP2pGroupList extends Object implements Parcelable
WifiP2pManager
Modifier and Type | Class and Description |
---|---|
static interface |
WifiP2pGroupList.GroupDeleteListener |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<WifiP2pGroupList> |
CREATOR
Implement the Parcelable interface
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
WifiP2pGroupList() |
WifiP2pGroupList(WifiP2pGroupList source,
WifiP2pGroupList.GroupDeleteListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
add(WifiP2pGroup group)
Add the specified group to this group list.
|
boolean |
clear()
Clear the group.
|
boolean |
contains(int netId)
Return true if this group list contains the specified network id.
|
int |
describeContents()
Implement the Parcelable interface
|
Collection<WifiP2pGroup> |
getGroupList()
Return the list of p2p group.
|
int |
getNetworkId(String deviceAddress)
Return the network id of the group owner profile with the specified p2p device
address.
|
int |
getNetworkId(String deviceAddress,
String ssid)
Return the network id of the group with the specified p2p device address
and the ssid.
|
String |
getOwnerAddr(int netId)
Return the group owner address of the group with the specified network id
|
void |
remove(int netId)
Remove the group with the specified network id from this group list.
|
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel dest,
int flags)
Implement the Parcelable interface
|
public static final Parcelable.Creator<WifiP2pGroupList> CREATOR
public WifiP2pGroupList()
public WifiP2pGroupList(WifiP2pGroupList source, WifiP2pGroupList.GroupDeleteListener listener)
public Collection<WifiP2pGroup> getGroupList()
public void add(WifiP2pGroup group)
group
- public void remove(int netId)
netId
- public boolean clear()
public int getNetworkId(String deviceAddress)
deviceAddress
- p2p device address.public int getNetworkId(String deviceAddress, String ssid)
deviceAddress
- p2p device address.ssid
- ssid.public String getOwnerAddr(int netId)
netId
- network id.public boolean contains(int netId)
netId
- network id.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public int describeContents()
describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.