public class ModProtocol extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
ModProtocol.Protocol
This class presents the actual greybus protocol id, which the ModProtocol
instance is associated with.
|
Parcelable.ClassLoaderCreator, Parcelable.Creator
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator |
CREATOR |
static int |
PROTOCOL_ALL
Special "protocol", used in
ModManager.registerModListener(com.motorola.mod.ModListener, int[]) only,
and NOT a real protocol at all. |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object other) |
ModProtocol.Protocol |
getProtocol()
The getProtocol() method returns the protocol enumeration associated with
this object.
|
String |
getProtocolName()
The getProtocolName() method returns a readable name of the protocol, as
defined in the
ModProtocol.Protocol enumeration. |
short |
getRawProtocolId()
The getRawProtocolId() method returns the protocol ID associated with this
object, as defined in the
ModProtocol.Protocol enumeration. |
byte |
getVersionMajor()
Each greybus protocol has an associated Major and Minor version. For future use only.
|
byte |
getVersionMinor()
Each greybus protocol has an associated Major and Minor version. For future use only.
|
String |
toString() |
void |
writeToParcel(Parcel out,
int flags) |
public static final Parcelable.Creator CREATOR
public static final int PROTOCOL_ALL
ModManager.registerModListener(com.motorola.mod.ModListener, int[])
only,
and NOT a real protocol at all.public ModProtocol.Protocol getProtocol()
null
, the object is holding an
unsupported protocol, and the caller should use ModProtocol.getRawProtocolId()
to retrieve the protocol ID.public short getRawProtocolId()
ModProtocol.Protocol
enumeration.public byte getVersionMajor()
public byte getVersionMinor()
public String getProtocolName()
ModProtocol.Protocol
enumeration.public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel out, int flags)
writeToParcel
in interface Parcelable
(c) 2016 Motorola Mobility LLC. All Rights Reserved
MOTOROLA and the Stylized M Logo are registered trademarks of Motorola Trademark Holdings, LLC
Android, Google, Google Play, Nexus and other marks are trademarks of Google Inc.