00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/ 00009 #include "SendResponseListener.h" 00010 00011 #include "ace/Message_Block.h" 00012 00013 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00014 00015 namespace OpenDDS { 00016 namespace DCPS { 00017 00018 SendResponseListener::SendResponseListener(const OPENDDS_STRING& msg_src) 00019 : tracker_(msg_src) 00020 { 00021 } 00022 00023 SendResponseListener::~SendResponseListener() 00024 { 00025 OPENDDS_STRING caller_string("SendResponseListener::~SendResponseListener"); 00026 tracker_.wait_messages_pending(caller_string); 00027 } 00028 00029 void 00030 SendResponseListener::data_delivered(const DataSampleElement* /* sample */) 00031 { 00032 tracker_.message_delivered(); 00033 } 00034 00035 void 00036 SendResponseListener::data_dropped( 00037 const DataSampleElement* /* sample */, 00038 bool /* dropped_by_transport */) 00039 { 00040 tracker_.message_dropped(); 00041 } 00042 00043 void 00044 SendResponseListener::control_delivered(const Message_Block_Ptr& /* sample */) 00045 { 00046 tracker_.message_delivered(); 00047 } 00048 00049 void 00050 SendResponseListener::control_dropped( 00051 const Message_Block_Ptr& /* sample */, 00052 bool /* dropped_by_transport */) 00053 { 00054 tracker_.message_dropped(); 00055 } 00056 00057 void 00058 SendResponseListener::track_message() 00059 { 00060 tracker_.message_sent(); 00061 } 00062 00063 } // namespace DCPS 00064 } // namespace OpenDDS 00065 00066 OPENDDS_END_VERSIONED_NAMESPACE_DECL