diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-01-14 20:01:26 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-01-14 20:01:26 +0000 |
commit | 39719b8235f4bb6e16e5162b442ac6344c9702da (patch) | |
tree | 0dc4cde3fa94a49c59be5569b0d1f1db8bab1289 /TAO/orbsvcs/tests | |
parent | be7769867c161ea33d5045f3489c41adb02626de (diff) | |
download | ATCD-39719b8235f4bb6e16e5162b442ac6344c9702da.tar.gz |
ChangeLogTag: Mon Jan 14 13:41:11 2002 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs/tests')
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Basic/Simple.dsp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Notify_Tests.dsw | 50 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp | 88 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h | 26 |
4 files changed, 157 insertions, 11 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Basic/Simple.dsp b/TAO/orbsvcs/tests/Notify/Basic/Simple.dsp index 8ff08049571..ae21e87b559 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/Simple.dsp +++ b/TAO/orbsvcs/tests/Notify/Basic/Simple.dsp @@ -101,9 +101,5 @@ SOURCE=.\Simple.cpp SOURCE=.\Simple.h
# End Source File
# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
# End Target
# End Project
diff --git a/TAO/orbsvcs/tests/Notify/Notify_Tests.dsw b/TAO/orbsvcs/tests/Notify/Notify_Tests.dsw index b4c3e3a1413..e3b331bb9bd 100644 --- a/TAO/orbsvcs/tests/Notify/Notify_Tests.dsw +++ b/TAO/orbsvcs/tests/Notify/Notify_Tests.dsw @@ -105,7 +105,55 @@ Package=<4> ###############################################################################
-Project: "TAO_NotifyTests"=.\lib\TAO_NotifyTests.dsp - Package Owner=<4>
+Project: "Structured_Filter_Consumer"=.\Structured_Filter\Structured_Filter_Consumer.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Structured_Filter_Supplier"=.\Structured_Filter\Structured_Filter_Supplier.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Structured_Multi_Filter_Consumer"=.\Structured_Multi_Filter\Structured_Multi_Filter_Consumer.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Structured_Multi_Filter_Supplier"=.\Structured_Multi_Filter\Structured_Multi_Filter_Supplier.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "TAO_NotifyTests DLL"=.\lib\TAO_NotifyTests.dsp - Package Owner=<4>
Package=<5>
{{{
diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp index bfefc4a4a1d..e1803116fdb 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp @@ -31,8 +31,8 @@ Notify_Test_Client::init (int argc, char *argv [] TAO_ENV_ARG_DECL) void Notify_Test_Client::init_ORB (int argc, - char *argv [] - TAO_ENV_ARG_DECL) + char *argv [] + TAO_ENV_ARG_DECL) { this->orb_ = CORBA::ORB_init (argc, argv, @@ -76,7 +76,8 @@ Notify_Test_Client::resolve_naming_service (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW (CORBA::UNKNOWN ()); this->naming_context_ = - CosNaming::NamingContext::_narrow (naming_obj.in () TAO_ENV_ARG_PARAMETER); + CosNaming::NamingContext::_narrow (naming_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } @@ -93,8 +94,10 @@ Notify_Test_Client::resolve_Notify_factory (TAO_ENV_SINGLE_ARG_DECL) ACE_CHECK; this->notify_factory_ = - CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in () - TAO_ENV_ARG_PARAMETER); + CosNotifyChannelAdmin::EventChannelFactory::_narrow ( + obj.in () + TAO_ENV_ARG_PARAMETER + ); ACE_CHECK; } @@ -113,3 +116,78 @@ Notify_Test_Client::shutdown (TAO_ENV_SINGLE_ARG_DECL_NOT_USED) { this->done_ = 1; } + +CORBA::ORB_ptr +Notify_Test_Client::orb (void) +{ + return this->orb_.in (); +} + + +PortableServer::POA_ptr +Notify_Test_Client::root_poa (void) +{ + return this->root_poa_.in (); +} + + +CosNaming::NamingContext_ptr +Notify_Test_Client::naming_context (void) +{ + return this->naming_context_.in (); +} + + +CosNotifyChannelAdmin::EventChannelFactory_ptr +Notify_Test_Client::notify_factory (void) +{ + return this->notify_factory_.in (); +} + + +CosNotifyChannelAdmin::EventChannel_ptr +Notify_Test_Client::create_event_channel (const char* cname, + int resolve + TAO_ENV_ARG_PARAMETER) +{ + CosNotifyChannelAdmin::EventChannel_var ec; + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup (cname); + + if (resolve) + { + CORBA::Object_var obj = naming_context_->resolve (name); + ec = CosNotifyChannelAdmin::EventChannel::_narrow (obj.in ()); + + if (CORBA::is_nil (ec.in ())) + { + return 0; + } + } + else + { + CosNotifyChannelAdmin::ChannelID id; + CosNotification::QoSProperties initial_qos; + CosNotification::AdminProperties initial_admin; + + ec = notify_factory_->create_channel (initial_qos, + initial_admin, + id + TAO_ENV_ARG_PARAMETER); + ACE_CHECK; + + naming_context_->rebind(name, ec.in()); + } + + return ec._retn (); +} + + +CORBA::Boolean& +Notify_Test_Client::done (void) +{ + return this->done_; +} + + diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h index ed7d79f16e9..5f4879155ec 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h +++ b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h @@ -42,8 +42,32 @@ class TAO_NOTIFY_TEST_Export Notify_Test_Client void shutdown (TAO_ENV_SINGLE_ARG_DECL); // Shutdown the ORB + CORBA::Boolean& done (void); + // Access the done boolean. + + CORBA::ORB_ptr orb (void); + // Access the ORB. This class retains ownership. + + PortableServer::POA_ptr root_poa (void); + // Access the Root POA. This class retains ownership. + + CosNaming::NamingContext_ptr naming_context (void); + // Access the Naming Context. This class retains ownership. + + CosNotifyChannelAdmin::EventChannelFactory_ptr notify_factory (void); + // Access the Notify Factory. This class retains ownership. + + CosNotifyChannelAdmin::EventChannel_ptr create_event_channel ( + const char* name, + int resolve + TAO_ENV_ARG_DECL + ); + // Create an Event Channel. Ownership is passed to the caller. + protected: - void init_ORB (int argc, char *argv [] TAO_ENV_ARG_DECL); + void init_ORB (int argc, + char *argv [] + TAO_ENV_ARG_DECL); // Initializes the ORB. void resolve_naming_service (TAO_ENV_SINGLE_ARG_DECL); |