Skip to content

Commit

Permalink
Merge pull request #344 from rjpdasilva/feature/ioconnector_add_icata…
Browse files Browse the repository at this point in the history
…log_resource

IOConnector: Implement the Resource() interface method
  • Loading branch information
pwielders authored Jan 23, 2021
2 parents 23a5bf2 + 60c0dd5 commit 2936860
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions IOConnector/IOConnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,20 @@ namespace Plugin

}

/* virtual */ Exchange::IExternal* IOConnector::Resource(const uint32_t id)
{
Exchange::IExternal* result = nullptr;

Pins::iterator index = _pins.find(id);

if (index != _pins.end()) {
result = index->second.Pin();
result->AddRef();
}

return (result);
}

/* virtual */ void IOConnector::Deinitialize(PluginHost::IShell * service)
{
ASSERT(_service == service);
Expand Down
1 change: 1 addition & 0 deletions IOConnector/IOConnector.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ namespace Plugin {
// -------------------------------------------------------------------------------------------------------
void Register(ICatalog::INotification* sink) override;
void Unregister(ICatalog::INotification* sink) override;
Exchange::IExternal* Resource(const uint32_t id) override;

// IWeb methods
// -------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 2936860

Please sign in to comment.