diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c index 4171f3d..5d67574 100644 --- a/src/virt-viewer-session.c +++ b/src/virt-viewer-session.c @@ -731,3 +731,16 @@ void virt_viewer_session_vm_action(VirtViewerSession *self, gint action) if (klass->vm_action) klass->vm_action(self, action); } + +gboolean virt_viewer_session_has_vm_action(VirtViewerSession *self, gint action) +{ + VirtViewerSessionClass *klass; + + g_return_val_if_fail(VIRT_VIEWER_IS_SESSION(self), FALSE); + + klass = VIRT_VIEWER_SESSION_GET_CLASS(self); + + if (klass->has_vm_action) + return klass->has_vm_action(self, action); + return FALSE; +} diff --git a/src/virt-viewer-session.h b/src/virt-viewer-session.h index b772ab1..650bca3 100644 --- a/src/virt-viewer-session.h +++ b/src/virt-viewer-session.h @@ -68,6 +68,7 @@ struct _VirtViewerSessionClass { gboolean (*can_share_folder)(VirtViewerSession *session); gboolean (*can_retry_auth)(VirtViewerSession *session); void (*vm_action)(VirtViewerSession *session, gint action); + gboolean (*has_vm_action)(VirtViewerSession *session, gint action); }; GType virt_viewer_session_get_type(void); @@ -107,3 +108,4 @@ gboolean virt_viewer_session_can_share_folder(VirtViewerSession *self); gboolean virt_viewer_session_can_retry_auth(VirtViewerSession *self); void virt_viewer_session_vm_action(VirtViewerSession *self, gint action); +gboolean virt_viewer_session_has_vm_action(VirtViewerSession *self, gint action);