Namespace l2dbus.DbusTypes

The L2DBUS DbusTypes module.

This module provides wrapper classes for the D-Bus types. The D-Bus type wrappers provide a hint to the marshalling code that converts between native Lua types and D-Bus types. Without any hint or a D-Bus introspective signature a heuristic approach is used to convert between the two type systems. Most of the time these conversions will be correct but the Lua/D-Bus wrapper types and message signatures help avoid potential conversion ambiguity.

Class Invalid

l2dbus.DbusTypes.Invalid.new ()

Invalid

value ()
dbusTypeId ()

Class Byte

l2dbus.DbusTypes.Byte.new (value)

Byte

value ()
dbusTypeId ()

Class Boolean

l2dbus.DbusTypes.Boolean.new (value)

Boolean

value ()
dbusTypeId ()

Class Int16

l2dbus.DbusTypes.Int16.new (value)

Int16

value ()
dbusTypeId ()

Class Uint16

l2dbus.DbusTypes.Uint16.new (value)

Uint16

value ()
dbusTypeId ()

Class Int32

l2dbus.DbusTypes.Int32.new (value)

Int32

value ()
dbusTypeId ()

Class Uint32

l2dbus.DbusTypes.Uint32.new (value)

Uint32

value ()
dbusTypeId ()

Class Int64

l2dbus.DbusTypes.Int64.new (value)

Int64

value ()
dbusTypeId ()

Class Uint64

l2dbus.DbusTypes.Uint64.new (value)

Uint64

value ()
dbusTypeId ()

Class Double

l2dbus.DbusTypes.Double.new (value)

Double

value ()
dbusTypeId ()

Class String

l2dbus.DbusTypes.String.new (value)

String

value ()
dbusTypeId ()

Class ObjectPath

l2dbus.DbusTypes.ObjectPath.new (value)

ObjectPath

value ()
dbusTypeId ()

Class Signature

l2dbus.DbusTypes.Signature.new (value)

Signature

value ()
dbusTypeId ()

Class Array

l2dbus.DbusTypes.Array.new (value)

Array

value ()
dbusTypeId ()

Class Dictionary

l2dbus.DbusTypes.Dictionary.new (value)

Dictionary

value ()
dbusTypeId ()

Class Structure

l2dbus.DbusTypes.Structure.new (value)

Structure

value ()
dbusTypeId ()

Class Variant

l2dbus.DbusTypes.Variant.new (value, signature)

Variant

value ()
dbusTypeId ()

Class UnixFd

l2dbus.DbusTypes.UnixFd.new (fd)

UnixFd

value ()
dbusTypeId ()


Class Invalid

The L2DBUS wrapper class for the D-Bus Invalid type.
l2dbus.DbusTypes.Invalid.new ()

Creates a new D-Bus Invalid wrapper object.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Invalid typed object.

Invalid

value ()

Returns the value associated with the Invalid type.

Returns:

    nil Returns nil for the Invalid type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Invalid type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Byte

The L2DBUS wrapper class for the D-Bus Byte type.
l2dbus.DbusTypes.Byte.new (value)

Creates a new D-Bus Byte wrapper object.

Parameters:

  • value number The Lua value associated and wrapped by the D-Bus Byte type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Byte typed object.

Byte

value ()

Returns the value associated with the Byte type.

Returns:

    number Returns the value associated with the Byte type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Byte type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Boolean

The L2DBUS wrapper class for the D-Bus Boolean type.
l2dbus.DbusTypes.Boolean.new (value)

Creates a new D-Bus Boolean wrapper object.

Parameters:

  • value bool The Lua value associated and wrapped by the D-Bus Boolean type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Boolean typed object.

Boolean

value ()

Returns the value associated with the Boolean type.

Returns:

    bool Returns the value associated with the Boolean type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Boolean type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Int16

The L2DBUS wrapper class for the D-Bus Int16 type.
l2dbus.DbusTypes.Int16.new (value)

Creates a new D-Bus Int16 wrapper object.

Parameters:

  • value number The Lua value associated and wrapped by the D-Bus Int16 type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Int16 typed object.

