Re: [Spice-devel] [PATCH spice-streaming-agent] Update old style header guards

2018-02-14 Thread Victor Toso
Hi, On Thu, Feb 15, 2018 at 07:14:14AM +, Frediano Ziglio wrote: > Some header used some slightly different naming style for > header guards. > Update the names to make them more coherent. > > Signed-off-by: Frediano Ziglio > --- > src/hexdump.h | 4 ++-- > src/jpeg.hpp

[Spice-devel] [PATCH spice-streaming-agent] Update old style header guards

2018-02-14 Thread Frediano Ziglio
Some header used some slightly different naming style for header guards. Update the names to make them more coherent. Signed-off-by: Frediano Ziglio --- src/hexdump.h | 4 ++-- src/jpeg.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [Spice-devel] [PATCH 10/14] Remove clang warning on missing 'override'

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > In file included from mjpeg-fallback.cpp:8: > ./mjpeg-fallback.hpp:28:25: warning: 'VideoCodecType' overrides a member > function but is not marked 'override' [-Winconsistent-missing-override] > SpiceVideoCodecType VideoCodecType()

Re: [Spice-devel] [PATCH 14/14] Do not test twice for the same condition

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/spice-streaming-agent.cpp

Re: [Spice-devel] [PATCH 13/14] Use C++ style for cursor message initialization instead of C style

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 49 > +-- > 1 file changed, 29 insertions(+), 20 deletions(-) > > diff --git

Re: [Spice-devel] [PATCH 12/14] Get rid of C-style memset initializations, use C++ style aggregates

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 43 > --- > 1 file changed, 24 insertions(+), 19 deletions(-) > > diff --git

Re: [Spice-devel] [PATCH 11/14] Replace inefficient C-style initialization with C++-style

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/src/spice-streaming-agent.cpp

Re: [Spice-devel] [PATCH 10/14] Remove clang warning on missing 'override'

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > In file included from mjpeg-fallback.cpp:8: > ./mjpeg-fallback.hpp:28:25: warning: 'VideoCodecType' overrides a member > function but is not marked 'override' [-Winconsistent-missing-override] > SpiceVideoCodecType VideoCodecType()

Re: [Spice-devel] [PATCH 09/14] Remove clang warning on marking a function const

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > ./static-plugin.hpp:29:5: warning: 'const' qualifier on function type > 'PluginInitFunc' (aka 'bool (spice::streaming_agent::Agent *)') has no > effect [-Wignored-qualifiers] > const PluginInitFunc* const init_func; > ^~ > >

Re: [Spice-devel] [PATCH 06/14] log_binary is really a boolean

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/spice-streaming-agent.cpp

