Re: [Spice-devel] [PATCH spice-streaming-agent] Remove using entire std namespace

2018-02-08 Thread Frediano Ziglio
> > On Thu, 2018-02-08 at 16:21 +, Frediano Ziglio wrote: > > As discussed about style the usage or "using namespace" should be > > avoided. > > > > Signed-off-by: Frediano Ziglio > > --- > > src/concrete-agent.cpp| 11 +-- > > src/mjpeg-fallback.cpp

[Spice-devel] [RFC PATCH 0/1] separate the agent business code

2018-02-08 Thread Lukáš Hrázký
Hello, as previously discussed, I've attempted to separate out the agent code into a class (temporarily called AgentRunner, see the commit message for details). The patch is cleaned up and working, it could only use a better naming for the class and then to rename the source files accordingly.

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

2018-02-08 Thread Lukáš Hrázký
Create an AgentRunner (TODO: needs a better name) class to encapsulate the streaming and communication with the server. The basic setup (cmd arg parsing, signal handling, ...) is moved to main.cpp. The rest of the functions is moved to the AgentRunner class and modified as little as possible: -

[Spice-devel] [PATCH spice-streaming-agent] Remove using entire std namespace

2018-02-08 Thread Frediano Ziglio
As discussed about style the usage or "using namespace" should be avoided. Signed-off-by: Frediano Ziglio --- src/concrete-agent.cpp| 11 +-- src/mjpeg-fallback.cpp| 3 +-- src/spice-streaming-agent.cpp | 5 ++--- 3 files changed, 8 insertions(+),

Re: [Spice-devel] [PATCH spice-streaming-agent] Remove using entire std namespace

2018-02-08 Thread Lukáš Hrázký
On Thu, 2018-02-08 at 16:21 +, Frediano Ziglio wrote: > As discussed about style the usage or "using namespace" should be > avoided. > > Signed-off-by: Frediano Ziglio > --- > src/concrete-agent.cpp| 11 +-- > src/mjpeg-fallback.cpp| 3 +-- >

[Spice-devel] [RFC PATCH spice-streaming-agent v2] separate and encapsulate the agent business code

2018-02-08 Thread Lukáš Hrázký
Create an AgentRunner (TODO: needs a better name) class to encapsulate the streaming and communication with the server. The basic setup (cmd arg parsing, signal handling, ...) is moved to main.cpp. The rest of the functions is moved to the AgentRunner class and modified as little as possible: -

Re: [Spice-devel] [PATCH v2 02/13] Update copyright date

2018-02-08 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > docs/spice_style.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/docs/spice_style.txt b/docs/spice_style.txt > index eb0e30ef..c127f026

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

2018-02-08 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > docs/spice_style.txt | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/docs/spice_style.txt b/docs/spice_style.txt > index

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

2018-02-08 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > .clang-format | 23 +++ > 1 file changed, 23 insertions(+) > create mode 100644 .clang-format > > diff --git a/.clang-format b/.clang-format > new

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

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 10:04, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> Signed-off-by: Christophe de Dinechin >> --- >> .clang-format | 23 +++ >> 1 file changed, 23 insertions(+) >>

Re: [Spice-devel] [PATCH v2 04/13] Rephrase assertion section

2018-02-08 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > docs/spice_style.txt | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/docs/spice_style.txt b/docs/spice_style.txt > index

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

2018-02-08 Thread Victor Toso
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 patch is not fixing anything or adding new feature (another for Nack). >

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

2018-02-08 Thread Lukáš Hrázký
On Thu, 2018-02-08 at 11:09 +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 patch

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

2018-02-08 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > docs/spice_style.txt | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/docs/spice_style.txt b/docs/spice_style.txt > index 780f0615..e2465aa9

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

2018-02-08 Thread Lukáš Hrázký
On Thu, 2018-02-08 at 04:02 -0500, Frediano Ziglio 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 v2 12/13] Add guidelines about warnings and whitespaces

