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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <fziglio@xxxxxxxxxx>
---
 include/spice-streaming-agent/frame-capture.hpp | 5 +++--
 include/spice-streaming-agent/plugin.hpp        | 9 +++++----
 src/concrete-agent.cpp                          | 2 +-
 src/concrete-agent.hpp                          | 5 +++--
 src/mjpeg-fallback.cpp                          | 2 +-
 src/mjpeg-fallback.hpp                          | 5 +++--
 src/spice-streaming-agent.cpp                   | 2 +-
 src/static-plugin.cpp                           | 2 +-
 src/static-plugin.hpp                           | 5 +++--
 9 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/include/spice-streaming-agent/frame-capture.hpp b/include/spice-streaming-agent/frame-capture.hpp
index 6c41e04..313e07b 100644
--- a/include/spice-streaming-agent/frame-capture.hpp
+++ b/include/spice-streaming-agent/frame-capture.hpp
@@ -10,7 +10,8 @@
 
 #include <spice/enums.h>
 
-namespace SpiceStreamingAgent {
+namespace spice {
+namespace streaming_agent {
 
 struct FrameSize
 {
@@ -57,6 +58,6 @@ protected:
     void operator=(const FrameCapture&) = delete;
 };
 
-}
+}} // spice::streaming_agent
 
 #endif // SPICE_STREAMING_AGENT_FRAME_CAPTURE_HPP
diff --git a/include/spice-streaming-agent/plugin.hpp b/include/spice-streaming-agent/plugin.hpp
index f1d5d60..28096dc 100644
--- a/include/spice-streaming-agent/plugin.hpp
+++ b/include/spice-streaming-agent/plugin.hpp
@@ -17,7 +17,8 @@
  * Plugins and register them.
  */
 
-namespace SpiceStreamingAgent {
+namespace spice {
+namespace streaming_agent {
 
 class FrameCapture;
 
@@ -129,9 +130,9 @@ public:
     virtual const ConfigureOption* Options() const = 0;
 };
 
-typedef bool PluginInitFunc(SpiceStreamingAgent::Agent* agent);
+typedef bool PluginInitFunc(spice::streaming_agent::Agent* agent);
 
-}
+}} // spice::streaming_agent
 
 #ifndef SPICE_STREAMING_AGENT_PROGRAM
 /*!
@@ -146,7 +147,7 @@ typedef bool PluginInitFunc(SpiceStreamingAgent::Agent* agent);
  * the plugin which could be a problem in some systems.
  * \return true if plugin should stay loaded, false otherwise
  */
-extern "C" SpiceStreamingAgent::PluginInitFunc spice_streaming_agent_plugin_init;
+extern "C" spice::streaming_agent::PluginInitFunc spice_streaming_agent_plugin_init;
 #endif
 
 #endif // SPICE_STREAMING_AGENT_PLUGIN_HPP
diff --git a/src/concrete-agent.cpp b/src/concrete-agent.cpp
index 873a69e..ebeef33 100644
--- a/src/concrete-agent.cpp
+++ b/src/concrete-agent.cpp
@@ -14,7 +14,7 @@
 #include "static-plugin.hpp"
 
 using namespace std;
-using namespace SpiceStreamingAgent;
+using namespace spice::streaming_agent;
 
 static inline unsigned MajorVersion(unsigned version)
 {
diff --git a/src/concrete-agent.hpp b/src/concrete-agent.hpp
index b5876a5..0a8aeec 100644
--- a/src/concrete-agent.hpp
+++ b/src/concrete-agent.hpp
@@ -11,7 +11,8 @@
 #include <memory>
 #include <spice-streaming-agent/plugin.hpp>
 
-namespace SpiceStreamingAgent {
+namespace spice {
+namespace streaming_agent {
 
 struct ConcreteConfigureOption: ConfigureOption
 {
@@ -42,6 +43,6 @@ private:
     std::vector<ConcreteConfigureOption> options;
 };
 
-}
+}} // spice::streaming_agent
 
 #endif // SPICE_STREAMING_AGENT_CONCRETE_AGENT_HPP
diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp
index 7c918a7..10543ad 100644
--- a/src/mjpeg-fallback.cpp
+++ b/src/mjpeg-fallback.cpp
@@ -19,7 +19,7 @@
 #include "jpeg.hpp"
 
 using namespace std;
-using namespace SpiceStreamingAgent;
+using namespace spice::streaming_agent;
 
 #define ERROR(args) do { \
     std::ostringstream _s; \
diff --git a/src/mjpeg-fallback.hpp b/src/mjpeg-fallback.hpp
index 8044244..a5f1037 100644
--- a/src/mjpeg-fallback.hpp
+++ b/src/mjpeg-fallback.hpp
@@ -10,7 +10,8 @@
 #include <spice-streaming-agent/frame-capture.hpp>
 
 
-namespace SpiceStreamingAgent {
+namespace spice {
+namespace streaming_agent {
 
 struct MjpegSettings
 {
@@ -29,6 +30,6 @@ private:
     MjpegSettings settings = { 10, 80 };
 };
 
-} // namespace SpiceStreamingAgent
+}} // spice::streaming_agent
 
 #endif // SPICE_STREAMING_AGENT_MJPEG_FALLBACK_HPP
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 94d9d25..0e7641e 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -36,7 +36,7 @@
 #include "concrete-agent.hpp"
 
 using namespace std;
-using namespace SpiceStreamingAgent;
+using namespace spice::streaming_agent;
 
 static ConcreteAgent agent;
 
diff --git a/src/static-plugin.cpp b/src/static-plugin.cpp
index d5feb22..c8d55f0 100644
--- a/src/static-plugin.cpp
+++ b/src/static-plugin.cpp
@@ -11,7 +11,7 @@
 #include <stdlib.h>
 #include "static-plugin.hpp"
 
-using namespace SpiceStreamingAgent;
+using namespace spice::streaming_agent;
 
 const StaticPlugin *StaticPlugin::list = nullptr;
 
diff --git a/src/static-plugin.hpp b/src/static-plugin.hpp
index 5436b41..4399a9a 100644
--- a/src/static-plugin.hpp
+++ b/src/static-plugin.hpp
@@ -8,7 +8,8 @@
 
 #include <spice-streaming-agent/plugin.hpp>
 
-namespace SpiceStreamingAgent {
+namespace spice {
+namespace streaming_agent {
 
 class StaticPlugin final {
 public:
@@ -30,6 +31,6 @@ private:
     static const StaticPlugin *list;
 };
 
-}
+}} // spice::streaming_agent
 
 #endif // SPICE_STREAMING_AGENT_STATIC_PLUGIN_HPP
-- 
2.14.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]