public class IRPeripheral
extends java.lang.Object
implements java.io.Serializable, android.os.Parcelable
Modifier and Type | Class and Description |
---|---|
static interface |
IRPeripheral.IRPeripheralListener |
static interface |
IRPeripheral.ReachabilityResult
testReachability()で使用するコールバック用インタフェースです。
Callback interface for testReachability().
|
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<IRPeripheral> |
CREATOR |
static java.lang.String |
IRKIT_MODEL_NAME |
static java.lang.String |
TAG |
Constructor and Description |
---|
IRPeripheral() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
void |
fetchDeviceId()
POST /keys を呼んでdeviceidを取得します。
Fetch deviceid by calling POST /keys.
|
void |
fetchModelInfo()
modelNameとfirmwareVersionを取得します。
Fetch modelName and firmwareVersion.
|
void |
fetchModelInfo(int retryCount)
modelNameとfirmwareVersionを取得します。
Fetch modelName and firmwareVersion.
|
java.lang.String |
getCustomizedName() |
java.lang.String |
getDeviceAPIEndpoint()
このIRKitデバイスにローカルネットワーク内で接続するためのエンドポイントを返します。
Return a local network endpoint for this IRKit device.
|
java.lang.String |
getDeviceId() |
java.lang.String |
getFirmwareVersion() |
java.util.Date |
getFoundDate() |
java.net.InetAddress |
getHost() |
java.lang.String |
getHostname() |
IRPeripheral.IRPeripheralListener |
getListener() |
java.lang.String |
getModelName() |
int |
getPort() |
boolean |
hasDeviceId() |
boolean |
hasModelInfo() |
boolean |
isFetchingDeviceId() |
boolean |
isLocalAddressResolved()
IRKitがローカルネットワーク内に見つかっているかどうかを返します。
Return whether this IRKit is found on local network.
|
boolean |
isReachable()
IRKitへローカルネットワーク内で到達可能かどうかをテストします。最大で100ミリ秒ブロックします。
Test whether this IRKit is reachable on local network.
|
boolean |
isWaitingForConfiguration()
自動設定を現在待機中かどうかを返します。
Returns whether this peripheral is waiting for auto configuration.
|
void |
lostLocalAddress()
IRKitにローカルネットワーク内で到達できなくなった際にこのメソッドを呼びます。
Call this method when IRKit is no longer reachable on local network.
|
static java.util.Map<java.lang.String,java.lang.String> |
parseServerHeaderValue(java.lang.String server)
Device HTTP APIのレスポンスに含まれるServerヘッダの値を解釈した結果を返します。
Returns parsed result of Server header contained in a response of Device HTTP API.
|
void |
setCustomizedName(java.lang.String customizedName) |
void |
setDeviceId(java.lang.String deviceId) |
void |
setFirmwareVersion(java.lang.String firmwareVersion) |
void |
setFoundDate(java.util.Date foundDate) |
void |
setHost(java.net.InetAddress host) |
void |
setHostname(java.lang.String hostname) |
void |
setIsWaitingForConfiguration(boolean isWaitingForConfiguration)
自動設定を現在待機中かどうかをセットします。
Sets whether this peripheral is waiting for auto configuration.
|
void |
setListener(IRPeripheral.IRPeripheralListener listener) |
void |
setModelName(java.lang.String modelName) |
void |
setPort(int port) |
boolean |
storeResponseHeaders(Response response)
Device HTTP APIのレスポンスヘッダを解釈してフィールドを必要に応じて更新します。
Parse headers in Device HTTP API response and store in fields if updated.
|
boolean |
storeServerHeaderValue(java.lang.String server)
Device HTTP APIのレスポンスに含まれるServerヘッダの値を解釈します。
modelNameとfirmwareVersionの値が変化している場合はフィールドに保存します。
Parse the value of Server header in Device HTTP API response.
|
void |
testReachability(IRPeripheral.ReachabilityResult result)
IRKitにローカルネットワーク内で到達可能かどうかを非同期にテストします。
Test asynchronously whether this IRKit is reachable on local network.
|
org.json.JSONObject |
toJSONObject() |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel out,
int flags) |
public static final transient java.lang.String TAG
public static final transient java.lang.String IRKIT_MODEL_NAME
public static final android.os.Parcelable.Creator<IRPeripheral> CREATOR
public java.lang.String toString()
toString
in class java.lang.Object
public IRPeripheral.IRPeripheralListener getListener()
public void setListener(IRPeripheral.IRPeripheralListener listener)
public java.lang.String getHostname()
public void setHostname(java.lang.String hostname)
public java.lang.String getCustomizedName()
public void setCustomizedName(java.lang.String customizedName)
public java.util.Date getFoundDate()
public void setFoundDate(java.util.Date foundDate)
public boolean hasDeviceId()
public java.lang.String getDeviceId()
public void setDeviceId(java.lang.String deviceId)
public boolean hasModelInfo()
public java.lang.String getModelName()
public void setModelName(java.lang.String modelName)
public java.lang.String getFirmwareVersion()
public boolean isFetchingDeviceId()
public void setFirmwareVersion(java.lang.String firmwareVersion)
public java.net.InetAddress getHost()
public void setHost(java.net.InetAddress host)
public int getPort()
public void setPort(int port)
public boolean isWaitingForConfiguration()
public void setIsWaitingForConfiguration(boolean isWaitingForConfiguration)
isWaitingForConfiguration
- 自動設定を待機中かどうか。
Whether this peripheral is waiting for auto configuration.public boolean storeServerHeaderValue(java.lang.String server)
server
- Serverヘッダの値。 Server header value.public static java.util.Map<java.lang.String,java.lang.String> parseServerHeaderValue(java.lang.String server)
server
- Serverヘッダの値。 Server header value.public boolean storeResponseHeaders(Response response)
response
- Response objectpublic void fetchModelInfo()
public void fetchModelInfo(int retryCount)
retryCount
- 最大リトライ数。 Max retry count.public void fetchDeviceId()
public java.lang.String getDeviceAPIEndpoint()
public boolean isLocalAddressResolved()
public boolean isReachable()
public void testReachability(IRPeripheral.ReachabilityResult result)
result
- ReachabilityResult objectpublic void lostLocalAddress()
public org.json.JSONObject toJSONObject()
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel out, int flags)
writeToParcel
in interface android.os.Parcelable