Qt Jambi Home

com.trolltech.qt.network
Class QNetworkAddressEntry

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.network.QNetworkAddressEntry
All Implemented Interfaces:
QtJambiInterface

public class QNetworkAddressEntry
extends QtJambiObject

The QNetworkAddressEntry class stores one IP address supported by a network interface, along with its associated netmask and broadcast address.

Each network interface can contain zero or more IP addresses, which in turn can be associated with a netmask and/or a broadcast address (depending on support from the operating system).

This class represents one such group.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Constructor Summary
QNetworkAddressEntry()
          Constructs an empty QNetworkAddressEntry object.
QNetworkAddressEntry(QNetworkAddressEntry other)
          Constructs a QNetworkAddressEntry object that is a copy of the object other.
 
Method Summary
 QHostAddress broadcast()
          Returns the broadcast address associated with the IPv4 address and netmask.
static QNetworkAddressEntry fromNativePointer(QNativePointer nativePointer)
          This function returns the QNetworkAddressEntry instance pointed to by nativePointer
 QHostAddress ip()
          This function returns one IPv4 or IPv6 address found, that was found in a network interface.
static QNativePointer nativePointerArray(QNetworkAddressEntry[] array)
          This function returns a QNativePointer that is pointing to the specified QNetworkAddressEntry array.
 QHostAddress netmask()
          Returns the netmask associated with the IP address.
 void setBroadcast(QHostAddress newBroadcast)
          Sets the broadcast IP address of this QNetworkAddressEntry object to newBroadcast.
 void setIp(QHostAddress newIp)
          Sets the IP address the QNetworkAddressEntry object contains to newIp.
 void setNetmask(QHostAddress newNetmask)
          Sets the netmask that this QNetworkAddressEntry object contains to newNetmask.
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QNetworkAddressEntry

public QNetworkAddressEntry()

Constructs an empty QNetworkAddressEntry object.


QNetworkAddressEntry

public QNetworkAddressEntry(QNetworkAddressEntry other)

Constructs a QNetworkAddressEntry object that is a copy of the object other.

Method Detail

broadcast

public final QHostAddress broadcast()

Returns the broadcast address associated with the IPv4 address and netmask. It can usually be derived from those two by setting to 1 the bits of the IP address where the netmask contains a 0. (In other words, by bitwise-OR'ing the IP address with the inverse of the netmask)

This member is always empty for IPv6 addresses, since the concept of broadcast has been abandoned in that system in favor of multicast. In particular, the group of hosts corresponding to all the nodes in the local network can be reached by the "all-nodes" special multicast group (address FF02::1).

See Also:
setBroadcast

ip

public final QHostAddress ip()

This function returns one IPv4 or IPv6 address found, that was found in a network interface.

See Also:
setIp

netmask

public final QHostAddress netmask()

Returns the netmask associated with the IP address. The netmask is expressed in the form of an IP address, such as 255.255.0.0.

For IPv6 addresses, the prefix length is converted to an address where the number of bits set to 1 is equal to the prefix length. For a prefix length of 64 bits (the most common value), the netmask will be expressed as a QHostAddress holding the address FFFF:FFFF:FFFF:FFFF::

See Also:
setNetmask

setBroadcast

public final void setBroadcast(QHostAddress newBroadcast)

Sets the broadcast IP address of this QNetworkAddressEntry object to newBroadcast.

See Also:
broadcast

setIp

public final void setIp(QHostAddress newIp)

Sets the IP address the QNetworkAddressEntry object contains to newIp.

See Also:
ip

setNetmask

public final void setNetmask(QHostAddress newNetmask)

Sets the netmask that this QNetworkAddressEntry object contains to newNetmask.

See Also:
netmask

fromNativePointer

public static QNetworkAddressEntry fromNativePointer(QNativePointer nativePointer)
This function returns the QNetworkAddressEntry instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.

nativePointerArray

public static QNativePointer nativePointerArray(QNetworkAddressEntry[] array)
This function returns a QNativePointer that is pointing to the specified QNetworkAddressEntry array.

Parameters:
array - the array that the returned pointer will point to.
Returns:
a QNativePointer that is pointing to the specified array.

Qt Jambi Home