getNetworkProtocols method

Future<List<NetworkProtocol>> getNetworkProtocols()

This operation gets defined network protocols from a device. The device shall support the getNetworkProtocols command returning configured network protocols.

Implementation

Future<List<NetworkProtocol>> getNetworkProtocols() async {
  final envelope = await Soap.retrieveEnvlope(
      uri, onvif.secureRequest(SoapRequest.networkProtocols()));

  if (envelope.body.networkProtocolsResponse == null) throw Exception();

  return envelope.body.networkProtocolsResponse!.networkProtocols;
}