:: Re: [DNG] automount, mount, and USB…
Top Pagina
Delete this message
Reply to this message
Auteur: Laurent Bercot
Datum:  
Aan: dng
Onderwerp: Re: [DNG] automount, mount, and USB sticks
On 29/07/2015 16:02, kpb wrote:
> That is a really interesting way of looing at things, thanks for the mental prompt.


It's an elementary design principle: separate the engine from the interface.
I very much hope people who design GUIs keep it in mind.


> How would you deal with providing notifications to a GUI layer if present?


Have a general notification mechanism present, such as a bus (and no, I'm
not advocating D-Bus). Then have your GUI clients register on the bus and
subscribe to the events they're interested in, just like any other client
would.

But that's for the general case. In many other, specific cases, there will
be a communication stream from the command-line utility to its caller; if
the GUI is the caller, it can simply keep the command-line utility alive
and use the stream of information it's getting from it.

--
Laurent