2018-02-08 Thread Frediano Ziglio
> > On Thu, 2018-02-08 at 10:21 +0100, Victor Toso wrote: > > Hey, > > > > On Thu, Feb 08, 2018 at 10:13:21AM +0100, Lukáš Hrázký wrote: > > > On Thu, 2018-02-08 at 04:02 -0500, Frediano Ziglio wrote: > > > > > > > > > > From: Christophe de Dinechin > > > > > > > > > >

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

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 10:52, Frediano Ziglio wrote: > >> >> On Thu, 2018-02-08 at 10:21 +0100, Victor Toso wrote: >>> Hey, >>> >>> On Thu, Feb 08, 2018 at 10:13:21AM +0100, Lukáš Hrázký wrote: On Thu, 2018-02-08 at 04:02 -0500, Frediano Ziglio wrote: >> >>

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

2018-02-08 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > docs/spice_style.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/docs/spice_style.txt b/docs/spice_style.txt > index 3e463d2f..74f4e29d

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

2018-02-08 Thread Lukáš Hrázký
On Thu, 2018-02-08 at 10:21 +0100, Victor Toso wrote: > Hey, > > On Thu, Feb 08, 2018 at 10:13:21AM +0100, Lukáš Hrázký wrote: > > On Thu, 2018-02-08 at 04:02 -0500, Frediano Ziglio wrote: > > > > > > > > From: Christophe de Dinechin > > > > > > > > The objective of these

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

2018-02-08 Thread Frediano Ziglio
> > > On 8 Feb 2018, at 10:52, Frediano Ziglio wrote: > > > >> > >> On Thu, 2018-02-08 at 10:21 +0100, Victor Toso wrote: > >>> Hey, > >>> > >>> On Thu, Feb 08, 2018 at 10:13:21AM +0100, Lukáš Hrázký wrote: > On Thu, 2018-02-08 at 04:02 -0500, Frediano Ziglio wrote: >

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

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 11:01, Frediano Ziglio wrote: > >>> >>> On 8 Feb 2018, at 10:52, Frediano Ziglio wrote: >>> On Thu, 2018-02-08 at 10:21 +0100, Victor Toso wrote: > Hey, > > On Thu, Feb 08, 2018 at 10:13:21AM +0100, Lukáš

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

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 11:09, 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).

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

2018-02-08 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > The indent of the rephrasing is that: > > - If you have a single constant, use const, e.g. (visible in debugger) > const unsigned max_stuff = 42; > > - If you have multiple constants, prefer enums over #define, as > already

Re: [Spice-devel] [PATCH v2 08/13] Remove confusing example

2018-02-08 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > The sentence explaining that example makes no real sense, and > the coding style suggestion is horrendous (not to mention flies in the > face of all automatic indentation tools) > > Signed-off-by: Christophe de Dinechin

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

2018-02-08 Thread Frediano Ziglio
> > 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 submitting patches, > i.e. someone who use tools that automatically

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

2018-02-08 Thread Victor Toso
Hey, On Thu, Feb 08, 2018 at 10:13:21AM +0100, Lukáš Hrázký wrote: > On Thu, 2018-02-08 at 04:02 -0500, Frediano Ziglio wrote: > > > > > > From: Christophe de Dinechin > > > > > > The objective of these guidelines is that: > > > - We avoid introducing new warnings > > > -

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

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 10:02, Frediano Ziglio 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

Re: [Spice-devel] [PATCH v2 04/13] Rephrase assertion section

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 10:35, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> Signed-off-by: Christophe de Dinechin >> --- >> docs/spice_style.txt | 6 +- >> 1 file changed, 5 insertions(+), 1 deletion(-) >>

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

2018-02-08 Thread Jonathon Jongsma
On Tue, 2018-01-16 at 12:28 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/stream-device.c | 154 > ++--- > 1 file changed, 147 insertions(+), 7 deletions(-) > > diff --git a/server/stream-device.c

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

