[Spice-devel] [spice-xpi PATCHv2 1/2] Handle USB-related plugin properties

Hans de Goede hdegoede at redhat.com
Wed Apr 4 07:05:04 PDT 2012


Hi,

On 04/04/2012 11:33 AM, Uri Lublin wrote:
> On 04/04/2012 11:03 AM, Christophe Fergeau wrote:
>> The Firefox plugin exposes the UsbAutoShare property and the SetUsbFilter
>> method that were not wired until now. This commit propagates their value to
>> the nsPluginInstance object and send them through the controller socket.
>> ---
>> SpiceXPI/src/plugin/plugin.cpp | 18 ++++++++----------
>> SpiceXPI/src/plugin/plugin.h | 2 ++
>> spice-protocol | 2 +-
>> 3 files changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
>> index 3459869..1f42214 100644
>> --- a/SpiceXPI/src/plugin/plugin.cpp
>> +++ b/SpiceXPI/src/plugin/plugin.cpp
>> @@ -194,6 +194,7 @@ nsPluginInstance::nsPluginInstance(NPP aInstance):
>> m_admin_console(PR_FALSE),
>> m_no_taskmgr_execution(PR_FALSE),
>> m_send_ctrlaltdel(PR_TRUE),
>> + m_usb_auto_share(PR_TRUE),
>> m_scriptable_peer(NULL)
>> {
>> // create temporary directory in /tmp
>> @@ -231,6 +232,7 @@ NPBool nsPluginInstance::init(NPWindow *aWindow)
>> m_number_of_monitors.clear();
>> m_guest_host_name.clear();
>> m_hot_keys.clear();
>> + m_usb_filter.clear();
>> m_language.clear();
>
> The default is an empty string.
> How does the client behave with such a filter string? Refuse redir for all devices ?

Erm, yes. Good one. spice-gtk has a build in sane default, so it is probably best to
just not send this if it is an empty string, rather then to add another default
value to the xpi.

Regards,

Hans


More information about the Spice-devel mailing list