WifiP2pUsdBasedServiceConfig


class WifiP2pUsdBasedServiceConfig : Parcelable
kotlin.Any
   ↳ android.net.wifi.p2p.nsd.WifiP2pUsdBasedServiceConfig

A class for creating a USD based service discovery configuration for use with WifiP2pServiceInfo.
or WifiP2pServiceRequest.
For the details of the configuration, refer Wi-Fi Alliance Wi-Fi Direct R2 specification - Appendix H - Unsynchronized Service Discovery (as defined in Wi-Fi Aware) and section 4.2.13 USD frame format.

Summary

Nested classes

Builder used to build WifiP2pUsdBasedServiceConfig objects for USD based service discovery and advertisement.

Constants
static Int

Bonjour service protocol type

static Int

Generic service protocol type

Inherited constants
Public constructors

Public methods
Int

Implement the Parcelable interface

String

Get the service name of this USD service configuration.

Int

Get the service protocol type of this USD service configuration.

ByteArray?

Get the service specific info of this USD service configuration.

String

Generates a string of all the defined elements.

Unit
writeToParcel(dest: Parcel, flags: Int)

Implement the Parcelable interface

Properties
static Parcelable.Creator<WifiP2pUsdBasedServiceConfig!>

Implement the Parcelable interface

Constants

SERVICE_PROTOCOL_TYPE_BONJOUR

static val SERVICE_PROTOCOL_TYPE_BONJOUR: Int

Bonjour service protocol type

Value: 1

SERVICE_PROTOCOL_TYPE_GENERIC

static val SERVICE_PROTOCOL_TYPE_GENERIC: Int

Generic service protocol type

Value: 2

Public constructors

WifiP2pUsdBasedServiceConfig

WifiP2pUsdBasedServiceConfig()

Public methods

describeContents

fun describeContents(): Int

Implement the Parcelable interface

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getServiceName

fun getServiceName(): String

Get the service name of this USD service configuration. See also Builder.

Return
String UTF-8 string defining the service. This value cannot be null.

getServiceProtocolType

fun getServiceProtocolType(): Int

Get the service protocol type of this USD service configuration. See also Builder.setServiceProtocolType(int).

Return
Int A non-negative service layer protocol type. Value is between 0 and 255 inclusive

getServiceSpecificInfo

fun getServiceSpecificInfo(): ByteArray?

Get the service specific info of this USD service configuration. see also Builder.setServiceSpecificInfo(byte[]) .

Return
ByteArray? A byte-array of service specification information, or null if unset.

toString

fun toString(): String

Generates a string of all the defined elements.

Return
String a compiled string representing all elements

writeToParcel

fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Implement the Parcelable interface

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

static val CREATOR: Parcelable.Creator<WifiP2pUsdBasedServiceConfig!>

Implement the Parcelable interface