You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2009/09/25 22:24:24 UTC

svn commit: r818994 [1/2] - in /qpid/trunk/qpid/cpp: bindings/qmf/ bindings/qmf/python/ bindings/qmf/ruby/ bindings/qmf/tests/ include/qmf/ include/qmf/engine/ src/ src/qmf/ src/qmf/engine/ src/qpid/broker/

Author: tross
Date: Fri Sep 25 20:24:22 2009
New Revision: 818994

URL: http://svn.apache.org/viewvc?rev=818994&view=rev
Log:
QMF updates:
  - Refactored into two namespaces:
     1) 'qmf' for the public QMF api (c++)
     2) 'qmf::engine' for the public engine API (used for language bindings)
  - Added object and first_object calls to Console (in Ruby)
  - Made objects call compatible with the kwarg arguments used in the older API
  - Added to_s functions to classes that needed them

Added:
    qpid/trunk/qpid/cpp/include/qmf/ConsoleObject.h
    qpid/trunk/qpid/cpp/include/qmf/engine/
    qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/AgentEngine.h
    qpid/trunk/qpid/cpp/include/qmf/engine/ConnectionSettings.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/include/qmf/ConnectionSettings.h
    qpid/trunk/qpid/cpp/include/qmf/engine/Console.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ConsoleEngine.h
    qpid/trunk/qpid/cpp/include/qmf/engine/Event.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Event.h
    qpid/trunk/qpid/cpp/include/qmf/engine/Message.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Message.h
    qpid/trunk/qpid/cpp/include/qmf/engine/Object.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Object.h
    qpid/trunk/qpid/cpp/include/qmf/engine/ObjectId.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ObjectId.h
    qpid/trunk/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/include/qmf/QmfImportExport.h
    qpid/trunk/qpid/cpp/include/qmf/engine/Query.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Query.h
    qpid/trunk/qpid/cpp/include/qmf/engine/ResilientConnection.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ResilientConnection.h
    qpid/trunk/qpid/cpp/include/qmf/engine/Schema.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Schema.h
    qpid/trunk/qpid/cpp/include/qmf/engine/Typecode.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Typecode.h
    qpid/trunk/qpid/cpp/include/qmf/engine/Value.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Value.h
    qpid/trunk/qpid/cpp/src/qmf/engine/
    qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/AgentEngine.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.h
    qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.h
    qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.h
    qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/MessageImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/MessageImpl.h
    qpid/trunk/qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ObjectIdImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/ObjectIdImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ObjectIdImpl.h
    qpid/trunk/qpid/cpp/src/qmf/engine/ObjectImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ObjectImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/ObjectImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ObjectImpl.h
    qpid/trunk/qpid/cpp/src/qmf/engine/Protocol.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Protocol.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/Protocol.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/Protocol.h
    qpid/trunk/qpid/cpp/src/qmf/engine/QueryImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/QueryImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/QueryImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/QueryImpl.h
    qpid/trunk/qpid/cpp/src/qmf/engine/ResilientConnection.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ResilientConnection.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/SchemaImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/SchemaImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/SchemaImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/SchemaImpl.h
    qpid/trunk/qpid/cpp/src/qmf/engine/SequenceManager.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/SequenceManager.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/SequenceManager.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/SequenceManager.h
    qpid/trunk/qpid/cpp/src/qmf/engine/ValueImpl.cpp
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ValueImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/engine/ValueImpl.h
      - copied, changed from r818917, qpid/trunk/qpid/cpp/src/qmf/ValueImpl.h
Removed:
    qpid/trunk/qpid/cpp/include/qmf/ConnectionSettings.h
    qpid/trunk/qpid/cpp/src/qmf/AgentEngine.cpp
    qpid/trunk/qpid/cpp/src/qmf/AgentEngine.h
    qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.h
    qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.h
    qpid/trunk/qpid/cpp/src/qmf/ConsoleEngine.h
    qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.h
    qpid/trunk/qpid/cpp/src/qmf/Event.h
    qpid/trunk/qpid/cpp/src/qmf/Message.h
    qpid/trunk/qpid/cpp/src/qmf/MessageImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/MessageImpl.h
    qpid/trunk/qpid/cpp/src/qmf/Object.h
    qpid/trunk/qpid/cpp/src/qmf/ObjectId.h
    qpid/trunk/qpid/cpp/src/qmf/ObjectIdImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/ObjectIdImpl.h
    qpid/trunk/qpid/cpp/src/qmf/ObjectImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/ObjectImpl.h
    qpid/trunk/qpid/cpp/src/qmf/Protocol.cpp
    qpid/trunk/qpid/cpp/src/qmf/Protocol.h
    qpid/trunk/qpid/cpp/src/qmf/Query.h
    qpid/trunk/qpid/cpp/src/qmf/QueryImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/QueryImpl.h
    qpid/trunk/qpid/cpp/src/qmf/ResilientConnection.cpp
    qpid/trunk/qpid/cpp/src/qmf/ResilientConnection.h
    qpid/trunk/qpid/cpp/src/qmf/Schema.h
    qpid/trunk/qpid/cpp/src/qmf/SchemaImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/SchemaImpl.h
    qpid/trunk/qpid/cpp/src/qmf/SequenceManager.cpp
    qpid/trunk/qpid/cpp/src/qmf/SequenceManager.h
    qpid/trunk/qpid/cpp/src/qmf/Typecode.h
    qpid/trunk/qpid/cpp/src/qmf/Value.h
    qpid/trunk/qpid/cpp/src/qmf/ValueImpl.cpp
    qpid/trunk/qpid/cpp/src/qmf/ValueImpl.h
Modified:
    qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am
    qpid/trunk/qpid/cpp/bindings/qmf/python/qmf.py
    qpid/trunk/qpid/cpp/bindings/qmf/qmfengine.i
    qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am
    qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb
    qpid/trunk/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb
    qpid/trunk/qpid/cpp/bindings/qmf/tests/test_base.rb
    qpid/trunk/qpid/cpp/src/qmf.mk
    qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp

Modified: qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am?rev=818994&r1=818993&r2=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am Fri Sep 25 20:24:22 2009
@@ -38,7 +38,7 @@
 #_qmfengine_la_LDFLAGS = -avoid-version -module -shrext "$(PYTHON_SO)"
 #_qmfengine_la_LDFLAGS = -avoid-version -module -shrext ".so"
 _qmfengine_la_LDFLAGS = -avoid-version -module -shared
-_qmfengine_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmfagent.la
+_qmfengine_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmf.la
 _qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(srcdir)/qmf -I$(PYTHON_INC)
 nodist__qmfengine_la_SOURCES = qmfengine.cpp
 

