Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Send an event about progression to the eventpipe
Baptiste Daroussin committed 11 years ago
commit c12a5fd1a04ad7fd48cd2b9480b859d6199d7e0a
parent 3ad479bcdc35e330540c8625dceb7ac7b97ea7f1
1 file changed +9 -0
modified libpkg/pkg_event.c
@@ -361,6 +361,15 @@ pipeevent(struct pkg_event *ev)
		sbuf_printf(msg, "{ \"text\": \"%s\" } ] }}",
			ev->e_query_select.items[i]);
		break;
+
	case PKG_EVENT_PROGRESS_START:
+
		sbuf_printf(msg, "{\"type\": \"PROGRESS_START\", "
+
		  "\"data\": {}}");
+
		break;
+
	case PKG_EVENT_PROGRESS_TICK:
+
		sbuf_printf(msg, "{\"type\": \"PROGRESS_TICK\", "
+
		  "\"data\": { \"current\": %ld, \"total\" : %ld}}",
+
		  ev->e_progress_tick.current, ev->e_progress_tick.total);
+
		break;
	case PKG_EVENT_BACKUP:
	case PKG_EVENT_RESTORE:
		break;