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

Lukáš Hrázký lhrazky at redhat.com
Thu Feb 8 16:20:39 UTC 2018


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. This
should be enough for Frediano to implement the daemon code comfortably,
as the call to the agent is now ~3 lines. It does probably break
horribly any patches people may have in store for the code in question.

I'm sending this now, and as a RFC, because looking at the code I'd like
to take it a step further. The AgentRunner class does not have a clearly
defined purpose and kind of blurs with the ConcreteAgent class that is
already there. It contains a mix of code all the way down to the network
communication. So I'd like to try to separate the networking code
further and possibly somehow merge the AgentRunner and ConcreteAgent.

I'll be on PTO tomorrow though, so sending this now for comments and
possibly not to delay Frediano, if he likes it and would like to rebase
his daemon code on top of this. Further changes to this code should not
interfere much anymore.

Lukas


Lukáš Hrázký (1):
  separate and encapsulate the agent business code

 src/Makefile.am               |   2 +
 src/main.cpp                  | 127 ++++++++++++
 src/spice-streaming-agent.cpp | 455 +++++++++++++++++-------------------------
 src/spice-streaming-agent.hpp |  56 ++++++
 4 files changed, 370 insertions(+), 270 deletions(-)
 create mode 100644 src/main.cpp
 create mode 100644 src/spice-streaming-agent.hpp

-- 
2.16.1



More information about the Spice-devel mailing list