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 namespace OpenDDS { 00014 namespace DCPS { 00015 00016 SendResponseListener::SendResponseListener(const OPENDDS_STRING& msg_src) 00017 : tracker_(msg_src) 00018 { 00019 } 00020 00021 SendResponseListener::~SendResponseListener() 00022 { 00023 OPENDDS_STRING caller_string("SendResponseListener::~SendResponseListener"); 00024 tracker_.wait_messages_pending(caller_string); 00025 } 00026 00027 void 00028 SendResponseListener::data_delivered(const DataSampleElement* /* sample */) 00029 { 00030 tracker_.message_delivered(); 00031 } 00032 00033 void 00034 SendResponseListener::data_dropped( 00035 const DataSampleElement* /* sample */, 00036 bool /* dropped_by_transport */) 00037 { 00038 tracker_.message_dropped(); 00039 } 00040 00041 void 00042 SendResponseListener::control_delivered(ACE_Message_Block* sample) 00043 { 00044 if (sample != 0) sample->release(); 00045 tracker_.message_delivered(); 00046 } 00047 00048 void 00049 SendResponseListener::control_dropped( 00050 ACE_Message_Block* sample, 00051 bool /* dropped_by_transport */) 00052 { 00053 if (sample != 0) sample->release(); 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