Int16

value ()

Returns the value associated with the Int16 type.

Returns:

    number Returns the value associated with the Int16 type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Int16 type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Uint16

The L2DBUS wrapper class for the D-Bus Uint16 type.
l2dbus.DbusTypes.Uint16.new (value)

Creates a new D-Bus Uint16 wrapper object.

Parameters:

  • value number The Lua value associated and wrapped by the D-Bus Uint16 type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Uint16 typed object.

Uint16

value ()

Returns the value associated with the Uint16 type.

Returns:

    number Returns the value associated with the Uint16 type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Uint16 type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Int32

The L2DBUS wrapper class for the D-Bus Int32 type.
l2dbus.DbusTypes.Int32.new (value)

Creates a new D-Bus Int32 wrapper object.

Parameters:

  • value number The Lua value associated and wrapped by the D-Bus Int32 type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Int32 typed object.

Int32

value ()

Returns the value associated with the Int32 type.

Returns:

    number Returns the value associated with the Int32 type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Int32 type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Uint32

The L2DBUS wrapper class for the D-Bus Uint32 type.
l2dbus.DbusTypes.Uint32.new (value)

Creates a new D-Bus Uint32 wrapper object.

Parameters:

  • value number The Lua value associated and wrapped by the D-Bus Uint32 type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Uint32 typed object.

Uint32

value ()

Returns the value associated with the Uint32 type.

Returns:

    number Returns the value associated with the Uint32 type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Uint32 type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Int64

The L2DBUS wrapper class for the D-Bus Int64 type.
l2dbus.DbusTypes.Int64.new (value)

Creates a new D-Bus Int64 wrapper object.

Parameters:

  • value number or userdata The Lua value associated and wrapped by the D-Bus Int64 type. Besides the basic Lua number type the constructor also accepts the Int64/Uint64 extended Lua types provided by this module.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Int64 typed object.

Int64

value ()

Returns the value associated with the Int64 type.

Returns:

    number Returns the value associated with the Int64 type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Int64 type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Uint64

The L2DBUS wrapper class for the D-Bus Uint64 type.
l2dbus.DbusTypes.Uint64.new (value)

Creates a new D-Bus Uint64 wrapper object.

Parameters:

  • value number or userdata The Lua value associated and wrapped by the D-Bus Uint64 type. Besides the basic Lua number type the constructor also accepts the Int64/Uint64 extended Lua types provided by this module.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Uint64 typed object.

Uint64

value ()

Returns the value associated with the Uint64 type.

Returns:

    number Returns the value associated with the Uint64 type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Uint64 type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Double

The L2DBUS wrapper class for the D-Bus Double type.
l2dbus.DbusTypes.Double.new (value)

Creates a new D-Bus Double wrapper object.

Parameters:

  • value number The Lua value associated and wrapped by the D-Bus Double type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Double typed object.

Double

value ()

Returns the value associated with the Double type.

Returns:

    number Returns the value associated with the Double type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Double type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class String

The L2DBUS wrapper class for the D-Bus String type.
l2dbus.DbusTypes.String.new (value)

Creates a new D-Bus String wrapper object.

Parameters:

  • value string The Lua value associated and wrapped by the D-Bus String type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus String typed object.

String

value ()

Returns the value associated with the String type.

Returns:

    string Returns the value associated with the String type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the String type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class ObjectPath

The L2DBUS wrapper class for the D-Bus ObjectPath type.
l2dbus.DbusTypes.ObjectPath.new (value)

Creates a new D-Bus ObjectPath wrapper object. This function does not validate the supplied D-Bus object path and assumes it meets the D-Bus specification requirements for such a path.

Parameters:

  • value string The Lua value associated and wrapped by the D-Bus ObjectPath type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus ObjectPath typed object.

ObjectPath

value ()

Returns the value associated with the ObjectPath type.

Returns:

    string Returns the value associated with the ObjectPath type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the ObjectPath type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Signature

The L2DBUS wrapper class for the D-Bus Signature type.
l2dbus.DbusTypes.Signature.new (value)

