gi-nm-1.0.1: NM bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.NM.Structs.IPAddress

Description

No description available in the introspection data.

Synopsis

Exported types

newtype IPAddress Source #

Memory-managed wrapper type.

Instances

Instances details
Eq IPAddress Source # 
Instance details

Defined in GI.NM.Structs.IPAddress

GBoxed IPAddress Source # 
Instance details

Defined in GI.NM.Structs.IPAddress

ManagedPtrNewtype IPAddress Source # 
Instance details

Defined in GI.NM.Structs.IPAddress

TypedObject IPAddress Source # 
Instance details

Defined in GI.NM.Structs.IPAddress

Methods

glibType :: IO GType #

HasParentTypes IPAddress Source # 
Instance details

Defined in GI.NM.Structs.IPAddress

IsGValue (Maybe IPAddress) Source #

Convert IPAddress to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.NM.Structs.IPAddress

type ParentTypes IPAddress Source # 
Instance details

Defined in GI.NM.Structs.IPAddress

type ParentTypes IPAddress = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

cmpFull, dup, equal, ref, unref.

Getters

getAddress, getAttribute, getAttributeNames, getFamily, getPrefix.

Setters

setAddress, setAttribute, setPrefix.

cmpFull

iPAddressCmpFull Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

a: the IPAddress

-> IPAddress

b: the IPAddress to compare address to.

-> [IPAddressCmpFlags]

cmpFlags: the IPAddressCmpFlags that indicate what to compare.

-> m Int32

Returns: 0 if the two objects have the same values (according to their flags) or a integer indicating the compare order.

Note that with cmpFlags NM_IP_ADDRESS_CMP_FLAGS_WITH_ATTRS, there is no total order for comparing GVariant. That means, if the two addresses only differ by their attributes, the sort order is undefined and the return value only indicates equality.

Since: 1.22

dup

iPAddressDup Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> m IPAddress

Returns: a copy of address

This API was part of public headers before 1.32.0 but was erroneously not exported in the ABI. It is thus only usable since 1.32.0.

Creates a copy of address

Since: 1.32

equal

iPAddressEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> IPAddress

other: the IPAddress to compare address to.

-> m Bool

Returns: True if the objects contain the same values, False if they do not.

Determines if two IPAddress objects contain the same address and prefix (attributes are not compared).

getAddress

iPAddressGetAddress Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> m Text

Returns: the IP address

Gets the IP address property of this address object.

getAttribute

iPAddressGetAttribute Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> Text

name: the name of an address attribute

-> m GVariant

Returns: the value of the attribute with name name on address, or Nothing if address has no such attribute.

Gets the value of the attribute with name name on address

getAttributeNames

iPAddressGetAttributeNames Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> m [Text]

Returns: a Nothing-terminated array of attribute names,

Gets an array of attribute names defined on address.

getFamily

iPAddressGetFamily Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> m Int32

Returns: the IP address family

Gets the IP address family (eg, AF_INET) property of this address object.

getPrefix

iPAddressGetPrefix Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> m Word32

Returns: the IP address prefix

Gets the IP address prefix (ie "24" or "30" etc) property of this address object.

new

iPAddressNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

family: the IP address family (<literal>AF_INET</literal> or <literal>AF_INET6</literal>)

-> Text

addr: the IP address

-> Word32

prefix: the address prefix length

-> m IPAddress

Returns: the new IPAddress object, or Nothing on error (Can throw GError)

Creates a new IPAddress object.

newBinary

iPAddressNewBinary Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

family: the IP address family (<literal>AF_INET</literal> or <literal>AF_INET6</literal>)

-> Ptr ()

addr: the IP address

-> Word32

prefix: the address prefix length

-> m IPAddress

Returns: the new IPAddress object, or Nothing on error (Can throw GError)

Creates a new IPAddress object. addr must point to a buffer of the correct size for family.

ref

iPAddressRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> m () 

Increases the reference count of the object.

setAddress

iPAddressSetAddress Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> Text

addr: the IP address, as a string

-> m () 

Sets the IP address property of this address object.

addr must be a valid address of address's family. If you aren't sure you have a valid address, use utilsIpaddrValid to check it.

setAttribute

iPAddressSetAttribute Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> Text

name: the name of an address attribute

-> Maybe GVariant

value: the value

-> m () 

Sets or clears the named attribute on address to the given value.

setPrefix

iPAddressSetPrefix Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> Word32

prefix: the IP address prefix

-> m () 

Sets the IP address prefix property of this address object.

unref

iPAddressUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPAddress

address: the IPAddress

-> m () 

Decreases the reference count of the object. If the reference count reaches zero, the object will be destroyed.