summaryrefslogtreecommitdiff
path: root/qpid/cpp/bindings/qmf
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-08-19 18:31:31 +0000
committerTed Ross <tross@apache.org>2009-08-19 18:31:31 +0000
commit7753a6839ac0abb282e2d4372f7a4199243cf4ff (patch)
tree4b8ff6cdf883dc24f84423dd42b5f25d169013c7 /qpid/cpp/bindings/qmf
parentaaae47e89aa754481027e0c7ed6030218f01ec51 (diff)
downloadqpid-python-7753a6839ac0abb282e2d4372f7a4199243cf4ff.tar.gz
Introduce the public includes for the QMF interfaces.
Rename Agent to AgentEngine to differentiate the API from the underlying engine. Note that some of these public headers will overlap with the emerging "messaging" API (notably Connection.h and ConnectionSettings.h). It is desirable that these components of the API become common between "messaging" and "qmf". As such, once the differences are reconciled, they will most likely be removed from the qmf space and placed in the messaging space. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@805916 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings/qmf')
-rw-r--r--qpid/cpp/bindings/qmf/qmfengine.i4
-rw-r--r--qpid/cpp/bindings/qmf/ruby/Makefile.am2
-rw-r--r--qpid/cpp/bindings/qmf/ruby/qmf.rb22
3 files changed, 14 insertions, 14 deletions
diff --git a/qpid/cpp/bindings/qmf/qmfengine.i b/qpid/cpp/bindings/qmf/qmfengine.i
index 3c67d92031..e1a4c53bec 100644
--- a/qpid/cpp/bindings/qmf/qmfengine.i
+++ b/qpid/cpp/bindings/qmf/qmfengine.i
@@ -19,7 +19,7 @@
%{
-#include "Agent.h"
+#include "AgentEngine.h"
#include <ResilientConnection.h>
%}
@@ -27,7 +27,7 @@
%include <Query.h>
%include <Message.h>
-%include <Agent.h>
+%include <AgentEngine.h>
%include <ResilientConnection.h>
%include <Typecode.h>
%include <Schema.h>
diff --git a/qpid/cpp/bindings/qmf/ruby/Makefile.am b/qpid/cpp/bindings/qmf/ruby/Makefile.am
index 532fdb6875..1dc08f646a 100644
--- a/qpid/cpp/bindings/qmf/ruby/Makefile.am
+++ b/qpid/cpp/bindings/qmf/ruby/Makefile.am
@@ -36,7 +36,7 @@ rubylibarchdir = $(RUBY_LIB_ARCH)
rubylibarch_LTLIBRARIES = qmfengine.la
qmfengine_la_LDFLAGS = -avoid-version -module -shrext ".$(RUBY_DLEXT)"
-qmfengine_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmfcommon.la
+qmfengine_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmfagent.la
qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH)
nodist_qmfengine_la_SOURCES = qmfengine.cpp
diff --git a/qpid/cpp/bindings/qmf/ruby/qmf.rb b/qpid/cpp/bindings/qmf/ruby/qmf.rb
index 7ee447c675..35a76c490a 100644
--- a/qpid/cpp/bindings/qmf/ruby/qmf.rb
+++ b/qpid/cpp/bindings/qmf/ruby/qmf.rb
@@ -33,11 +33,11 @@ module Qmf
class ConnectionSettings < Qmfengine::ConnectionSettings
end
- class ConnectionEvent
+ class ConnectionHandler
def conn_event_connected(); end
def conn_event_disconnected(error); end
- def conn_event_session_closed(context, error); end
- def conn_event_recv(context, message); end
+ def sess_event_session_closed(context, error); end
+ def sess_event_recv(context, message); end
end
class Query
@@ -63,15 +63,10 @@ module Qmf
end
end
- class AgentHandler
- def get_query(context, query, userId); end
- def method_call(context, name, object_id, args, userId); end
- end
-
class Connection
attr_reader :impl
- def initialize(settings, event_handler = nil, delay_min = 1, delay_max = 128, delay_factor = 2)
+ def initialize(settings, delay_min = 1, delay_max = 128, delay_factor = 2)
@impl = Qmfengine::ResilientConnection.new(settings, delay_min, delay_max, delay_factor)
@sockEngine, @sock = Socket::socketpair(Socket::PF_UNIX, Socket::SOCK_STREAM, 0)
@impl.setNotifyFd(@sockEngine.fileno)
@@ -232,7 +227,12 @@ module Qmf
end
end
- class Agent
+ class AgentHandler
+ def get_query(context, query, userId); end
+ def method_call(context, name, object_id, args, userId); end
+ end
+
+ class Agent < ConnectionHandler
def initialize(handler, label="")
if label == ""
@agentLabel = "rb-%s.%d" % [Socket.gethostname, Process::pid]
@@ -241,7 +241,7 @@ module Qmf
end
@conn = nil
@handler = handler
- @impl = Qmfengine::Agent.new(@agentLabel)
+ @impl = Qmfengine::AgentEngine.new(@agentLabel)
@event = Qmfengine::AgentEvent.new
@xmtMessage = Qmfengine::Message.new
end