Codebase list virt-viewer / 87d8c80
src: Add usb-device-reset hotkey support to config file Signed-off-by: Paul Donohue <git@PaulSD.com> Paul Donohue authored 3 years ago Daniel P. Berrangé committed 2 years ago
2 changed file(s) with 28 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6262 * - smartcard-insert: string in spice hotkey format
6363 * - smartcard-remove: string in spice hotkey format
6464 * - secure-attention: string in spice hotkey format
65 * - usb-device-reset: string in spice hotkey format
6566 * - enable-smartcard: int (0 or 1 atm)
6667 * - enable-usbredir: int (0 or 1 atm)
6768 * - color-depth: int
136137 PROP_SECURE_CHANNELS,
137138 PROP_DELETE_THIS_FILE,
138139 PROP_SECURE_ATTENTION,
140 PROP_USB_DEVICE_RESET,
139141 PROP_OVIRT_ADMIN,
140142 PROP_OVIRT_HOST,
141143 PROP_OVIRT_VM_GUID,
571573 {
572574 virt_viewer_file_set_string(self, MAIN_GROUP, "secure-attention", value);
573575 g_object_notify(G_OBJECT(self), "secure-attention");
576 }
577
578 gchar*
579 virt_viewer_file_get_usb_device_reset(VirtViewerFile* self)
580 {
581 return virt_viewer_file_get_string(self, MAIN_GROUP, "usb-device-reset");
582 }
583
584 void
585 virt_viewer_file_set_usb_device_reset(VirtViewerFile* self, const gchar* value)
586 {
587 virt_viewer_file_set_string(self, MAIN_GROUP, "usb-device-reset", value);
588 g_object_notify(G_OBJECT(self), "usb-device-reset");
574589 }
575590
576591 gchar*
966981 { "smartcard-insert", "app.smartcard-insert" },
967982 { "smartcard-remove", "app.smartcard-remove" },
968983 { "secure-attention", "win.secure-attention" },
984 { "usb-device-reset", "win.usb-device-reset" },
969985 };
970986 int i;
971987
10531069 case PROP_SECURE_ATTENTION:
10541070 virt_viewer_file_set_secure_attention(self, g_value_get_string(value));
10551071 break;
1072 case PROP_USB_DEVICE_RESET:
1073 virt_viewer_file_set_usb_device_reset(self, g_value_get_string(value));
1074 break;
10561075 case PROP_ENABLE_SMARTCARD:
10571076 virt_viewer_file_set_enable_smartcard(self, g_value_get_int(value));
10581077 break;
11791198 case PROP_SECURE_ATTENTION:
11801199 g_value_take_string(value, virt_viewer_file_get_secure_attention(self));
11811200 break;
1201 case PROP_USB_DEVICE_RESET:
1202 g_value_take_string(value, virt_viewer_file_get_usb_device_reset(self));
1203 break;
11821204 case PROP_ENABLE_SMARTCARD:
11831205 g_value_set_int(value, virt_viewer_file_get_enable_smartcard(self));
11841206 break;
13331355 g_param_spec_string("secure-attention", "secure-attention", "secure-attention", NULL,
13341356 G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
13351357
1358 g_object_class_install_property(G_OBJECT_CLASS(klass), PROP_USB_DEVICE_RESET,
1359 g_param_spec_string("usb-device-reset", "usb-device-reset", "usb-device-reset", NULL,
1360 G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
1361
13361362 g_object_class_install_property(G_OBJECT_CLASS(klass), PROP_ENABLE_SMARTCARD,
13371363 g_param_spec_int("enable-smartcard", "enable-smartcard", "enable-smartcard", 0, 1, 0,
13381364 G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
104104 void virt_viewer_file_set_delete_this_file(VirtViewerFile* self, gint value);
105105 gchar* virt_viewer_file_get_secure_attention(VirtViewerFile* self);
106106 void virt_viewer_file_set_secure_attention(VirtViewerFile* self, const gchar* value);
107 gchar* virt_viewer_file_get_usb_device_reset(VirtViewerFile* self);
108 void virt_viewer_file_set_usb_device_reset(VirtViewerFile* self, const gchar* value);
107109 gint virt_viewer_file_get_ovirt_admin(VirtViewerFile* self);
108110 void virt_viewer_file_set_ovirt_admin(VirtViewerFile* self, gint value);
109111 gchar* virt_viewer_file_get_ovirt_host(VirtViewerFile* self);