| 323 | } |
| 324 | |
| 325 | OpenDDS::DCPS::TopicStatus TAO_DDS_DCPSInfo_i::remove_topic( |
| 326 | DDS::DomainId_t domainId, |
| 327 | const OpenDDS::DCPS::GUID_t& participantId, |
| 328 | const OpenDDS::DCPS::GUID_t& topicId) |
| 329 | { |
| 330 | ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, guard, this->lock_, OpenDDS::DCPS::INTERNAL_ERROR); |
| 331 | |
| 332 | // Grab the domain. |
| 333 | DCPS_IR_Domain_Map::iterator where = this->domains_.find(domainId); |
| 334 | |
| 335 | if (where == this->domains_.end()) { |
| 336 | throw OpenDDS::DCPS::Invalid_Domain(); |
| 337 | } |
| 338 | |
| 339 | // Grab the participant. |
| 340 | DCPS_IR_Participant* partPtr |
| 341 | = where->second->participant(participantId); |
| 342 | |
| 343 | if (0 == partPtr) { |
| 344 | throw OpenDDS::DCPS::Invalid_Participant(); |
| 345 | } |
| 346 | |
| 347 | DCPS_IR_Topic* topic; |
| 348 | |
| 349 | if (partPtr->find_topic_reference(topicId, topic) != 0) { |
| 350 | throw OpenDDS::DCPS::Invalid_Topic(); |
| 351 | } |
| 352 | |
| 353 | OpenDDS::DCPS::TopicStatus removedStatus = where->second->remove_topic(partPtr, topic); |
| 354 | |
| 355 | if (this->um_ |
| 356 | && (partPtr->isOwner() == true) |
| 357 | && (partPtr->isBitPublisher() == false)) { |
| 358 | Update::IdPath path(domainId, participantId, topicId); |
| 359 | this->um_->destroy(path, Update::Topic); |
| 360 | |
| 361 | if (OpenDDS::DCPS::DCPS_debug_level > 4) { |
| 362 | OpenDDS::DCPS::RepoIdConverter converter(topicId); |
| 363 | ACE_DEBUG((LM_DEBUG, |
| 364 | ACE_TEXT("(%P|%t) TAO_DDS_DCPSInfo_i::remove_topic: ") |
| 365 | ACE_TEXT("pushing deletion of topic %C in domain %d.\n"), |
| 366 | std::string(converter).c_str(), |
| 367 | domainId)); |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | return removedStatus; |
| 372 | } |
| 373 | |
| 374 | OpenDDS::DCPS::GUID_t TAO_DDS_DCPSInfo_i::reserve_publication_id(DDS::DomainId_t domainId, |
| 375 | const OpenDDS::DCPS::GUID_t& participantId, |
no test coverage detected