[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [libvirt-glib] Add gvir_domain_open_graphics_fd()



On Wed, Nov 19, 2014 at 12:36 PM, Christophe Fergeau
<cfergeau redhat com> wrote:
> On Wed, Nov 19, 2014 at 12:08:21PM +0000, Zeeshan Ali (Khattak) wrote:
>> On Wed, Nov 19, 2014 at 11:00 AM, Christophe Fergeau
>> <cfergeau redhat com> wrote:
>> > Could/should this take a GVirConfigDomainGraphics * instead and infer
>> > the index from it?
>> > I know gvir_domain-open_graphics() uses 'idx', but maybe we should offer
>> > the 2 variants?
>>
>> Doesn't sound very convenient and also I don't think the API
>> guarantees the order of devices returned from
>> gvir_config_domain_get_devices.
>
> Hmm if it's not guaranteed now, we'll have to make sure it is at some
> point.

Well, I guess its guaranteed if we say that it is since we create list
of devices by parsing xml..

However, there is still the issue of this API not being convenient for
app if it takes a GVirConfigDomainGraphics *. They'll have to get the
GVirConfigDomain pointer and get list of devices and and find the
graphics device themselves while most domains have just one graphics
device typically.

> Or is it possible to find out the index to pass to that function
> with the current API when there are multiple graphics devices?

No, AFAIK.

-- 
Regards,

Zeeshan Ali (Khattak)
________________________________________
Befriend GNOME: http://www.gnome.org/friends/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]