diff options
author | David Robillard <d@drobilla.net> | 2007-07-24 19:26:47 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-24 19:26:47 +0000 |
commit | bb1c49dfa484db080938cff6f8f70167c9026a1c (patch) | |
tree | 6f6382fcbfddfead6d5c32d19977aed8020d32e4 /src/common/interface/ClientKey.h | |
parent | f0f64e4425acfb8b8633a47faa70f87fc32a4399 (diff) | |
download | ingen-bb1c49dfa484db080938cff6f8f70167c9026a1c.tar.gz ingen-bb1c49dfa484db080938cff6f8f70167c9026a1c.tar.bz2 ingen-bb1c49dfa484db080938cff6f8f70167c9026a1c.zip |
Consistently rename all C++ files .cpp/.hpp.
Fix (some) inclusion guard names to not clash with other libs.
git-svn-id: http://svn.drobilla.net/lad/ingen@613 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/common/interface/ClientKey.h')
-rw-r--r-- | src/common/interface/ClientKey.h | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/src/common/interface/ClientKey.h b/src/common/interface/ClientKey.h deleted file mode 100644 index b007a647..00000000 --- a/src/common/interface/ClientKey.h +++ /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 - |