00001 #include "PublisherQos_Handler.h"
00002 #include "QOS_PubSub_T.h"
00003
00004 bool
00005 PublisherQos_Handler::get_publisher_qos (DDS::PublisherQos& pub_qos,
00006 dds::qosProfile * profile,
00007 const ACE_TCHAR * name)
00008 {
00009 if (name)
00010 {
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 }
00022 else
00023 {
00024 if (profile->count_publisher_qos () == 0)
00025 {
00026 if (OpenDDS::DCPS::DCPS_debug_level > 7)
00027 {
00028 ACE_DEBUG ((LM_TRACE,
00029 ACE_TEXT ("PublisherQos_Handler::get_publisher_qos - ")
00030 ACE_TEXT ("No Publisher QOS available in profile <%C>\n"),
00031 profile->name ().c_str ()));
00032 }
00033 return true;
00034 }
00035
00036 dds::qosProfile::publisher_qos_iterator pub_it = profile->begin_publisher_qos ();
00037 return PublisherQos_Handler::get_publisher_qos (pub_qos, pub_it->get ());
00038 }
00039
00040 ACE_ERROR ((LM_DEBUG,
00041 ACE_TEXT ("PublisherQos_Handler::get_publisher_qos - ")
00042 ACE_TEXT ("Unable to find PublisherQos <%C>\n"),
00043 name));
00044 return false;
00045 }
00046
00047 bool
00048 PublisherQos_Handler::get_publisher_qos (DDS::PublisherQos& pub_qos,
00049 dds::publisherQos * pub)
00050 {
00051 typedef QOS_PubSub_T<dds::publisherQos*, DDS::PublisherQos> pub_type;
00052 pub_type publisher_qos_handler;
00053 publisher_qos_handler.read_qos (pub_qos, pub);
00054
00055 return true;
00056 }