+ json_close_array
+ [ -n "$_EXPORT_VARS" ] && {
+ json_add_array env
+ for var in $_EXPORT_VARS; do
+ eval "json_add_string \"\" \"\${$var}\""
+ done
+ json_close_array
+ }
+ _proto_notify "$interface"
+}
+
+proto_kill_command() {
+ local interface="$1"; shift
+
+ json_init
+ json_add_int action 2
+ [ -n "$1" ] && json_add_int signal "$1"
+ _proto_notify "$interface"
+}
+
+proto_notify_error() {
+ local interface="$1"; shift
+
+ json_init
+ json_add_int action 3
+ json_add_array error
+ while [ $# -gt 0 ]; do
+ json_add_string "" "$1"
+ shift
+ done
+ json_close_array
+ _proto_notify "$interface"
+}
+
+proto_block_restart() {
+ local interface="$1"; shift
+
+ json_init
+ json_add_int action 4
+ _proto_notify "$interface"
+}
+
+proto_set_available() {
+ local interface="$1"
+ local state="$2"
+ json_init
+ json_add_int action 5
+ json_add_boolean available "$state"
+ _proto_notify "$interface"