summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/interface/ClientKey.hpp86
-rw-r--r--src/common/interface/EngineInterface.hpp7
-rw-r--r--src/common/interface/Makefile.am1
-rw-r--r--src/common/interface/Responder.hpp13
4 files changed, 9 insertions, 98 deletions
diff --git a/src/common/interface/ClientKey.hpp b/src/common/interface/ClientKey.hpp
deleted file mode 100644
index b007a647..00000000
--- a/src/common/interface/ClientKey.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef CLIENTKEY_H
-#define CLIENTKEY_H
-
-#include <string>
-
-namespace Ingen {
-namespace Shared {
-
-
-/** Key for looking up clients.
- *
- * This might actually be a lookup key (as in OSC clients) or a direct handle
- * of some kind (eg pointer) (for in-process or shared memory clients).
- *
- * This is shared code, nothing client or server code specific should be here.
- */
-class ClientKey
-{
-public:
- /** A key to identify a particular ClientInterface.
- *
- * There are two different OSC key types because one is for server side,
- * and one is for client side. A client can not identify it's own URL to
- * the host (for NAT traversal, etc) so it can only know the outgoing UDP
- * port it's sending on. The server however identifies that client by the
- * full incoming URL.
- */
- enum Type {
- NIL, ///< A NULL key (represents no client)
- OSC_URL, ///< An OSC URL (remote host/client)
- OSC_PORT, ///< A local OSC port
- DIRECT ///< A direct in-process function call client
- };
-
- ClientKey()
- : _type(NIL),
- _uri("")
- {}
-
- ClientKey(Type type, const std::string& uri)
- : _type(type)
- , _uri(uri)
- {}
-
- /*ClientKey(Type type, int port)
- : _type(OSC_PORT)
- , _port(port)
- {}*/
-
- inline bool
- operator==(const ClientKey& key) const
- {
- return (_type == key._type && _uri == key._uri);
- }
-
- inline Type type() const { return _type; }
- inline const std::string& uri() const { return _uri; }
-
-protected:
- Type _type;
- const std::string _uri; ///< URL for OSC_URL, (string) port number for OSC_PORT
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // CLIENTKEY_H
-
diff --git a/src/common/interface/EngineInterface.hpp b/src/common/interface/EngineInterface.hpp
index af662f82..f727b1be 100644
--- a/src/common/interface/EngineInterface.hpp
+++ b/src/common/interface/EngineInterface.hpp
@@ -28,7 +28,6 @@ namespace Ingen {
/** Shared code used on both client side and engine side (abstract interfaces). */
namespace Shared {
-class ClientKey;
class Responder;
@@ -47,8 +46,8 @@ public:
virtual void disable_responses() = 0;
// Client registration
- virtual void register_client(ClientKey key, SharedPtr<ClientInterface> client) = 0;
- virtual void unregister_client(ClientKey key) = 0;
+ virtual void register_client(const string& uri, SharedPtr<ClientInterface> client) = 0;
+ virtual void unregister_client(const string& uri) = 0;
// Engine commands
@@ -125,6 +124,8 @@ public:
virtual void request_object(const string& path) = 0;
virtual void request_port_value(const string& port_path) = 0;
+
+ virtual void request_metadata(const string& path, const string& key) = 0;
virtual void request_plugins() = 0;
diff --git a/src/common/interface/Makefile.am b/src/common/interface/Makefile.am
index 7a8f641d..7b9f1f53 100644
--- a/src/common/interface/Makefile.am
+++ b/src/common/interface/Makefile.am
@@ -1,6 +1,5 @@
EXTRA_DIST = \
README \
ClientInterface.hpp \
- ClientKey.hpp \
Responder.hpp \
EngineInterface.hpp
diff --git a/src/common/interface/Responder.hpp b/src/common/interface/Responder.hpp
index fc8cdcf7..0ae0972a 100644
--- a/src/common/interface/Responder.hpp
+++ b/src/common/interface/Responder.hpp
@@ -21,15 +21,11 @@
#include <inttypes.h>
#include <string>
#include <raul/SharedPtr.hpp>
-#include "interface/ClientKey.hpp"
#include "interface/ClientInterface.hpp"
namespace Ingen {
namespace Shared {
-using Shared::ClientKey;
-using Shared::ClientInterface;
-
/** Class to handle responding to clients.
*
@@ -39,8 +35,8 @@ using Shared::ClientInterface;
* Note that this class only handles sending responses to commands from
* clients, (ie OK or an error), <b>not</b> notifications (ie new node,
* disconnection) - that's what ClientInterface is for. If a command is
- * a request, the ClientKey of the Responder can be used to find the
- * ClientInterface which should receive the response.
+ * a request, the Responder can be used to find the ClientInterface
+ * (by URI) which should receive the response.
*
* ClientInterface and Responder are seperate because responding might not
* actually get exposed to the client interface (eg in simulated blocking
@@ -57,8 +53,9 @@ public:
Responder() {}
virtual ~Responder() {}
- virtual ClientKey client_key() { return ClientKey(); }
- virtual SharedPtr<ClientInterface> client() { return SharedPtr<ClientInterface>(); }
+ virtual std::string client_uri() { return ""; }
+
+ virtual SharedPtr<ClientInterface> client() { return SharedPtr<ClientInterface>(); }
virtual void set_id(int32_t id) {}