callAddService method

Future<void> callAddService({
  1. required int interface,
  2. required int protocol,
  3. required int flags,
  4. required String name,
  5. required String type,
  6. required String domain,
  7. required String host,
  8. required int port,
  9. required List<List<int>> txt,
  10. bool noAutoStart = false,
  11. bool allowInteractiveAuthorization = false,
})

Invokes org.freedesktop.Avahi.EntryGroup.AddService()

Implementation

Future<void> callAddService(
    {required int interface,
    required int protocol,
    required int flags,
    required String name,
    required String type,
    required String domain,
    required String host,
    required int port,
    required List<List<int>> txt,
    bool noAutoStart = false,
    bool allowInteractiveAuthorization = false}) async {
  await callMethod(
      'org.freedesktop.Avahi.EntryGroup',
      'AddService',
      [
        DBusInt32(interface),
        DBusInt32(protocol),
        DBusUint32(flags),
        DBusString(name),
        DBusString(type),
        DBusString(domain),
        DBusString(host),
        DBusUint16(port),
        DBusArray(
            DBusSignature('ay'), txt.map((child) => DBusArray.byte(child)))
      ],
      replySignature: DBusSignature(''),
      noAutoStart: noAutoStart,
      allowInteractiveAuthorization: allowInteractiveAuthorization);
}