2018-02-08 Thread Lukáš Hrázký
On Wed, 2018-02-07 at 10:10 +0100, Christophe de Dinechin wrote: > Frediano Ziglio writes: > > > These style are used by other SPICE projects like spice-streaming-agent. "This style is used ..." > > See discussion "Coding style and naming conventions for C++" at > >

Re: [Spice-devel] [PATCH spice-gtk 1/4] tests: add spice+unix:// URI checks

2018-02-08 Thread Frediano Ziglio
> > From: Marc-André Lureau > > For some reason, the URIs test didn't include spice+unix:// checks, > probably because they came about the same time. > > Signed-off-by: Marc-André Lureau > --- > tests/session.c | 28

Re: [Spice-devel] [PATCH spice-gtk 2/4] uri: learn to parse spice+tls:// form

2018-02-08 Thread Frediano Ziglio
> > From: Marc-André Lureau > > spice:// has a weird scheme encoding, where it can accept both plain > and tls ports with URI query parameters. However, it's not very > convenient nor very common to use (who really want to mix plain & tls > channels?). > > Instead,

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

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- .clang-format | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index

[Spice-devel] [PATCH spice-streaming-agent] Change name space to spice::streaming_agent

2018-02-08 Thread Frediano Ziglio
Discussed recently on the mailing list. This patch changes the namespace name only. 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 ---

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

2018-02-08 Thread Lukáš Hrázký
On Thu, 2018-02-08 at 14:03 +, Frediano Ziglio wrote: > This style is 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:

Re: [Spice-devel] [PATCH spice-streaming-agent] Change name space to spice::streaming_agent

2018-02-08 Thread Lukáš Hrázký
On Thu, 2018-02-08 at 14:00 +, Frediano Ziglio wrote: > Discussed recently on the mailing list. > This patch changes the namespace name only. > See discussion "Coding style and naming conventions for C++" at > https://lists.freedesktop.org/archives/spice-devel/2018-January/041562.html. > >

[Spice-devel] [PATCH v3 05/11] Rephrase section about constants

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin The indent of the rephrasing is that: - If you have a single constant, use const, e.g. (visible in debugger) const unsigned max_stuff = 42; - If you have multiple constants, prefer enums over #define, as already suggested later in the

[Spice-devel] [PATCH v3 06/11] Rephrase section on short functions for readability

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- docs/spice_style.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index b92b5b00..486efbc9 100644 ---

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

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 09:48, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> The indent of the rephrasing is that: >> >> - If you have a single constant, use const, e.g. (visible in debugger) >>const unsigned max_stuff = 42; >>

Re: [Spice-devel] [PATCH spice-server 0/2] Implement cursor for streaming device

2018-02-08 Thread Frediano Ziglio
ping almost 6 months old now > > These patches was already posted (second was also acked) however first > one was not complete. Updated reusing some new fields more coherently. > > Frediano Ziglio (2): > stream-device: handle cursor from device > stream-device: Implement mouse movement >

Re: [Spice-devel] [PATCH spice-server 0/3] Flush interface and TCP_CORK

2018-02-08 Thread Frediano Ziglio
ping more than 2 years old now > > These patches try to add interface to support flush interface. > This interface could help improving bandwidth usage reducing bytes > sent through network. > The TCP_CORK is one possible usage of the library which actually > decrease bandwidth (not using SSL)

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

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 09:50, 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(-) >> >>

[Spice-devel] [PATCH spice-gtk 4/4] tests: add spice+tls:// tests

2018-02-08 Thread marcandre . lureau
From: Marc-André Lureau They couldn't not be introduced before, because the test needs both parsing and generation. Signed-off-by: Marc-André Lureau --- tests/session.c | 14 ++ 1 file changed, 14 insertions(+) diff --git

[Spice-devel] [PATCH spice-gtk 0/4] Add spice+tls:// uri form

