summaryrefslogtreecommitdiffstats
path: root/src/socket
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket')
-rw-r--r--src/socket/SocketClient.hpp2
-rw-r--r--src/socket/SocketListener.cpp8
-rw-r--r--src/socket/SocketListener.hpp13
-rw-r--r--src/socket/SocketReader.cpp15
-rw-r--r--src/socket/SocketReader.hpp7
-rw-r--r--src/socket/SocketServer.hpp2
-rw-r--r--src/socket/SocketWriter.cpp6
-rw-r--r--src/socket/SocketWriter.hpp12
-rw-r--r--src/socket/ingen_socket_client.cpp12
-rw-r--r--src/socket/ingen_socket_server.cpp10
10 files changed, 42 insertions, 45 deletions
diff --git a/src/socket/SocketClient.hpp b/src/socket/SocketClient.hpp
index a58f92a5..c316e4a4 100644
--- a/src/socket/SocketClient.hpp
+++ b/src/socket/SocketClient.hpp
@@ -29,7 +29,7 @@ namespace Socket {
class SocketClient : public SocketWriter
{
public:
- SocketClient(Shared::World& world,
+ SocketClient(World& world,
const std::string& uri,
SharedPtr<Socket> sock,
SharedPtr<Interface> respondee)
diff --git a/src/socket/SocketListener.cpp b/src/socket/SocketListener.cpp
index a2dcaba0..f79c055a 100644
--- a/src/socket/SocketListener.cpp
+++ b/src/socket/SocketListener.cpp
@@ -21,9 +21,9 @@
#include <string>
#include "ingen/Interface.hpp"
-#include "ingen/shared/AtomReader.hpp"
-#include "ingen/shared/Configuration.hpp"
-#include "ingen/shared/World.hpp"
+#include "ingen/AtomReader.hpp"
+#include "ingen/Configuration.hpp"
+#include "ingen/World.hpp"
#include "sord/sordmm.hpp"
#include "sratom/sratom.h"
@@ -37,7 +37,7 @@
namespace Ingen {
namespace Socket {
-SocketListener::SocketListener(Ingen::Shared::World& world)
+SocketListener::SocketListener(Ingen::World& world)
: Raul::Thread("SocketListener")
, _world(world)
, _unix_sock(Socket::UNIX)
diff --git a/src/socket/SocketListener.hpp b/src/socket/SocketListener.hpp
index e9c27d85..c4700ed4 100644
--- a/src/socket/SocketListener.hpp
+++ b/src/socket/SocketListener.hpp
@@ -24,24 +24,23 @@
namespace Ingen {
class Interface;
-
-namespace Shared { class World; }
+class World;
namespace Socket {
class SocketListener : public Raul::Thread
{
public:
- explicit SocketListener(Ingen::Shared::World& world);
+ explicit SocketListener(Ingen::World& world);
~SocketListener();
private:
virtual void _run();
- Ingen::Shared::World& _world;
- std::string _unix_path;
- Socket _unix_sock;
- Socket _net_sock;
+ Ingen::World& _world;
+ std::string _unix_path;
+ Socket _unix_sock;
+ Socket _net_sock;
};
} // namespace Ingen
diff --git a/src/socket/SocketReader.cpp b/src/socket/SocketReader.cpp
index 1a3e5475..9d28b405 100644
--- a/src/socket/SocketReader.cpp
+++ b/src/socket/SocketReader.cpp
@@ -18,9 +18,9 @@
#include <poll.h>
#include "ingen/Interface.hpp"
-#include "ingen/shared/AtomReader.hpp"
-#include "ingen/shared/URIMap.hpp"
-#include "ingen/shared/World.hpp"
+#include "ingen/AtomReader.hpp"
+#include "ingen/URIMap.hpp"
+#include "ingen/World.hpp"
#include "sord/sordmm.hpp"
#include "sratom/sratom.h"
@@ -31,9 +31,9 @@
namespace Ingen {
namespace Socket {
-SocketReader::SocketReader(Ingen::Shared::World& world,
- Interface& iface,
- SharedPtr<Socket> sock)
+SocketReader::SocketReader(Ingen::World& world,
+ Interface& iface,
+ SharedPtr<Socket> sock)
: Raul::Thread("SocketReader")
, _world(world)
, _iface(iface)
@@ -132,8 +132,7 @@ SocketReader::_run()
serd_reader_start_stream(reader, f, (const uint8_t*)"(socket)", false);
// Make an AtomReader to call Ingen Interface methods based on Atom
- Shared::AtomReader ar(
- _world.uri_map(), _world.uris(), _world.forge(), _iface);
+ AtomReader ar(_world.uri_map(), _world.uris(), _world.forge(), _iface);
struct pollfd pfd;
pfd.fd = _socket->fd();
diff --git a/src/socket/SocketReader.hpp b/src/socket/SocketReader.hpp
index 5e205186..51435368 100644
--- a/src/socket/SocketReader.hpp
+++ b/src/socket/SocketReader.hpp
@@ -25,8 +25,7 @@
namespace Ingen {
class Interface;
-
-namespace Shared { class World; }
+class World;
namespace Socket {
@@ -34,7 +33,7 @@ namespace Socket {
class SocketReader : public Raul::Thread
{
public:
- SocketReader(Shared::World& world,
+ SocketReader(World& world,
Interface& iface,
SharedPtr<Socket> sock);
@@ -59,7 +58,7 @@ private:
const SerdNode* object_datatype,
const SerdNode* object_lang);
- Shared::World& _world;
+ World& _world;
Interface& _iface;
SerdEnv* _env;
SordInserter* _inserter;
diff --git a/src/socket/SocketServer.hpp b/src/socket/SocketServer.hpp
index 6732ed4e..6bbd792d 100644
--- a/src/socket/SocketServer.hpp
+++ b/src/socket/SocketServer.hpp
@@ -29,7 +29,7 @@ namespace Socket {
class SocketServer : public Server::EventWriter, public SocketReader
{
public:
- SocketServer(Shared::World& world,
+ SocketServer(World& world,
Server::Engine& engine,
SharedPtr<Socket> sock)
: Server::EventWriter(engine)
diff --git a/src/socket/SocketWriter.cpp b/src/socket/SocketWriter.cpp
index c375ae16..ae815aea 100644
--- a/src/socket/SocketWriter.cpp
+++ b/src/socket/SocketWriter.cpp
@@ -18,7 +18,7 @@
#include <sys/types.h>
#include <sys/socket.h>
-#include "ingen/shared/URIMap.hpp"
+#include "ingen/URIMap.hpp"
#include "SocketWriter.hpp"
@@ -40,8 +40,8 @@ socket_sink(const void* buf, size_t len, void* stream)
return ret;
}
-SocketWriter::SocketWriter(Shared::URIMap& map,
- Shared::URIs& uris,
+SocketWriter::SocketWriter(URIMap& map,
+ URIs& uris,
const Raul::URI& uri,
SharedPtr<Socket> sock)
: AtomWriter(map, uris, *this)
diff --git a/src/socket/SocketWriter.hpp b/src/socket/SocketWriter.hpp
index 2a17d843..cbdb2602 100644
--- a/src/socket/SocketWriter.hpp
+++ b/src/socket/SocketWriter.hpp
@@ -20,8 +20,8 @@
#include <stdint.h>
#include "ingen/Interface.hpp"
-#include "ingen/shared/AtomSink.hpp"
-#include "ingen/shared/AtomWriter.hpp"
+#include "ingen/AtomSink.hpp"
+#include "ingen/AtomWriter.hpp"
#include "raul/URI.hpp"
#include "raul/SharedPtr.hpp"
#include "sratom/sratom.h"
@@ -33,11 +33,11 @@ namespace Socket {
/** An Interface that writes Turtle messages to a socket.
*/
-class SocketWriter : public Shared::AtomWriter, public Shared::AtomSink
+class SocketWriter : public AtomWriter, public AtomSink
{
public:
- SocketWriter(Shared::URIMap& map,
- Shared::URIs& uris,
+ SocketWriter(URIMap& map,
+ URIs& uris,
const Raul::URI& uri,
SharedPtr<Socket> sock);
@@ -49,7 +49,7 @@ public:
Raul::URI uri() const { return _uri; }
protected:
- Shared::URIMap& _map;
+ URIMap& _map;
Sratom* _sratom;
SerdNode _base;
SerdURI _base_uri;
diff --git a/src/socket/ingen_socket_client.cpp b/src/socket/ingen_socket_client.cpp
index b10d598e..8819ea2c 100644
--- a/src/socket/ingen_socket_client.cpp
+++ b/src/socket/ingen_socket_client.cpp
@@ -16,15 +16,15 @@
#include <string>
-#include "ingen/shared/Module.hpp"
-#include "ingen/shared/World.hpp"
+#include "ingen/Module.hpp"
+#include "ingen/World.hpp"
#include "raul/log.hpp"
#include "Socket.hpp"
#include "SocketClient.hpp"
static SharedPtr<Ingen::Interface>
-new_socket_interface(Ingen::Shared::World* world,
+new_socket_interface(Ingen::World* world,
const std::string& url,
SharedPtr<Ingen::Interface> respondee)
{
@@ -41,8 +41,8 @@ new_socket_interface(Ingen::Shared::World* world,
return SharedPtr<Ingen::Interface>(client);
}
-struct IngenSocketClientModule : public Ingen::Shared::Module {
- void load(Ingen::Shared::World* world) {
+struct IngenSocketClientModule : public Ingen::Module {
+ void load(Ingen::World* world) {
world->add_interface_factory("unix", &new_socket_interface);
world->add_interface_factory("tcp", &new_socket_interface);
}
@@ -50,7 +50,7 @@ struct IngenSocketClientModule : public Ingen::Shared::Module {
extern "C" {
-Ingen::Shared::Module*
+Ingen::Module*
ingen_module_load()
{
return new IngenSocketClientModule();
diff --git a/src/socket/ingen_socket_server.cpp b/src/socket/ingen_socket_server.cpp
index 5bf679bb..aa13eebd 100644
--- a/src/socket/ingen_socket_server.cpp
+++ b/src/socket/ingen_socket_server.cpp
@@ -16,8 +16,8 @@
#include "raul/log.hpp"
-#include "ingen/shared/Module.hpp"
-#include "ingen/shared/World.hpp"
+#include "ingen/Module.hpp"
+#include "ingen/World.hpp"
#include "../server/Engine.hpp"
#include "../server/EventWriter.hpp"
@@ -26,8 +26,8 @@
using namespace Ingen;
-struct IngenSocketServerModule : public Ingen::Shared::Module {
- void load(Ingen::Shared::World* world) {
+struct IngenSocketServerModule : public Ingen::Module {
+ void load(Ingen::World* world) {
listener = SharedPtr<Ingen::Socket::SocketListener>(
new Ingen::Socket::SocketListener(*world));
}
@@ -37,7 +37,7 @@ struct IngenSocketServerModule : public Ingen::Shared::Module {
extern "C" {
-Ingen::Shared::Module*
+Ingen::Module*
ingen_module_load()
{
return new IngenSocketServerModule();