[Spice-devel] [PATCH spice-server] style: Update style to include some C++ element

2018-02-06 Thread Frediano Ziglio
These style are used by other SPICE projects like spice-streaming-agent. See discussion "Coding style and naming conventions for C++" at https://lists.freedesktop.org/archives/spice-devel/2018-January/041562.html. Signed-off-by: Frediano Ziglio --- docs/spice_style.txt | 38 +

Re: [Spice-devel] [PATCH spice-streaming-agent 3/5] Starts/stops the agent based on VT status

2018-02-06 Thread Lukáš Hrázký
On Tue, 2018-02-06 at 05:06 -0500, Frediano Ziglio wrote: > > > > On Thu, 2018-02-01 at 16:40 +, Frediano Ziglio wrote: > > > Check if the current server is active or not and stream only if active. > > > This will allow to support multiple servers running. > > > When multiple servers are runni

Re: [Spice-devel] [PATCH spice-streaming-agent 4/5] Implement a daemon/agent separation

2018-02-06 Thread Lukáš Hrázký
On Tue, 2018-02-06 at 06:08 -0500, Frediano Ziglio wrote: > > > > On Thu, 2018-02-01 at 16:40 +, Frediano Ziglio wrote: > > > This allows to manage properly multiple servers (currently only Xorg). > > > The executable will run as a service forking the proper agent. > > > The agent will then ma

Re: [Spice-devel] [PATCH spice-streaming-agent 4/5] Implement a daemon/agent separation

2018-02-06 Thread Lukáš Hrázký
On Mon, 2018-02-05 at 18:05 +0100, Christophe de Dinechin wrote: > > On 2 Feb 2018, at 18:34, Lukáš Hrázký wrote: > > > > On Thu, 2018-02-01 at 16:40 +, Frediano Ziglio wrote: > > > This allows to manage properly multiple servers (currently only Xorg). > > > The executable will run as a servi

Re: [Spice-devel] [PATCH spice-streaming-agent v2 3/4] use std::string where it's easy to replace

2018-02-06 Thread Lukáš Hrázký
On Tue, 2018-02-06 at 12:02 +0100, Christophe de Dinechin wrote: > > On 25 Jan 2018, at 11:29, Lukáš Hrázký wrote: > > > > It's a good practice to consistently use std::string in C++ when there > > are no special needs for a char *. > > OK. Catching up on past e-mail here. FWIW, I disagree with

Re: [Spice-devel] Coding style and naming conventions for C++

2018-02-06 Thread Victor Toso
On Tue, Feb 06, 2018 at 04:40:18AM -0500, Frediano Ziglio wrote: > > > > On Tue, 2018-01-30 at 11:50 +0100, Christophe de Dinechin wrote: > > > > > > Let’s first share our preference on existing styles to see > > > if we agree on anything… > > > As for me, I have a slight preference for the LLVM

Re: [Spice-devel] [PATCH spice-streaming-agent 4/5] Implement a daemon/agent separation

2018-02-06 Thread Frediano Ziglio
> > On Thu, 2018-02-01 at 16:40 +, Frediano Ziglio wrote: > > This allows to manage properly multiple servers (currently only Xorg). > > The executable will run as a service forking the proper agent. > > The agent will then manage the active server. > > The server receive just minimal informat

Re: [Spice-devel] [PATCH spice-streaming-agent v2 3/4] use std::string where it's easy to replace

2018-02-06 Thread Christophe de Dinechin
> On 25 Jan 2018, at 11:29, Lukáš Hrázký wrote: > > It's a good practice to consistently use std::string in C++ when there > are no special needs for a char *. OK. Catching up on past e-mail here. FWIW, I disagree with the rationale and therefore the change. std::string represents dynamic str

Re: [Spice-devel] [PATCH spice-streaming-agent v2 1/2] mjpeg plugin: split off the declaration into a header

2018-02-06 Thread Lukáš Hrázký
On Tue, 2018-02-06 at 04:53 -0500, Frediano Ziglio wrote: > > > > On Tue, 2018-02-06 at 04:35 -0500, Frediano Ziglio wrote: > > > > > > > > So that the plugin can later be included in a unit test. > > > > > > > > Signed-off-by: Lukáš Hrázký > > > > --- > > > > src/mjpeg-fallback.cpp | 26 +

Re: [Spice-devel] [PATCH spice-streaming-agent 3/5] Starts/stops the agent based on VT status

2018-02-06 Thread Frediano Ziglio
> > On Thu, 2018-02-01 at 16:40 +, Frediano Ziglio wrote: > > Check if the current server is active or not and stream only if active. > > This will allow to support multiple servers running. > > When multiple servers are running only one have the GPU associated > > and is writing to the screen

Re: [Spice-devel] [PATCH spice-streaming-agent v2 2/2] explicit instead of static registration for built-in plugins

2018-02-06 Thread Christophe de Dinechin
> On 6 Feb 2018, at 10:51, Frediano Ziglio wrote: > >>> >>> On 5 Feb 2018, at 15:29, Lukáš Hrázký wrote: >>> >>> The static registration (that is, having a static list of pointers to >>> static plugin variables and calling a generic function in the main >>> initialization code path to regist

Re: [Spice-devel] [PATCH spice-streaming-agent v2 1/2] mjpeg plugin: split off the declaration into a header

2018-02-06 Thread Frediano Ziglio
> > On Tue, 2018-02-06 at 04:35 -0500, Frediano Ziglio wrote: > > > > > > So that the plugin can later be included in a unit test. > > > > > > Signed-off-by: Lukáš Hrázký > > > --- > > > src/mjpeg-fallback.cpp | 26 ++ > > > src/mjpeg-fallback.hpp | 34 +

Re: [Spice-devel] [PATCH spice-streaming-agent v2 2/2] explicit instead of static registration for built-in plugins

2018-02-06 Thread Frediano Ziglio
> > > On 5 Feb 2018, at 15:29, Lukáš Hrázký wrote: > > > > The static registration (that is, having a static list of pointers to > > static plugin variables and calling a generic function in the main > > initialization code path to register them) allows to add plugins without > > registering each

Re: [Spice-devel] [PATCH spice-streaming-agent v2 1/2] mjpeg plugin: split off the declaration into a header

2018-02-06 Thread Lukáš Hrázký
On Tue, 2018-02-06 at 04:35 -0500, Frediano Ziglio wrote: > > > > So that the plugin can later be included in a unit test. > > > > Signed-off-by: Lukáš Hrázký > > --- > > src/mjpeg-fallback.cpp | 26 ++ > > src/mjpeg-fallback.hpp | 34 ++ >

Re: [Spice-devel] Coding style and naming conventions for C++

2018-02-06 Thread Frediano Ziglio
> > On Tue, 2018-01-30 at 11:50 +0100, Christophe de Dinechin wrote: > > > > Let’s first share our preference on existing styles to see if we agree on > > anything… > > As for me, I have a slight preference for the LLVM coding style, but I made > > modifications in my own clang-format files. > >

Re: [Spice-devel] [PATCH spice-streaming-agent v2 1/2] mjpeg plugin: split off the declaration into a header

2018-02-06 Thread Frediano Ziglio
> > So that the plugin can later be included in a unit test. > > Signed-off-by: Lukáš Hrázký > --- > src/mjpeg-fallback.cpp | 26 ++ > src/mjpeg-fallback.hpp | 34 ++ > 2 files changed, 40 insertions(+), 20 deletions(-) > create mode 1006