ohos.utils.Sequenceablepublic class ProgramInfo
extends java.lang.Object
implements ohos.utils.Sequenceable
| 构造器 | 说明 |
|---|---|
ProgramInfo() |
A no-argument constructor used to create a
ProgramInfo instance. |
ProgramInfo(int signalQuality,
int freq,
int stereo,
boolean signalSatisfied) |
A constructor used to create a
ProgramInfo instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getFreq() |
Obtains the frequency of the radio signal.
|
int |
getSignalQuality() |
Obtains the radio signal strength.
|
boolean |
getSignalSatisfied() |
Checks whether the radio signal strength reaches the threshold.
|
int |
getStereo() |
Obtains the radio stereo volume.
|
boolean |
marshalling(ohos.utils.Parcel out) |
Marshals a
ProgramInfo object into a Parcel. |
void |
setFreq(int freq) |
Sets the frequency of the radio signal.
|
void |
setSignalQuality(int signalQuality) |
Sets the radio signal strength.
|
void |
setSignalSatisfied(boolean signalSatisfied) |
Sets whether the radio signal strength reaches the threshold.
|
void |
setStereo(int stereo) |
Sets radio stereo volume.
|
boolean |
unmarshalling(ohos.utils.Parcel in) |
Unmarshals a
ProgramInfo object from a Parcel. |
public ProgramInfo()
ProgramInfo instance.public ProgramInfo(int signalQuality,
int freq,
int stereo,
boolean signalSatisfied)
ProgramInfo instance.signalQuality - Indicates the signal strength.freq - Indicates the radio signal frequency.stereo - Indicates the radio stereo volume.signalSatisfied - Specifies whether the signal strength reaches the threshold.public int getSignalQuality()
public int getFreq()
public int getStereo()
public boolean getSignalSatisfied()
true if the threshold is reached; returns false otherwise.public void setSignalQuality(int signalQuality)
signalQuality - Indicates the signal strength to set. A larger value indicates stronger signal strength.public void setFreq(int freq)
freq - Indicates the radio signal frequency.public void setStereo(int stereo)
stereo - Indicates the stereo volume.public void setSignalSatisfied(boolean signalSatisfied)
signalSatisfied - Specifies whether the signal strength reaches the threshold.
Value true means that the threshold is reached, and false means the opposite.public boolean marshalling(ohos.utils.Parcel out)
ProgramInfo object into a Parcel.marshalling 在接口中 ohos.utils.Sequenceableout - Indicates the Parcel object into which the
ProgramInfo object will be written.true if marshalling is successful; returns
false otherwise.public boolean unmarshalling(ohos.utils.Parcel in)
ProgramInfo object from a Parcel.unmarshalling 在接口中 ohos.utils.Sequenceablein - Indicates the Parcel object into which the
ProgramInfo object has been written.true if unmarshalling is successful; returns
false otherwise.