diff options
Diffstat (limited to 'TAO/DevGuideExamples')
98 files changed, 715 insertions, 611 deletions
diff --git a/TAO/DevGuideExamples/ChangeLog b/TAO/DevGuideExamples/ChangeLog index ebd1a314de3..3ecde377ddd 100644 --- a/TAO/DevGuideExamples/ChangeLog +++ b/TAO/DevGuideExamples/ChangeLog @@ -1,3 +1,107 @@ +Wed Oct 22 16:17:58 UTC 2008 Abdullah Sowayan <abdullah.sowayan@lmco.com> + + * EventServices/OMG_Basic/EchoEventConsumerMain.cpp: + * EventServices/OMG_Basic/EchoEventConsumer_i.h: + * EventServices/OMG_Basic/EchoEventSupplierMain.cpp: + * EventServices/OMG_SupplierSideEC/EchoEventConsumerMain.cpp: + * EventServices/OMG_SupplierSideEC/EchoEventConsumer_i.h: + * EventServices/OMG_SupplierSideEC/EchoEventSupplierMain.cpp: + * EventServices/OMG_TypedEC/ConsumerMain.cpp: + * EventServices/OMG_TypedEC/Consumer_i.h: + * EventServices/OMG_TypedEC/Messenger_i.h: + * EventServices/OMG_TypedEC/SupplierMain.cpp: + * EventServices/RTEC_Basic/EchoEventConsumerMain.cpp: + * EventServices/RTEC_Basic/EchoEventConsumer_i.h: + * EventServices/RTEC_Basic/EchoEventSupplierMain.cpp: + * EventServices/RTEC_Basic/EchoEventSupplier_i.h: + * EventServices/RTEC_Federated/EchoEventConsumerMain.cpp: + * EventServices/RTEC_Federated/EchoEventConsumer_i.h: + * EventServices/RTEC_Federated/EchoEventSupplierMain.cpp: + * EventServices/RTEC_Federated/EchoEventSupplier_i.h: + * EventServices/RTEC_Filter/EchoEventConsumerMain.cpp: + * EventServices/RTEC_Filter/EchoEventConsumer_i.h: + * EventServices/RTEC_Filter/EchoEventSupplierMain.cpp: + * EventServices/RTEC_Filter/EchoEventSupplier_i.h: + * EventServices/RTEC_MCast_Federated/EchoEventConsumerMain.cpp: + * EventServices/RTEC_MCast_Federated/EchoEventConsumer_i.h: + * EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp: + * EventServices/RTEC_MCast_Federated/EchoEventSupplier_i.h: + * EventServices/RTEC_MCast_Federated/SimpleAddressServer.h: + * NamingService/Messenger/MessengerClient.cpp: + * NamingService/Messenger/MessengerServer.cpp: + * NamingService/Naming_Client/MessengerClient.cpp: + * NamingService/Naming_Client/MessengerServer.cpp: + * NamingService/Naming_Context_Ext/MessengerClient.cpp: + * NamingService/Naming_Context_Ext/MessengerServer.cpp: + * NamingService/Naming_Server/MessengerTask.cpp: + * NamingService/Naming_Server/NamingTask.cpp: + * NamingService/corbaloc_Messenger/MessengerClient.cpp: + * NamingService/corbaloc_Messenger/MessengerServer.cpp: + * NamingService/corbaname_Messenger/MessengerClient.cpp: + * NamingService/corbaname_Messenger/MessengerServer.cpp: + * NotifyService/EventSequence/EventSequenceConsumer_i.h: + * NotifyService/EventSequence/EventSequenceSupplier_i.h: + * NotifyService/EventSequence/MessengerClient.cpp: + * NotifyService/EventSequence/MessengerConsumer.cpp: + * NotifyService/EventSequence/MessengerServer.cpp: + * NotifyService/EventSequence/Messenger_i.h: + * NotifyService/EventSequence/Messenger_i.cpp: + * NotifyService/Filtering/MessengerClient.cpp: + * NotifyService/Filtering/MessengerServer.cpp: + * NotifyService/Filtering/Messenger_i.h: + * NotifyService/Filtering/Messenger_i.cpp: + * NotifyService/Filtering/StructuredEventConsumer_i.h: + * NotifyService/Filtering/StructuredEventSupplier_i.h: + * NotifyService/Messenger/MessengerClient.cpp: + * NotifyService/Messenger/MessengerConsumer.cpp: + * NotifyService/Messenger/MessengerServer.cpp: + * NotifyService/Messenger/Messenger_i.h: + * NotifyService/Messenger/Messenger_i.cpp: + * NotifyService/Messenger/StructuredEventConsumer_i.h: + * NotifyService/Messenger/StructuredEventSupplier_i.h: + * NotifyService/OfferSubscriptions/MessengerClient.cpp: + * NotifyService/OfferSubscriptions/MessengerConsumer.cpp: + * NotifyService/OfferSubscriptions/MessengerServer.cpp: + * NotifyService/OfferSubscriptions/Messenger_i.h: + * NotifyService/OfferSubscriptions/Messenger_i.cpp: + * NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h: + * NotifyService/OfferSubscriptions/StructuredEventSupplier_i.h: + * NotifyService/QoSProperties/MessengerClient.cpp: + * NotifyService/QoSProperties/MessengerConsumer.cpp: + * NotifyService/QoSProperties/MessengerServer.cpp: + * NotifyService/QoSProperties/Messenger_i.h: + * NotifyService/QoSProperties/Messenger_i.cpp: + * NotifyService/QoSProperties/StructuredEventConsumer_i.h: + * NotifyService/QoSProperties/StructuredEventSupplier_i.h: + * NotifyService/RTNotify/MessengerClient.cpp: + * NotifyService/RTNotify/MessengerConsumer.cpp: + * NotifyService/RTNotify/MessengerServer.cpp: + * NotifyService/RTNotify/Messenger_i.h: + * NotifyService/RTNotify/Messenger_i.cpp: + * NotifyService/RTNotify/StructuredEventConsumer_i.h: + * NotifyService/RTNotify/StructuredEventSupplier_i.h: + * NotifyService/SupplierSideNC/MessengerClient.cpp: + * NotifyService/SupplierSideNC/MessengerServer.cpp: + * NotifyService/SupplierSideNC/MessengerSupplier.cpp: + * NotifyService/SupplierSideNC/Messenger_i.h: + * NotifyService/SupplierSideNC/Messenger_i.cpp: + * NotifyService/SupplierSideNC/StructuredEventConsumer_i.h: + * NotifyService/SupplierSideNC/StructuredEventSupplier_i.h: + * PortableInterceptors/Auth/MessengerClient.cpp: + * PortableInterceptors/PICurrent/ClientInitializer.cpp: + * PortableInterceptors/PICurrent/MessengerClient.cpp: + * PortableInterceptors/PICurrent/MessengerServer.cpp: + * PortableInterceptors/PICurrent_NameService/ClientInitializer.cpp: + * PortableInterceptors/PICurrent_NameService/MessengerClient.cpp: + * PortableInterceptors/PICurrent_NameService/MessengerServer.cpp: + * Security/ParticipatingApp/Messenger_i.h: + * ValueTypes/Notify/consumer.cpp: + * ValueTypes/Notify/supplier.cpp: + + Fixed fuzz errors. When including files from ACE/TAO/CIAO, use "" instead of <>. + + Example: #include <ace/OS.h> was changed to "ace/OS.h" + Wed Oct 22 15:56:27 UTC 2008 Abdullah Sowayan <abdullah.sowayan@lmco.com> * AMH/amh_pch.h: diff --git a/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventConsumerMain.cpp b/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventConsumerMain.cpp index c02eb8f245e..79a2ef70181 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventConsumerMain.cpp +++ b/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventConsumerMain.cpp @@ -6,9 +6,9 @@ #include "EchoEventConsumer_i.h" -#include <orbsvcs/CosEventCommC.h> -#include <orbsvcs/CosEventChannelAdminC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosEventCommC.h" +#include "orbsvcs/CosEventChannelAdminC.h" +#include "orbsvcs/CosNamingC.h" #include <iostream> diff --git a/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventConsumer_i.h b/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventConsumer_i.h index 0438569f0d0..8a17a07ca08 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventConsumer_i.h +++ b/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventConsumer_i.h @@ -6,8 +6,8 @@ #ifndef _EchoEventConsumer_i_h_ #define _EchoEventConsumer_i_h_ -#include <orbsvcs/CosEventCommS.h> // for POA_CosEventComm::PushConsumer -#include <orbsvcs/CosEventChannelAdminC.h> +#include "orbsvcs/CosEventCommS.h"// for POA_CosEventComm::PushConsumer +#include "orbsvcs/CosEventChannelAdminC.h" class EchoEventConsumer_i : public virtual POA_CosEventComm::PushConsumer { diff --git a/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventSupplierMain.cpp b/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventSupplierMain.cpp index 8505243b80f..1d66e52a524 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventSupplierMain.cpp +++ b/TAO/DevGuideExamples/EventServices/OMG_Basic/EchoEventSupplierMain.cpp @@ -2,9 +2,9 @@ // Main program for a PushSupplier of Echo events. -#include <orbsvcs/CosEventCommC.h> -#include <orbsvcs/CosEventChannelAdminC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosEventCommC.h" +#include "orbsvcs/CosEventChannelAdminC.h" +#include "orbsvcs/CosNamingC.h" #include <iostream> diff --git a/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventConsumerMain.cpp b/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventConsumerMain.cpp index ec9da700888..448984bef77 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventConsumerMain.cpp +++ b/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventConsumerMain.cpp @@ -5,9 +5,9 @@ #include "EchoEventConsumer_i.h" -#include <orbsvcs/CosEventCommC.h> -#include <orbsvcs/CosEventChannelAdminC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosEventCommC.h" +#include "orbsvcs/CosEventChannelAdminC.h" +#include "orbsvcs/CosNamingC.h" #include <iostream> const int EVENT_LIMIT = 10; diff --git a/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventConsumer_i.h b/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventConsumer_i.h index 0438569f0d0..8a17a07ca08 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventConsumer_i.h +++ b/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventConsumer_i.h @@ -6,8 +6,8 @@ #ifndef _EchoEventConsumer_i_h_ #define _EchoEventConsumer_i_h_ -#include <orbsvcs/CosEventCommS.h> // for POA_CosEventComm::PushConsumer -#include <orbsvcs/CosEventChannelAdminC.h> +#include "orbsvcs/CosEventCommS.h"// for POA_CosEventComm::PushConsumer +#include "orbsvcs/CosEventChannelAdminC.h" class EchoEventConsumer_i : public virtual POA_CosEventComm::PushConsumer { diff --git a/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventSupplierMain.cpp b/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventSupplierMain.cpp index f35c214388f..e616a556368 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventSupplierMain.cpp +++ b/TAO/DevGuideExamples/EventServices/OMG_SupplierSideEC/EchoEventSupplierMain.cpp @@ -2,11 +2,11 @@ // Main program for a PushSupplier of Echo events. -#include <orbsvcs/CosEventCommC.h> -#include <orbsvcs/CosEventChannelAdminC.h> -#include <orbsvcs/CosNamingC.h> -#include <orbsvcs/CosEvent/CEC_EventChannel.h> -#include <orbsvcs/CosEvent/CEC_Default_Factory.h> +#include "orbsvcs/CosEventCommC.h" +#include "orbsvcs/CosEventChannelAdminC.h" +#include "orbsvcs/CosNamingC.h" +#include "orbsvcs/CosEvent/CEC_EventChannel.h" +#include "orbsvcs/CosEvent/CEC_Default_Factory.h" #include <iostream> const int EVENT_DELAY_MS = 10; diff --git a/TAO/DevGuideExamples/EventServices/OMG_TypedEC/ConsumerMain.cpp b/TAO/DevGuideExamples/EventServices/OMG_TypedEC/ConsumerMain.cpp index e6cf5fbb445..904c8ff3da7 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_TypedEC/ConsumerMain.cpp +++ b/TAO/DevGuideExamples/EventServices/OMG_TypedEC/ConsumerMain.cpp @@ -7,9 +7,9 @@ #include "Messenger_i.h" #include "Consumer_i.h" -#include <orbsvcs/CosTypedEventCommC.h> -#include <orbsvcs/CosTypedEventChannelAdminC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosTypedEventCommC.h" +#include "orbsvcs/CosTypedEventChannelAdminC.h" +#include "orbsvcs/CosNamingC.h" #include "tao/AnyTypeCode/TypeCode.h" #include "ace/OS_NS_stdio.h" #include <iostream> diff --git a/TAO/DevGuideExamples/EventServices/OMG_TypedEC/Consumer_i.h b/TAO/DevGuideExamples/EventServices/OMG_TypedEC/Consumer_i.h index a7a940adfe5..6af0ab7bc63 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_TypedEC/Consumer_i.h +++ b/TAO/DevGuideExamples/EventServices/OMG_TypedEC/Consumer_i.h @@ -6,14 +6,14 @@ #ifndef _Consumer_i_h_ #define _Consumer_i_h_ -#include <orbsvcs/CosTypedEventCommS.h> // for POA_CosTypedEventComm::TypedPushConsumer +#include "orbsvcs/CosTypedEventCommS.h"// for POA_CosTypedEventComm::TypedPushConsumer -class Consumer_i +class Consumer_i : public virtual POA_CosTypedEventComm::TypedPushConsumer { public: // Constructor - Consumer_i(CORBA::ORB_ptr orb, + Consumer_i(CORBA::ORB_ptr orb, CORBA::Object_ptr obj); // Override operations from TypedPushConsumer interface. diff --git a/TAO/DevGuideExamples/EventServices/OMG_TypedEC/Messenger_i.h b/TAO/DevGuideExamples/EventServices/OMG_TypedEC/Messenger_i.h index 8fc73a88b99..4b11a93e683 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_TypedEC/Messenger_i.h +++ b/TAO/DevGuideExamples/EventServices/OMG_TypedEC/Messenger_i.h @@ -16,20 +16,20 @@ #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include <orbsvcs/CosTypedEventChannelAdminC.h> +#include "orbsvcs/CosTypedEventChannelAdminC.h" //Class Messenger_i class Messenger_i : public virtual POA_Messenger { public: - //Constructor + //Constructor Messenger_i (CORBA::ORB_ptr orb, CosEventChannelAdmin::ProxyPushSupplier_ptr supplier, int event_limit); - - //Destructor + + //Destructor virtual ~Messenger_i (void); - + virtual void send_message (const char * user_name, const char * subject, const char * message); diff --git a/TAO/DevGuideExamples/EventServices/OMG_TypedEC/SupplierMain.cpp b/TAO/DevGuideExamples/EventServices/OMG_TypedEC/SupplierMain.cpp index 49e89778f9c..8162a6bf508 100644 --- a/TAO/DevGuideExamples/EventServices/OMG_TypedEC/SupplierMain.cpp +++ b/TAO/DevGuideExamples/EventServices/OMG_TypedEC/SupplierMain.cpp @@ -2,9 +2,9 @@ // Main program for a TypedPushSupplier of Messenger objects. -#include <orbsvcs/CosTypedEventCommC.h> -#include <orbsvcs/CosTypedEventChannelAdminC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosTypedEventCommC.h" +#include "orbsvcs/CosTypedEventChannelAdminC.h" +#include "orbsvcs/CosNamingC.h" #include "tao/AnyTypeCode/TypeCode.h" #include <iostream> diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp b/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp index 0949781c71b..37695b39784 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp +++ b/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp @@ -4,11 +4,11 @@ #include "EchoEventConsumer_i.h" -#include <orbsvcs/RtecEventCommC.h> -#include <orbsvcs/RtecEventChannelAdminC.h> -#include <orbsvcs/Time_Utilities.h> -#include <orbsvcs/Event_Utilities.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/RtecEventCommC.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/CosNamingC.h" #include <iostream> const int EVENT_LIMIT = 10; diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumer_i.h b/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumer_i.h index abe88a334e1..4e846e79f47 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumer_i.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumer_i.h @@ -6,8 +6,8 @@ #ifndef _EchoEventConsumer_i_h_ #define _EchoEventConsumer_i_h_ -#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushConsumer -#include <orbsvcs/RtecEventChannelAdminC.h> +#include "orbsvcs/RtecEventCommS.h"// for POA_CosEventComm::PushConsumer +#include "orbsvcs/RtecEventChannelAdminC.h" class EchoEventConsumer_i : public virtual POA_RtecEventComm::PushConsumer { diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp b/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp index 0cb459e7dca..76d9ee6e3bd 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp +++ b/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp @@ -5,11 +5,11 @@ #include "EchoEventSupplier_i.h" -#include <orbsvcs/RtecEventCommC.h> -#include <orbsvcs/RtecEventChannelAdminC.h> -#include <orbsvcs/Time_Utilities.h> -#include <orbsvcs/Event_Utilities.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/RtecEventCommC.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/CosNamingC.h" #include <iostream> const RtecEventComm::EventSourceID MY_SOURCE_ID = ACE_ES_EVENT_SOURCE_ANY + 1; diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplier_i.h b/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplier_i.h index ab93a670215..06d39ff04bd 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplier_i.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplier_i.h @@ -6,7 +6,7 @@ #ifndef _EchoEventSupplier_i_h_ #define _EchoEventSupplier_i_h_ -#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushSupplier +#include "orbsvcs/RtecEventCommS.h"// for POA_CosEventComm::PushSupplier class EchoEventSupplier_i : public virtual POA_RtecEventComm::PushSupplier { diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumerMain.cpp b/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumerMain.cpp index 924cea32da6..f54a11177b4 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumerMain.cpp +++ b/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumerMain.cpp @@ -5,11 +5,11 @@ #include "EchoEventConsumer_i.h" -#include <orbsvcs/RtecEventCommC.h> -#include <orbsvcs/RtecEventChannelAdminC.h> -#include <orbsvcs/Time_Utilities.h> -#include <orbsvcs/Event_Utilities.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/RtecEventCommC.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/CosNamingC.h" #include <iostream> const RtecEventComm::EventSourceID MY_SOURCE_ID = ACE_ES_EVENT_SOURCE_ANY + 1; diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumer_i.h b/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumer_i.h index abe88a334e1..4e846e79f47 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumer_i.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumer_i.h @@ -6,8 +6,8 @@ #ifndef _EchoEventConsumer_i_h_ #define _EchoEventConsumer_i_h_ -#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushConsumer -#include <orbsvcs/RtecEventChannelAdminC.h> +#include "orbsvcs/RtecEventCommS.h"// for POA_CosEventComm::PushConsumer +#include "orbsvcs/RtecEventChannelAdminC.h" class EchoEventConsumer_i : public virtual POA_RtecEventComm::PushConsumer { diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplierMain.cpp b/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplierMain.cpp index 48c44b827a7..1d85aed8b28 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplierMain.cpp +++ b/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplierMain.cpp @@ -5,14 +5,14 @@ #include "EchoEventSupplier_i.h" -#include <orbsvcs/RtecEventCommC.h> -#include <orbsvcs/RtecEventChannelAdminC.h> -#include <orbsvcs/Time_Utilities.h> -#include <orbsvcs/Event_Utilities.h> -#include <orbsvcs/CosNamingC.h> -#include <orbsvcs/Event/EC_Event_Channel.h> -#include <orbsvcs/Event/EC_Gateway_IIOP.h> -#include <orbsvcs/Event/EC_Default_Factory.h> +#include "orbsvcs/RtecEventCommC.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/CosNamingC.h" +#include "orbsvcs/Event/EC_Event_Channel.h" +#include "orbsvcs/Event/EC_Gateway_IIOP.h" +#include "orbsvcs/Event/EC_Default_Factory.h" #include "ace/Thread_Manager.h" #include <iostream> diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplier_i.h b/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplier_i.h index ab93a670215..06d39ff04bd 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplier_i.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplier_i.h @@ -6,7 +6,7 @@ #ifndef _EchoEventSupplier_i_h_ #define _EchoEventSupplier_i_h_ -#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushSupplier +#include "orbsvcs/RtecEventCommS.h"// for POA_CosEventComm::PushSupplier class EchoEventSupplier_i : public virtual POA_RtecEventComm::PushSupplier { diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumerMain.cpp b/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumerMain.cpp index e3f076f5c66..66bd74c77fe 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumerMain.cpp +++ b/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumerMain.cpp @@ -5,11 +5,11 @@ #include "EchoEventConsumer_i.h" -#include <orbsvcs/RtecEventCommC.h> -#include <orbsvcs/RtecEventChannelAdminC.h> -#include <orbsvcs/Time_Utilities.h> -#include <orbsvcs/Event_Utilities.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/RtecEventCommC.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/CosNamingC.h" #include <iostream> const RtecEventComm::EventSourceID MY_SUPPLIER_ID_START = ACE_ES_EVENT_SOURCE_ANY + 1; diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumer_i.h b/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumer_i.h index abe88a334e1..4e846e79f47 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumer_i.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumer_i.h @@ -6,8 +6,8 @@ #ifndef _EchoEventConsumer_i_h_ #define _EchoEventConsumer_i_h_ -#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushConsumer -#include <orbsvcs/RtecEventChannelAdminC.h> +#include "orbsvcs/RtecEventCommS.h"// for POA_CosEventComm::PushConsumer +#include "orbsvcs/RtecEventChannelAdminC.h" class EchoEventConsumer_i : public virtual POA_RtecEventComm::PushConsumer { diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplierMain.cpp b/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplierMain.cpp index e3b18666886..4f0830bc17f 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplierMain.cpp +++ b/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplierMain.cpp @@ -5,11 +5,11 @@ #include "EchoEventSupplier_i.h" -#include <orbsvcs/RtecEventCommC.h> // for Event Communication interfaces -#include <orbsvcs/RtecEventChannelAdminC.h> -#include <orbsvcs/Time_Utilities.h> -#include <orbsvcs/Event_Utilities.h> -#include <orbsvcs/CosNamingC.h> // for Naming Service interfaces +#include "orbsvcs/RtecEventCommC.h"// for Event Communication interfaces +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/CosNamingC.h"// for Naming Service interfaces #include <iostream> const RtecEventComm::EventSourceID MY_SOURCE_ID_START = ACE_ES_EVENT_SOURCE_ANY + 1; diff --git a/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplier_i.h b/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplier_i.h index ab93a670215..06d39ff04bd 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplier_i.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplier_i.h @@ -6,7 +6,7 @@ #ifndef _EchoEventSupplier_i_h_ #define _EchoEventSupplier_i_h_ -#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushSupplier +#include "orbsvcs/RtecEventCommS.h"// for POA_CosEventComm::PushSupplier class EchoEventSupplier_i : public virtual POA_RtecEventComm::PushSupplier { diff --git a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumerMain.cpp b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumerMain.cpp index 725f2e264c9..6f1b8ab44e9 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumerMain.cpp +++ b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumerMain.cpp @@ -5,11 +5,11 @@ #include "EchoEventConsumer_i.h" -#include <orbsvcs/RtecEventCommC.h> -#include <orbsvcs/RtecEventChannelAdminC.h> -#include <orbsvcs/Time_Utilities.h> -#include <orbsvcs/Event_Utilities.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/RtecEventCommC.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/CosNamingC.h" #include <iostream> const RtecEventComm::EventSourceID MY_SOURCE_ID = ACE_ES_EVENT_SOURCE_ANY + 1; diff --git a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumer_i.h b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumer_i.h index abe88a334e1..4e846e79f47 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumer_i.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumer_i.h @@ -6,8 +6,8 @@ #ifndef _EchoEventConsumer_i_h_ #define _EchoEventConsumer_i_h_ -#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushConsumer -#include <orbsvcs/RtecEventChannelAdminC.h> +#include "orbsvcs/RtecEventCommS.h"// for POA_CosEventComm::PushConsumer +#include "orbsvcs/RtecEventChannelAdminC.h" class EchoEventConsumer_i : public virtual POA_RtecEventComm::PushConsumer { diff --git a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp index 37d03869a4f..72dde0ef126 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp +++ b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp @@ -6,18 +6,18 @@ #include "EchoEventSupplier_i.h" #include "SimpleAddressServer.h" -#include <orbsvcs/RtecEventCommC.h> -#include <orbsvcs/RtecEventChannelAdminC.h> -#include <orbsvcs/Time_Utilities.h> -#include <orbsvcs/Event_Utilities.h> -#include <orbsvcs/CosNamingC.h> -#include <orbsvcs/Event/EC_Event_Channel.h> -#include <orbsvcs/Event/EC_Default_Factory.h> -#include <orbsvcs/Event/ECG_Mcast_EH.h> -#include <orbsvcs/Event/ECG_UDP_Sender.h> -#include <orbsvcs/Event/ECG_UDP_Receiver.h> -#include <orbsvcs/Event/ECG_UDP_Out_Endpoint.h> -#include <orbsvcs/Event/ECG_UDP_EH.h> +#include "orbsvcs/RtecEventCommC.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/CosNamingC.h" +#include "orbsvcs/Event/EC_Event_Channel.h" +#include "orbsvcs/Event/EC_Default_Factory.h" +#include "orbsvcs/Event/ECG_Mcast_EH.h" +#include "orbsvcs/Event/ECG_UDP_Sender.h" +#include "orbsvcs/Event/ECG_UDP_Receiver.h" +#include "orbsvcs/Event/ECG_UDP_Out_Endpoint.h" +#include "orbsvcs/Event/ECG_UDP_EH.h" #include "tao/ORB_Core.h" diff --git a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplier_i.h b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplier_i.h index ab93a670215..06d39ff04bd 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplier_i.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplier_i.h @@ -6,7 +6,7 @@ #ifndef _EchoEventSupplier_i_h_ #define _EchoEventSupplier_i_h_ -#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushSupplier +#include "orbsvcs/RtecEventCommS.h"// for POA_CosEventComm::PushSupplier class EchoEventSupplier_i : public virtual POA_RtecEventComm::PushSupplier { diff --git a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/SimpleAddressServer.h b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/SimpleAddressServer.h index eec2c5f2a7d..9c346d87a81 100644 --- a/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/SimpleAddressServer.h +++ b/TAO/DevGuideExamples/EventServices/RTEC_MCast_Federated/SimpleAddressServer.h @@ -5,7 +5,7 @@ #ifndef SIMPLEADDRESSSERVER_H #define SIMPLEADDRESSSERVER_H -#include <orbsvcs/RtecUDPAdminS.h> +#include "orbsvcs/RtecUDPAdminS.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_INET_Addr; diff --git a/TAO/DevGuideExamples/NamingService/Messenger/MessengerClient.cpp b/TAO/DevGuideExamples/NamingService/Messenger/MessengerClient.cpp index d1cfb3de5ef..4f56c28b581 100644 --- a/TAO/DevGuideExamples/NamingService/Messenger/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NamingService/Messenger/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) diff --git a/TAO/DevGuideExamples/NamingService/Messenger/MessengerServer.cpp b/TAO/DevGuideExamples/NamingService/Messenger/MessengerServer.cpp index 71d0980e871..4566177938b 100644 --- a/TAO/DevGuideExamples/NamingService/Messenger/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NamingService/Messenger/MessengerServer.cpp @@ -1,7 +1,7 @@ // $Id$ #include "Messenger_i.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) diff --git a/TAO/DevGuideExamples/NamingService/Naming_Client/MessengerClient.cpp b/TAO/DevGuideExamples/NamingService/Naming_Client/MessengerClient.cpp index eb4301b2ed8..bcb73045e27 100644 --- a/TAO/DevGuideExamples/NamingService/Naming_Client/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NamingService/Naming_Client/MessengerClient.cpp @@ -1,8 +1,8 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> -#include <orbsvcs/Naming/Naming_Client.h> +#include "orbsvcs/CosNamingC.h" +#include "orbsvcs/Naming/Naming_Client.h" #include <iostream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) diff --git a/TAO/DevGuideExamples/NamingService/Naming_Client/MessengerServer.cpp b/TAO/DevGuideExamples/NamingService/Naming_Client/MessengerServer.cpp index 2a5219a4078..40e46da5588 100644 --- a/TAO/DevGuideExamples/NamingService/Naming_Client/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NamingService/Naming_Client/MessengerServer.cpp @@ -1,8 +1,8 @@ // $Id$ #include "Messenger_i.h" -#include <orbsvcs/CosNamingC.h> -#include <orbsvcs/Naming/Naming_Client.h> +#include "orbsvcs/CosNamingC.h" +#include "orbsvcs/Naming/Naming_Client.h" #include <iostream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) diff --git a/TAO/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerClient.cpp b/TAO/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerClient.cpp index 13bb65667fe..e942c7b662b 100644 --- a/TAO/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> #include <fstream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) diff --git a/TAO/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerServer.cpp b/TAO/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerServer.cpp index 9b8d9a5afaa..95880c8d32f 100644 --- a/TAO/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerServer.cpp @@ -1,7 +1,7 @@ // $Id$ #include "Messenger_i.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> #include <fstream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) diff --git a/TAO/DevGuideExamples/NamingService/Naming_Server/MessengerTask.cpp b/TAO/DevGuideExamples/NamingService/Naming_Server/MessengerTask.cpp index de22e6fdafe..43dd52645d3 100644 --- a/TAO/DevGuideExamples/NamingService/Naming_Server/MessengerTask.cpp +++ b/TAO/DevGuideExamples/NamingService/Naming_Server/MessengerTask.cpp @@ -2,10 +2,10 @@ #include "MessengerTask.h" #include "Messenger_i.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> -MessengerTask::MessengerTask() +MessengerTask::MessengerTask() { // cast away constness to make Sun CC family of compilers happy. char* argv[] = {const_cast<char *>("Messenger"), 0 }; @@ -61,17 +61,17 @@ int MessengerTask::svc() obj = poa->id_to_reference(oid.in()); root->rebind(name, obj.in()); - std::cout << "Messenger object bound in Naming Service" << std::endl; - - // Normally we run the orb and the orb is shutdown by + std::cout << "Messenger object bound in Naming Service" << std::endl; + + // Normally we run the orb and the orb is shutdown by // calling MessengerTask::end(). To simplify the coordination - // between the main thread and this Messenger thread, specify + // between the main thread and this Messenger thread, specify // the time period to let the Messenger thread finish by itself. // Accept requests ACE_Time_Value tv(1); orb_->run(tv); orb_->destroy(); - + return 0; } catch(const CORBA::Exception& ex) { diff --git a/TAO/DevGuideExamples/NamingService/Naming_Server/NamingTask.cpp b/TAO/DevGuideExamples/NamingService/Naming_Server/NamingTask.cpp index 58b521f41d3..2cd9169e3af 100644 --- a/TAO/DevGuideExamples/NamingService/Naming_Server/NamingTask.cpp +++ b/TAO/DevGuideExamples/NamingService/Naming_Server/NamingTask.cpp @@ -1,7 +1,7 @@ // $Id$ #include "NamingTask.h" -#include <orbsvcs/Naming/Naming_Server.h> +#include "orbsvcs/Naming/Naming_Server.h" #include "ace/OS_NS_unistd.h" #include <iostream> diff --git a/TAO/DevGuideExamples/NamingService/corbaloc_Messenger/MessengerClient.cpp b/TAO/DevGuideExamples/NamingService/corbaloc_Messenger/MessengerClient.cpp index 690caa6bf5c..98132b8f7ca 100644 --- a/TAO/DevGuideExamples/NamingService/corbaloc_Messenger/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NamingService/corbaloc_Messenger/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) diff --git a/TAO/DevGuideExamples/NamingService/corbaloc_Messenger/MessengerServer.cpp b/TAO/DevGuideExamples/NamingService/corbaloc_Messenger/MessengerServer.cpp index d78cb0d9af3..ab882806879 100644 --- a/TAO/DevGuideExamples/NamingService/corbaloc_Messenger/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NamingService/corbaloc_Messenger/MessengerServer.cpp @@ -1,7 +1,7 @@ // $Id$ #include "Messenger_i.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { diff --git a/TAO/DevGuideExamples/NamingService/corbaname_Messenger/MessengerClient.cpp b/TAO/DevGuideExamples/NamingService/corbaname_Messenger/MessengerClient.cpp index 5882f2aa118..474cdfbdada 100644 --- a/TAO/DevGuideExamples/NamingService/corbaname_Messenger/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NamingService/corbaname_Messenger/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { diff --git a/TAO/DevGuideExamples/NamingService/corbaname_Messenger/MessengerServer.cpp b/TAO/DevGuideExamples/NamingService/corbaname_Messenger/MessengerServer.cpp index 9870eb7d4c0..dfabdf2746e 100644 --- a/TAO/DevGuideExamples/NamingService/corbaname_Messenger/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NamingService/corbaname_Messenger/MessengerServer.cpp @@ -1,7 +1,7 @@ // $Id$ #include "Messenger_i.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { diff --git a/TAO/DevGuideExamples/NotifyService/EventSequence/EventSequenceConsumer_i.h b/TAO/DevGuideExamples/NotifyService/EventSequence/EventSequenceConsumer_i.h index a5ee6f42cd1..e8bdfef2775 100644 --- a/TAO/DevGuideExamples/NotifyService/EventSequence/EventSequenceConsumer_i.h +++ b/TAO/DevGuideExamples/NotifyService/EventSequence/EventSequenceConsumer_i.h @@ -3,25 +3,25 @@ #ifndef _EVENTCONSUMER_I_H_ #define _EVENTCONSUMER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" class EventSequenceConsumer_i : public POA_CosNotifyComm::SequencePushConsumer { public: EventSequenceConsumer_i(CORBA::ORB_ptr orb); - + virtual void push_structured_events ( - const CosNotification::EventBatch & events + const CosNotification::EventBatch & events ); - + virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed + const CosNotification::EventTypeSeq & removed ); - + virtual void disconnect_sequence_push_consumer (); private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/EventSequence/EventSequenceSupplier_i.h b/TAO/DevGuideExamples/NotifyService/EventSequence/EventSequenceSupplier_i.h index 258cd948d59..3a5a153a42e 100644 --- a/TAO/DevGuideExamples/NotifyService/EventSequence/EventSequenceSupplier_i.h +++ b/TAO/DevGuideExamples/NotifyService/EventSequence/EventSequenceSupplier_i.h @@ -3,21 +3,21 @@ #ifndef _EVENTSUPPLIER_I_H_ #define _EVENTSUPPLIER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" class EventSequenceSupplier_i : public POA_CosNotifyComm::SequencePushSupplier { public: // Constructor EventSequenceSupplier_i(CORBA::ORB_ptr orb); - virtual void disconnect_sequence_push_supplier (); - + virtual void disconnect_sequence_push_supplier (); + virtual void subscription_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed + const CosNotification::EventTypeSeq & removed ); private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerClient.cpp b/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerClient.cpp index 1e8521e8a67..eeea6d8701a 100644 --- a/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN(int argc, ACE_TCHAR * argv[]) diff --git a/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerConsumer.cpp b/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerConsumer.cpp index 8e5cd29fdd3..1196078a73f 100644 --- a/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerConsumer.cpp +++ b/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerConsumer.cpp @@ -1,81 +1,81 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "EventSequenceConsumer_i.h" #include <iostream> -int +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - try + try { CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references("NameService"); - + CosNaming::NamingContextExt_var naming_context = CosNaming::NamingContextExt::_narrow(obj.in()); - + obj = naming_context->resolve_str("MyEventChannel"); - CosNotifyChannelAdmin::EventChannel_var ec = + CosNotifyChannelAdmin::EventChannel_var ec = CosNotifyChannelAdmin::EventChannel::_narrow(obj.in()); - + CosNotifyChannelAdmin::AdminID adminid; CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = CosNotifyChannelAdmin::OR_OP; - - CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->new_for_consumers(ifgop, + + CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = + ec->new_for_consumers(ifgop, adminid); - + obj = orb->resolve_initial_references("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in()); - + EventSequenceConsumer_i servant(orb.in()); - + PortableServer::ObjectId_var objectId = poa->activate_object(&servant); - + obj = poa->id_to_reference (objectId.in()); - CosNotifyComm::SequencePushConsumer_var consumer = + CosNotifyComm::SequencePushConsumer_var consumer = CosNotifyComm::SequencePushConsumer::_narrow(obj.in()); - - CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; - + + CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; + CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier = consumer_admin->obtain_notification_push_supplier( CosNotifyChannelAdmin::SEQUENCE_EVENT, consumeradmin_proxy_id); - - CosNotifyChannelAdmin::SequenceProxyPushSupplier_var supplier_proxy = + + CosNotifyChannelAdmin::SequenceProxyPushSupplier_var supplier_proxy = CosNotifyChannelAdmin::SequenceProxyPushSupplier::_narrow(proxy_supplier.in()); - + supplier_proxy->connect_sequence_push_consumer(consumer.in()); - + CosNotification::EventTypeSeq added (1); CosNotification::EventTypeSeq removed (1); added.length (1); removed.length (1); - + added[0].domain_name = CORBA::string_dup ("OCI_TAO"); added[0].type_name = CORBA::string_dup ("examples"); - + removed[0].domain_name = CORBA::string_dup ("*"); removed[0].type_name = CORBA::string_dup ("*"); - + supplier_proxy->subscription_change(added, removed); - - PortableServer::POAManager_var poa_manager = poa->the_POAManager(); - + + PortableServer::POAManager_var poa_manager = poa->the_POAManager(); + poa_manager->activate(); - + orb->run(); orb->destroy(); - + return 0; } catch(const CORBA::Exception& ex) diff --git a/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerServer.cpp b/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerServer.cpp index 1e3f6b6c57d..640f0013c6e 100644 --- a/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NotifyService/EventSequence/MessengerServer.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include <iostream> #include <fstream> diff --git a/TAO/DevGuideExamples/NotifyService/EventSequence/Messenger_i.cpp b/TAO/DevGuideExamples/NotifyService/EventSequence/Messenger_i.cpp index 17585fed28b..17dea7b9aff 100644 --- a/TAO/DevGuideExamples/NotifyService/EventSequence/Messenger_i.cpp +++ b/TAO/DevGuideExamples/NotifyService/EventSequence/Messenger_i.cpp @@ -1,8 +1,8 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include "EventSequenceSupplier_i.h" @@ -13,44 +13,44 @@ Messenger_i::Messenger_i (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate (orb)) , supplier_(new EventSequenceSupplier_i(orb)) { - - CORBA::Object_var naming_obj = + + CORBA::Object_var naming_obj = orb_->resolve_initial_references ("NameService"); - + CosNaming::NamingContextExt_var naming_context = CosNaming::NamingContextExt::_narrow (naming_obj.in()); - + CORBA::Object_var obj = naming_context->resolve_str("NotifyEventChannelFactory"); - + CosNotifyChannelAdmin::EventChannelFactory_var notify_factory = CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in ()); - + CosNotifyChannelAdmin::ChannelID id; CosNotification::QoSProperties initial_qos; CosNotification::AdminProperties initial_admin; - + CosNotifyChannelAdmin::EventChannel_var ec = notify_factory->create_channel (initial_qos, initial_admin, id); - + CosNaming::Name_var name = naming_context->to_name("MyEventChannel"); naming_context->rebind(name.in(), ec.in()); - - CosNotifyChannelAdmin::AdminID adminid; - CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = - CosNotifyChannelAdmin::OR_OP; - + + CosNotifyChannelAdmin::AdminID adminid; + CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = + CosNotifyChannelAdmin::OR_OP; + CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin = ec->new_for_suppliers (ifgop, adminid); - + CosNotifyChannelAdmin::ProxyID supplieradmin_proxy_id; - + CosNotifyChannelAdmin::ProxyConsumer_var proxy_consumer = supplier_admin->obtain_notification_push_consumer( CosNotifyChannelAdmin::SEQUENCE_EVENT, supplieradmin_proxy_id); - + CORBA::Object_var poa_obj = orb_->resolve_initial_references ("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow (poa_obj.in()); PortableServer::POAManager_var mgr = poa->the_POAManager(); @@ -58,13 +58,13 @@ Messenger_i::Messenger_i (CORBA::ORB_ptr orb) PortableServer::ObjectId_var objectId = poa->activate_object(supplier_.get()); CORBA::Object_var supplier_obj = poa->id_to_reference(objectId.in()); - - CosNotifyComm::SequencePushSupplier_var supplier = + + CosNotifyComm::SequencePushSupplier_var supplier = CosNotifyComm::SequencePushSupplier::_narrow(supplier_obj.in()); - - consumer_proxy_ = + + consumer_proxy_ = CosNotifyChannelAdmin::SequenceProxyPushConsumer::_narrow(proxy_consumer.in()); - + consumer_proxy_->connect_sequence_push_supplier(supplier.in()); } @@ -76,29 +76,29 @@ Messenger_i::~Messenger_i (void) CORBA::Boolean Messenger_i::send_message ( const char * user_name, const char * subject, - char *& message + char *& message ) { - + std::cout << "Message from: " << user_name << std::endl; std::cout << "Subject: " << subject << std::endl; std::cout << "Message: " << message << std::endl; - + // Event Definition - CosNotification::StructuredEvent event; - - event.header.fixed_header.event_type.domain_name = + CosNotification::StructuredEvent event; + + event.header.fixed_header.event_type.domain_name = CORBA::string_dup("OCI_TAO"); // string - event.header.fixed_header.event_type.type_name = + event.header.fixed_header.event_type.type_name = CORBA::string_dup("examples"); // string - event.header.fixed_header.event_name = + event.header.fixed_header.event_name = CORBA::string_dup("myevent"); - + // OptionalHeaderFields - // PropertySeq - + // PropertySeq + // sequence<Property>: string name, any value event.filterable_data.length (1); event.filterable_data[0].name = CORBA::string_dup("Message from:"); @@ -109,7 +109,7 @@ CORBA::Boolean Messenger_i::send_message ( event.filterable_data.length (3); event.filterable_data[2].name = CORBA::string_dup("Message:"); event.filterable_data[2].value <<= (const char *)message; - + std::cout << "pushing " << std::endl; CosNotification::EventBatch events; events.length(4); @@ -117,10 +117,10 @@ CORBA::Boolean Messenger_i::send_message ( events[1] = event; events[2] = event; events[3] = event; - + consumer_proxy_->push_structured_events(events); - + return 1; - + } diff --git a/TAO/DevGuideExamples/NotifyService/EventSequence/Messenger_i.h b/TAO/DevGuideExamples/NotifyService/EventSequence/Messenger_i.h index a3c2cbeeff4..949f5c87dc6 100644 --- a/TAO/DevGuideExamples/NotifyService/EventSequence/Messenger_i.h +++ b/TAO/DevGuideExamples/NotifyService/EventSequence/Messenger_i.h @@ -5,7 +5,7 @@ #include "MessengerS.h" -#include <orbsvcs/CosNotifyChannelAdminC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" #include "ace/Auto_Ptr.h" class EventSequenceSupplier_i; diff --git a/TAO/DevGuideExamples/NotifyService/Filtering/MessengerClient.cpp b/TAO/DevGuideExamples/NotifyService/Filtering/MessengerClient.cpp index de519c4a013..8d52a5af557 100644 --- a/TAO/DevGuideExamples/NotifyService/Filtering/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NotifyService/Filtering/MessengerClient.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "MessengerC.h" #include <iostream> diff --git a/TAO/DevGuideExamples/NotifyService/Filtering/MessengerServer.cpp b/TAO/DevGuideExamples/NotifyService/Filtering/MessengerServer.cpp index 2c3d0d21ebe..a26fb9a60c4 100644 --- a/TAO/DevGuideExamples/NotifyService/Filtering/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NotifyService/Filtering/MessengerServer.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include "ace/Argv_Type_Converter.h" #include "ace/Get_Opt.h" diff --git a/TAO/DevGuideExamples/NotifyService/Filtering/Messenger_i.cpp b/TAO/DevGuideExamples/NotifyService/Filtering/Messenger_i.cpp index efd67223b4f..f63bc493769 100644 --- a/TAO/DevGuideExamples/NotifyService/Filtering/Messenger_i.cpp +++ b/TAO/DevGuideExamples/NotifyService/Filtering/Messenger_i.cpp @@ -1,8 +1,8 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include "StructuredEventSupplier_i.h" @@ -17,97 +17,97 @@ Messenger_i::Messenger_i (CORBA::ORB_ptr orb) { CORBA::Object_var poa_obj = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow(poa_obj.in()); - + CORBA::Object_var naming_obj = orb_->resolve_initial_references ("NameService"); - + if (CORBA::is_nil(naming_obj.in())) { std::cerr << "Unable to find naming service" << std::endl; - } - + } + CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow(naming_obj.in()); - + CosNaming::Name name(1); name.length (1); name[0].id = CORBA::string_dup("NotifyEventChannelFactory"); - + CORBA::Object_var obj = naming_context->resolve(name); - + CosNotifyChannelAdmin::EventChannelFactory_var notify_factory = CosNotifyChannelAdmin::EventChannelFactory::_narrow(obj.in()); - + if (CORBA::is_nil(notify_factory.in())) { std::cerr << "Unable to find notify factory" << std::endl; - } - + } + CosNotifyChannelAdmin::ChannelID id; CosNotification::QoSProperties initial_qos; CosNotification::AdminProperties initial_admin; - + CosNotifyChannelAdmin::EventChannel_var ec = notify_factory->create_channel (initial_qos, initial_admin, id); - + if (CORBA::is_nil (ec.in())) { std::cerr << "Unable to crete event channel" << std::endl; - } - + } + name.length(1); name[0].id = CORBA::string_dup("MyEventChannel"); - + naming_context->rebind(name, ec.in()); - - CosNotifyChannelAdmin::AdminID adminid; - CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = - CosNotifyChannelAdmin::AND_OP; - + + CosNotifyChannelAdmin::AdminID adminid; + CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = + CosNotifyChannelAdmin::AND_OP; + CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin = ec->new_for_suppliers (ifgop, adminid); - + if (CORBA::is_nil (supplier_admin.in())) { std::cerr << "Unable to find supplier admin" << std::endl; - } - + } + CosNotifyChannelAdmin::ProxyID supplieradmin_proxy_id; - + CosNotifyChannelAdmin::ProxyConsumer_var proxy_consumer = supplier_admin->obtain_notification_push_consumer( CosNotifyChannelAdmin::STRUCTURED_EVENT, supplieradmin_proxy_id); - - StructuredEventSupplier_i *servant = - new StructuredEventSupplier_i(orb_.in()); - + + StructuredEventSupplier_i *servant = + new StructuredEventSupplier_i(orb_.in()); + PortableServer::ObjectId_var oid = poa->activate_object(servant); CORBA::Object_var supplier_obj = poa->id_to_reference(oid.in()); - CosNotifyComm::StructuredPushSupplier_var supplier = + CosNotifyComm::StructuredPushSupplier_var supplier = CosNotifyComm::StructuredPushSupplier::_narrow(supplier_obj.in()); - - consumer_proxy_ = + + consumer_proxy_ = CosNotifyChannelAdmin::StructuredProxyPushConsumer:: _narrow(proxy_consumer.in()); - + if (CORBA::is_nil (consumer_proxy_.in())) { std::cerr << "Unable to find structured proxy push consumer" << std::endl; - } - + } + consumer_proxy_->connect_structured_push_supplier(supplier.in()); - + } catch(const CORBA::Exception& ex) { std::cerr << ex << std::endl; - } - + } + } - + // Implementation skeleton destructor Messenger_i::~Messenger_i (void) { } - + CORBA::Boolean Messenger_i::send_message ( const char * user_name, const char * subject, @@ -121,19 +121,19 @@ CORBA::Boolean Messenger_i::send_message ( try { - + // Event Definition - CosNotification::StructuredEvent event; - - event.header.fixed_header.event_type.domain_name = + CosNotification::StructuredEvent event; + + event.header.fixed_header.event_type.domain_name = CORBA::string_dup("OCI_TAO"); // string - event.header.fixed_header.event_type.type_name = + event.header.fixed_header.event_type.type_name = CORBA::string_dup("examples"); // string - event.header.fixed_header.event_name = + event.header.fixed_header.event_name = CORBA::string_dup("myevent"); - + // sequence<Property>: string name, any value event.filterable_data.length (1); event.filterable_data[0].name = CORBA::string_dup("From"); @@ -143,16 +143,16 @@ CORBA::Boolean Messenger_i::send_message ( event.filterable_data[1].value <<= (const char *)subject; event.filterable_data.length (3); event.filterable_data[2].name = CORBA::string_dup("Message"); - event.filterable_data[2].value <<= (const char *)message; - + event.filterable_data[2].value <<= (const char *)message; + consumer_proxy_->push_structured_event(event); } - + catch(const CosNotifyComm::InvalidEventType&) { std::cerr << "Invalid Event Type Exception " << std::endl; return 1; } - + catch(const CORBA::Exception& ex) { std::cerr << ex << std::endl; return 1; diff --git a/TAO/DevGuideExamples/NotifyService/Filtering/Messenger_i.h b/TAO/DevGuideExamples/NotifyService/Filtering/Messenger_i.h index 0a160910fcd..087c07b3aba 100644 --- a/TAO/DevGuideExamples/NotifyService/Filtering/Messenger_i.h +++ b/TAO/DevGuideExamples/NotifyService/Filtering/Messenger_i.h @@ -3,9 +3,9 @@ #ifndef MESSENGERI_H_ #define MESSENGERI_H_ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "MessengerS.h" @@ -13,12 +13,12 @@ class Messenger_i : public virtual POA_Messenger { public: - //Constructor + //Constructor Messenger_i (CORBA::ORB_ptr orb); - - //Destructor + + //Destructor virtual ~Messenger_i (void); - + CORBA::Boolean send_message ( const char * user_name, const char * subject, diff --git a/TAO/DevGuideExamples/NotifyService/Filtering/StructuredEventConsumer_i.h b/TAO/DevGuideExamples/NotifyService/Filtering/StructuredEventConsumer_i.h index c533573454c..2cee3e77fd8 100644 --- a/TAO/DevGuideExamples/NotifyService/Filtering/StructuredEventConsumer_i.h +++ b/TAO/DevGuideExamples/NotifyService/Filtering/StructuredEventConsumer_i.h @@ -3,9 +3,9 @@ #ifndef _EVENTCONSUMER_I_H_ #define _EVENTCONSUMER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" -class StructuredEventConsumer_i : +class StructuredEventConsumer_i : public virtual POA_CosNotifyComm::StructuredPushConsumer { public: @@ -27,4 +27,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/Filtering/StructuredEventSupplier_i.h b/TAO/DevGuideExamples/NotifyService/Filtering/StructuredEventSupplier_i.h index 0efe1146e63..9f18951c030 100644 --- a/TAO/DevGuideExamples/NotifyService/Filtering/StructuredEventSupplier_i.h +++ b/TAO/DevGuideExamples/NotifyService/Filtering/StructuredEventSupplier_i.h @@ -3,9 +3,9 @@ #ifndef _EVENTSUPPLIER_I_H_ #define _EVENTSUPPLIER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" -class StructuredEventSupplier_i : +class StructuredEventSupplier_i : public virtual POA_CosNotifyComm::StructuredPushSupplier { public: @@ -23,4 +23,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/Messenger/MessengerClient.cpp b/TAO/DevGuideExamples/NotifyService/Messenger/MessengerClient.cpp index f7e6d42e866..226fd6b54c6 100644 --- a/TAO/DevGuideExamples/NotifyService/Messenger/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NotifyService/Messenger/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN(int argc, ACE_TCHAR * argv[]) diff --git a/TAO/DevGuideExamples/NotifyService/Messenger/MessengerConsumer.cpp b/TAO/DevGuideExamples/NotifyService/Messenger/MessengerConsumer.cpp index d8a53f38664..63a9956ca80 100644 --- a/TAO/DevGuideExamples/NotifyService/Messenger/MessengerConsumer.cpp +++ b/TAO/DevGuideExamples/NotifyService/Messenger/MessengerConsumer.cpp @@ -1,69 +1,69 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "StructuredEventConsumer_i.h" #include <iostream> -int +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); - + CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); - + CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow(naming_obj.in()); - + CosNaming::Name name; name.length (1); name[0].id = CORBA::string_dup("MyEventChannel"); CORBA::Object_var ecObj = naming_context->resolve(name); - - CosNotifyChannelAdmin::EventChannel_var ec = + + CosNotifyChannelAdmin::EventChannel_var ec = CosNotifyChannelAdmin::EventChannel::_narrow(ecObj.in()); - + CosNotifyChannelAdmin::AdminID adminid; CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = CosNotifyChannelAdmin::OR_OP; - - CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->new_for_consumers(ifgop, + + CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = + ec->new_for_consumers(ifgop, adminid); - + CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); - - PortableServer::POA_var poa = + + PortableServer::POA_var poa = PortableServer::POA::_narrow (poa_object.in()); - + StructuredEventConsumer_i servant (orb.in()); PortableServer::ObjectId_var objectId = poa->activate_object (&servant); - + CORBA::Object_var consumer_obj = poa->id_to_reference (objectId.in ()); - CosNotifyComm::StructuredPushConsumer_var consumer = + CosNotifyComm::StructuredPushConsumer_var consumer = CosNotifyComm::StructuredPushConsumer::_narrow (consumer_obj.in ()); - - CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; - + + CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; + CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier = consumer_admin->obtain_notification_push_supplier( CosNotifyChannelAdmin::STRUCTURED_EVENT, consumeradmin_proxy_id); - + CosNotifyChannelAdmin::StructuredProxyPushSupplier_var supplier_proxy; supplier_proxy = CosNotifyChannelAdmin::StructuredProxyPushSupplier:: _narrow(proxy_supplier.in()); - + supplier_proxy->connect_structured_push_consumer(consumer.in()); - + CosNotification::EventTypeSeq added (1); CosNotification::EventTypeSeq removed (1); added.length (1); @@ -77,10 +77,10 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) supplier_proxy->subscription_change(added, removed); - PortableServer::POAManager_var poa_manager = poa->the_POAManager(); - + PortableServer::POAManager_var poa_manager = poa->the_POAManager(); + poa_manager->activate(); - + orb->run(); } catch(const CORBA::Exception& ex) diff --git a/TAO/DevGuideExamples/NotifyService/Messenger/MessengerServer.cpp b/TAO/DevGuideExamples/NotifyService/Messenger/MessengerServer.cpp index 984a8340080..aa3ad6bb744 100644 --- a/TAO/DevGuideExamples/NotifyService/Messenger/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NotifyService/Messenger/MessengerServer.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include <iostream> #include <fstream> diff --git a/TAO/DevGuideExamples/NotifyService/Messenger/Messenger_i.cpp b/TAO/DevGuideExamples/NotifyService/Messenger/Messenger_i.cpp index 8e1ef9f2f1a..91addf9f407 100644 --- a/TAO/DevGuideExamples/NotifyService/Messenger/Messenger_i.cpp +++ b/TAO/DevGuideExamples/NotifyService/Messenger/Messenger_i.cpp @@ -1,8 +1,8 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "ace/OS_NS_stdio.h" #include "Messenger_i.h" diff --git a/TAO/DevGuideExamples/NotifyService/Messenger/Messenger_i.h b/TAO/DevGuideExamples/NotifyService/Messenger/Messenger_i.h index 07686c54325..38fa49c29e9 100644 --- a/TAO/DevGuideExamples/NotifyService/Messenger/Messenger_i.h +++ b/TAO/DevGuideExamples/NotifyService/Messenger/Messenger_i.h @@ -3,14 +3,14 @@ #ifndef MESSENGER_H_ #define MESSENGER_H_ -#include <orbsvcs/CosNotifyChannelAdminC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" #include "MessengerS.h" class Messenger_i : public POA_Messenger { public: Messenger_i (CORBA::ORB_ptr orb); - + virtual ~Messenger_i (void); CORBA::Boolean send_message (const char * user_name, @@ -22,7 +22,7 @@ class Messenger_i : public POA_Messenger CosNotifyChannelAdmin::StructuredProxyPushConsumer_var consumer_proxy_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/Messenger/StructuredEventConsumer_i.h b/TAO/DevGuideExamples/NotifyService/Messenger/StructuredEventConsumer_i.h index dc7b62a9a6e..adb5bd999c8 100644 --- a/TAO/DevGuideExamples/NotifyService/Messenger/StructuredEventConsumer_i.h +++ b/TAO/DevGuideExamples/NotifyService/Messenger/StructuredEventConsumer_i.h @@ -3,9 +3,9 @@ #ifndef _EVENTCONSUMER_I_H_ #define _EVENTCONSUMER_I_H_ -#include <orbsvcs/CosNotifyCommS.h> +#include "orbsvcs/CosNotifyCommS.h" -class StructuredEventConsumer_i : +class StructuredEventConsumer_i : public virtual POA_CosNotifyComm::StructuredPushConsumer { public: @@ -26,4 +26,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/Messenger/StructuredEventSupplier_i.h b/TAO/DevGuideExamples/NotifyService/Messenger/StructuredEventSupplier_i.h index 30fea5628d3..6df2455fcb0 100644 --- a/TAO/DevGuideExamples/NotifyService/Messenger/StructuredEventSupplier_i.h +++ b/TAO/DevGuideExamples/NotifyService/Messenger/StructuredEventSupplier_i.h @@ -3,16 +3,16 @@ #ifndef _EVENTSUPPLIER_I_H_ #define _EVENTSUPPLIER_I_H_ -#include <orbsvcs/CosNotifyCommS.h> +#include "orbsvcs/CosNotifyCommS.h" -class StructuredEventSupplier_i : +class StructuredEventSupplier_i : public virtual POA_CosNotifyComm::StructuredPushSupplier { public: // Constructor StructuredEventSupplier_i(CORBA::ORB_ptr orb); virtual void disconnect_structured_push_supplier (); - + virtual void subscription_change ( const CosNotification::EventTypeSeq & added, const CosNotification::EventTypeSeq & removed @@ -21,4 +21,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerClient.cpp b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerClient.cpp index a2d06ff2d3e..cf6f2cec87c 100644 --- a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> diff --git a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerConsumer.cpp b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerConsumer.cpp index f17537d065f..589b6a37c70 100644 --- a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerConsumer.cpp +++ b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerConsumer.cpp @@ -1,8 +1,8 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "StructuredEventConsumer_i.h" #include <iostream> @@ -16,93 +16,93 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); - + if (CORBA::is_nil (poa_object.in())) { std::cerr << "Unable to initialize the POA." << std::endl; return 1; } - + PortableServer::POA_var poa = PortableServer::POA::_narrow(poa_object.in()); // Activate POA manager PortableServer::POAManager_var mgr = poa->the_POAManager(); mgr->activate(); - + CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); - + if (CORBA::is_nil(naming_obj.in())) { std::cerr << "Unable to find naming service" << std::endl; return 1; } - + CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow(naming_obj.in()); - + CosNaming::Name name(1); - + name.length (1); name[0].id = CORBA::string_dup("MyEventChannel"); CORBA::Object_var ecObj = naming_context->resolve(name); - + CosNotifyChannelAdmin::EventChannel_var ec = CosNotifyChannelAdmin::EventChannel::_narrow(ecObj.in()); - + if (CORBA::is_nil (ec.in())) { std::cerr << "Unable to find event channel" << std::endl; return 1; } - + CosNotifyChannelAdmin::AdminID adminid; CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = CosNotifyChannelAdmin::OR_OP; - + CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = ec->new_for_consumers(ifgop, adminid); - + if (CORBA::is_nil (consumer_admin.in())) { std::cerr << "Unable to find consumer admin" << std::endl; return 1; } - + StructuredEventConsumer_i servant(orb.in()); - + CosNotifyComm::StructuredPushConsumer_var consumer = servant._this(); CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; - + CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier = consumer_admin->obtain_notification_push_supplier( CosNotifyChannelAdmin::STRUCTURED_EVENT, consumeradmin_proxy_id); - + // The proxy that we are connected to. CosNotifyChannelAdmin::StructuredProxyPushSupplier_var supplier_proxy; supplier_proxy = CosNotifyChannelAdmin::StructuredProxyPushSupplier:: _narrow(proxy_supplier.in()); - + if (CORBA::is_nil (supplier_proxy.in())) { std::cerr << "Unable to create structured push supplier proxy" << std::endl; return 1; } - + supplier_proxy->connect_structured_push_consumer(consumer.in()); CosNotification::EventTypeSeq added (1); CosNotification::EventTypeSeq removed (1); added.length (1); removed.length (1); - + added[0].domain_name = CORBA::string_dup ("OCI_TAO"); added[0].type_name = CORBA::string_dup ("examples"); - + removed[0].domain_name = CORBA::string_dup ("*"); removed[0].type_name = CORBA::string_dup ("*"); supplier_proxy->subscription_change(added, removed); - + orb->run(); } catch(const CORBA::Exception& ex) diff --git a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerServer.cpp b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerServer.cpp index 797301befaf..e64d6a4b4c8 100644 --- a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerServer.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include <iostream> #include <fstream> diff --git a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/Messenger_i.cpp b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/Messenger_i.cpp index 300367ca26e..b362f3ba60e 100644 --- a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/Messenger_i.cpp +++ b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/Messenger_i.cpp @@ -1,96 +1,96 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include "StructuredEventSupplier_i.h" #include <iostream> -Messenger_i::Messenger_i (CORBA::ORB_ptr orb) +Messenger_i::Messenger_i (CORBA::ORB_ptr orb) : orb_(CORBA::ORB::_duplicate(orb)) { - CORBA::Object_var poa_object = + CORBA::Object_var poa_object = orb_->resolve_initial_references("RootPOA"); - + if (CORBA::is_nil (poa_object.in())) { std::cerr << "Unable to initialize the POA." << std::endl; } - + CORBA::Object_var naming_obj = orb_->resolve_initial_references ("NameService"); - + if (CORBA::is_nil(naming_obj.in())) { std::cerr << "Unable to find naming service" << std::endl; - } - + } + CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow(naming_obj.in()); - + CosNaming::Name name; name.length (1); name[0].id = CORBA::string_dup("NotifyEventChannelFactory"); - + CORBA::Object_var obj = naming_context->resolve(name); CosNotifyChannelAdmin::EventChannelFactory_var notify_factory = CosNotifyChannelAdmin::EventChannelFactory::_narrow(obj.in()); - + if (CORBA::is_nil(notify_factory.in())) { std::cerr << "Unable to find notify factory" << std::endl; - } - + } + CosNotifyChannelAdmin::ChannelID id; CosNotification::QoSProperties initial_qos; CosNotification::AdminProperties initial_admin; - + CosNotifyChannelAdmin::EventChannel_var ec = notify_factory->create_channel (initial_qos, initial_admin, id); - + if (CORBA::is_nil (ec.in())) { std::cerr << "Unable to crete event channel" << std::endl; - } - - // name.length(1); + } + + // name.length(1); name[0].id = CORBA::string_dup("MyEventChannel"); - + naming_context->rebind(name, ec.in()); - - CosNotifyChannelAdmin::AdminID adminid; - CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = - CosNotifyChannelAdmin::OR_OP; - + + CosNotifyChannelAdmin::AdminID adminid; + CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = + CosNotifyChannelAdmin::OR_OP; + CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin = ec->new_for_suppliers (ifgop, adminid); - + if (CORBA::is_nil (supplier_admin.in())) { std::cerr << "Unable to find supplier admin" << std::endl; - } - + } + CosNotifyChannelAdmin::ProxyID supplieradmin_proxy_id; - + CosNotifyChannelAdmin::ProxyConsumer_var proxy_consumer = supplier_admin->obtain_notification_push_consumer( CosNotifyChannelAdmin::STRUCTURED_EVENT, supplieradmin_proxy_id); - - StructuredEventSupplier_i *servant = + + StructuredEventSupplier_i *servant = new StructuredEventSupplier_i(orb_.in()); - - CosNotifyComm::StructuredPushSupplier_var supplier = + + CosNotifyComm::StructuredPushSupplier_var supplier = servant->_this(); - - s_proxy_consumer_ = + + s_proxy_consumer_ = CosNotifyChannelAdmin::StructuredProxyPushConsumer:: _narrow(proxy_consumer.in()); - + if (CORBA::is_nil (s_proxy_consumer_.in())) { std::cerr << "Unable to find structured proxy push consumer" << std::endl; - } - + } + s_proxy_consumer_-> connect_structured_push_supplier(supplier.in()); @@ -115,29 +115,29 @@ Messenger_i::~Messenger_i (void) CORBA::Boolean Messenger_i::send_message ( const char * user_name, const char * subject, - char *& message) + char *& message) { - + std::cout << "Message from: " << user_name << std::endl; std::cout << "Subject: " << subject << std::endl; std::cout << "Message: " << message << std::endl; - - + + // Event Definition - CosNotification::StructuredEvent event; - - event.header.fixed_header.event_type.domain_name = + CosNotification::StructuredEvent event; + + event.header.fixed_header.event_type.domain_name = CORBA::string_dup("OCI_TAO"); // string - event.header.fixed_header.event_type.type_name = + event.header.fixed_header.event_type.type_name = CORBA::string_dup("examples"); // string - event.header.fixed_header.event_name = + event.header.fixed_header.event_name = CORBA::string_dup("myevent"); - + // OptionalHeaderFields - // PropertySeq - + // PropertySeq + // sequence<Property>: string name, any value event.filterable_data.length (1); event.filterable_data[0].name = CORBA::string_dup("Message from:"); @@ -148,7 +148,7 @@ CORBA::Boolean Messenger_i::send_message ( event.filterable_data.length (3); event.filterable_data[2].name = CORBA::string_dup("Message:"); event.filterable_data[2].value <<= (const char *)message; - + s_proxy_consumer_->push_structured_event(event); return 1; diff --git a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/Messenger_i.h b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/Messenger_i.h index 5fa4913cfeb..401201354b4 100644 --- a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/Messenger_i.h +++ b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/Messenger_i.h @@ -3,7 +3,7 @@ #ifndef MESSENGER_H_ #define MESSENGER_H_ -#include <orbsvcs/CosNotifyChannelAdminC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" #include "MessengerS.h" class Messenger_i : public POA_Messenger @@ -22,4 +22,4 @@ private: CosNotifyChannelAdmin::StructuredProxyPushConsumer_var s_proxy_consumer_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h index a1915b9b4b7..86c10e74910 100644 --- a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h +++ b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h @@ -3,7 +3,7 @@ #ifndef _EVENTCONSUMER_I_H_ #define _EVENTCONSUMER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" class StructuredEventConsumer_i : public POA_CosNotifyComm::StructuredPushConsumer { @@ -24,4 +24,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventSupplier_i.h b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventSupplier_i.h index 5cd59a73967..aac055fad6c 100644 --- a/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventSupplier_i.h +++ b/TAO/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventSupplier_i.h @@ -3,15 +3,15 @@ #ifndef _EVENTSUPPLIER_I_H_ #define _EVENTSUPPLIER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" class StructuredEventSupplier_i : public POA_CosNotifyComm::StructuredPushSupplier { public: // Constructor StructuredEventSupplier_i(CORBA::ORB_ptr orb); - virtual void disconnect_structured_push_supplier (); - + virtual void disconnect_structured_push_supplier (); + virtual void subscription_change ( const CosNotification::EventTypeSeq & added, const CosNotification::EventTypeSeq & removed); @@ -19,4 +19,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerClient.cpp b/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerClient.cpp index 09f5edebc57..21c6615ea95 100644 --- a/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN(int argc, ACE_TCHAR * argv[]) diff --git a/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerConsumer.cpp b/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerConsumer.cpp index fd3e6cbcedb..ca63f55d999 100644 --- a/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerConsumer.cpp +++ b/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerConsumer.cpp @@ -1,66 +1,66 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "StructuredEventConsumer_i.h" #include <iostream> -int +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); - + CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); - + CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow(naming_obj.in()); - + CosNaming::Name name; name.length (1); name[0].id = CORBA::string_dup("MyEventChannel"); CORBA::Object_var ecObj = naming_context->resolve(name); - - CosNotifyChannelAdmin::EventChannel_var ec = + + CosNotifyChannelAdmin::EventChannel_var ec = CosNotifyChannelAdmin::EventChannel::_narrow(ecObj.in()); - + CosNotifyChannelAdmin::AdminID adminid; CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = CosNotifyChannelAdmin::OR_OP; - - CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = + + CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = ec->new_for_consumers(ifgop, adminid); - + CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); - - PortableServer::POA_var poa = + + PortableServer::POA_var poa = PortableServer::POA::_narrow (poa_object.in()); - + StructuredEventConsumer_i servant (orb.in()); PortableServer::ObjectId_var objectId = poa->activate_object (&servant); - + CORBA::Object_var consumer_obj = poa->id_to_reference (objectId.in ()); - CosNotifyComm::StructuredPushConsumer_var consumer = + CosNotifyComm::StructuredPushConsumer_var consumer = CosNotifyComm::StructuredPushConsumer::_narrow (consumer_obj.in ()); - - CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; - + + CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; + CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier = consumer_admin->obtain_notification_push_supplier( CosNotifyChannelAdmin::STRUCTURED_EVENT, consumeradmin_proxy_id); - + CosNotifyChannelAdmin::StructuredProxyPushSupplier_var supplier_proxy; - supplier_proxy = + supplier_proxy = CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow(proxy_supplier.in()); - + CosNotification::QoSProperties properties (1); properties.length (1); @@ -69,7 +69,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) supplier_proxy->set_qos (properties); supplier_proxy->connect_structured_push_consumer(consumer.in()); - + CosNotification::EventTypeSeq added (1); CosNotification::EventTypeSeq removed (1); added.length (1); @@ -83,10 +83,10 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) supplier_proxy->subscription_change(added, removed); - PortableServer::POAManager_var poa_manager = poa->the_POAManager(); - + PortableServer::POAManager_var poa_manager = poa->the_POAManager(); + poa_manager->activate(); - + orb->run(); } catch(const CORBA::Exception& ex) diff --git a/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerServer.cpp b/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerServer.cpp index 562683a0f03..94ec2c65574 100644 --- a/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NotifyService/QoSProperties/MessengerServer.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include <iostream> #include <fstream> diff --git a/TAO/DevGuideExamples/NotifyService/QoSProperties/Messenger_i.cpp b/TAO/DevGuideExamples/NotifyService/QoSProperties/Messenger_i.cpp index 16f4e470806..e5d99375ae4 100644 --- a/TAO/DevGuideExamples/NotifyService/QoSProperties/Messenger_i.cpp +++ b/TAO/DevGuideExamples/NotifyService/QoSProperties/Messenger_i.cpp @@ -1,8 +1,8 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include "StructuredEventSupplier_i.h" @@ -11,21 +11,21 @@ Messenger_i::Messenger_i (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate (orb)) { - CORBA::Object_var naming_obj = + CORBA::Object_var naming_obj = orb_->resolve_initial_references ("NameService"); - + CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow (naming_obj.in()); CosNaming::Name name; name.length (1); name[0].id = CORBA::string_dup ("NotifyEventChannelFactory"); - + CORBA::Object_var obj = naming_context->resolve (name); CosNotifyChannelAdmin::EventChannelFactory_var notify_factory = CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in ()); - + CosNotifyChannelAdmin::ChannelID id; CosNotification::QoSProperties initial_qos; CosNotification::AdminProperties initial_admin; @@ -43,33 +43,33 @@ Messenger_i::Messenger_i (CORBA::ORB_ptr orb) initial_admin[3].name = CORBA::string_dup (CosNotification::RejectNewEvents); initial_admin[3].value <<= CORBA::Any::from_boolean((CORBA::Boolean)1); - + CosNotifyChannelAdmin::EventChannel_var ec = notify_factory->create_channel (initial_qos, initial_admin, id); name[0].id = CORBA::string_dup ("MyEventChannel"); - + naming_context->rebind (name, ec.in()); - - CosNotifyChannelAdmin::AdminID adminid; - CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = - CosNotifyChannelAdmin::OR_OP; - + + CosNotifyChannelAdmin::AdminID adminid; + CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = + CosNotifyChannelAdmin::OR_OP; + CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin = ec->new_for_suppliers (ifgop, adminid); - + CosNotifyChannelAdmin::ProxyID supplieradmin_proxy_id; - + CosNotifyChannelAdmin::ProxyConsumer_var proxy_consumer = supplier_admin->obtain_notification_push_consumer( CosNotifyChannelAdmin::STRUCTURED_EVENT, supplieradmin_proxy_id); - - StructuredEventSupplier_i *servant = + + StructuredEventSupplier_i *servant = new StructuredEventSupplier_i(orb_.in()); - + CORBA::Object_var poa_obj = orb_->resolve_initial_references ("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow (poa_obj.in ()); PortableServer::POAManager_var mgr = poa->the_POAManager (); @@ -79,12 +79,12 @@ Messenger_i::Messenger_i (CORBA::ORB_ptr orb) CORBA::Object_var supplier_obj = poa->id_to_reference (objectId.in ()); - CosNotifyComm::StructuredPushSupplier_var supplier = + CosNotifyComm::StructuredPushSupplier_var supplier = CosNotifyComm::StructuredPushSupplier::_narrow (supplier_obj.in ()); - - consumer_proxy_ = + + consumer_proxy_ = CosNotifyChannelAdmin::StructuredProxyPushConsumer::_narrow (proxy_consumer.in()); - + consumer_proxy_-> connect_structured_push_supplier (supplier.in()); } @@ -99,26 +99,26 @@ CORBA::Boolean Messenger_i::send_message ( const char * subject, char *& message) { - + std::cout << "Message from: " << user_name << std::endl; std::cout << "Subject: " << subject << std::endl; std::cout << "Message: " << message << std::endl; - + // Event Definition - CosNotification::StructuredEvent event; - - event.header.fixed_header.event_type.domain_name = + CosNotification::StructuredEvent event; + + event.header.fixed_header.event_type.domain_name = CORBA::string_dup("OCI_TAO"); // string - event.header.fixed_header.event_type.type_name = + event.header.fixed_header.event_type.type_name = CORBA::string_dup("examples"); // string - event.header.fixed_header.event_name = + event.header.fixed_header.event_name = CORBA::string_dup("myevent"); - + // OptionalHeaderFields - // PropertySeq - + // PropertySeq + // sequence<Property>: string name, any value event.filterable_data.length (1); event.filterable_data[0].name = CORBA::string_dup("Message from:"); @@ -129,7 +129,7 @@ CORBA::Boolean Messenger_i::send_message ( event.filterable_data.length (3); event.filterable_data[2].name = CORBA::string_dup("Message:"); event.filterable_data[2].value <<= (const char *)message; - + std::cout << "pushing " << std::endl; consumer_proxy_->push_structured_event(event); diff --git a/TAO/DevGuideExamples/NotifyService/QoSProperties/Messenger_i.h b/TAO/DevGuideExamples/NotifyService/QoSProperties/Messenger_i.h index 07686c54325..38fa49c29e9 100644 --- a/TAO/DevGuideExamples/NotifyService/QoSProperties/Messenger_i.h +++ b/TAO/DevGuideExamples/NotifyService/QoSProperties/Messenger_i.h @@ -3,14 +3,14 @@ #ifndef MESSENGER_H_ #define MESSENGER_H_ -#include <orbsvcs/CosNotifyChannelAdminC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" #include "MessengerS.h" class Messenger_i : public POA_Messenger { public: Messenger_i (CORBA::ORB_ptr orb); - + virtual ~Messenger_i (void); CORBA::Boolean send_message (const char * user_name, @@ -22,7 +22,7 @@ class Messenger_i : public POA_Messenger CosNotifyChannelAdmin::StructuredProxyPushConsumer_var consumer_proxy_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/QoSProperties/StructuredEventConsumer_i.h b/TAO/DevGuideExamples/NotifyService/QoSProperties/StructuredEventConsumer_i.h index 4ac3c9caaa6..567e8e1a57c 100644 --- a/TAO/DevGuideExamples/NotifyService/QoSProperties/StructuredEventConsumer_i.h +++ b/TAO/DevGuideExamples/NotifyService/QoSProperties/StructuredEventConsumer_i.h @@ -3,9 +3,9 @@ #ifndef _EVENTCONSUMER_I_H_ #define _EVENTCONSUMER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" -class StructuredEventConsumer_i : +class StructuredEventConsumer_i : public virtual POA_CosNotifyComm::StructuredPushConsumer { public: @@ -13,17 +13,17 @@ public: virtual void push_structured_event( const CosNotification::StructuredEvent ¬ification - ); + ); virtual void offer_change ( const CosNotification::EventTypeSeq & added, const CosNotification::EventTypeSeq & removed - ); + ); - virtual void disconnect_structured_push_consumer(); + virtual void disconnect_structured_push_consumer(); private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/QoSProperties/StructuredEventSupplier_i.h b/TAO/DevGuideExamples/NotifyService/QoSProperties/StructuredEventSupplier_i.h index d62832bc466..01fad5fb2d0 100644 --- a/TAO/DevGuideExamples/NotifyService/QoSProperties/StructuredEventSupplier_i.h +++ b/TAO/DevGuideExamples/NotifyService/QoSProperties/StructuredEventSupplier_i.h @@ -3,22 +3,22 @@ #ifndef _EVENTSUPPLIER_I_H_ #define _EVENTSUPPLIER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" -class StructuredEventSupplier_i : +class StructuredEventSupplier_i : public virtual POA_CosNotifyComm::StructuredPushSupplier { public: // Constructor StructuredEventSupplier_i(CORBA::ORB_ptr orb); - virtual void disconnect_structured_push_supplier (); - + virtual void disconnect_structured_push_supplier (); + virtual void subscription_change ( const CosNotification::EventTypeSeq & added, const CosNotification::EventTypeSeq & removed - ); + ); private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerClient.cpp b/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerClient.cpp index f7e6d42e866..226fd6b54c6 100644 --- a/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerClient.cpp @@ -1,7 +1,7 @@ // $Id$ #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int ACE_TMAIN(int argc, ACE_TCHAR * argv[]) diff --git a/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerConsumer.cpp b/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerConsumer.cpp index 3733ebbb340..9f981295a41 100644 --- a/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerConsumer.cpp +++ b/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerConsumer.cpp @@ -1,8 +1,8 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "orbsvcs/NotifyExtC.h" #include "tao/RTCORBA/RTCORBA.h" @@ -10,47 +10,47 @@ #include "Priorities.h" #include <iostream> -int +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); - + CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); - + CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow(naming_obj.in()); - + CosNaming::Name name; name.length (1); name[0].id = CORBA::string_dup("MyEventChannel"); CORBA::Object_var ecObj = naming_context->resolve(name); - - CosNotifyChannelAdmin::EventChannel_var ec = + + CosNotifyChannelAdmin::EventChannel_var ec = CosNotifyChannelAdmin::EventChannel::_narrow(ecObj.in()); - + CosNotifyChannelAdmin::AdminID adminid; CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = CosNotifyChannelAdmin::OR_OP; - - CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->new_for_consumers(ifgop, + + CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin = + ec->new_for_consumers(ifgop, adminid); - + CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); - - PortableServer::POA_var poa = + + PortableServer::POA_var poa = PortableServer::POA::_narrow (poa_object.in()); - + CORBA::Object_var rtorb_obj = orb->resolve_initial_references ("RTORB"); RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (rtorb_obj.in ()); // Create an RT POA with a lane at the given priority. CORBA::Policy_var priority_model_policy = - rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED, + rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED, DEFAULT_PRIORITY); RTCORBA::ThreadpoolLanes lanes (2); @@ -81,7 +81,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) max_request_buffer_size); // Create a thread-pool policy. - CORBA::Policy_var lanes_policy = + CORBA::Policy_var lanes_policy = rt_orb->create_threadpool_policy (threadpool_id); CORBA::PolicyList poa_policy_list(2); @@ -97,15 +97,15 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) StructuredEventConsumer_i servant (orb.in()); - PortableServer::ObjectId_var objectId = + PortableServer::ObjectId_var objectId = rt_poa->activate_object (&servant); - - CORBA::Object_var consumer_obj = + + CORBA::Object_var consumer_obj = rt_poa->id_to_reference (objectId.in ()); - CosNotifyComm::StructuredPushConsumer_var consumer = + CosNotifyComm::StructuredPushConsumer_var consumer = CosNotifyComm::StructuredPushConsumer::_narrow (consumer_obj.in ()); - + NotifyExt::ThreadPoolLanesParams tpl_params; tpl_params.priority_model = NotifyExt::CLIENT_PROPAGATED; @@ -128,15 +128,15 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) qos[0].value <<= tpl_params; consumer_admin->set_qos(qos); - CORBA::Object_var current_obj = + CORBA::Object_var current_obj = orb->resolve_initial_references ("RTCurrent"); RTCORBA::Current_var current = RTCORBA::Current::_narrow (current_obj.in ()); current->the_priority(HIGH_PRIORITY); - - CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; - + + CosNotifyChannelAdmin::ProxyID consumeradmin_proxy_id; + CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier = consumer_admin->obtain_notification_push_supplier( CosNotifyChannelAdmin::STRUCTURED_EVENT, @@ -145,7 +145,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) CosNotifyChannelAdmin::StructuredProxyPushSupplier_var supplier_proxy; supplier_proxy = CosNotifyChannelAdmin::StructuredProxyPushSupplier:: _narrow(proxy_supplier.in()); - + supplier_proxy->connect_structured_push_consumer(consumer.in()); CosNotification::EventTypeSeq added (1); @@ -162,7 +162,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) supplier_proxy->subscription_change(added, removed); poa_manager->activate(); - + orb->run(); } catch(const CORBA::Exception& ex) diff --git a/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerServer.cpp b/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerServer.cpp index 984a8340080..aa3ad6bb744 100644 --- a/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NotifyService/RTNotify/MessengerServer.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include <iostream> #include <fstream> diff --git a/TAO/DevGuideExamples/NotifyService/RTNotify/Messenger_i.cpp b/TAO/DevGuideExamples/NotifyService/RTNotify/Messenger_i.cpp index a43202fad6f..c6dc34bc7e1 100644 --- a/TAO/DevGuideExamples/NotifyService/RTNotify/Messenger_i.cpp +++ b/TAO/DevGuideExamples/NotifyService/RTNotify/Messenger_i.cpp @@ -1,8 +1,8 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "orbsvcs/NotifyExtC.h" #include "ace/OS_NS_stdio.h" diff --git a/TAO/DevGuideExamples/NotifyService/RTNotify/Messenger_i.h b/TAO/DevGuideExamples/NotifyService/RTNotify/Messenger_i.h index 596302cfc7d..9eb0591df2e 100644 --- a/TAO/DevGuideExamples/NotifyService/RTNotify/Messenger_i.h +++ b/TAO/DevGuideExamples/NotifyService/RTNotify/Messenger_i.h @@ -3,7 +3,7 @@ #ifndef MESSENGER_H_ #define MESSENGER_H_ -#include <orbsvcs/CosNotifyChannelAdminC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" #include "MessengerS.h" #include "tao/RTCORBA/RTCORBA.h" @@ -11,7 +11,7 @@ class Messenger_i : public POA_Messenger { public: Messenger_i (CORBA::ORB_ptr orb); - + virtual ~Messenger_i (void); CORBA::Boolean send_message (const char * user_name, @@ -24,4 +24,4 @@ class Messenger_i : public POA_Messenger RTCORBA::Current_var current_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/RTNotify/StructuredEventConsumer_i.h b/TAO/DevGuideExamples/NotifyService/RTNotify/StructuredEventConsumer_i.h index dc7b62a9a6e..adb5bd999c8 100644 --- a/TAO/DevGuideExamples/NotifyService/RTNotify/StructuredEventConsumer_i.h +++ b/TAO/DevGuideExamples/NotifyService/RTNotify/StructuredEventConsumer_i.h @@ -3,9 +3,9 @@ #ifndef _EVENTCONSUMER_I_H_ #define _EVENTCONSUMER_I_H_ -#include <orbsvcs/CosNotifyCommS.h> +#include "orbsvcs/CosNotifyCommS.h" -class StructuredEventConsumer_i : +class StructuredEventConsumer_i : public virtual POA_CosNotifyComm::StructuredPushConsumer { public: @@ -26,4 +26,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/RTNotify/StructuredEventSupplier_i.h b/TAO/DevGuideExamples/NotifyService/RTNotify/StructuredEventSupplier_i.h index b5e5396adc7..6df2455fcb0 100644 --- a/TAO/DevGuideExamples/NotifyService/RTNotify/StructuredEventSupplier_i.h +++ b/TAO/DevGuideExamples/NotifyService/RTNotify/StructuredEventSupplier_i.h @@ -3,22 +3,22 @@ #ifndef _EVENTSUPPLIER_I_H_ #define _EVENTSUPPLIER_I_H_ -#include <orbsvcs/CosNotifyCommS.h> +#include "orbsvcs/CosNotifyCommS.h" -class StructuredEventSupplier_i : +class StructuredEventSupplier_i : public virtual POA_CosNotifyComm::StructuredPushSupplier { public: // Constructor StructuredEventSupplier_i(CORBA::ORB_ptr orb); - virtual void disconnect_structured_push_supplier (); - + virtual void disconnect_structured_push_supplier (); + virtual void subscription_change ( const CosNotification::EventTypeSeq & added, const CosNotification::EventTypeSeq & removed - ); + ); private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerClient.cpp b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerClient.cpp index 022f2250e97..5d3cb836453 100644 --- a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerClient.cpp +++ b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerClient.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "MessengerC.h" #include <iostream> int ACE_TMAIN(int argc, ACE_TCHAR * argv[]) diff --git a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerServer.cpp b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerServer.cpp index 0adf47194ee..1e214673971 100644 --- a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerServer.cpp +++ b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerServer.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include "Messenger_i.h" #include <iostream> #include <fstream> diff --git a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerSupplier.cpp b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerSupplier.cpp index 5fc3ef6524c..e1468ab0c93 100644 --- a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerSupplier.cpp +++ b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/MessengerSupplier.cpp @@ -1,7 +1,7 @@ // $Id$ -#include <orbsvcs/Notify/Notify_EventChannelFactory_i.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/Notify/Notify_EventChannelFactory_i.h" +#include "orbsvcs/CosNamingC.h" #include "ace/Profile_Timer.h" #include "StructuredEventSupplier_i.h" #include <iostream> diff --git a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/Messenger_i.cpp b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/Messenger_i.cpp index 968d42dc0ed..5b5f93e2167 100644 --- a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/Messenger_i.cpp +++ b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/Messenger_i.cpp @@ -1,16 +1,16 @@ // $Id$ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> -#include <orbsvcs/Notify/Notify_EventChannelFactory_i.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" +#include "orbsvcs/Notify/Notify_EventChannelFactory_i.h" // The static initialization trick doesn't work with static builds. // On SunOS 5.8 and MacOS X, the static initialization trick used // in the CosNotification_Serv library does not work. Including the // initializer class here works around the problem. #if defined (TAO_AS_STATIC_LIBS) || defined (sun) || defined (__APPLE__) -#include <orbsvcs/Notify/CosNotify_Initializer.h> +#include "orbsvcs/Notify/CosNotify_Initializer.h" #endif /* sun || __APPLE__ */ #include "Messenger_i.h" @@ -25,92 +25,92 @@ Messenger_i::Messenger_i (CORBA::ORB_ptr orb) { CORBA::Object_var poa_obj = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow(poa_obj.in()); - + CORBA::Object_var naming_obj = orb_->resolve_initial_references ("NameService"); - + if (CORBA::is_nil(naming_obj.in())) { std::cerr << "Unable to find naming service" << std::endl; - } - + } + CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow(naming_obj.in()); - - + + // // Create an instance of TAO's notification event channel // - + CosNotifyChannelAdmin::EventChannelFactory_var notify_factory = TAO_Notify_EventChannelFactory_i::create(poa.in()); - + if (CORBA::is_nil (notify_factory.in ())) { std::cerr << "Unable to create the notify event channel" << std::endl; return; } - + CosNotifyChannelAdmin::ChannelID id; CosNotification::QoSProperties initial_qos; CosNotification::AdminProperties initial_admin; - + CosNotifyChannelAdmin::EventChannel_var ec = notify_factory->create_channel (initial_qos, initial_admin, id); - + if (CORBA::is_nil (ec.in())) { std::cerr << "Unable to create event channel" << std::endl; return; - } - - + } + + CosNaming::Name name(1); name.length(1); name[0].id = CORBA::string_dup("MyEventChannel"); - + naming_context->rebind(name, ec.in()); - - CosNotifyChannelAdmin::AdminID adminid; - CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = - CosNotifyChannelAdmin::AND_OP; - + + CosNotifyChannelAdmin::AdminID adminid; + CosNotifyChannelAdmin::InterFilterGroupOperator ifgop = + CosNotifyChannelAdmin::AND_OP; + CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin = ec->new_for_suppliers (ifgop, adminid); - + if (CORBA::is_nil (supplier_admin.in())) { std::cerr << "Unable to find supplier admin" << std::endl; - } - + } + CosNotifyChannelAdmin::ProxyID supplieradmin_proxy_id; - + CosNotifyChannelAdmin::ProxyConsumer_var proxy_consumer = supplier_admin->obtain_notification_push_consumer( CosNotifyChannelAdmin::STRUCTURED_EVENT, supplieradmin_proxy_id); - - StructuredEventSupplier_i *servant = - new StructuredEventSupplier_i(orb_.in()); - + + StructuredEventSupplier_i *servant = + new StructuredEventSupplier_i(orb_.in()); + PortableServer::ObjectId_var oid = poa->activate_object(servant); CORBA::Object_var supplier_obj = poa->id_to_reference(oid.in()); - CosNotifyComm::StructuredPushSupplier_var supplier = + CosNotifyComm::StructuredPushSupplier_var supplier = CosNotifyComm::StructuredPushSupplier::_narrow(supplier_obj.in()); - - consumer_proxy_ = + + consumer_proxy_ = CosNotifyChannelAdmin::StructuredProxyPushConsumer:: _narrow(proxy_consumer.in()); - + if (CORBA::is_nil (consumer_proxy_.in())) { std::cerr << "Unable to find structured proxy push consumer" << std::endl; - } - + } + consumer_proxy_->connect_structured_push_supplier(supplier.in()); - + } catch(const CORBA::Exception& ex) { std::cerr << ex << std::endl; - } - + } + } @@ -125,26 +125,26 @@ CORBA::Boolean Messenger_i::send_message ( char *& message ) { - + std::cout << "Message from: " << user_name << std::endl; std::cout << "Subject: " << subject << std::endl; std::cout << "Message: " << message << std::endl; - + try { - + // Event Definition - CosNotification::StructuredEvent event; - - event.header.fixed_header.event_type.domain_name = + CosNotification::StructuredEvent event; + + event.header.fixed_header.event_type.domain_name = CORBA::string_dup("OCI_TAO"); // string - event.header.fixed_header.event_type.type_name = + event.header.fixed_header.event_type.type_name = CORBA::string_dup("examples"); // string - event.header.fixed_header.event_name = + event.header.fixed_header.event_name = CORBA::string_dup("myevent"); - + // sequence<Property>: string name, any value event.filterable_data.length (1); event.filterable_data[0].name = CORBA::string_dup("From"); @@ -154,16 +154,16 @@ CORBA::Boolean Messenger_i::send_message ( event.filterable_data[1].value <<= (const char *)subject; event.filterable_data.length (3); event.filterable_data[2].name = CORBA::string_dup("Message"); - event.filterable_data[2].value <<= (const char *)message; - + event.filterable_data[2].value <<= (const char *)message; + consumer_proxy_->push_structured_event(event); } - + catch(const CosNotifyComm::InvalidEventType&) { std::cerr << "Invalid Event Type Exception " << std::endl; return 1; } - + catch(const CORBA::Exception& ex) { std::cerr << ex << std::endl; return 1; diff --git a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/Messenger_i.h b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/Messenger_i.h index 238ca9237ef..15471aaedde 100644 --- a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/Messenger_i.h +++ b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/Messenger_i.h @@ -3,9 +3,9 @@ #ifndef MESSENGERI_H_ #define MESSENGERI_H_ -#include <orbsvcs/CosNotifyChannelAdminC.h> -#include <orbsvcs/CosNotifyCommC.h> -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" #include "MessengerS.h" @@ -13,12 +13,12 @@ class Messenger_i : public virtual POA_Messenger { public: - //Constructor + //Constructor Messenger_i (CORBA::ORB_ptr orb); - - //Destructor + + //Destructor virtual ~Messenger_i (void); - + CORBA::Boolean send_message ( const char * user_name, const char * subject, diff --git a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/StructuredEventConsumer_i.h b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/StructuredEventConsumer_i.h index 49e983dd765..6dd45e0b20c 100644 --- a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/StructuredEventConsumer_i.h +++ b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/StructuredEventConsumer_i.h @@ -3,7 +3,7 @@ #ifndef _EVENTCONSUMER_I_H_ #define _EVENTCONSUMER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" class StructuredEventConsumer_i : public POA_CosNotifyComm::StructuredPushConsumer { @@ -23,4 +23,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/StructuredEventSupplier_i.h b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/StructuredEventSupplier_i.h index a78faed2868..37d97731643 100644 --- a/TAO/DevGuideExamples/NotifyService/SupplierSideNC/StructuredEventSupplier_i.h +++ b/TAO/DevGuideExamples/NotifyService/SupplierSideNC/StructuredEventSupplier_i.h @@ -3,7 +3,7 @@ #ifndef _EVENTSUPPLIER_I_H_ #define _EVENTSUPPLIER_I_H_ -#include <orbsvcs/CosNotifyChannelAdminS.h> +#include "orbsvcs/CosNotifyChannelAdminS.h" class StructuredEventSupplier_i : public POA_CosNotifyComm::StructuredPushSupplier { @@ -20,4 +20,4 @@ private: CORBA::ORB_var orb_; }; -#endif +#endif diff --git a/TAO/DevGuideExamples/PortableInterceptors/Auth/MessengerClient.cpp b/TAO/DevGuideExamples/PortableInterceptors/Auth/MessengerClient.cpp index 924cbabb0dc..17613d73381 100644 --- a/TAO/DevGuideExamples/PortableInterceptors/Auth/MessengerClient.cpp +++ b/TAO/DevGuideExamples/PortableInterceptors/Auth/MessengerClient.cpp @@ -5,7 +5,7 @@ #include "tao/ORBInitializer_Registry.h" // Ensure that the PI library is linked in when building statically #include "tao/PI/PI.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int diff --git a/TAO/DevGuideExamples/PortableInterceptors/PICurrent/ClientInitializer.cpp b/TAO/DevGuideExamples/PortableInterceptors/PICurrent/ClientInitializer.cpp index 8400f3ca607..41372dddb13 100644 --- a/TAO/DevGuideExamples/PortableInterceptors/PICurrent/ClientInitializer.cpp +++ b/TAO/DevGuideExamples/PortableInterceptors/PICurrent/ClientInitializer.cpp @@ -3,7 +3,7 @@ #include "ClientInitializer.h" #include "ClientInterceptor.h" #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> ClientInitializer::ClientInitializer (void) diff --git a/TAO/DevGuideExamples/PortableInterceptors/PICurrent/MessengerClient.cpp b/TAO/DevGuideExamples/PortableInterceptors/PICurrent/MessengerClient.cpp index 6b5fd4962fc..65c51a955bb 100644 --- a/TAO/DevGuideExamples/PortableInterceptors/PICurrent/MessengerClient.cpp +++ b/TAO/DevGuideExamples/PortableInterceptors/PICurrent/MessengerClient.cpp @@ -6,7 +6,7 @@ #include "tao/ORBInitializer_Registry.h" // Ensure that the PI library is linked in when building statically #include "tao/PI/PI.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int diff --git a/TAO/DevGuideExamples/PortableInterceptors/PICurrent/MessengerServer.cpp b/TAO/DevGuideExamples/PortableInterceptors/PICurrent/MessengerServer.cpp index fb7e989084d..9282e1415c4 100644 --- a/TAO/DevGuideExamples/PortableInterceptors/PICurrent/MessengerServer.cpp +++ b/TAO/DevGuideExamples/PortableInterceptors/PICurrent/MessengerServer.cpp @@ -7,7 +7,7 @@ #include "tao/ORBInitializer_Registry.h" // Ensure that the PI_Server library is linked in when building statically #include "tao/PI_Server/PI_Server.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> #include <fstream> #include <fstream> diff --git a/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/ClientInitializer.cpp b/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/ClientInitializer.cpp index d7f1478fa5c..3278f25b1cb 100644 --- a/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/ClientInitializer.cpp +++ b/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/ClientInitializer.cpp @@ -3,7 +3,7 @@ #include "ClientInitializer.h" #include "ClientInterceptor.h" #include "MessengerC.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> ClientInitializer::ClientInitializer (void) diff --git a/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/MessengerClient.cpp b/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/MessengerClient.cpp index 072c872ae7c..3edbc5d2284 100644 --- a/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/MessengerClient.cpp +++ b/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/MessengerClient.cpp @@ -6,7 +6,7 @@ #include "tao/ORBInitializer_Registry.h" // Ensure that the PI library is linked in when building statically #include "tao/PI/PI.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int diff --git a/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/MessengerServer.cpp b/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/MessengerServer.cpp index 32e25584690..4d57232a4ef 100644 --- a/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/MessengerServer.cpp +++ b/TAO/DevGuideExamples/PortableInterceptors/PICurrent_NameService/MessengerServer.cpp @@ -7,7 +7,7 @@ #include "tao/ORBInitializer_Registry.h" // Ensure that the PI_Server library is linked in when building statically #include "tao/PI_Server/PI_Server.h" -#include <orbsvcs/CosNamingC.h> +#include "orbsvcs/CosNamingC.h" #include <iostream> int diff --git a/TAO/DevGuideExamples/Security/ParticipatingApp/Messenger_i.h b/TAO/DevGuideExamples/Security/ParticipatingApp/Messenger_i.h index 595b470f639..9dfb7ce0ff3 100644 --- a/TAO/DevGuideExamples/Security/ParticipatingApp/Messenger_i.h +++ b/TAO/DevGuideExamples/Security/ParticipatingApp/Messenger_i.h @@ -5,8 +5,8 @@ #include <openssl/ssl.h> #include <openssl/x509.h> -#include <orbsvcs/SecurityC.h> -#include <orbsvcs/SSLIOPC.h> +#include "orbsvcs/SecurityC.h" +#include "orbsvcs/SSLIOPC.h" #include "MessengerS.h" @@ -17,9 +17,9 @@ public: CORBA::ORB_ptr orb, SSLIOP::Current_ptr ssliop_current ); - + virtual ~Messenger_i (void); - + virtual CORBA::Boolean send_message ( const char * user_name, const char * subject, diff --git a/TAO/DevGuideExamples/ValueTypes/Notify/consumer.cpp b/TAO/DevGuideExamples/ValueTypes/Notify/consumer.cpp index a325b72b9c5..099ad96ad48 100644 --- a/TAO/DevGuideExamples/ValueTypes/Notify/consumer.cpp +++ b/TAO/DevGuideExamples/ValueTypes/Notify/consumer.cpp @@ -7,9 +7,9 @@ const char* notify_ior = "corbaloc::localhost:8888/NotifyEventChannelFactory"; #include "Event_i.h" -#include <orbsvcs/CosEventCommS.h> +#include "orbsvcs/CosEventCommS.h" -#include <orbsvcs/CosNotifyChannelAdminC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" #include "tao/corba.h" #include "tao/ORB_Core.h" diff --git a/TAO/DevGuideExamples/ValueTypes/Notify/supplier.cpp b/TAO/DevGuideExamples/ValueTypes/Notify/supplier.cpp index eb7af2dc911..97bbb208c9a 100644 --- a/TAO/DevGuideExamples/ValueTypes/Notify/supplier.cpp +++ b/TAO/DevGuideExamples/ValueTypes/Notify/supplier.cpp @@ -7,9 +7,9 @@ const char* notify_ior = "corbaloc::localhost:8888/NotifyEventChannelFactory"; #include "Event_i.h" -#include <orbsvcs/CosEventCommS.h> +#include "orbsvcs/CosEventCommS.h" -#include <orbsvcs/CosNotifyChannelAdminC.h> +#include "orbsvcs/CosNotifyChannelAdminC.h" #include "tao/corba.h" #include "tao/ORB_Core.h" |