Re: [Spice-devel] [PATCH 07/14] Do not create std::string for constants

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > As per e-mail discussions (https://patchwork.freedesktop.org/patch/200629/), > using std::string for C-style string constants is against C++ good practices, > see >

Re: [Spice-devel] [PATCH 05/14] Rename 'quit' to 'quit_requested' for consistency with 'streaming_requested'

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/src/spice-streaming-agent.cpp

Re: [Spice-devel] [PATCH 04/14] Add PRIu64 format for uint64_t

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Otherwise, clang complains: > > spice-streaming-agent.cpp:414:66: warning: format specifies type 'unsigned > long' but the argument has type 'uint64_t' (aka 'unsigned long long') > [-Wformat] > fprintf(f_log, "%lu:

Re: [Spice-devel] [PATCH 02/14] Capture 'cursor' by value

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > We should really not be capturing cursor by reference here, > since that value could be changed by the surrounding loop and sending > the data could some day be made asynchronous. > > Signed-off-by: Christophe de Dinechin

Re: [Spice-devel] [PATCH 03/14] streaming_requested is really a bool

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/spice-streaming-agent.cpp

Re: [Spice-devel] [PATCH 01/14] Add required header

2018-02-14 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Without this, clang emits among others: > > spice-streaming-agent.cpp:355:31: error: implicit instantiation of undefined > template 'std::__1::basic_string std::__1::allocator >' > streamfd =

Re: [Spice-devel] [PATCH spice-server v2 1/2] stream-device: handle cursor from device

2018-02-14 Thread Christophe de Dinechin
> On 9 Feb 2018, at 17:59, Frediano Ziglio wrote: > > + > +// read part of the message till we get all > +if (dev->msg_len < dev->hdr.size) { > +dev->msg = g_realloc(dev->msg, dev->hdr.size); > +dev->msg_len =

Re: [Spice-devel] [PATCH v3 11/11] Rewrite the style guide for headers

2018-02-14 Thread Christophe de Dinechin
> On 14 Feb 2018, at 14:35, Christophe Fergeau wrote: > > This one sounds more like an RFC to me Well, this is really a bug fix in the documentation more than a RFC. > , as from a quick look in server/, > this is not the style currently in use. As I pointed out in

Re: [Spice-devel] [PATCH v3 10/11] Add guidelines about warnings and whitespaces

2018-02-14 Thread Christophe de Dinechin
> On 14 Feb 2018, at 14:37, Christophe Fergeau wrote: > > On Thu, Feb 08, 2018 at 12:25:30PM +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> The objective of these guidelines is that: >> - We avoid introducing new warnings

Re: [Spice-devel] [spice-server] style: Slight tweak to the header guard section

2018-02-14 Thread Christophe de Dinechin
> On 14 Feb 2018, at 17:29, Christophe Fergeau wrote: > > This changes the suggested style to what is currently used in > spice-server codebase. This also removes a few sentences which > are not really related to how one should format their header guards. > >

Re: [Spice-devel] [PATCH v3 01/11] Add .clang-format with defaults matching what's specified in the style guide

2018-02-14 Thread Christophe de Dinechin
> On 14 Feb 2018, at 17:34, Christophe Fergeau wrote: > > On Wed, Feb 14, 2018 at 10:45:56AM -0500, Frediano Ziglio wrote: >>> >>> Shouldn't this go with a Makefile rule? A few lines in the log what this >>> is about, what is the goal for having this file, ... would not

Re: [Spice-devel] [RFC PATCH 1/1] separate and encapsulate the agent business code

2018-02-14 Thread Christophe de Dinechin
I cut quite a bit for clarity. What I cut I agree with ;-) > On 14 Feb 2018, at 14:45, Lukáš Hrázký wrote: > > On Tue, 2018-02-13 at 17:10 +0100, Christophe de Dinechin wrote: >> Hi Lukas, >> > > For your comments which are unrelated to my changes, I commended > uniformly

[Spice-devel] [PATCH 01/14] Add required header

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Without this, clang emits among others: spice-streaming-agent.cpp:355:31: error: implicit instantiation of undefined template 'std::__1::basic_string' streamfd = open(streamport.c_str(),

[Spice-devel] [PATCH 04/14] Add PRIu64 format for uint64_t

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Otherwise, clang complains: spice-streaming-agent.cpp:414:66: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] fprintf(f_log, "%lu: Frame of %zu

[Spice-devel] [PATCH 09/14] Remove clang warning on marking a function const

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin ./static-plugin.hpp:29:5: warning: 'const' qualifier on function type 'PluginInitFunc' (aka 'bool (spice::streaming_agent::Agent *)') has no effect [-Wignored-qualifiers] const PluginInitFunc* const init_func; ^~ Signed-off-by:

[Spice-devel] [PATCH 03/14] streaming_requested is really a bool

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- src/spice-streaming-agent.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp index

[Spice-devel] [PATCH 11/14] Replace inefficient C-style initialization with C++-style

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- src/spice-streaming-agent.cpp | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp index

[Spice-devel] [PATCH 12/14] Get rid of C-style memset initializations, use C++ style aggregates

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- src/spice-streaming-agent.cpp | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/src/spice-streaming-agent.cpp

[Spice-devel] [PATCH 10/14] Remove clang warning on missing 'override'

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin In file included from mjpeg-fallback.cpp:8: ./mjpeg-fallback.hpp:28:25: warning: 'VideoCodecType' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] SpiceVideoCodecType VideoCodecType() const;

[Spice-devel] [PATCH 06/14] log_binary is really a boolean

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- src/spice-streaming-agent.cpp | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp index

[Spice-devel] [PATCH 00/14] Minor improvements and coding style changes to the streaming agent

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin This series implements a number of comments that were made during previous code reviews, including a reworked / udpated version of the stream RAII patch. Christophe de Dinechin (14): Add required header Capture 'cursor' by value

[Spice-devel] [PATCH 07/14] Do not create std::string for constants

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin As per e-mail discussions (https://patchwork.freedesktop.org/patch/200629/), using std::string for C-style string constants is against C++ good practices, see

[Spice-devel] [PATCH 02/14] Capture 'cursor' by value

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin We should really not be capturing cursor by reference here, since that value could be changed by the surrounding loop and sending the data could some day be made asynchronous. Signed-off-by: Christophe de Dinechin ---

[Spice-devel] [PATCH 14/14] Do not test twice for the same condition

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- src/spice-streaming-agent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp index

[Spice-devel] [PATCH 08/14] Use RAII to cleanup stream in case of exception or return

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin This lets us get rid of C-style 'goto done' in do_capture. Signed-off-by: Christophe de Dinechin --- src/spice-streaming-agent.cpp | 32 1 file changed, 20 insertions(+), 12 deletions(-)

[Spice-devel] [PATCH 13/14] Use C++ style for cursor message initialization instead of C style

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- src/spice-streaming-agent.cpp | 49 +-- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/src/spice-streaming-agent.cpp

[Spice-devel] [PATCH 05/14] Rename 'quit' to 'quit_requested' for consistency with 'streaming_requested'

2018-02-14 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- src/spice-streaming-agent.cpp | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp

Re: [Spice-devel] [PATCH spice-streaming-agent v3] Remove reading start/stop commands from stdin

2018-02-14 Thread Frediano Ziglio
> > It was mainly a debugging feature for the early development stages. It > was agreed its usefulness is at the moment outweighed by the complexity > it brings to the code. > > Signed-off-by: Lukáš Hrázký Acked-by: Frediano Ziglio Frediano > --- >

Re: [Spice-devel] [PATCH v2 12/13] Add guidelines about warnings and whitespaces

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 11:09:35AM +0100, Victor Toso wrote: > Hi, > > On Thu, Feb 08, 2018 at 05:01:05AM -0500, Frediano Ziglio wrote: > > > > Depends on many cases. You don't want spurious changes to make harder to > > > > look at the history for instance (that is a point for Nack). > > > > The

Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-14 Thread Christophe Fergeau
On Wed, Feb 14, 2018 at 10:40:58AM -0500, Frediano Ziglio wrote: > > > > > On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote: > > > > > > Introduce a unit test framework (Catch) to the codebase and a simple > > > unit test for parsing the options of the mjpeg plugin. > > > > > >

Re: [Spice-devel] [PATCH v3 01/11] Add .clang-format with defaults matching what's specified in the style guide

2018-02-14 Thread Christophe Fergeau
On Wed, Feb 14, 2018 at 10:45:56AM -0500, Frediano Ziglio wrote: > > > > Shouldn't this go with a Makefile rule? A few lines in the log what this > > is about, what is the goal for having this file, ... would not hurt. > > > > Christophe > > > > I think this file is supposed to just help

[Spice-devel] [spice-server] style: Slight tweak to the header guard section

2018-02-14 Thread Christophe Fergeau
This changes the suggested style to what is currently used in spice-server codebase. This also removes a few sentences which are not really related to how one should format their header guards. Signed-off-by: Christophe Fergeau --- docs/spice_style.txt | 6 ++ 1 file

Re: [Spice-devel] [PATCH v3 09/11] Add mention of header guards

2018-02-14 Thread Christophe de Dinechin
> On 14 Feb 2018, at 16:43, Christophe Fergeau wrote: > > On Thu, Feb 08, 2018 at 12:25:29PM +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Signed-off-by: Christophe de Dinechin >> --- >>

[Spice-devel] [PATCH spice-streaming-agent v3] Remove reading start/stop commands from stdin

2018-02-14 Thread Lukáš Hrázký
It was mainly a debugging feature for the early development stages. It was agreed its usefulness is at the moment outweighed by the complexity it brings to the code. Signed-off-by: Lukáš Hrázký --- Changes since v2: - fix grammar in the description - use ternary if for

Re: [Spice-devel] [PATCH v3 01/11] Add .clang-format with defaults matching what's specified in the style guide

2018-02-14 Thread Frediano Ziglio
> > Shouldn't this go with a Makefile rule? A few lines in the log what this > is about, what is the goal for having this file, ... would not hurt. > > Christophe > I think this file is supposed to just help developers so should not be in the Makefile. I think you mean that the intention

Re: [Spice-devel] [PATCH v3 09/11] Add mention of header guards

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 12:25:29PM +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > docs/spice_style.txt | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git

Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-14 Thread Frediano Ziglio
> > > On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote: > > > > Introduce a unit test framework (Catch) to the codebase and a simple > > unit test for parsing the options of the mjpeg plugin. > > > > Signed-off-by: Lukáš Hrázký > > --- > > configure.ac

Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-14 Thread Lukáš Hrázký
On Wed, 2018-02-14 at 16:08 +0100, Christophe de Dinechin wrote: > > On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote: > > > > Introduce a unit test framework (Catch) to the codebase and a simple > > unit test for parsing the options of the mjpeg plugin. > > > > Signed-off-by:

Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-14 Thread Lukáš Hrázký
On Wed, 2018-02-14 at 09:22 -0500, Frediano Ziglio wrote: > > > > Introduce a unit test framework (Catch) to the codebase and a simple > > unit test for parsing the options of the mjpeg plugin. > > > > Signed-off-by: Lukáš Hrázký > > --- > > configure.ac

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

2018-02-14 Thread Christophe de Dinechin
> On 14 Feb 2018, at 15:28, Christophe Fergeau wrote: > > On Thu, Feb 08, 2018 at 08:16:37AM +0100, Christophe de Dinechin wrote: >> Using std::string by default is *not* considered a good practice in >> C++. The reference for C++ good practices are probably best

Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-14 Thread Christophe de Dinechin
> On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote: > > Introduce a unit test framework (Catch) to the codebase and a simple > unit test for parsing the options of the mjpeg plugin. > > Signed-off-by: Lukáš Hrázký > --- > configure.ac

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

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 08:16:37AM +0100, Christophe de Dinechin wrote: > Using std::string by default is *not* considered a good practice in > C++. The reference for C++ good practices are probably best summarized > by the C++ Core Guidelines: >

Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-14 Thread Frediano Ziglio
> > Introduce a unit test framework (Catch) to the codebase and a simple > unit test for parsing the options of the mjpeg plugin. > > Signed-off-by: Lukáš Hrázký > --- > configure.ac | 3 ++ > src/mjpeg-fallback.cpp| 5 +++ >

Re: [Spice-devel] [PATCH spice-streaming-agent] build: Do not use top_srcdir if not necessary

2018-02-14 Thread Christophe Fergeau
On Mon, Jan 29, 2018 at 05:16:12PM -0500, Frediano Ziglio wrote: > > > > > > > On 29 Jan 2018, at 12:00, Frediano Ziglio wrote: > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > > Makefile.am | 4 ++-- > > > 1 file changed, 2 insertions(+), 2

Re: [Spice-devel] [PATCH spice-streaming-agent v2] Remove reading start/stop commands from stdin

2018-02-14 Thread Uri Lublin
On 02/14/2018 01:58 PM, Lukáš Hrázký wrote: It was mainly a debugging feature for the early development stages. It was agreed it's usefulness is at the moment outweighted by the its usefulness ... spellchecker also suggests: outweighed Looks good, see nit comment below (not important,

Re: [Spice-devel] [PATCH v3 10/11] Add guidelines about warnings and whitespaces

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 12:25:30PM +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > The objective of these guidelines is that: > - We avoid introducing new warnings > - We know how to fix old ones > - We don't have to isolate whitespace changes when

Re: [Spice-devel] [PATCH v3 11/11] Rewrite the style guide for headers

2018-02-14 Thread Christophe Fergeau
This one sounds more like an RFC to me, as from a quick look in server/, this is not the style currently in use. Christophe On Thu, Feb 08, 2018 at 12:25:31PM +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > As written, the headers style guide looks

Re: [Spice-devel] [PATCH v3 03/11] Specify file extensions for C++ and Obj-C

2018-02-14 Thread Christophe Fergeau
On Mon, Feb 12, 2018 at 03:23:06AM -0500, Frediano Ziglio wrote: > See > https://lists.freedesktop.org/archives/spice-devel/2018-February/041724.html > > > From: Christophe de Dinechin > > > > Signed-off-by: Christophe de Dinechin > > --- > >

Re: [Spice-devel] [PATCH v2 11/13] Add mention of header guards

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 03:58:46AM -0500, Frediano Ziglio wrote: > > + > > +[source,h] > > +--- > > +#ifndef MY_MODULE_H > > +#define MY_MODULE_H > > + > > +... > > + > > +#endif /* MY_MODULE_H */ > > +--- > > + > > Are we suggesting C style only comment or is clear the is not important? > (I'm

Re: [Spice-devel] [PATCH v2 06/13] Rephrase section on short functions for readability

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 03:50:37AM -0500, Frediano Ziglio wrote: > > > > From: Christophe de Dinechin > > > > Signed-off-by: Christophe de Dinechin > > --- > > docs/spice_style.txt | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >

Re: [Spice-devel] [PATCH v2 05/13] Rephrase section about constants

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 03:48:46AM -0500, Frediano Ziglio wrote: > I think that the "Alternatively, use global `const` variables." > is quite an ancient comment when spice-server was in C++ > (much before I join and I think even older than the git repository!) There was a C++ *client* in

Re: [Spice-devel] [PATCH v3 01/11] Add .clang-format with defaults matching what's specified in the style guide

2018-02-14 Thread Christophe Fergeau
Shouldn't this go with a Makefile rule? A few lines in the log what this is about, what is the goal for having this file, ... would not hurt. Christophe On Thu, Feb 08, 2018 at 12:25:21PM +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > >

Re: [Spice-devel] [PATCH v3 04/11] Rephrase assertion section

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 12:25:24PM +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > docs/spice_style.txt | 15 --- > 1 file changed, 12 insertions(+), 3 deletions(-) > >

Re: [Spice-devel] [PATCH v3 04/11] Rephrase assertion section

2018-02-14 Thread Christophe Fergeau
On Tue, Feb 13, 2018 at 02:40:38PM +0100, Christophe de Dinechin wrote: > > > > On 13 Feb 2018, at 14:39, Frediano Ziglio wrote: > > > >>> > >>> On 12 Feb 2018, at 17:58, Frediano Ziglio wrote: > >>> > >>> In SPICE, as in Glib, ERROR is more "strong"

[Spice-devel] [PATCH spice-streaming-agent v3 1/3] mjpeg-fallback: a more high-level way of handling options

2018-02-14 Thread Lukáš Hrázký
Use C++ standard library: - std::string - std::stoi() to parse the numbers (also note atoi() behavior is undefined in case of errors) - exceptions for errors, makes testing and potential future changes to error handling easier. Signed-off-by: Lukáš Hrázký ---

[Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-14 Thread Lukáš Hrázký
Introduce a unit test framework (Catch) to the codebase and a simple unit test for parsing the options of the mjpeg plugin. Signed-off-by: Lukáš Hrázký --- configure.ac | 3 ++ src/mjpeg-fallback.cpp| 5 +++ src/mjpeg-fallback.hpp

[Spice-devel] [PATCH spice-streaming-agent v3 2/3] src/unitests: add temporary files to .gitignore

2018-02-14 Thread Lukáš Hrázký
Signed-off-by: Lukáš Hrázký --- src/unittests/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/unittests/.gitignore b/src/unittests/.gitignore index bb238d7..af41c48 100644 --- a/src/unittests/.gitignore +++ b/src/unittests/.gitignore @@ -1 +1,4 @@

[Spice-devel] [PATCH spice-streaming-agent v3 0/3] first unit test and options parsing improvements

2018-02-14 Thread Lukáš Hrázký
This series introduces a C++ unit test framework called Catch to the codebase, adds a simple unit test for the options parsing for the mjpeg plugin and improves on the option parsing code. Since we more or less agreed we can solve the Catch package in RHEL one way or another, I suppose we can

[Spice-devel] [PATCH spice-streaming-agent v2] Remove reading start/stop commands from stdin

2018-02-14 Thread Lukáš Hrázký
It was mainly a debugging feature for the early development stages. It was agreed it's usefulness is at the moment outweighted by the complexity it brings to the code. Signed-off-by: Lukáš Hrázký --- Changes since v1: - Log also to stderr if it's a tty

Re: [Spice-devel] [PATCH spice-streaming-agent] Remove reading start/stop commands from stdin

2018-02-14 Thread Christophe de Dinechin
> On 14 Feb 2018, at 11:46, Lukáš Hrázký wrote: > > It was mainly a debugging feature for the early development stages. It > was agreed it's usefulness is at the moment outweighted by the > complexity it brings to the code. > > Signed-off-by: Lukáš Hrázký

[Spice-devel] [PATCH spice-streaming-agent] Remove reading start/stop commands from stdin

2018-02-14 Thread Lukáš Hrázký
It was mainly a debugging feature for the early development stages. It was agreed it's usefulness is at the moment outweighted by the complexity it brings to the code. Signed-off-by: Lukáš Hrázký --- src/spice-streaming-agent.cpp | 71