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