Modified: qpid/trunk/qpid/cpp/bindings/qmf/python/qmf.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/python/qmf.py?rev=818994&r1=818993&r2=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/python/qmf.py (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/python/qmf.py Fri Sep 25 20:24:22 2009
@@ -566,7 +566,7 @@
     #   attr_reader :impl
     def initialize(handler=None, kwargs={}):
        self._handler = handler
-       self.impl = qmfengine.ConsoleEngine()
+       self.impl = qmfengine.Console()
        self._event = qmfengine.ConsoleEvent()
        self._broker_list = []
     
@@ -741,7 +741,7 @@
             self._agentLabel = label
         self._conn = None
         self._handler = handler
-        self.impl = qmfengine.AgentEngine(self._agentLabel)
+        self.impl = qmfengine.Agent(self._agentLabel)
         self._event = qmfengine.AgentEvent()
         self._xmtMessage = qmfengine.Message()
     

Modified: qpid/trunk/qpid/cpp/bindings/qmf/qmfengine.i
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/qmfengine.i?rev=818994&r1=818993&r2=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/qmfengine.i (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/qmfengine.i Fri Sep 25 20:24:22 2009
@@ -19,34 +19,35 @@
 
 %{
 
-#include "qmf/AgentEngine.h"
-#include "qmf/ConsoleEngine.h"
-#include "qmf/ResilientConnection.h"
+#include "qmf/engine/Agent.h"
+#include "qmf/engine/Console.h"
+#include "qmf/engine/ResilientConnection.h"
 
 %}
 
-%include <qmf/QmfImportExport.h>
-%include <qmf/Query.h>
-%include <qmf/Message.h>
-%include <qmf/AgentEngine.h>
-%include <qmf/ConsoleEngine.h>
-%include <qmf/ConnectionSettings.h>
-%include <qmf/ResilientConnection.h>
-%include <qmf/Typecode.h>
-%include <qmf/Schema.h>
-%include <qmf/Value.h>
-%include <qmf/ObjectId.h>
-%include <qmf/Object.h>
+%include <qmf/engine/QmfEngineImportExport.h>
+%include <qmf/engine/Query.h>
+%include <qmf/engine/Message.h>
+%include <qmf/engine/Agent.h>
+%include <qmf/engine/Console.h>
+%include <qmf/engine/ConnectionSettings.h>
+%include <qmf/engine/ResilientConnection.h>
+%include <qmf/engine/Typecode.h>
+%include <qmf/engine/Schema.h>
+%include <qmf/engine/Value.h>
+%include <qmf/engine/ObjectId.h>
+%include <qmf/engine/Object.h>
 
 
 %inline {
 
 using namespace std;
-using namespace qmf;
+using namespace qmf::engine;
 
 namespace qmf {
+namespace engine {
 
-
+}
 }
 }
 

Modified: qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am?rev=818994&r1=818993&r2=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am Fri Sep 25 20:24:22 2009
@@ -23,23 +23,22 @@
 
 EXTRA_DIST = ruby.i
 BUILT_SOURCES = qmfengine.cpp
-generated_file_list = qmfengine.cpp
 
 rubylibdir = $(RUBY_LIB)
 
 dist_rubylib_DATA = qmf.rb
 
-$(generated_file_list): $(srcdir)/ruby.i $(srcdir)/../qmfengine.i
+qmfengine.cpp: $(srcdir)/ruby.i $(srcdir)/../qmfengine.i
 	$(SWIG) -ruby -c++ -Wall -I/usr/include $(INCLUDES) $(QPID_CXXFLAGS) -o qmfengine.cpp $(srcdir)/ruby.i
 
 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/libqmfagent.la
+qmfengine_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmfengine.la
 qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH)
 nodist_qmfengine_la_SOURCES = qmfengine.cpp
 
-CLEANFILES = $(generated_file_list)
+CLEANFILES = qmfengine.cpp
 
 endif # HAVE_RUBY_DEVEL

Modified: qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb?rev=818994&r1=818993&r2=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb Fri Sep 25 20:24:22 2009
@@ -570,6 +570,10 @@
     def args
       Arguments.new(@impl.getArgs)
     end
+
+    def method_missing(name, *extra_args)
+      args.__send__(name, extra_args)
+    end
   end
 
   ##==============================================================================
@@ -643,6 +647,10 @@
     def typecode
       @impl.getType
     end
+
+    def to_s
+      name
+    end
   end
 
   class SchemaMethod
@@ -669,6 +677,10 @@
     def name
       @impl.getName
     end
+
+    def to_s
+      name
+    end
   end
 
   class SchemaProperty
@@ -689,6 +701,10 @@
     def name
       @impl.getName
     end
+
+    def to_s
+      name
+    end
   end
 
   class SchemaStatistic
@@ -706,6 +722,10 @@
     def name
       @impl.getName
     end
+
+    def to_s
+      name
+    end
   end
 
   class SchemaClassKey
@@ -816,7 +836,7 @@
     def initialize(handler = nil, kwargs={})
       super()
       @handler = handler
-      @impl = Qmfengine::ConsoleEngine.new
+      @impl = Qmfengine::Console.new
       @event = Qmfengine::ConsoleEvent.new
       @broker_list = []
       @cv = new_cond
@@ -902,9 +922,15 @@
 
     def objects(query, kwargs = {})
       timeout = 30
+      kwargs.merge!(query) if query.class == Hash
+
       if kwargs.include?(:timeout)
         timeout = kwargs[:timeout]
+        kwargs.delete(:timeout)
       end
+
+      query = Query.new(kwargs) if query.class == Hash
+
       synchronize do
         @sync_count = 1
         @sync_result = []
@@ -918,6 +944,18 @@
       end
     end
 
+    # Return one and only one object or nil.
+    def object(query, kwargs = {})
+      objs = objects(query, kwargs)
+      return objs.length == 1 ? objs[0] : nil
+    end
+
+    # Return the first of potentially many objects.
+    def first_object(query, kwargs = {})
+      objs = objects(query, kwargs)
+      return objs.length > 0 ? objs[0] : nil
+    end
+
     def _get_result(list, context)
       synchronize do
         list.each do |item|
@@ -1120,7 +1158,7 @@
       end
       @conn = nil
       @handler = handler
-      @impl = Qmfengine::AgentEngine.new(@agentLabel)
+      @impl = Qmfengine::Agent.new(@agentLabel)
       @event = Qmfengine::AgentEvent.new
       @xmtMessage = Qmfengine::Message.new
     end

Modified: qpid/trunk/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb?rev=818994&r1=818993&r2=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb Fri Sep 25 20:24:22 2009
@@ -38,9 +38,8 @@
   end
 
   def test_B_basic_method_invocation
-    parents = @qmfc.objects(Qmf::Query.new(:class => "parent"))
-    assert_equal(parents.size, 1, "Number of 'parent' objects")
-    parent = parents[0]
+    parent = @qmfc.object(:class => "parent")
+    assert(parent, "Number of 'parent' objects")
     for seq in 0...10
       result = parent.echo(seq)
       assert_equal(result.status, 0, "Method Response Status")
@@ -54,9 +53,8 @@
   end
 
   def test_C_basic_types_numeric_big
-    parents = @qmfc.objects(Qmf::Query.new(:class =>"parent"))
-    assert_equal(parents.size, 1, "Number of parent objects")
-    parent = parents[0]
+    parent = @qmfc.object(:class =>"parent")
+    assert(parent, "Number of parent objects")
 
     result = parent.set_numerics("big")
     assert_equal(result.status, 0, "Method Response Status")
@@ -76,9 +74,8 @@
   end
 
   def test_C_basic_types_numeric_small
-    parents = @qmfc.objects(Qmf::Query.new(:class =>"parent"))
-    assert_equal(parents.size, 1, "Number of parent objects")
-    parent = parents[0]
+    parent = @qmfc.object(:class =>"parent")
+    assert(parent, "Number of parent objects")
 
     result = parent.set_numerics("small")
     assert_equal(result.status, 0, "Method Response Status")
@@ -98,9 +95,8 @@
   end
 
   def test_C_basic_types_numeric_negative
-    parents = @qmfc.objects(Qmf::Query.new(:class =>"parent"))
-    assert_equal(parents.size, 1, "Number of parent objects")
-    parent = parents[0]
+    parent = @qmfc.object(:class =>"parent")
+    assert(parent, "Number of parent objects")
 
     result = parent.set_numerics("negative")
     assert_equal(result.status, 0, "Method Response Status")
@@ -120,9 +116,8 @@
   end
 
   def test_C_basic_types_string_short
-    parents = @qmfc.objects(Qmf::Query.new(:class =>"parent"))
-    assert_equal(parents.size, 1, "Number of parent objects")
-    parent = parents[0]
+    parent = @qmfc.object(:class =>"parent")
+    assert(parent, "Number of parent objects")
 
     strings = []
     strings << ""
@@ -148,9 +143,8 @@
   end
 
   def test_C_basic_types_string_long
-    parents = @qmfc.objects(Qmf::Query.new(:class =>"parent"))
-    assert_equal(parents.size, 1, "Number of parent objects")
-    parent = parents[0]
+    parent = @qmfc.object(:class =>"parent")
+    assert(parent, "Number of parent objects")
 
     strings = []
     strings << ""
@@ -174,9 +168,8 @@
   end
 
   def test_D_userid_for_method
-    parents = @qmfc.objects(Qmf::Query.new(:class => "parent"))
-    assert_equal(parents.size, 1, "Number of parent objects")
-    parent = parents[0]
+    parent = @qmfc.object(:class => "parent")
+    assert(parent, "Number of parent objects")
 
     result = parent.probe_userid
     assert_equal(result.status, 0, "Method Response Status")

Modified: qpid/trunk/qpid/cpp/bindings/qmf/tests/test_base.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/tests/test_base.rb?rev=818994&r1=818993&r2=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/tests/test_base.rb (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/tests/test_base.rb Fri Sep 25 20:24:22 2009
@@ -62,6 +62,11 @@
     raise "Assertion failed: #{left} != #{right}#{text}" unless left == right
   end
 
+  def assert(condition, in_text=nil)
+    text = " (#{in_text})" if in_text
+    raise "Assertion failed: #{left} != #{right}#{text}" unless condition
+  end
+
   def fail(text)
     raise text
   end

Added: qpid/trunk/qpid/cpp/include/qmf/ConsoleObject.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/ConsoleObject.h?rev=818994&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/include/qmf/ConsoleObject.h (added)
+++ qpid/trunk/qpid/cpp/include/qmf/ConsoleObject.h Fri Sep 25 20:24:22 2009
@@ -0,0 +1,94 @@
+#ifndef _QmfConsoleObject_
+#define _QmfConsoleObject_
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "qmf/QmfImportExport.h"
+
+namespace qmf {
+
+    class ConsoleObjectImpl;
+    class SchemaObjectClass;
+    class ObjectId;
+    class Value;
+
+    /**
+     * ConsoleObject is an extension of Object with console-specific methods added.
+     *
+     * \ingroup qmfapi
+     */
+    class ConsoleObject : public Object {
+    public:
+        /**
+         * Create a new Object of a specific type.
+         *
+         * @param type Pointer to the schema class to use as a type for this object.
+         */
+        QMF_EXTERN ConsoleObject(const SchemaObjectClass* type);
+
+        /**
+         * Destroy the object.
+         */
+        QMF_EXTERN virtual ~ConsoleObject();
+
+        /**
+         *
+         */
+        QMF_EXTERN const SchemaObjectClass* getSchema() const;
+
+        /**
+         *
+         */
+        QMF_EXTERN ObjectId* getObjectId() const;
+
+        /**
+         *
+         */
+        QMF_EXTERN uint64_t getCurrentTime() const;
+        QMF_EXTERN uint64_t getCreateTime() const;
+        QMF_EXTERN uint64_t getDeleteTime() const;
+
+        /**
+         *
+         */
+        QMF_EXTERN bool isDeleted() const;
+
+        /**
+         *
+         */
+        QMF_EXTERN void update();
+
+        /**
+         *
+         */
+        QMF_EXTERN void invokeMethod(const char* name, const Value* arguments, MethodResult& result);
+
+        /**
+         *
+         */
+        QMF_EXTERN uint32_t invokeMethodAsync(const char* name, const Value* arguments = 0);
+
+    private:
+        ConsoleObjectImpl* impl;
+    };
+
+}
+
+#endif 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/AgentEngine.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h&p1=qpid/trunk/qpid/cpp/src/qmf/AgentEngine.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/AgentEngine.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfAgentEngine_
-#define _QmfAgentEngine_
+#ifndef _QmfEngineAgent_
+#define _QmfEngineAgent_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,15 +20,16 @@
  * under the License.
  */
 
-#include <qmf/Schema.h>
-#include <qmf/ObjectId.h>
-#include <qmf/Object.h>
-#include <qmf/Event.h>
-#include <qmf/Query.h>
-#include <qmf/Value.h>
-#include <qmf/Message.h>
+#include <qmf/engine/Schema.h>
+#include <qmf/engine/ObjectId.h>
+#include <qmf/engine/Object.h>
+#include <qmf/engine/Event.h>
+#include <qmf/engine/Query.h>
+#include <qmf/engine/Value.h>
+#include <qmf/engine/Message.h>
 
 namespace qmf {
+namespace engine {
 
     /**
      * AgentEvent
@@ -64,15 +65,15 @@
         const SchemaObjectClass* objectClass; // (METHOD_CALL)
     };
 
-    class AgentEngineImpl;
+    class AgentImpl;
 
     /**
-     * AgentEngine - Protocol engine for the QMF agent
+     * Agent - Protocol engine for the QMF agent
      */
-    class AgentEngine {
+    class Agent {
     public:
-        AgentEngine(char* label, bool internalStore=true);
-        ~AgentEngine();
+        Agent(char* label, bool internalStore=true);
+        ~Agent();
 
         /**
          * Configure the directory path for storing persistent data.
@@ -199,9 +200,10 @@
         void raiseEvent(Event& event);
 
     private:
-        AgentEngineImpl* impl;
+        AgentImpl* impl;
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/ConnectionSettings.h (from r818917, qpid/trunk/qpid/cpp/include/qmf/ConnectionSettings.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/ConnectionSettings.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/ConnectionSettings.h&p1=qpid/trunk/qpid/cpp/include/qmf/ConnectionSettings.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qmf/ConnectionSettings.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/ConnectionSettings.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfConnectionSettings_
-#define _QmfConnectionSettings_
+#ifndef _QmfEngineConnectionSettings_
+#define _QmfEngineConnectionSettings_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,10 +20,11 @@
  * under the License.
  */
 
-#include "qmf/QmfImportExport.h"
+#include "qmf/engine/QmfEngineImportExport.h"
 #include "qpid/sys/IntegerTypes.h"
 
 namespace qmf {
+namespace engine {
 
     class ConnectionSettingsImpl;
     class Value;
@@ -44,7 +45,7 @@
          * authentication will be the best-available (GSSAPI/Kerberos, Anonymous, Plain with prompts
          * for username and password).
          */
-        QMF_EXTERN ConnectionSettings();
+        QMFE_EXTERN ConnectionSettings();
 
         /**
          * Create a set of connection settings by URL.
@@ -59,7 +60,7 @@
          *    amqp://broker?transport=rdma&authmech=GSSAPI&authservice=qpidd
          *    amqps://broker?authmech=PLAIN&authuser=guest&authpass=guest
          */
-        QMF_EXTERN ConnectionSettings(const char* url);
+        QMFE_EXTERN ConnectionSettings(const char* url);
 
         /**
          * Copy Constructor.
@@ -69,7 +70,7 @@
         /**
          * Destroy the connection settings object.
          */
-        QMF_EXTERN ~ConnectionSettings();
+        QMFE_EXTERN ~ConnectionSettings();
 
         /**
          * Set an attribute to control connection setup.
@@ -79,7 +80,7 @@
          * @param value Reference to a value to be stored as the attribute.  The type of the value
          *              is specific to the key.
          */
-        QMF_EXTERN void setAttr(const char* key, const Value& value);
+        QMFE_EXTERN void setAttr(const char* key, const Value& value);
 
         /**
          * Get the value of an attribute.
@@ -88,7 +89,7 @@
          *
          * @return The value associated with the attribute name.
          */
-        QMF_EXTERN Value getAttr(const char* key) const;
+        QMFE_EXTERN Value getAttr(const char* key) const;
 
         /**
          * Get the attribute string (the portion of the URL following the '?') for the settings.
@@ -97,16 +98,16 @@
          *         available beyond the scope of the calling function, it should be copied.  The
          *         returned pointer may become invalid if the set of attributes is changed.
          */
-        QMF_EXTERN const char* getAttrString() const;
+        QMFE_EXTERN const char* getAttrString() const;
 
         /**
          * Shortcuts for setting the transport for the connection.
          *
          * @param port The port value for the connection address.
          */
-        QMF_EXTERN void transportTcp(uint16_t port = 5672);
-        QMF_EXTERN void transportSsl(uint16_t port = 5671);
-        QMF_EXTERN void transportRdma(uint16_t port = 5672);
+        QMFE_EXTERN void transportTcp(uint16_t port = 5672);
+        QMFE_EXTERN void transportSsl(uint16_t port = 5671);
+        QMFE_EXTERN void transportRdma(uint16_t port = 5672);
 
         /**
          * Shortcuts for setting authentication mechanisms.
@@ -121,9 +122,9 @@
          *
          * @param maxSsf Maximum security factor for connections. 0 = encryption not permitted.
          */
-        QMF_EXTERN void authAnonymous(const char* username = 0);
-        QMF_EXTERN void authPlain(const char* username = 0, const char* password = 0);
-        QMF_EXTERN void authGssapi(const char* serviceName, uint32_t minSsf = 0, uint32_t maxSsf = 256);
+        QMFE_EXTERN void authAnonymous(const char* username = 0);
+        QMFE_EXTERN void authPlain(const char* username = 0, const char* password = 0);
+        QMFE_EXTERN void authGssapi(const char* serviceName, uint32_t minSsf = 0, uint32_t maxSsf = 256);
 
         /**
          * Shortcut for setting connection retry attributes.
@@ -134,7 +135,7 @@
          *
          * @param delayFactor Factor to multiply the delay by between failed connection attempts.
          */
-        QMF_EXTERN void setRetry(int delayMin = 1, int delayMax = 128, int delayFactor = 2);
+        QMFE_EXTERN void setRetry(int delayMin = 1, int delayMax = 128, int delayFactor = 2);
 
     private:
         friend class ResilientConnectionImpl;
@@ -142,5 +143,6 @@
     };
 
 }
+}
 
 #endif

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Console.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/ConsoleEngine.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Console.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Console.h&p1=qpid/trunk/qpid/cpp/src/qmf/ConsoleEngine.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/ConsoleEngine.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Console.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfConsoleEngine_
-#define _QmfConsoleEngine_
+#ifndef _QmfEngineConsole_
+#define _QmfEngineConsole_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,19 +20,20 @@
  * under the License.
  */
 
-#include <qmf/ResilientConnection.h>
-#include <qmf/Schema.h>
-#include <qmf/ObjectId.h>
-#include <qmf/Object.h>
-#include <qmf/Event.h>
-#include <qmf/Query.h>
-#include <qmf/Value.h>
-#include <qmf/Message.h>
+#include <qmf/engine/ResilientConnection.h>
+#include <qmf/engine/Schema.h>
+#include <qmf/engine/ObjectId.h>
+#include <qmf/engine/Object.h>
+#include <qmf/engine/Event.h>
+#include <qmf/engine/Query.h>
+#include <qmf/engine/Value.h>
+#include <qmf/engine/Message.h>
 
 namespace qmf {
+namespace engine {
 
-    class ConsoleEngine;
-    struct ConsoleEngineImpl;
+    class Console;
+    struct ConsoleImpl;
     class BrokerProxyImpl;
     class AgentProxy;
     struct AgentProxyImpl;
@@ -53,7 +54,7 @@
 
     private:
         friend struct MethodResponseImpl;
-        friend struct ConsoleEngineImpl;
+        friend struct ConsoleImpl;
         MethodResponse(MethodResponseImpl* impl);
         MethodResponseImpl* impl;
     };
@@ -146,7 +147,7 @@
      */
     class BrokerProxy {
     public:
-        BrokerProxy(ConsoleEngine& console);
+        BrokerProxy(Console& console);
         ~BrokerProxy();
 
         void sessionOpened(SessionHandle& sh);
@@ -165,7 +166,7 @@
         void sendQuery(const Query& query, void* context, const AgentProxy* agent = 0);
 
     private:
-        friend struct ConsoleEngineImpl;
+        friend struct ConsoleImpl;
         friend struct StaticContext;
         BrokerProxyImpl* impl;
     };
@@ -184,10 +185,10 @@
             userBindings(false) {}
     };
 
-    class ConsoleEngine {
+    class Console {
     public:
-        ConsoleEngine(const ConsoleSettings& settings = ConsoleSettings());
-        ~ConsoleEngine();
+        Console(const ConsoleSettings& settings = ConsoleSettings());
+        ~Console();
 
         bool getEvent(ConsoleEvent& event) const;
         void popEvent();
@@ -218,9 +219,10 @@
     private:
         friend class BrokerProxyImpl;
         friend struct AgentProxyImpl;
-        ConsoleEngineImpl* impl;
+        ConsoleImpl* impl;
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Event.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/Event.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Event.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Event.h&p1=qpid/trunk/qpid/cpp/src/qmf/Event.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/Event.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Event.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfEvent_
-#define _QmfEvent_
+#ifndef _QmfEngineEvent_
+#define _QmfEngineEvent_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -21,10 +21,12 @@
  */
 
 namespace qmf {
+namespace engine {
 
     class Event {
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Message.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/Message.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Message.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Message.h&p1=qpid/trunk/qpid/cpp/src/qmf/Message.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/Message.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Message.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfMessage_
-#define _QmfMessage_
+#ifndef _QmfEngineMessage_
+#define _QmfEngineMessage_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -23,6 +23,7 @@
 #include "qpid/sys/IntegerTypes.h"
 
 namespace qmf {
+namespace engine {
 
     struct Message {
         char*    body;
@@ -35,5 +36,6 @@
     };
 
 }
+}
 
 #endif

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Object.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/Object.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Object.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Object.h&p1=qpid/trunk/qpid/cpp/src/qmf/Object.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/Object.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Object.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfObject_
-#define _QmfObject_
+#ifndef _QmfEngineObject_
+#define _QmfEngineObject_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +20,12 @@
  * under the License.
  */
 
-#include <qmf/Schema.h>
-#include <qmf/ObjectId.h>
-#include <qmf/Value.h>
+#include <qmf/engine/Schema.h>
+#include <qmf/engine/ObjectId.h>
+#include <qmf/engine/Value.h>
 
 namespace qmf {
+namespace engine {
 
     struct ObjectImpl;
     class Object {
@@ -44,11 +45,12 @@
 
     private:
         friend struct ObjectImpl;
-        friend class  AgentEngineImpl;
+        friend class  AgentImpl;
         Object(ObjectImpl* impl);
         ObjectImpl* impl;
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/ObjectId.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/ObjectId.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/ObjectId.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/ObjectId.h&p1=qpid/trunk/qpid/cpp/src/qmf/ObjectId.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/ObjectId.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/ObjectId.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfObjectId_
-#define _QmfObjectId_
+#ifndef _QmfEngineObjectId_
+#define _QmfEngineObjectId_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -23,6 +23,7 @@
 #include <qpid/sys/IntegerTypes.h>
 
 namespace qmf {
+namespace engine {
 
     // TODO: Add to/from string and << operator
 
@@ -50,11 +51,12 @@
         friend class  BrokerProxyImpl;
         friend struct QueryImpl;
         friend struct ValueImpl;
-        friend class  AgentEngineImpl;
+        friend class  AgentImpl;
         ObjectId(ObjectIdImpl* impl);
         ObjectIdImpl* impl;
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h (from r818917, qpid/trunk/qpid/cpp/include/qmf/QmfImportExport.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h&p1=qpid/trunk/qpid/cpp/include/qmf/QmfImportExport.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qmf/QmfImportExport.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef QMF_IMPORT_EXPORT_H
-#define QMF_IMPORT_EXPORT_H
+#ifndef QMF_ENGINE_IMPORT_EXPORT_H
+#define QMF_ENGINE_IMPORT_EXPORT_H
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -22,12 +22,12 @@
 
 #if defined(WIN32) && !defined(QPID_DECLARE_STATIC)
 #  if defined(QMF_EXPORT) || defined (qmfcommon_EXPORTS)
-#    define QMF_EXTERN __declspec(dllexport)
+#    define QMFE_EXTERN __declspec(dllexport)
 #  else
-#    define QMF_EXTERN __declspec(dllimport)
+#    define QMFE_EXTERN __declspec(dllimport)
 #  endif
 #else
-#  define QMF_EXTERN
+#  define QMFE_EXTERN
 #endif
 
 #endif

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Query.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/Query.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Query.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Query.h&p1=qpid/trunk/qpid/cpp/src/qmf/Query.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/Query.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Query.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfQuery_
-#define _QmfQuery_
+#ifndef _QmfEngineQuery_
+#define _QmfEngineQuery_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,10 +20,11 @@
  * under the License.
  */
 
-#include <qmf/ObjectId.h>
-#include <qmf/Value.h>
+#include <qmf/engine/ObjectId.h>
+#include <qmf/engine/Value.h>
 
 namespace qmf {
+namespace engine {
 
     class Object;
     struct QueryElementImpl;
@@ -103,6 +104,7 @@
         QueryImpl* impl;
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/ResilientConnection.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/ResilientConnection.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/ResilientConnection.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/ResilientConnection.h&p1=qpid/trunk/qpid/cpp/src/qmf/ResilientConnection.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/ResilientConnection.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/ResilientConnection.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfResilientConnection_
-#define _QmfResilientConnection_
+#ifndef _QmfEngineResilientConnection_
+#define _QmfEngineResilientConnection_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +20,12 @@
  * under the License.
  */
 
-#include <qmf/Message.h>
-#include <qmf/ConnectionSettings.h>
+#include <qmf/engine/Message.h>
+#include <qmf/engine/ConnectionSettings.h>
 #include <string>
 
 namespace qmf {
+namespace engine {
 
     class ResilientConnectionImpl;
 
@@ -158,6 +159,7 @@
         ResilientConnectionImpl* impl;
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Schema.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/Schema.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Schema.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Schema.h&p1=qpid/trunk/qpid/cpp/src/qmf/Schema.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/Schema.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Schema.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfSchema_
-#define _QmfSchema_
+#ifndef _QmfEngineSchema_
+#define _QmfEngineSchema_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,10 +20,11 @@
  * under the License.
  */
 
-#include <qmf/Typecode.h>
+#include <qmf/engine/Typecode.h>
 #include <qpid/sys/IntegerTypes.h>
 
 namespace qmf {
+namespace engine {
 
     enum Access { ACCESS_READ_CREATE = 1, ACCESS_READ_WRITE = 2, ACCESS_READ_ONLY = 3 };
     enum Direction { DIR_IN = 1, DIR_OUT = 2, DIR_IN_OUT = 3 };
@@ -78,7 +79,7 @@
     private:
         friend struct SchemaMethodImpl;
         friend struct SchemaObjectClassImpl;
-        friend class  AgentEngineImpl;
+        friend class  AgentImpl;
         SchemaMethod(SchemaMethodImpl* impl);
         SchemaMethodImpl* impl;
     };
@@ -148,7 +149,7 @@
     private:
         friend struct SchemaClassKeyImpl;
         friend class BrokerProxyImpl;
-        friend struct ConsoleEngineImpl;
+        friend struct ConsoleImpl;
         SchemaClassKey(SchemaClassKeyImpl* impl);
         SchemaClassKeyImpl* impl;
     };
@@ -175,7 +176,7 @@
     private:
         friend struct SchemaObjectClassImpl;
         friend class  BrokerProxyImpl;
-        friend class  AgentEngineImpl;
+        friend class  AgentImpl;
         SchemaObjectClass(SchemaObjectClassImpl* impl);
         SchemaObjectClassImpl* impl;
     };
@@ -197,11 +198,12 @@
     private:
         friend struct SchemaEventClassImpl;
         friend class  BrokerProxyImpl;
-        friend class  AgentEngineImpl;
+        friend class  AgentImpl;
         SchemaEventClass(SchemaEventClassImpl* impl);
         SchemaEventClassImpl* impl;
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Typecode.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/Typecode.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Typecode.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Typecode.h&p1=qpid/trunk/qpid/cpp/src/qmf/Typecode.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/Typecode.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Typecode.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfTypecode_
-#define _QmfTypecode_
+#ifndef _QmfEngineTypecode_
+#define _QmfEngineTypecode_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -21,6 +21,7 @@
  */
 
 namespace qmf {
+namespace engine {
 
     enum Typecode {
         TYPE_UINT8      = 1,
@@ -46,6 +47,7 @@
         TYPE_ARRAY      = 22
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/include/qmf/engine/Value.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/Value.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qmf/engine/Value.h?p2=qpid/trunk/qpid/cpp/include/qmf/engine/Value.h&p1=qpid/trunk/qpid/cpp/src/qmf/Value.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/Value.h (original)
+++ qpid/trunk/qpid/cpp/include/qmf/engine/Value.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfValue_
-#define _QmfValue_
+#ifndef _QmfEngineValue_
+#define _QmfEngineValue_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,10 +20,11 @@
  * under the License.
  */
 
-#include <qmf/ObjectId.h>
-#include <qmf/Typecode.h>
+#include <qmf/engine/ObjectId.h>
+#include <qmf/engine/Typecode.h>
 
 namespace qmf {
+namespace engine {
 
     class Object;
     struct ValueImpl;
@@ -109,11 +110,12 @@
         friend struct ValueImpl;
         friend class  BrokerProxyImpl;
         friend struct ObjectImpl;
-        friend class  AgentEngineImpl;
+        friend class  AgentImpl;
         Value(ValueImpl* impl);
         ValueImpl* impl;
     };
 }
+}
 
 #endif
 

Modified: qpid/trunk/qpid/cpp/src/qmf.mk
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf.mk?rev=818994&r1=818993&r2=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf.mk (original)
+++ qpid/trunk/qpid/cpp/src/qmf.mk Fri Sep 25 20:24:22 2009
@@ -20,12 +20,14 @@
 #
 # qmf library makefile fragment, to be included in Makefile.am
 # 
-lib_LTLIBRARIES +=				\
-  libqmfcommon.la				\
-  libqmfagent.la
+lib_LTLIBRARIES +=	\
+  libqmf.la		\
+  libqmfengine.la
 
-# Public header files
-nobase_include_HEADERS +=			\
+#
+# Public headers for the QMF API
+#
+QMF_API =					\
   ../include/qpid/agent/ManagementAgent.h	\
   ../include/qpid/agent/QmfAgentImportExport.h	\
   ../include/qmf/Agent.h			\
@@ -34,45 +36,75 @@
   ../include/qmf/ConnectionSettings.h		\
   ../include/qmf/AgentObject.h
 
-libqmfcommon_la_SOURCES =			\
-  qmf/BrokerProxyImpl.cpp			\
-  qmf/BrokerProxyImpl.h				\
-  qmf/ConnectionSettingsImpl.cpp		\
-  qmf/ConnectionSettingsImpl.h			\
-  qmf/ConsoleEngineImpl.cpp			\
-  qmf/ConsoleEngineImpl.h			\
-  qmf/ConsoleEngine.h				\
-  qmf/Event.h					\
-  qmf/Message.h					\
-  qmf/MessageImpl.cpp				\
-  qmf/MessageImpl.h				\
-  qmf/Object.h					\
-  qmf/ObjectId.h				\
-  qmf/ObjectIdImpl.cpp				\
-  qmf/ObjectIdImpl.h				\
-  qmf/ObjectImpl.cpp				\
-  qmf/ObjectImpl.h				\
-  qmf/Protocol.cpp				\
-  qmf/Protocol.h				\
-  qmf/Query.h					\
-  qmf/QueryImpl.cpp				\
-  qmf/QueryImpl.h				\
-  qmf/ResilientConnection.cpp			\
-  qmf/ResilientConnection.h			\
-  qmf/SequenceManager.cpp			\
-  qmf/SequenceManager.h				\
-  qmf/Schema.h					\
-  qmf/SchemaImpl.cpp				\
-  qmf/SchemaImpl.h				\
-  qmf/Typecode.h				\
-  qmf/Value.h					\
-  qmf/ValueImpl.cpp				\
-  qmf/ValueImpl.h
-
-libqmfagent_la_SOURCES =			\
-  qmf/AgentEngine.cpp				\
-  qmf/AgentEngine.h				\
-  qpid/agent/ManagementAgentImpl.cpp		\
-  qpid/agent/ManagementAgentImpl.h
+#
+# Public headers for the QMF Engine API
+#
+QMF_ENGINE_API =				\
+  ../include/qmf/engine/Agent.h			\
+  ../include/qmf/engine/Console.h		\
+  ../include/qmf/engine/Event.h			\
+  ../include/qmf/engine/Message.h		\
+  ../include/qmf/engine/Object.h		\
+  ../include/qmf/engine/ObjectId.h		\
+  ../include/qmf/engine/Query.h			\
+  ../include/qmf/engine/ResilientConnection.h	\
+  ../include/qmf/engine/Schema.h		\
+  ../include/qmf/engine/Typecode.h		\
+  ../include/qmf/engine/Value.h
+
+# Public header files
+nobase_include_HEADERS +=	\
+  $(QMF_API)			\
+  $(QMF_ENGINE_API)
+
+libqmf_la_SOURCES =			\
+  $(QMF_API)				\
+  qpid/agent/ManagementAgentImpl.cpp
+
+libqmfengine_la_SOURCES =			\
+  $(QMF_ENGINE_API)				\
+  qmf/engine/Agent.cpp				\
+  qmf/engine/BrokerProxyImpl.cpp		\
+  qmf/engine/BrokerProxyImpl.h			\
+  qmf/engine/ConnectionSettingsImpl.cpp		\
+  qmf/engine/ConnectionSettingsImpl.h		\
+  qmf/engine/ConsoleImpl.cpp			\
+  qmf/engine/ConsoleImpl.h			\
+  qmf/engine/MessageImpl.cpp			\
+  qmf/engine/MessageImpl.h			\
+  qmf/engine/ObjectIdImpl.cpp			\
+  qmf/engine/ObjectIdImpl.h			\
+  qmf/engine/ObjectImpl.cpp			\
+  qmf/engine/ObjectImpl.h			\
+  qmf/engine/Protocol.cpp			\
+  qmf/engine/Protocol.h				\
+  qmf/engine/QueryImpl.cpp			\
+  qmf/engine/QueryImpl.h			\
+  qmf/engine/ResilientConnection.cpp		\
+  qmf/engine/SequenceManager.cpp		\
+  qmf/engine/SequenceManager.h			\
+  qmf/engine/SchemaImpl.cpp			\
+  qmf/engine/SchemaImpl.h			\
+  qmf/engine/ValueImpl.cpp			\
+  qmf/engine/ValueImpl.h
+
+libqmf_la_LIBADD = libqmfengine.la
+libqmfengine_la_LIBADD = libqpidclient.la
+
+# Library Version Information:
+#
+#  CURRENT  => API/ABI version.  Bump this if the interface changes
+#  REVISION => Version of underlying implementation.
+#              Bump if implementation changes but API/ABI doesn't
+#  AGE      => Number of API/ABI versions this is backward compatible with
+#
+QMF_CURRENT  = 1
+QMF_REVISION = 0
+QMF_AGE      = 0
+
+QMF_ENGINE_CURRENT  = 1
+QMF_ENGINE_REVISION = 0
+QMF_ENGINE_AGE      = 0
 
-libqmfagent_la_LIBADD = libqpidclient.la libqmfcommon.la
+libqmf_la_LDFLAGS = -version-info $(QMF_CURRENT):$(QMF_REVISION):$(QMF_AGE)
+libqmfengine_la_LDFLAGS = -version-info $(QMF_ENGINE_CURRENT):$(QMF_ENGINE_REVISION):$(QMF_ENGINE_AGE)

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp (from r818917, qpid/trunk/qpid/cpp/src/qmf/AgentEngine.cpp)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp?p2=qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp&p1=qpid/trunk/qpid/cpp/src/qmf/AgentEngine.cpp&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/AgentEngine.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp Fri Sep 25 20:24:22 2009
@@ -17,15 +17,15 @@
  * under the License.
  */
 
-#include "qmf/AgentEngine.h"
-#include "qmf/MessageImpl.h"
-#include "qmf/SchemaImpl.h"
-#include "qmf/Typecode.h"
-#include "qmf/ObjectImpl.h"
-#include "qmf/ObjectIdImpl.h"
-#include "qmf/QueryImpl.h"
-#include "qmf/ValueImpl.h"
-#include "qmf/Protocol.h"
+#include "qmf/engine/Agent.h"
+#include "qmf/engine/MessageImpl.h"
+#include "qmf/engine/SchemaImpl.h"
+#include "qmf/engine/Typecode.h"
+#include "qmf/engine/ObjectImpl.h"
+#include "qmf/engine/ObjectIdImpl.h"
+#include "qmf/engine/QueryImpl.h"
+#include "qmf/engine/ValueImpl.h"
+#include "qmf/engine/Protocol.h"
 #include <qpid/framing/Buffer.h>
 #include <qpid/framing/Uuid.h>
 #include <qpid/framing/FieldTable.h>
@@ -43,11 +43,12 @@
 #include <boost/noncopyable.hpp>
 
 using namespace std;
-using namespace qmf;
+using namespace qmf::engine;
 using namespace qpid::framing;
 using namespace qpid::sys;
 
 namespace qmf {
+namespace engine {
 
     struct AgentEventImpl {
         typedef boost::shared_ptr<AgentEventImpl> Ptr;
@@ -79,10 +80,10 @@
         AgentQueryContext() : schemaMethod(0) {}
     };
 
-    class AgentEngineImpl : public boost::noncopyable {
+    class AgentImpl : public boost::noncopyable {
     public:
-        AgentEngineImpl(char* label, bool internalStore);
-        ~AgentEngineImpl();
+        AgentImpl(char* label, bool internalStore);
+        ~AgentImpl();
 
         void setStoreDir(const char* path);
         void setTransferDir(const char* path);
@@ -199,10 +200,11 @@
         void handleConsoleAddedIndication();
     };
 }
+}
 
-const char* AgentEngineImpl::QMF_EXCHANGE = "qpid.management";
-const char* AgentEngineImpl::DIR_EXCHANGE = "amq.direct";
-const char* AgentEngineImpl::BROKER_KEY   = "broker";
+const char* AgentImpl::QMF_EXCHANGE = "qpid.management";
+const char* AgentImpl::DIR_EXCHANGE = "amq.direct";
+const char* AgentImpl::BROKER_KEY   = "broker";
 
 #define STRING_REF(s) {if (!s.empty()) item.s = const_cast<char*>(s.c_str());}
 
@@ -228,7 +230,7 @@
     return item;
 }
 
-AgentEngineImpl::AgentEngineImpl(char* _label, bool i) :
+AgentImpl::AgentImpl(char* _label, bool i) :
     label(_label), queueName("qmfa-"), internalStore(i), nextTransientId(1),
     requestedBrokerBank(0), requestedAgentBank(0),
     assignedBrokerBank(0), assignedAgentBank(0),
@@ -237,11 +239,11 @@
     queueName += label;
 }
 
-AgentEngineImpl::~AgentEngineImpl()
+AgentImpl::~AgentImpl()
 {
 }
 
-void AgentEngineImpl::setStoreDir(const char* path)
+void AgentImpl::setStoreDir(const char* path)
 {
     Mutex::ScopedLock _lock(lock);
     if (path)
@@ -250,7 +252,7 @@
         storeDir.clear();
 }
 
-void AgentEngineImpl::setTransferDir(const char* path)
+void AgentImpl::setTransferDir(const char* path)
 {
     Mutex::ScopedLock _lock(lock);
     if (path)
@@ -259,7 +261,7 @@
         transferDir.clear();
 }
 
-void AgentEngineImpl::handleRcvMessage(Message& message)
+void AgentImpl::handleRcvMessage(Message& message)
 {
     Buffer   inBuffer(message.body, message.length);
     uint8_t  opcode;
@@ -275,13 +277,13 @@
         else if (opcode == Protocol::OP_GET_QUERY) handleGetQuery(inBuffer, sequence, replyToKey, userId);
         else if (opcode == Protocol::OP_METHOD_REQUEST) handleMethodRequest(inBuffer, sequence, replyToKey, userId);
         else {
-            QPID_LOG(error, "AgentEngineImpl::handleRcvMessage invalid opcode=" << opcode);
+            QPID_LOG(error, "AgentImpl::handleRcvMessage invalid opcode=" << opcode);
             break;
         }
     }
 }
 
-bool AgentEngineImpl::getXmtMessage(Message& item) const
+bool AgentImpl::getXmtMessage(Message& item) const
 {
     Mutex::ScopedLock _lock(lock);
     if (xmtQueue.empty())
@@ -290,14 +292,14 @@
     return true;
 }
 
-void AgentEngineImpl::popXmt()
+void AgentImpl::popXmt()
 {
     Mutex::ScopedLock _lock(lock);
     if (!xmtQueue.empty())
         xmtQueue.pop_front();
 }
 
-bool AgentEngineImpl::getEvent(AgentEvent& event) const
+bool AgentImpl::getEvent(AgentEvent& event) const
 {
     Mutex::ScopedLock _lock(lock);
     if (eventQueue.empty())
@@ -306,14 +308,14 @@
     return true;
 }
 
-void AgentEngineImpl::popEvent()
+void AgentImpl::popEvent()
 {
     Mutex::ScopedLock _lock(lock);
     if (!eventQueue.empty())
         eventQueue.pop_front();
 }
 
-void AgentEngineImpl::newSession()
+void AgentImpl::newSession()
 {
     Mutex::ScopedLock _lock(lock);
     eventQueue.clear();
@@ -323,7 +325,7 @@
     eventQueue.push_back(eventSetupComplete());
 }
 
-void AgentEngineImpl::startProtocol()
+void AgentImpl::startProtocol()
 {
     Mutex::ScopedLock _lock(lock);
     char    rawbuffer[512];
@@ -339,7 +341,7 @@
              " reqAgent=" << requestedAgentBank);
 }
 
-void AgentEngineImpl::heartbeat()
+void AgentImpl::heartbeat()
 {
     Mutex::ScopedLock _lock(lock);
     Buffer buffer(outputBuffer, MA_BUFFER_SIZE);
@@ -352,7 +354,7 @@
     QPID_LOG(trace, "SENT HeartbeatIndication");
 }
 
-void AgentEngineImpl::methodResponse(uint32_t sequence, uint32_t status, char* text,
+void AgentImpl::methodResponse(uint32_t sequence, uint32_t status, char* text,
                                      const Value& argMap)
 {
     Mutex::ScopedLock _lock(lock);
@@ -385,7 +387,7 @@
     QPID_LOG(trace, "SENT MethodResponse seq=" << context->sequence << " status=" << status << " text=" << text);
 }
 
-void AgentEngineImpl::queryResponse(uint32_t sequence, Object& object, bool prop, bool stat)
+void AgentImpl::queryResponse(uint32_t sequence, Object& object, bool prop, bool stat)
 {
     Mutex::ScopedLock _lock(lock);
     map<uint32_t, AgentQueryContext::Ptr>::iterator iter = contextMap.find(sequence);
@@ -407,7 +409,7 @@
     QPID_LOG(trace, "SENT ContentIndication seq=" << context->sequence);
 }
 
-void AgentEngineImpl::queryComplete(uint32_t sequence)
+void AgentImpl::queryComplete(uint32_t sequence)
 {
     Mutex::ScopedLock _lock(lock);
     map<uint32_t, AgentQueryContext::Ptr>::iterator iter = contextMap.find(sequence);
@@ -419,7 +421,7 @@
     sendCommandCompleteLH(context->exchange, context->key, context->sequence, 0, "OK");
 }
 
-void AgentEngineImpl::registerClass(SchemaObjectClass* cls)
+void AgentImpl::registerClass(SchemaObjectClass* cls)
 {
     Mutex::ScopedLock _lock(lock);
 
@@ -436,7 +438,7 @@
     // TODO: Indicate this schema if connected.
 }
 
-void AgentEngineImpl::registerClass(SchemaEventClass* cls)
+void AgentImpl::registerClass(SchemaEventClass* cls)
 {
     Mutex::ScopedLock _lock(lock);
 
@@ -453,13 +455,13 @@
     // TODO: Indicate this schema if connected.
 }
 
-const ObjectId* AgentEngineImpl::addObject(Object&, uint64_t)
+const ObjectId* AgentImpl::addObject(Object&, uint64_t)
 {
     Mutex::ScopedLock _lock(lock);
     return 0;
 }
 
-const ObjectId* AgentEngineImpl::allocObjectId(uint64_t persistId)
+const ObjectId* AgentImpl::allocObjectId(uint64_t persistId)
 {
     Mutex::ScopedLock _lock(lock);
     uint16_t sequence  = persistId ? 0 : bootSequence;
@@ -469,17 +471,17 @@
     return oid;
 }
 
-const ObjectId* AgentEngineImpl::allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi)
+const ObjectId* AgentImpl::allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi)
 {
     return allocObjectId(((uint64_t) persistIdHi) << 32 | (uint64_t) persistIdLo);
 }
 
-void AgentEngineImpl::raiseEvent(Event&)
+void AgentImpl::raiseEvent(Event&)
 {
     Mutex::ScopedLock _lock(lock);
 }
 
-AgentEventImpl::Ptr AgentEngineImpl::eventDeclareQueue(const string& name)
+AgentEventImpl::Ptr AgentImpl::eventDeclareQueue(const string& name)
 {
     AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::DECLARE_QUEUE));
     event->name = name;
@@ -487,7 +489,7 @@
     return event;
 }
 
-AgentEventImpl::Ptr AgentEngineImpl::eventBind(const string& exchange, const string& queue,
+AgentEventImpl::Ptr AgentImpl::eventBind(const string& exchange, const string& queue,
                                                const string& key)
 {
     AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::BIND));
@@ -498,13 +500,13 @@
     return event;
 }
 
-AgentEventImpl::Ptr AgentEngineImpl::eventSetupComplete()
+AgentEventImpl::Ptr AgentImpl::eventSetupComplete()
 {
     AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::SETUP_COMPLETE));
     return event;
 }
 
-AgentEventImpl::Ptr AgentEngineImpl::eventQuery(uint32_t num, const string& userId, const string& package,
+AgentEventImpl::Ptr AgentImpl::eventQuery(uint32_t num, const string& userId, const string& package,
                                                 const string& cls, boost::shared_ptr<ObjectId> oid)
 {
     AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::GET_QUERY));
@@ -517,7 +519,7 @@
     return event;
 }
 
-AgentEventImpl::Ptr AgentEngineImpl::eventMethod(uint32_t num, const string& userId, const string& method,
+AgentEventImpl::Ptr AgentImpl::eventMethod(uint32_t num, const string& userId, const string& method,
                                                  boost::shared_ptr<ObjectId> oid, boost::shared_ptr<Value> argMap,
                                                  const SchemaObjectClass* objectClass)
 {
@@ -531,7 +533,7 @@
     return event;
 }
 
-void AgentEngineImpl::sendBufferLH(Buffer& buf, const string& destination, const string& routingKey)
+void AgentImpl::sendBufferLH(Buffer& buf, const string& destination, const string& routingKey)
 {
     uint32_t length = buf.getPosition();
     MessageImpl::Ptr message(new MessageImpl);
@@ -546,7 +548,7 @@
     xmtQueue.push_back(message);
 }
 
-void AgentEngineImpl::sendPackageIndicationLH(const string& packageName)
+void AgentImpl::sendPackageIndicationLH(const string& packageName)
 {
     Buffer buffer(outputBuffer, MA_BUFFER_SIZE);
     Protocol::encodeHeader(buffer, Protocol::OP_PACKAGE_INDICATION);
@@ -555,7 +557,7 @@
     QPID_LOG(trace, "SENT PackageIndication:  package_name=" << packageName);
 }
 
-void AgentEngineImpl::sendClassIndicationLH(ClassKind kind, const string& packageName, const AgentClassKey& key)
+void AgentImpl::sendClassIndicationLH(ClassKind kind, const string& packageName, const AgentClassKey& key)
 {
     Buffer buffer(outputBuffer, MA_BUFFER_SIZE);
     Protocol::encodeHeader(buffer, Protocol::OP_CLASS_INDICATION);
@@ -567,7 +569,7 @@
     QPID_LOG(trace, "SENT ClassIndication:  package_name=" << packageName << " class_name=" << key.name);
 }
 
-void AgentEngineImpl::sendCommandCompleteLH(const string& exchange, const string& replyToKey,
+void AgentImpl::sendCommandCompleteLH(const string& exchange, const string& replyToKey,
                                             uint32_t sequence, uint32_t code, const string& text)
 {
     Buffer buffer(outputBuffer, MA_BUFFER_SIZE);
@@ -578,7 +580,7 @@
     QPID_LOG(trace, "SENT CommandComplete: seq=" << sequence << " code=" << code << " text=" << text);
 }
 
-void AgentEngineImpl::sendMethodErrorLH(uint32_t sequence, const string& key, uint32_t code, const string& text)
+void AgentImpl::sendMethodErrorLH(uint32_t sequence, const string& key, uint32_t code, const string& text)
 {
     Buffer buffer(outputBuffer, MA_BUFFER_SIZE);
     Protocol::encodeHeader(buffer, Protocol::OP_METHOD_RESPONSE, sequence);
@@ -604,7 +606,7 @@
     QPID_LOG(trace, "SENT MethodResponse: errorCode=" << code << " text=" << fulltext);
 }
 
-void AgentEngineImpl::handleAttachResponse(Buffer& inBuffer)
+void AgentImpl::handleAttachResponse(Buffer& inBuffer)
 {
     Mutex::ScopedLock _lock(lock);
 
@@ -651,17 +653,17 @@
     }
 }
 
-void AgentEngineImpl::handlePackageRequest(Buffer&)
+void AgentImpl::handlePackageRequest(Buffer&)
 {
     Mutex::ScopedLock _lock(lock);
 }
 
-void AgentEngineImpl::handleClassQuery(Buffer&)
+void AgentImpl::handleClassQuery(Buffer&)
 {
     Mutex::ScopedLock _lock(lock);
 }
 
-void AgentEngineImpl::handleSchemaRequest(Buffer& inBuffer, uint32_t sequence,
+void AgentImpl::handleSchemaRequest(Buffer& inBuffer, uint32_t sequence,
                                           const string& replyExchange, const string& replyKey)
 {
     Mutex::ScopedLock _lock(lock);
@@ -710,7 +712,7 @@
     sendCommandCompleteLH(rExchange, rKey, sequence, 1, "class not found");
 }
 
-void AgentEngineImpl::handleGetQuery(Buffer& inBuffer, uint32_t sequence, const string& replyTo, const string& userId)
+void AgentImpl::handleGetQuery(Buffer& inBuffer, uint32_t sequence, const string& replyTo, const string& userId)
 {
     Mutex::ScopedLock _lock(lock);
     FieldTable ft;
@@ -762,7 +764,7 @@
     eventQueue.push_back(eventQuery(contextNum, userId, pname, cname, oid));
 }
 
-void AgentEngineImpl::handleMethodRequest(Buffer& buffer, uint32_t sequence, const string& replyTo, const string& userId)
+void AgentImpl::handleMethodRequest(Buffer& buffer, uint32_t sequence, const string& replyTo, const string& userId)
 {
     Mutex::ScopedLock _lock(lock);
     string pname;
@@ -822,7 +824,7 @@
     eventQueue.push_back(eventMethod(contextNum, userId, method, oid, argMap, schema));
 }
 
-void AgentEngineImpl::handleConsoleAddedIndication()
+void AgentImpl::handleConsoleAddedIndication()
 {
     Mutex::ScopedLock _lock(lock);
 }
@@ -831,25 +833,25 @@
 // Wrappers
 //==================================================================
 
-AgentEngine::AgentEngine(char* label, bool internalStore) { impl = new AgentEngineImpl(label, internalStore); }
-AgentEngine::~AgentEngine() { delete impl; }
-void AgentEngine::setStoreDir(const char* path) { impl->setStoreDir(path); }
-void AgentEngine::setTransferDir(const char* path) { impl->setTransferDir(path); }
-void AgentEngine::handleRcvMessage(Message& message) { impl->handleRcvMessage(message); }
-bool AgentEngine::getXmtMessage(Message& item) const { return impl->getXmtMessage(item); }
-void AgentEngine::popXmt() { impl->popXmt(); }
-bool AgentEngine::getEvent(AgentEvent& event) const { return impl->getEvent(event); }
-void AgentEngine::popEvent() { impl->popEvent(); }
-void AgentEngine::newSession() { impl->newSession(); }
-void AgentEngine::startProtocol() { impl->startProtocol(); }
-void AgentEngine::heartbeat() { impl->heartbeat(); }
-void AgentEngine::methodResponse(uint32_t sequence, uint32_t status, char* text, const Value& arguments) { impl->methodResponse(sequence, status, text, arguments); }
-void AgentEngine::queryResponse(uint32_t sequence, Object& object, bool prop, bool stat) { impl->queryResponse(sequence, object, prop, stat); }
-void AgentEngine::queryComplete(uint32_t sequence) { impl->queryComplete(sequence); }
-void AgentEngine::registerClass(SchemaObjectClass* cls) { impl->registerClass(cls); }
-void AgentEngine::registerClass(SchemaEventClass* cls) { impl->registerClass(cls); }
-const ObjectId* AgentEngine::addObject(Object& obj, uint64_t persistId) { return impl->addObject(obj, persistId); }
-const ObjectId* AgentEngine::allocObjectId(uint64_t persistId) { return impl->allocObjectId(persistId); }
-const ObjectId* AgentEngine::allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi) { return impl->allocObjectId(persistIdLo, persistIdHi); }
-void AgentEngine::raiseEvent(Event& event) { impl->raiseEvent(event); }
+Agent::Agent(char* label, bool internalStore) { impl = new AgentImpl(label, internalStore); }
+Agent::~Agent() { delete impl; }
+void Agent::setStoreDir(const char* path) { impl->setStoreDir(path); }
+void Agent::setTransferDir(const char* path) { impl->setTransferDir(path); }
+void Agent::handleRcvMessage(Message& message) { impl->handleRcvMessage(message); }
+bool Agent::getXmtMessage(Message& item) const { return impl->getXmtMessage(item); }
+void Agent::popXmt() { impl->popXmt(); }
+bool Agent::getEvent(AgentEvent& event) const { return impl->getEvent(event); }
+void Agent::popEvent() { impl->popEvent(); }
+void Agent::newSession() { impl->newSession(); }
+void Agent::startProtocol() { impl->startProtocol(); }
+void Agent::heartbeat() { impl->heartbeat(); }
+void Agent::methodResponse(uint32_t sequence, uint32_t status, char* text, const Value& arguments) { impl->methodResponse(sequence, status, text, arguments); }
+void Agent::queryResponse(uint32_t sequence, Object& object, bool prop, bool stat) { impl->queryResponse(sequence, object, prop, stat); }
+void Agent::queryComplete(uint32_t sequence) { impl->queryComplete(sequence); }
+void Agent::registerClass(SchemaObjectClass* cls) { impl->registerClass(cls); }
+void Agent::registerClass(SchemaEventClass* cls) { impl->registerClass(cls); }
+const ObjectId* Agent::addObject(Object& obj, uint64_t persistId) { return impl->addObject(obj, persistId); }
+const ObjectId* Agent::allocObjectId(uint64_t persistId) { return impl->allocObjectId(persistId); }
+const ObjectId* Agent::allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi) { return impl->allocObjectId(persistIdLo, persistIdHi); }
+void Agent::raiseEvent(Event& event) { impl->raiseEvent(event); }
 

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.cpp (from r818917, qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.cpp)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.cpp?p2=qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.cpp&p1=qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.cpp&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.cpp Fri Sep 25 20:24:22 2009
@@ -17,9 +17,9 @@
  * under the License.
  */
 
-#include "qmf/BrokerProxyImpl.h"
-#include "qmf/ConsoleEngineImpl.h"
-#include "qmf/Protocol.h"
+#include "qmf/engine/BrokerProxyImpl.h"
+#include "qmf/engine/ConsoleImpl.h"
+#include "qmf/engine/Protocol.h"
 #include "qpid/Address.h"
 #include "qpid/sys/SystemInfo.h"
 #include <qpid/log/Statement.h>
@@ -28,7 +28,7 @@
 #include <fstream>
 
 using namespace std;
-using namespace qmf;
+using namespace qmf::engine;
 using namespace qpid::framing;
 using namespace qpid::sys;
 
@@ -74,7 +74,7 @@
     return item;
 }
 
-BrokerProxyImpl::BrokerProxyImpl(BrokerProxy& pub, ConsoleEngine& _console) : publicObject(pub), console(_console)
+BrokerProxyImpl::BrokerProxyImpl(BrokerProxy& pub, Console& _console) : publicObject(pub), console(_console)
 {
     stringstream qn;
     qpid::TcpAddress addr;
@@ -674,7 +674,7 @@
 AgentProxy::~AgentProxy() { delete impl; }
 const char* AgentProxy::getLabel() const { return impl->getLabel().c_str(); }
 
-BrokerProxy::BrokerProxy(ConsoleEngine& console) : impl(new BrokerProxyImpl(*this, console)) {}
+BrokerProxy::BrokerProxy(Console& console) : impl(new BrokerProxyImpl(*this, console)) {}
 BrokerProxy::~BrokerProxy() { delete impl; }
 void BrokerProxy::sessionOpened(SessionHandle& sh) { impl->sessionOpened(sh); }
 void BrokerProxy::sessionClosed() { impl->sessionClosed(); }

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.h?p2=qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.h&p1=qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/BrokerProxyImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/BrokerProxyImpl.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfBrokerProxyImpl_
-#define _QmfBrokerProxyImpl_
+#ifndef _QmfEngineBrokerProxyImpl_
+#define _QmfEngineBrokerProxyImpl_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,13 +20,13 @@
  * under the License.
  */
 
-#include "qmf/ConsoleEngine.h"
-#include "qmf/ObjectImpl.h"
-#include "qmf/SchemaImpl.h"
-#include "qmf/ValueImpl.h"
-#include "qmf/QueryImpl.h"
-#include "qmf/SequenceManager.h"
-#include "qmf/MessageImpl.h"
+#include "qmf/engine/Console.h"
+#include "qmf/engine/ObjectImpl.h"
+#include "qmf/engine/SchemaImpl.h"
+#include "qmf/engine/ValueImpl.h"
+#include "qmf/engine/QueryImpl.h"
+#include "qmf/engine/SequenceManager.h"
+#include "qmf/engine/MessageImpl.h"
 #include "qpid/framing/Buffer.h"
 #include "qpid/framing/Uuid.h"
 #include "qpid/sys/Mutex.h"
@@ -39,6 +39,7 @@
 #include <vector>
 
 namespace qmf {
+namespace engine {
 
     typedef boost::shared_ptr<MethodResponse> MethodResponsePtr;
     struct MethodResponseImpl {
@@ -93,13 +94,13 @@
 
     typedef boost::shared_ptr<AgentProxy> AgentProxyPtr;
     struct AgentProxyImpl {
-        ConsoleEngine& console;
+        Console& console;
         BrokerProxy& broker;
         uint32_t agentBank;
         std::string label;
 
-        AgentProxyImpl(ConsoleEngine& c, BrokerProxy& b, uint32_t ab, const std::string& l) : console(c), broker(b), agentBank(ab), label(l) {}
-        static AgentProxy* factory(ConsoleEngine& c, BrokerProxy& b, uint32_t ab, const std::string& l) {
+        AgentProxyImpl(Console& c, BrokerProxy& b, uint32_t ab, const std::string& l) : console(c), broker(b), agentBank(ab), label(l) {}
+        static AgentProxy* factory(Console& c, BrokerProxy& b, uint32_t ab, const std::string& l) {
             AgentProxyImpl* impl(new AgentProxyImpl(c, b, ab, l));
             return new AgentProxy(impl);
         }
@@ -109,7 +110,7 @@
 
     class BrokerProxyImpl : public boost::noncopyable {
     public:
-        BrokerProxyImpl(BrokerProxy& pub, ConsoleEngine& _console);
+        BrokerProxyImpl(BrokerProxy& pub, Console& _console);
         ~BrokerProxyImpl() {}
 
         void sessionOpened(SessionHandle& sh);
@@ -140,7 +141,7 @@
         friend struct MethodContext;
         BrokerProxy& publicObject;
         mutable qpid::sys::Mutex lock;
-        ConsoleEngine& console;
+        Console& console;
         std::string queueName;
         qpid::framing::Uuid brokerId;
         SequenceManager seqMgr;
@@ -220,8 +221,7 @@
         MethodResponsePtr methodResponse;
     };
 
-
-
+}
 }
 
 #endif

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp (from r818917, qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.cpp)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp?p2=qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp&p1=qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.cpp&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp Fri Sep 25 20:24:22 2009
@@ -17,11 +17,11 @@
  * under the License.
  */
 
-#include "qmf/ConnectionSettingsImpl.h"
-#include "qmf/Typecode.h"
+#include "qmf/engine/ConnectionSettingsImpl.h"
+#include "qmf/engine/Typecode.h"
 
 using namespace std;
-using namespace qmf;
+using namespace qmf::engine;
 using namespace qpid;
 
 const string attrProtocol("protocol");

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.h?p2=qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.h&p1=qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/ConnectionSettingsImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfConnectionSettingsImpl_
-#define _QmfConnectionSettingsImpl_
+#ifndef _QmfEngineConnectionSettingsImpl_
+#define _QmfEngineConnectionSettingsImpl_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,13 +20,14 @@
  * under the License.
  */
 
-#include "qmf/ConnectionSettings.h"
-#include "qmf/Value.h"
+#include "qmf/engine/ConnectionSettings.h"
+#include "qmf/engine/Value.h"
 #include "qpid/client/ConnectionSettings.h"
 #include <string>
 #include <map>
 
 namespace qmf {
+namespace engine {
 
     class ConnectionSettingsImpl {
         qpid::client::ConnectionSettings clientSettings;
@@ -57,5 +58,6 @@
     };
 
 }
+}
 
 #endif

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.cpp (from r818917, qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.cpp)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.cpp?p2=qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.cpp&p1=qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.cpp&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.cpp Fri Sep 25 20:24:22 2009
@@ -17,17 +17,17 @@
  * under the License.
  */
 
-#include "qmf/ConsoleEngineImpl.h"
-#include "qmf/MessageImpl.h"
-#include "qmf/SchemaImpl.h"
-#include "qmf/Typecode.h"
-#include "qmf/ObjectImpl.h"
-#include "qmf/ObjectIdImpl.h"
-#include "qmf/QueryImpl.h"
-#include "qmf/ValueImpl.h"
-#include "qmf/Protocol.h"
-#include "qmf/SequenceManager.h"
-#include "qmf/BrokerProxyImpl.h"
+#include "qmf/engine/ConsoleImpl.h"
+#include "qmf/engine/MessageImpl.h"
+#include "qmf/engine/SchemaImpl.h"
+#include "qmf/engine/Typecode.h"
+#include "qmf/engine/ObjectImpl.h"
+#include "qmf/engine/ObjectIdImpl.h"
+#include "qmf/engine/QueryImpl.h"
+#include "qmf/engine/ValueImpl.h"
+#include "qmf/engine/Protocol.h"
+#include "qmf/engine/SequenceManager.h"
+#include "qmf/engine/BrokerProxyImpl.h"
 #include <qpid/framing/Buffer.h>
 #include <qpid/framing/Uuid.h>
 #include <qpid/framing/FieldTable.h>
@@ -40,7 +40,7 @@
 #include <fstream>
 
 using namespace std;
-using namespace qmf;
+using namespace qmf::engine;
 using namespace qpid::framing;
 using namespace qpid::sys;
 
@@ -68,7 +68,7 @@
     return item;
 }
 
-ConsoleEngineImpl::ConsoleEngineImpl(const ConsoleSettings& s) : settings(s)
+ConsoleImpl::ConsoleImpl(const ConsoleSettings& s) : settings(s)
 {
     bindingList.push_back(pair<string, string>(string(), "schema.#"));
     if (settings.rcvObjects && settings.rcvEvents && settings.rcvHeartbeats && !settings.userBindings) {
@@ -85,12 +85,12 @@
     }
 }
 
-ConsoleEngineImpl::~ConsoleEngineImpl()
+ConsoleImpl::~ConsoleImpl()
 {
     // This function intentionally left blank.
 }
 
-bool ConsoleEngineImpl::getEvent(ConsoleEvent& event) const
+bool ConsoleImpl::getEvent(ConsoleEvent& event) const
 {
     Mutex::ScopedLock _lock(lock);
     if (eventQueue.empty())
@@ -99,20 +99,20 @@
     return true;
 }
 
-void ConsoleEngineImpl::popEvent()
+void ConsoleImpl::popEvent()
 {
     Mutex::ScopedLock _lock(lock);
     if (!eventQueue.empty())
         eventQueue.pop_front();
 }
 
-void ConsoleEngineImpl::addConnection(BrokerProxy& broker, void* /*context*/)
+void ConsoleImpl::addConnection(BrokerProxy& broker, void* /*context*/)
 {
     Mutex::ScopedLock _lock(lock);
     brokerList.push_back(broker.impl);
 }
 
-void ConsoleEngineImpl::delConnection(BrokerProxy& broker)
+void ConsoleImpl::delConnection(BrokerProxy& broker)
 {
     Mutex::ScopedLock _lock(lock);
     for (vector<BrokerProxyImpl*>::iterator iter = brokerList.begin();
@@ -123,13 +123,13 @@
         }
 }
 
-uint32_t ConsoleEngineImpl::packageCount() const
+uint32_t ConsoleImpl::packageCount() const
 {
     Mutex::ScopedLock _lock(lock);
     return packages.size();
 }
 
-const string& ConsoleEngineImpl::getPackageName(uint32_t idx) const
+const string& ConsoleImpl::getPackageName(uint32_t idx) const
 {
     const static string empty;
 
@@ -142,7 +142,7 @@
     return iter->first;
 }
 
-uint32_t ConsoleEngineImpl::classCount(const char* packageName) const
+uint32_t ConsoleImpl::classCount(const char* packageName) const
 {
     Mutex::ScopedLock _lock(lock);
     PackageList::const_iterator pIter = packages.find(packageName);
@@ -155,7 +155,7 @@
     return oList.size() + eList.size();
 }
 
-const SchemaClassKey* ConsoleEngineImpl::getClass(const char* packageName, uint32_t idx) const
+const SchemaClassKey* ConsoleImpl::getClass(const char* packageName, uint32_t idx) const
 {
     Mutex::ScopedLock _lock(lock);
     PackageList::const_iterator pIter = packages.find(packageName);
@@ -183,7 +183,7 @@
     return 0;
 }
 
-ClassKind ConsoleEngineImpl::getClassKind(const SchemaClassKey* key) const
+ClassKind ConsoleImpl::getClassKind(const SchemaClassKey* key) const
 {
     Mutex::ScopedLock _lock(lock);
     PackageList::const_iterator pIter = packages.find(key->getPackageName());
@@ -196,7 +196,7 @@
     return CLASS_OBJECT;
 }
 
-const SchemaObjectClass* ConsoleEngineImpl::getObjectClass(const SchemaClassKey* key) const
+const SchemaObjectClass* ConsoleImpl::getObjectClass(const SchemaClassKey* key) const
 {
     Mutex::ScopedLock _lock(lock);
     PackageList::const_iterator pIter = packages.find(key->getPackageName());
@@ -210,7 +210,7 @@
     return iter->second;
 }
 
-const SchemaEventClass* ConsoleEngineImpl::getEventClass(const SchemaClassKey* key) const
+const SchemaEventClass* ConsoleImpl::getEventClass(const SchemaClassKey* key) const
 {
     Mutex::ScopedLock _lock(lock);
     PackageList::const_iterator pIter = packages.find(key->getPackageName());
@@ -224,7 +224,7 @@
     return iter->second;
 }
 
-void ConsoleEngineImpl::bindPackage(const char* packageName)
+void ConsoleImpl::bindPackage(const char* packageName)
 {
     stringstream key;
     key << "console.obj.*.*." << packageName << ".#";
@@ -235,7 +235,7 @@
         (*iter)->addBinding(QMF_EXCHANGE, key.str());
 }
 
-void ConsoleEngineImpl::bindClass(const SchemaClassKey* classKey)
+void ConsoleImpl::bindClass(const SchemaClassKey* classKey)
 {
     stringstream key;
     key << "console.obj.*.*." << classKey->getPackageName() << "." << classKey->getClassName() << ".#";
@@ -246,7 +246,7 @@
         (*iter)->addBinding(QMF_EXCHANGE, key.str());
 }
 
-void ConsoleEngineImpl::bindClass(const char* packageName, const char* className)
+void ConsoleImpl::bindClass(const char* packageName, const char* className)
 {
     stringstream key;
     key << "console.obj.*.*." << packageName << "." << className << ".#";
@@ -258,20 +258,20 @@
 }
 
 /*
-void ConsoleEngineImpl::startSync(const Query& query, void* context, SyncQuery& sync)
+void ConsoleImpl::startSync(const Query& query, void* context, SyncQuery& sync)
 {
 }
 
-void ConsoleEngineImpl::touchSync(SyncQuery& sync)
+void ConsoleImpl::touchSync(SyncQuery& sync)
 {
 }
 
-void ConsoleEngineImpl::endSync(SyncQuery& sync)
+void ConsoleImpl::endSync(SyncQuery& sync)
 {
 }
 */
 
-void ConsoleEngineImpl::learnPackage(const string& packageName)
+void ConsoleImpl::learnPackage(const string& packageName)
 {
     Mutex::ScopedLock _lock(lock);
     if (packages.find(packageName) == packages.end())
@@ -279,7 +279,7 @@
                         (packageName, pair<ObjectClassList, EventClassList>(ObjectClassList(), EventClassList())));
 }
 
-void ConsoleEngineImpl::learnClass(SchemaObjectClass* cls)
+void ConsoleImpl::learnClass(SchemaObjectClass* cls)
 {
     Mutex::ScopedLock _lock(lock);
     const SchemaClassKey* key = cls->getClassKey();
@@ -292,7 +292,7 @@
         list[key] = cls;
 }
 
-void ConsoleEngineImpl::learnClass(SchemaEventClass* cls)
+void ConsoleImpl::learnClass(SchemaEventClass* cls)
 {
     Mutex::ScopedLock _lock(lock);
     const SchemaClassKey* key = cls->getClassKey();
@@ -305,7 +305,7 @@
         list[key] = cls;
 }
 
-bool ConsoleEngineImpl::haveClass(const SchemaClassKey* key) const
+bool ConsoleImpl::haveClass(const SchemaClassKey* key) const
 {
     Mutex::ScopedLock _lock(lock);
     PackageList::const_iterator pIter = packages.find(key->getPackageName());
@@ -318,7 +318,7 @@
     return oList.find(key) != oList.end() || eList.find(key) != eList.end();
 }
 
-SchemaObjectClass* ConsoleEngineImpl::getSchema(const SchemaClassKey* key) const
+SchemaObjectClass* ConsoleImpl::getSchema(const SchemaClassKey* key) const
 {
     Mutex::ScopedLock _lock(lock);
     PackageList::const_iterator pIter = packages.find(key->getPackageName());
@@ -337,24 +337,24 @@
 // Wrappers
 //==================================================================
 
-ConsoleEngine::ConsoleEngine(const ConsoleSettings& settings) : impl(new ConsoleEngineImpl(settings)) {}
-ConsoleEngine::~ConsoleEngine() { delete impl; }
-bool ConsoleEngine::getEvent(ConsoleEvent& event) const { return impl->getEvent(event); }
-void ConsoleEngine::popEvent() { impl->popEvent(); }
-void ConsoleEngine::addConnection(BrokerProxy& broker, void* context) { impl->addConnection(broker, context); }
-void ConsoleEngine::delConnection(BrokerProxy& broker) { impl->delConnection(broker); }
-uint32_t ConsoleEngine::packageCount() const { return impl->packageCount(); }
-const char* ConsoleEngine::getPackageName(uint32_t idx) const { return impl->getPackageName(idx).c_str(); }
-uint32_t ConsoleEngine::classCount(const char* packageName) const { return impl->classCount(packageName); }
-const SchemaClassKey* ConsoleEngine::getClass(const char* packageName, uint32_t idx) const { return impl->getClass(packageName, idx); }
-ClassKind ConsoleEngine::getClassKind(const SchemaClassKey* key) const { return impl->getClassKind(key); }
-const SchemaObjectClass* ConsoleEngine::getObjectClass(const SchemaClassKey* key) const { return impl->getObjectClass(key); }
-const SchemaEventClass* ConsoleEngine::getEventClass(const SchemaClassKey* key) const { return impl->getEventClass(key); }
-void ConsoleEngine::bindPackage(const char* packageName) { impl->bindPackage(packageName); }
-void ConsoleEngine::bindClass(const SchemaClassKey* key) { impl->bindClass(key); }
-void ConsoleEngine::bindClass(const char* packageName, const char* className) { impl->bindClass(packageName, className); }
-//void ConsoleEngine::startSync(const Query& query, void* context, SyncQuery& sync) { impl->startSync(query, context, sync); }
-//void ConsoleEngine::touchSync(SyncQuery& sync) { impl->touchSync(sync); }
-//void ConsoleEngine::endSync(SyncQuery& sync) { impl->endSync(sync); }
+Console::Console(const ConsoleSettings& settings) : impl(new ConsoleImpl(settings)) {}
+Console::~Console() { delete impl; }
+bool Console::getEvent(ConsoleEvent& event) const { return impl->getEvent(event); }
+void Console::popEvent() { impl->popEvent(); }
+void Console::addConnection(BrokerProxy& broker, void* context) { impl->addConnection(broker, context); }
+void Console::delConnection(BrokerProxy& broker) { impl->delConnection(broker); }
+uint32_t Console::packageCount() const { return impl->packageCount(); }
+const char* Console::getPackageName(uint32_t idx) const { return impl->getPackageName(idx).c_str(); }
+uint32_t Console::classCount(const char* packageName) const { return impl->classCount(packageName); }
+const SchemaClassKey* Console::getClass(const char* packageName, uint32_t idx) const { return impl->getClass(packageName, idx); }
+ClassKind Console::getClassKind(const SchemaClassKey* key) const { return impl->getClassKind(key); }
+const SchemaObjectClass* Console::getObjectClass(const SchemaClassKey* key) const { return impl->getObjectClass(key); }
+const SchemaEventClass* Console::getEventClass(const SchemaClassKey* key) const { return impl->getEventClass(key); }
+void Console::bindPackage(const char* packageName) { impl->bindPackage(packageName); }
+void Console::bindClass(const SchemaClassKey* key) { impl->bindClass(key); }
+void Console::bindClass(const char* packageName, const char* className) { impl->bindClass(packageName, className); }
+//void Console::startSync(const Query& query, void* context, SyncQuery& sync) { impl->startSync(query, context, sync); }
+//void Console::touchSync(SyncQuery& sync) { impl->touchSync(sync); }
+//void Console::endSync(SyncQuery& sync) { impl->endSync(sync); }
 
 

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.h?p2=qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.h&p1=qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/ConsoleEngineImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/ConsoleImpl.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfConsoleEngineImpl_
-#define _QmfConsoleEngineImpl_
+#ifndef _QmfEngineConsoleEngineImpl_
+#define _QmfEngineConsoleEngineImpl_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,17 +20,17 @@
  * under the License.
  */
 
-#include "qmf/ConsoleEngine.h"
-#include "qmf/MessageImpl.h"
-#include "qmf/SchemaImpl.h"
-#include "qmf/Typecode.h"
-#include "qmf/ObjectImpl.h"
-#include "qmf/ObjectIdImpl.h"
-#include "qmf/QueryImpl.h"
-#include "qmf/ValueImpl.h"
-#include "qmf/Protocol.h"
-#include "qmf/SequenceManager.h"
-#include "qmf/BrokerProxyImpl.h"
+#include "qmf/engine/Console.h"
+#include "qmf/engine/MessageImpl.h"
+#include "qmf/engine/SchemaImpl.h"
+#include "qmf/engine/Typecode.h"
+#include "qmf/engine/ObjectImpl.h"
+#include "qmf/engine/ObjectIdImpl.h"
+#include "qmf/engine/QueryImpl.h"
+#include "qmf/engine/ValueImpl.h"
+#include "qmf/engine/Protocol.h"
+#include "qmf/engine/SequenceManager.h"
+#include "qmf/engine/BrokerProxyImpl.h"
 #include <qpid/framing/Buffer.h>
 #include <qpid/framing/Uuid.h>
 #include <qpid/framing/FieldTable.h>
@@ -49,6 +49,7 @@
 #include <boost/noncopyable.hpp>
 
 namespace qmf {
+namespace engine {
 
     struct ConsoleEventImpl {
         typedef boost::shared_ptr<ConsoleEventImpl> Ptr;
@@ -67,10 +68,10 @@
         ConsoleEvent copy();
     };
 
-    class ConsoleEngineImpl : public boost::noncopyable {
+    class ConsoleImpl : public boost::noncopyable {
     public:
-        ConsoleEngineImpl(const ConsoleSettings& settings = ConsoleSettings());
-        ~ConsoleEngineImpl();
+        ConsoleImpl(const ConsoleSettings& settings = ConsoleSettings());
+        ~ConsoleImpl();
 
         bool getEvent(ConsoleEvent& event) const;
         void popEvent();
@@ -128,6 +129,7 @@
         SchemaObjectClass* getSchema(const SchemaClassKey* key) const;
     };
 }
+}
 
 #endif
 

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.cpp (from r818917, qpid/trunk/qpid/cpp/src/qmf/MessageImpl.cpp)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.cpp?p2=qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.cpp&p1=qpid/trunk/qpid/cpp/src/qmf/MessageImpl.cpp&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/MessageImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.cpp Fri Sep 25 20:24:22 2009
@@ -17,11 +17,11 @@
  * under the License.
  */
 
-#include "qmf/MessageImpl.h"
+#include "qmf/engine/MessageImpl.h"
 #include <string.h>
 
 using namespace std;
-using namespace qmf;
+using namespace qmf::engine;
 
 #define STRING_REF(s) {if (!s.empty()) item.s = const_cast<char*>(s.c_str());}
 

Copied: qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.h (from r818917, qpid/trunk/qpid/cpp/src/qmf/MessageImpl.h)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.h?p2=qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.h&p1=qpid/trunk/qpid/cpp/src/qmf/MessageImpl.h&r1=818917&r2=818994&rev=818994&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/MessageImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qmf/engine/MessageImpl.h Fri Sep 25 20:24:22 2009
@@ -1,5 +1,5 @@
-#ifndef _QmfMessageImpl_
-#define _QmfMessageImpl_
+#ifndef _QmfEngineMessageImpl_
+#define _QmfEngineMessageImpl_
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +20,12 @@
  * under the License.
  */
 
-#include "qmf/Message.h"
+#include "qmf/engine/Message.h"
 #include <string>
 #include <boost/shared_ptr.hpp>
 
 namespace qmf {
+namespace engine {
 
     struct MessageImpl {
         typedef boost::shared_ptr<MessageImpl> Ptr;
@@ -38,5 +39,6 @@
         Message copy();
     };
 }
+}
 
 #endif



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org