org.jSyncManager.API.Protocol.Util

Class DLPNetSyncInfo

Implemented Interfaces:
Serializable

public class DLPNetSyncInfo
extends java.lang.Object
implements Serializable

The Network Sync Information class. This class is used to contains a handhelds network synchronization information.

Constructor Summary

DLPNetSyncInfo()
Create a new, empty Net Sync Info object.
DLPNetSyncInfo(byte[] data)
Creates a new Net Sync Info object based on the byte array read from the handheld.

Method Summary

String
getHostIP()
Gets the host IP for LANSync, or null if not set.
String
getHostName()
Gets the hostname for LANSync, or null if not set.
String
getNetmask()
Gets the netmask for LANSync, or null if not set.
boolean
isLANSyncEnabled()
Tests to see if LANSync is enabled.
byte[]
object2Bytes()
Converts this object to a series of bytes for writing to the handheld.
void
setHostIP(String ip)
Sets the hostIP for LANSync.
void
setHostName(String host)
Sets the hostname for LANSync.
void
setLANSyncEnabled(boolean state)
Sets the LANSync-enabled state.
void
setNetmask(String netmask)
Sets the netmask for LANSync.

Constructor Details

DLPNetSyncInfo

public DLPNetSyncInfo()
Create a new, empty Net Sync Info object. By default, all fields will be set to null.

DLPNetSyncInfo

public DLPNetSyncInfo(byte[] data)
Creates a new Net Sync Info object based on the byte array read from the handheld.
Parameters:
data - the LANSync information as read from the handheld.

Method Details

getHostIP

public String getHostIP()
Gets the host IP for LANSync, or null if not set.
Returns:
the hostIP for LANSync, or null if not set.

getHostName

public String getHostName()
Gets the hostname for LANSync, or null if not set.
Returns:
the hostname for LANSync, or null if not set.

getNetmask

public String getNetmask()
Gets the netmask for LANSync, or null if not set.
Returns:
the netmask for LANSync, or null if not set.

isLANSyncEnabled

public boolean isLANSyncEnabled()
Tests to see if LANSync is enabled.
Returns:
true if LANSync is enabled, false otherwise.

object2Bytes

public byte[] object2Bytes()
Converts this object to a series of bytes for writing to the handheld.
Returns:
a series of bytes representing this object.

setHostIP

public void setHostIP(String ip)
Sets the hostIP for LANSync.
Parameters:
ip - the hostIP to use for LANSync.

setHostName

public void setHostName(String host)
Sets the hostname for LANSync.
Parameters:
host - the hostname to use for LANSync.

setLANSyncEnabled

public void setLANSyncEnabled(boolean state)
Sets the LANSync-enabled state.
Parameters:
state - set to true if LANSync is to be enabled, false otherwise.

setNetmask

public void setNetmask(String netmask)
Sets the netmask for LANSync.
Parameters:
netmask - the netmask to use for LANSync.