Networking QML Type

Provides miscellaneous tools for interacting with a network. More...

Import Statement: import ArcGIS.AppFramework.Networking 1.0

Properties

Signals

Methods

Detailed Description

The Networking component handles miscellaneous properties used to identify details of the network the device is currently connected to. This component contains no means to interact with or write to these components, and is only capable of displaying them.

This code sample demonstrates using the Networking component to return some basic information about the network the device is currently connected to. The online status of the network connection will be displayed as a checkbox, but may not be writable by the app.

ColumnLayout {
    anchors {
        fill: parent
        margins: 5 * AppFramework.displayScaleFactor
    }

    CheckBox {
        enabled: false
        checked: AppFramework.network.isOnline
        text: "Online"
    }

    Text {
        Layout.fillWidth: true

        text: "Host name: %1".arg(Networking.hostName)
    }

    Text {
        Layout.fillWidth: true

        text: "Domain name: %1".arg(Networking.domainName)
    }

    Text {
        text: "Active configuration: %1 %2".arg(Networking.activeConfiguration.bearerTypeName).arg(Networking.activeConfiguration.name)
    }
}

Enumerations

NetworkAccessibility enumeration

NameValue
Networking.NetworkAccessibilityUnknownAccessibility-1
Networking.NetworkAccessibilityNotAccessible0
Networking.NetworkAccessibilityAccessible1

EncodingFormat enumeration

NameValue
Networking.EncodingFormatPem0
Networking.EncodingFormatDer1

PatternSyntax enumeration

NameValue
Networking.PatternSyntaxRegExp0
Networking.PatternSyntaxWildcard1
Networking.PatternSyntaxFixedString2
Networking.PatternSyntaxRegExp23
Networking.PatternSyntaxWildcardUnix4
Networking.PatternSyntaxW3CXmlSchema115

Property Documentation

[read-only] activeConfiguration : NetworkConfiguration

Returns the current active network configuration.


[read-only] addresses : List<NetworkAddress>

Returns a list of IP addresses currently being tracked by NetworkAddress.


[read-only] anyAddress : string

Returns the dual stack any-address. A socket bound on this address will listen on both IPv4 and IPv6 interfaces.


[read-only] anyIPv4Address : string

Reutrns the IPv4 any-address. A socket bound with this address will listen only on IPv4 interfaces.


[read-only] anyIPv6Address : string

Returns the IPv6 any-address. A socket bound with this address will listen only on IPv6 devices.


[read-only] broadcastAddress : string

Returns the IPv4 broadcast address.


[read-only] configurations : List<NetworkConfiguration>

Returns a list of configurations currently being tracked by NetworkConfiguration.


[read-only] credentialSignalingObject : CredentialSignalingInternal


defaultUserAgent : string


[read-only] domainName : string

Returns the DNS domain of the machine.


[read-only] hostName : string

Returns the machine's host name, if one is configured.


ignoreSslErrors : bool


[read-only] interfaces : List<NetworkInterface>

Returns a list of interfaces being tracked by NetworkInterface.


[read-only] isOnline : bool

Returns true if the device is online. Otherwise, returns false.


[read-only] localHostAddress : string

Returns the IPv4 local host address.


[read-only] localHostIPv6Address : string

Returns the IPv6 local host address.


networkAccessible : NetworkAccessibility

Holds whether the network is currently accessible. Uses the NetworkAccessibility enum.


[read-only] nullAddress : string

Returns the null address object.


password : string


pkcs12 : object

Read, set or clear the current PKCS#12 credentials object.

When you set a PKCS#12 credentials object, all subsequent SSL requests will use the new credentials. Use the clearAccessCache method to pick up changes to the PKCS#12 credential object, as otherwise requests may use the previous credentials.


proxyPassword : string


proxyRealm : string


proxyUser : string


realm : string


strictTransportSecurityEnabled : bool

Returns true if HTTP Strict Transport Security (HSTS) is enabled, otherwise returns false. By default, this is disabled.


[read-only] systemCaCertificates : QStringList


timeout : int


user : string


Signal Documentation

authenticationChallenge(AuthenticationChallenge authChallenge)

Note: The corresponding handler is onAuthenticationChallenge.


networkChanged()

Signal emitted when the state of the network has changed.

Note: The corresponding handler is onNetworkChanged.


networkError(url url, int error, string errorString)

Note: The corresponding handler is onNetworkError.


sslErrors(url url, object errors)

Note: The corresponding handler is onSslErrors.


Method Documentation

bool addDefaultCaCertificates(string path)

The path parameter


bool addDefaultCaCertificates(string path, encodingformat format)

The path parameter

The format parameter


bool addDefaultCaCertificates(string path, encodingformat format, patternsyntax patternSyntax)

The path parameter

The format parameter

The patternSyntax parameter


clearAccessCache()

Flushes the internal cache of authentication data and network connections.


clearConnectionCache()

Flushes the internal cache of network connections. In contrast to the clearAccessCache method, the authentication data is preserved.


object importPkcs12(object pkcs12File, string passPhrase)

Imports a PKCS#12 from a file, resource, or a binary object. The PKCS#12 file is a bundle containing a private key, certificates, and any associated caCertificates. If the passPhrase parameter is specified then it will be used to decrypt the PKCS#12 bundle.

If successful, this method returns the decrypted bundle as a PKCS#12 credential object. Otherwise, this method returns an empty response.

The pkcs12File parameter

Specifies a PKCS#12 (.pfx or .p12) file, resource, or binary object.

The passPhrase parameter

A password to decrypt the bundle.


bool isSpecialAddress(var address)

Returns true if the given address is a special address. Otherwise, returns false.

Potential special addresses are Null, LocalHost, LocalHostIPv6, Broadcast, AnyIPv4, AnyIPv6, and Any.

The address parameter

The address to check.


updateConfigurations()

Initiates an update of all configurations. This may be used to initiate WLAN scans or other time-consuming updates which may be required to obtain the correct state for configurations.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.