---
src/channel-power.c | 17 +++++++++++++++++
src/channel-power.h | 3 +++
src/map-file-glib | 1 +
3 files changed, 21 insertions(+)
diff --git a/src/channel-power.c b/src/channel-power.c
index 6b2d50f..7719184 100644
--- a/src/channel-power.c
+++ b/src/channel-power.c
@@ -93,6 +93,23 @@ void spice_power_channel_send_reset(SpicePowerChannel *self)
spice_msg_out_send(msg);
}
+/**
+ * spice_power_channel_send_poweroff:
+ * @self: a #SpicePowerChannel
+ *
+ * Send an poweroff action to the server.
+ **/
+void spice_power_channel_send_poweroff(SpicePowerChannel *self)
+{
+ CHANNEL_DEBUG(self, "spice_power_channel_send_poweroff() called");
+ SpiceMsgOut *msg;
+
+ g_return_if_fail(SPICE_IS_POWER_CHANNEL(self));
+
+ msg = spice_msg_out_new(SPICE_CHANNEL(self), SPICE_MSGC_POWER_POWEROFF);
+ spice_msg_out_send(msg);
+}
+
/* ------------------------------------------------------------------ */
/* coroutine context */
diff --git a/src/channel-power.h b/src/channel-power.h
index c1c453f..4d08390 100644
--- a/src/channel-power.h
+++ b/src/channel-power.h
@@ -66,6 +66,9 @@ GType spice_power_channel_get_type(void);
SPICE_GTK_AVAILABLE_IN_ALL
void spice_power_channel_send_reset(SpicePowerChannel *port);
+SPICE_GTK_AVAILABLE_IN_ALL
+void spice_power_channel_send_poweroff(SpicePowerChannel *port);
+
G_END_DECLS
#endif /* __SPICE_CLIENT_POWER_CHANNEL_H__ */
diff --git a/src/map-file-glib b/src/map-file-glib
index 7689320..8318a23 100644
--- a/src/map-file-glib
+++ b/src/map-file-glib
@@ -107,6 +107,7 @@ spice_port_event;
spice_port_write_async;
spice_port_write_finish;
spice_power_channel_get_type;
+spice_power_channel_send_poweroff;
spice_power_channel_send_reset;
spice_qmp_port_get;
spice_qmp_port_get_type;
--
2.52.0