2018-02-08 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here are a few patches related to spice schemes URI handling. They introduce a spice+tls:// form (see related man page update and patch for details). cheers Marc-André Lureau (4): tests: add spice+unix:// URI checks uri: learn to

[Spice-devel] [PATCH spice-gtk 2/4] uri: learn to parse spice+tls:// form

2018-02-08 Thread marcandre . lureau
From: Marc-André Lureau spice:// has a weird scheme encoding, where it can accept both plain and tls ports with URI query parameters. However, it's not very convenient nor very common to use (who really want to mix plain & tls channels?). Instead, let's introduce

[Spice-devel] [PATCH spice-gtk 3/4] uri: generate spice://host:port or spice+tls://host:port

2018-02-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/spice-session.c | 31 +++ tests/session.c | 20 ++-- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git

[Spice-devel] [PATCH spice-gtk 1/4] tests: add spice+unix:// URI checks

2018-02-08 Thread marcandre . lureau
From: Marc-André Lureau For some reason, the URIs test didn't include spice+unix:// checks, probably because they came about the same time. Signed-off-by: Marc-André Lureau --- tests/session.c | 28 +--- 1 file

[Spice-devel] [PATCH v3 02/11] Added External References section

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- docs/spice_style.txt | 20 1 file changed, 20 insertions(+) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index f5d13642..10bfbc9a 100644 ---

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

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- docs/spice_style.txt | 19 +++ 1 file changed, 19 insertions(+) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index eb2ee252..ae91f987 100644 ---

[Spice-devel] [PATCH v3 00/11] Updates to the style guide

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin Changes in v3: - Integrated clarification regarding headers - Added external references as a starting point - Changed [source,h] annotations (unsure if that's accepted) - Changed brace placement from Allman to Linux in .clang-format Changes in

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

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- docs/spice_style.txt | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index 13032df6..eef4880f 100644

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

2018-02-08 Thread Christophe de Dinechin
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 submitting patches, i.e. someone who use tools that automatically strip whitespaces

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

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin As written, the headers style guide looks quite wrong. In particular, it places headers in an order that makes it hard to detect hidden dependencies in SPICE headers. These rules can be enforced by the .clang-format proposed in earlier patch,

[Spice-devel] [PATCH v3 07/11] Remove confusing example

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin The sentence explaining that example makes no real sense, and the coding style suggestion is horrendous (not to mention flies in the face of all automatic indentation tools) Signed-off-by: Christophe de Dinechin ---

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

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- docs/spice_style.txt | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index 10bfbc9a..13032df6 100644 ---

[Spice-devel] [PATCH v3 08/11] Add mention of fall-through comments

2018-02-08 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- docs/spice_style.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index 68dbeeef..eb2ee252 100644 --- a/docs/spice_style.txt

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

2018-02-08 Thread Christophe de Dinechin
> On 8 Feb 2018, at 14:53, Lukáš Hrázký wrote: > > On Wed, 2018-02-07 at 10:10 +0100, Christophe de Dinechin wrote: >> Frediano Ziglio writes: >> >>> These style are used by other SPICE projects like spice-streaming-agent. > > "This style is used ..." > >>> See

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

2018-02-08 Thread Frediano Ziglio
> > > On 8 Feb 2018, at 15:16, Lukáš Hrázký wrote: > > > > On Thu, 2018-02-08 at 14:03 +, Frediano Ziglio wrote: > >> This style is used by other SPICE projects like spice-streaming-agent. > >> See discussion "Coding style and naming conventions for C++" at > >>

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

2018-02-08 Thread Lukáš Hrázký
On Thu, 2018-02-08 at 15:33 +0100, Christophe de Dinechin wrote: > > On 8 Feb 2018, at 14:53, Lukáš Hrázký wrote: > > > > On Wed, 2018-02-07 at 10:10 +0100, Christophe de Dinechin wrote: > > > Frediano Ziglio writes: > > > > > > > These style are used by other SPICE projects