Creates a new D-Bus Signature wrapper object. This function does not validate the supplied D-Bus type signature and assumes it meets the D-Bus specification requirements for such a signature.

Parameters:

  • value string The Lua value associated and wrapped by the D-Bus Signature type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Signature typed object.

Signature

value ()

Returns the value associated with the Signature type.

Returns:

    string Returns the value associated with the Signature type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Signature type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Array

The L2DBUS wrapper class for the D-Bus Array type.
l2dbus.DbusTypes.Array.new (value)

Creates a new D-Bus Array wrapper object. This constructor only minimally validates the provided Lua table to verify that it meets the basic restrictions of a D-Bus array. At a minimum, the elements of the table must be consecutively indexed and be of the same (homogeneous) type.

Parameters:

  • value table The Lua table associated and wrapped by the D-Bus Array type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Array typed object.

Array

value ()

Returns the value associated with the Array type.

Returns:

    table Returns the value associated with the Array type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Array type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Dictionary

The L2DBUS wrapper class for the D-Bus Dictionary type.
l2dbus.DbusTypes.Dictionary.new (value)

Creates a new D-Bus Dictionary wrapper object. In D-Bus terms a dictionary is an array of DICT_ENTRY structures whereby the key is a basic D-Bus type and the associated value is any valid D-Bus type. The constructor only minimally validates the provided Lua table to verify that it meets the basic restrictions of a D-Bus DICT_ENTRY array.

Parameters:

  • value table The Lua table associated and wrapped by the D-Bus Dictionary type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Dictionary typed object.

Dictionary

value ()

Returns the value associated with the Dictionary type.

Returns:

    table Returns the value associated with the Dictionary type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Dictionary type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Structure

The L2DBUS wrapper class for the D-Bus Structure type.
l2dbus.DbusTypes.Structure.new (value)

Creates a new D-Bus Structure wrapper object. In Lua terms this is an array containing non-homogeneous types. This differs from a D-Bus array where all the elements of the array must be the same time. The fields of the structure are ordered by increasing index. The constructor does minimal checking to verify the Lua table passed into it meets these minimal requirements.

Parameters:

  • value table The Lua table associated and wrapped by the D-Bus Structure type.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Structure typed object.

Structure

value ()

Returns the value associated with the Structure type.

Returns:

    table Returns the value associated with the Structure type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Structure type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class Variant

The L2DBUS wrapper class for the D-Bus Variant type.
l2dbus.DbusTypes.Variant.new (value, signature)

Creates a new D-Bus Variant wrapper object. A variant can hold any D-Bus type whether it is a basic or container type. This means it can be used to hold any Lua type excluding functions, threads (coroutines), nil, and external userdata (or lightuserdata) objects.

Parameters:

  • value any The Lua value (any type) associated and wrapped by the D-Bus Variant type. This type excludes functions, threads, nil, and external userdata or lightuserdata.
  • signature optional string The optional D-Bus signature describing the variant type. Note: it's necessary to prefix the signature with the D-Bus 'v' (variant) type code in order to be parsed as a variant.

Returns:

    userdata A Lua userdata wrapper around a D-Bus Variant typed object.

Variant

value ()

Returns the value associated with the Variant type.

Returns:

    table Returns the value associated with the Variant type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the Variant type.

Returns:

    number Returns the integral value for the associated D-Bus type.

Class UnixFd

The L2DBUS wrapper class for the D-Bus UnixFd type.
l2dbus.DbusTypes.UnixFd.new (fd)

Creates a new D-Bus UnixFd wrapper object.

Parameters:

  • fd number A Unix file descriptor to wrap. The application must verify that the version of D-Bus being used supports passing file descriptors since not all versions of the library support it.

Returns:

    userdata A Lua userdata wrapper around a D-Bus UnixFd typed object.

UnixFd

value ()

Returns the value associated with the UnixFd type.

Returns:

    number Returns the value associated with the UnixFd type.
dbusTypeId ()

Returns the D-Bus type identifier associated with the UnixFd type.

Returns:

    number Returns the integral value for the associated D-Bus type.
generated by LDoc 1.3