getServices method

Future<List<Service>> getServices(
  1. [bool includeCapability = false]
)

Returns information about services on the device.

Implementation

Future<List<Service>> getServices([bool includeCapability = false]) async {
  loggy.debug('getServices');

  final envelope = await transport.sendRequest(
      uri,
      transport.envelope(
          null, soap.DeviceManagementRequest.getServices(includeCapability)));

  if (envelope.body.hasFault) {
    throw Exception(envelope.body.fault.toString());
  }

  return GetServicesResponse.fromJson(envelope.body.response!).services;
}