getCapabilities method
This operation creates new device users and corresponding credentials on a device for authentication purposes. The device shall support creation of device users and their credentials through the CreateUsers command. Either all users are created successfully or a fault message shall be returned without creating any user.
ONVIF compliant devices are recommended to support password length of at least 28 bytes, as clients may follow the password derivation mechanism which results in 'password equivalent' of length 28 bytes, as described in section 3.1.2 of the ONVIF security white paper. This method has been replaced by the more generic getServices method. For capabilities of individual services refer to the getServiceCapabilities methods.
Implementation
//Future<CreateUsersResponse> createUsers(List<User> users) async {
// Future<void> createUsers(List<User> users) async {
// // final envelope = await Soap.retrieveEnvlope(
// print(uri);
// print(onvif
// .secureRequest(SoapRequest.createUsers(users))
// .toXmlString(pretty: true));
// await Soap.retrieveEnvlope(
// uri, onvif.secureRequest(SoapRequest.createUsers(users)),
// postProcess: (String xmlBody, dynamic jsonMap, Envelope envelope) {
// print(xmlBody);
// print('\n\n');
// print(jsonMap);
// });
// // if (envelope.body.usersResponse == null) throw Exception();
// // return envelope.body.usersResponse!;
// }
///This method has been replaced by the more generic [getServices] method. For
///capabilities of individual services refer to the [getServiceCapabilities]
///methods.
Future<Capabilities> getCapabilities({String category = 'All'}) async {
final envelope = await Soap.retrieveEnvlope(
uri, SoapRequest.envelope(null, SoapRequest.capabilities(category)));
if (envelope.body.capabilitiesResponse == null) throw Exception();
return envelope.body.capabilitiesResponse!.capabilities;
}