Skip to content

Commit 2936860

Browse files
authored
Merge pull request #344 from rjpdasilva/feature/ioconnector_add_icatalog_resource
IOConnector: Implement the Resource() interface method
2 parents 23a5bf2 + 60c0dd5 commit 2936860

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

IOConnector/IOConnector.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,20 @@ namespace Plugin
245245

246246
}
247247

248+
/* virtual */ Exchange::IExternal* IOConnector::Resource(const uint32_t id)
249+
{
250+
Exchange::IExternal* result = nullptr;
251+
252+
Pins::iterator index = _pins.find(id);
253+
254+
if (index != _pins.end()) {
255+
result = index->second.Pin();
256+
result->AddRef();
257+
}
258+
259+
return (result);
260+
}
261+
248262
/* virtual */ void IOConnector::Deinitialize(PluginHost::IShell * service)
249263
{
250264
ASSERT(_service == service);

IOConnector/IOConnector.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ namespace Plugin {
296296
// -------------------------------------------------------------------------------------------------------
297297
void Register(ICatalog::INotification* sink) override;
298298
void Unregister(ICatalog::INotification* sink) override;
299+
Exchange::IExternal* Resource(const uint32_t id) override;
299300

300301
// IWeb methods
301302
// -------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)