Skip to content

Commit

Permalink
[NAMING] Update the Service and Sink to their respective template def…
Browse files Browse the repository at this point in the history
…initions ServiceType and SinkType.
  • Loading branch information
pwielders committed Jan 2, 2024
1 parent 50e7820 commit 76c12d9
Show file tree
Hide file tree
Showing 25 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion DeviceIdentification/DeviceIdentification.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ namespace Plugin {
PluginHost::ISubSystem::IIdentifier* _identifier;

uint32_t _connectionId;
Core::Sink<Notification> _notification;
Core::SinkType<Notification> _notification;
};

} // namespace Plugin
Expand Down
2 changes: 1 addition & 1 deletion DeviceInfo/DeviceInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ namespace Plugin {
Exchange::IDeviceVideoCapabilities* _deviceVideoCapabilityInterface;
uint32_t _connectionId;
mutable Core::CriticalSection _adminLock;
Core::Sink<Notification> _notification;
Core::SinkType<Notification> _notification;
};

} // namespace Plugin
Expand Down
12 changes: 6 additions & 6 deletions DeviceInfo/DeviceInfoImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ namespace Plugin {
return pair.first;
});

audioOutputs = Core::Service<AudioOutputIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IAudioOutputIterator>(audioOutputList);
audioOutputs = Core::ServiceType<AudioOutputIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IAudioOutputIterator>(audioOutputList);
return (audioOutputs != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}

uint32_t DeviceInfoImplementation::AudioCapabilities(const Exchange::IDeviceAudioCapabilities::AudioOutput audioOutput, Exchange::IDeviceAudioCapabilities::IAudioCapabilityIterator*& audioCapabilities) const
{
AudioOutputMap::const_iterator index = _audioOutputMap.find(audioOutput);
if ((index != _audioOutputMap.end()) && (index->second.AudioCapabilities.size() > 0)) {
audioCapabilities = Core::Service<AudioCapabilityIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IAudioCapabilityIterator>(index->second.AudioCapabilities);
audioCapabilities = Core::ServiceType<AudioCapabilityIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IAudioCapabilityIterator>(index->second.AudioCapabilities);
}
return (audioCapabilities != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
Expand All @@ -97,7 +97,7 @@ namespace Plugin {
{
AudioOutputMap::const_iterator index = _audioOutputMap.find(audioOutput);
if ((index != _audioOutputMap.end()) && (index->second.MS12Capabilities.size() > 0)) {
ms12Capabilities = Core::Service<MS12CapabilityIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IMS12CapabilityIterator>(index->second.MS12Capabilities);
ms12Capabilities = Core::ServiceType<MS12CapabilityIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IMS12CapabilityIterator>(index->second.MS12Capabilities);
}
return (ms12Capabilities != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
Expand All @@ -106,7 +106,7 @@ namespace Plugin {
{
AudioOutputMap::const_iterator index = _audioOutputMap.find(audioOutput);
if ((index != _audioOutputMap.end()) && (index->second.MS12Profiles.size() > 0)) {
ms12AudioProfiles = Core::Service<MS12ProfileIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IMS12ProfileIterator>(index->second.MS12Profiles);
ms12AudioProfiles = Core::ServiceType<MS12ProfileIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IMS12ProfileIterator>(index->second.MS12Profiles);
}
return (ms12AudioProfiles != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
Expand All @@ -120,7 +120,7 @@ namespace Plugin {
return pair.first;
});

videoOutputs = Core::Service<VideoOutputIteratorImplementation>::Create<Exchange::IDeviceVideoCapabilities::IVideoOutputIterator>(videoOutputList);
videoOutputs = Core::ServiceType<VideoOutputIteratorImplementation>::Create<Exchange::IDeviceVideoCapabilities::IVideoOutputIterator>(videoOutputList);

return (videoOutputs != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
Expand All @@ -139,7 +139,7 @@ namespace Plugin {
{
VideoOutputMap::const_iterator index = _videoOutputMap.find(videoOutput);
if ((index != _videoOutputMap.end()) && (index->second.Resolutions.size() > 0)) {
resolutions = Core::Service<ResolutionIteratorImplementation>::Create<Exchange::IDeviceVideoCapabilities::IScreenResolutionIterator>(index->second.Resolutions);
resolutions = Core::ServiceType<ResolutionIteratorImplementation>::Create<Exchange::IDeviceVideoCapabilities::IScreenResolutionIterator>(index->second.Resolutions);
}

return (resolutions != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
Expand Down
6 changes: 3 additions & 3 deletions DisplayInfo/DeviceSettings/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ class DisplayInfoImplementation :
TRACE(Trace::Error, (_T("HDMI not connected!")));
ret = Core::ERROR_GENERAL;
}
colorimetry = Core::Service<ColorimetryIteratorImplementation>::Create<Exchange::IDisplayProperties::IColorimetryIterator>(colorimetryCaps);
colorimetry = Core::ServiceType<ColorimetryIteratorImplementation>::Create<Exchange::IDisplayProperties::IColorimetryIterator>(colorimetryCaps);
return (colorimetry != nullptr && ret == Core::ERROR_NONE ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}

Expand Down Expand Up @@ -683,7 +683,7 @@ class DisplayInfoImplementation :
if(capabilities & dsHDRSTANDARD_Invalid)hdrCapabilities.push_back(HDR_OFF);


type = Core::Service<HdrteratorImplementation>::Create<Exchange::IHDRProperties::IHDRIterator>(hdrCapabilities);
type = Core::ServiceType<HdrteratorImplementation>::Create<Exchange::IHDRProperties::IHDRIterator>(hdrCapabilities);
return (type != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
// @property
Expand Down Expand Up @@ -711,7 +711,7 @@ class DisplayInfoImplementation :
if(capabilities & dsHDRSTANDARD_Invalid)hdrCapabilities.push_back(HDR_OFF);


type = Core::Service<HdrteratorImplementation>::Create<Exchange::IHDRProperties::IHDRIterator>(hdrCapabilities);
type = Core::ServiceType<HdrteratorImplementation>::Create<Exchange::IHDRProperties::IHDRIterator>(hdrCapabilities);
return (type != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
// @property
Expand Down
2 changes: 1 addition & 1 deletion DisplayInfo/DisplayInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ namespace Plugin {
Exchange::IConnectionProperties* _connectionProperties;
Exchange::IHDRProperties* _hdrProperties;
Exchange::IDisplayProperties* _displayProperties;
Core::Sink<Notification> _notification;
Core::SinkType<Notification> _notification;
PluginHost::IShell* _service;
};

Expand Down
4 changes: 2 additions & 2 deletions DisplayInfo/Linux/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,12 @@ namespace Plugin {
, Config::GetValue(_config.hdcpLevelFilepath)
, Config::GetValue(_config.usePreferredMode)));

_graphics = Core::Service<GraphicsProperties>::Create<Exchange::IGraphicsProperties>(Config::GetValue(_config.gpuMemoryFile)
_graphics = Core::ServiceType<GraphicsProperties>::Create<Exchange::IGraphicsProperties>(Config::GetValue(_config.gpuMemoryFile)
, Config::GetValue(_config.gpuMemoryFreePattern)
, Config::GetValue(_config.gpuMemoryTotalPattern)
, Config::GetValue(_config.gpuMemoryUnitMultiplier));

_hdr = Core::Service<HDRProperties>::Create<Exchange::IHDRProperties>(Config::GetValue(_config.hdrLevelFilepath));
_hdr = Core::ServiceType<HDRProperties>::Create<Exchange::IHDRProperties>(Config::GetValue(_config.hdrLevelFilepath));
/* clang-format on */

return Core::ERROR_NONE;
Expand Down
6 changes: 3 additions & 3 deletions LocationSync/LocationSync.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ PUSH_WARNING(DISABLE_WARNING_THIS_IN_MEMBER_INITIALIZER_LIST)
, _source()
, _interval()
, _retries()
, _locator(Core::Service<LocationService>::Create<LocationService>(this))
, _locator(Core::ServiceType<LocationService>::Create<LocationService>(this))
{
ASSERT(parent != nullptr);
}
Expand Down Expand Up @@ -289,10 +289,10 @@ POP_WARNING()

uint16_t _skipURL;
string _source;
Core::Sink<Notification> _sink;
Core::SinkType<Notification> _sink;
PluginHost::IShell* _service;
bool _timezoneoverriden;
Core::Sink<LocationInfo> _locationinfo;
Core::SinkType<LocationInfo> _locationinfo;
mutable Core::CriticalSection _adminLock;
TimeZoneObservers _timezoneoberservers;
bool _activateOnFailure;
Expand Down
4 changes: 2 additions & 2 deletions MessageControl/MessageControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ namespace Plugin {
}

using Implementation = RPC::IteratorType<Exchange::IMessageControl::IControlIterator>;
controls = Core::Service<Implementation>::Create<Exchange::IMessageControl::IControlIterator>(list);
controls = Core::ServiceType<Implementation>::Create<Exchange::IMessageControl::IControlIterator>(list);

return (Core::ERROR_NONE);
}
Expand All @@ -448,7 +448,7 @@ namespace Plugin {
OutputList _outputDirector;
Publishers::WebSocketOutput _webSocketExporter;
MessageControl::ICollect::ICallback* _callback;
Core::Sink<Observer> _observer;
Core::SinkType<Observer> _observer;
PluginHost::IShell* _service;
const string _dispatcherIdentifier;
const string _dispatcherBasePath;
Expand Down
4 changes: 2 additions & 2 deletions Messenger/Messenger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace Plugin {

string roomId = GenerateRoomId(roomName, userName);

MsgNotification* sink = Core::Service<MsgNotification>::Create<MsgNotification>(this, roomId);
MsgNotification* sink = Core::ServiceType<MsgNotification>::Create<MsgNotification>(this, roomId);
ASSERT(sink != nullptr);

if (sink != nullptr) {
Expand Down Expand Up @@ -155,7 +155,7 @@ namespace Plugin {
Callback* cb = nullptr;

if (subscribe) {
cb = Core::Service<Callback>::Create<Callback>(this, roomId);
cb = Core::ServiceType<Callback>::Create<Callback>(this, roomId);
ASSERT(cb != nullptr);
}

Expand Down
2 changes: 1 addition & 1 deletion Messenger/Messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ POP_WARNING()
std::set<string> _rooms;
std::map<string, std::list<string>> _roomACL;
mutable Core::CriticalSection _adminLock;
Core::Sink<Notification> _notification;
Core::SinkType<Notification> _notification;
}; // class Messenger

} // namespace Plugin
Expand Down
4 changes: 2 additions & 2 deletions Messenger/RoomMaintainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace Plugin {

if (it == _roomMap.end()) {
// Room not found, so create one, already emplacing the first user.
newRoomUser = Core::Service<RoomImpl>::Create<RoomImpl>(this, roomId, userId, messageSink);
newRoomUser = Core::ServiceType<RoomImpl>::Create<RoomImpl>(this, roomId, userId, messageSink);
it = _roomMap.emplace(roomId, std::list<RoomImpl*>({newRoomUser})).first;

TRACE(Trace::Information, (_T("Room Maintainer: Room '%s' created"), roomId.c_str()));
Expand All @@ -58,7 +58,7 @@ namespace Plugin {
std::list<RoomImpl*>& users = (*it).second;

if (std::find_if(users.begin(), users.end(), [&userId](const RoomImpl* user) { return (user->UserId() == userId);}) == users.end()) {
newRoomUser = Core::Service<RoomImpl>::Create<RoomImpl>(this, roomId, userId, messageSink);
newRoomUser = Core::ServiceType<RoomImpl>::Create<RoomImpl>(this, roomId, userId, messageSink);

// Notify the room about a joining user.
// No point in sending the notification to the joining user as it cannot have its callback registered yet.
Expand Down
2 changes: 1 addition & 1 deletion Monitor/Monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ POP_WARNING()
private:
uint8_t _skipURL;
Config _config;
Core::Sink<MonitorObjects> _monitor;
Core::SinkType<MonitorObjects> _monitor;

private:
void RegisterAll();
Expand Down
12 changes: 6 additions & 6 deletions OpenCDMi/FrameworkRPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ POP_WARNING()
std::string _sessionId;
CDMi::IMediaKeySession* _mediaKeySession;
CDMi::IMediaKeySessionExt* _mediaKeySessionExt;
Core::Sink<Sink> _sink;
Core::SinkType<Sink> _sink;
DataExchange* _buffer;
CommonEncryptionData _cencData;
};
Expand Down Expand Up @@ -840,7 +840,7 @@ POP_WARNING()
if (sessionInterface != nullptr)
{
SessionImplementation *newEntry =
Core::Service<SessionImplementation>::Create<SessionImplementation>(this,
Core::ServiceType<SessionImplementation>::Create<SessionImplementation>(this,
keySystem, sessionInterface,
callback, &keyIds);

Expand Down Expand Up @@ -1338,7 +1338,7 @@ POP_WARNING()
_group = config.Group.Value();
}

_entryPoint = Core::Service<AccessorOCDM>::Create<Exchange::IAccessorOCDM>(this, config.SharePath.Value(), config.ShareSize.Value());
_entryPoint = Core::ServiceType<AccessorOCDM>::Create<Exchange::IAccessorOCDM>(this, config.SharePath.Value(), config.ShareSize.Value());
_engine = Core::ProxyType<RPC::InvokeServer>::Create(&Core::IWorkerPool::Instance());
_service = new ExternalAccess(Core::NodeId(config.Connector.Value().c_str()), _entryPoint, _shell->ProxyStubPath(), _engine);

Expand Down Expand Up @@ -1414,19 +1414,19 @@ POP_WARNING()
}
virtual RPC::IStringIterator* Systems() const
{
return (Core::Service<RPC::StringIterator>::Create<RPC::IStringIterator>(_keySystems));
return (Core::ServiceType<RPC::StringIterator>::Create<RPC::IStringIterator>(_keySystems));
}
virtual RPC::IStringIterator* Designators(const string& keySystem) const
{
std::list<string> designators;
LoadDesignators(keySystem, designators);
return (Core::Service<RPC::StringIterator>::Create<RPC::IStringIterator>(designators));
return (Core::ServiceType<RPC::StringIterator>::Create<RPC::IStringIterator>(designators));
}
virtual RPC::IStringIterator* Sessions(const string& keySystem) const
{
std::list<string> sessions;
LoadSessions(keySystem, sessions);
return (Core::Service<RPC::StringIterator>::Create<RPC::IStringIterator>(sessions));
return (Core::ServiceType<RPC::StringIterator>::Create<RPC::IStringIterator>(sessions));
}

public:
Expand Down
2 changes: 1 addition & 1 deletion OpenCDMi/OCDM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace OCDM {
Core::ProcessInfo _main;
};

Exchange::IMemory* result = Core::Service<MemoryObserverImpl>::Create<Exchange::IMemory>(connection);
Exchange::IMemory* result = Core::ServiceType<MemoryObserverImpl>::Create<Exchange::IMemory>(connection);

return (result);
}
Expand Down
2 changes: 1 addition & 1 deletion OpenCDMi/OCDM.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ POP_WARNING()
PluginHost::IShell* _service;
Exchange::IContentDecryption* _opencdmi;
Exchange::IMemory* _memory;
Core::Sink<Notification> _notification;
Core::SinkType<Notification> _notification;
};
} //namespace Plugin

Expand Down
2 changes: 1 addition & 1 deletion Packager/Packager.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace {
uint32_t _connectionId;
PluginHost::IShell* _service;
Exchange::IPackager* _implementation;
Core::Sink<Notification> _notification;
Core::SinkType<Notification> _notification;
};

} // namespace Plugin
Expand Down
4 changes: 2 additions & 2 deletions Packager/PackagerImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ namespace Plugin {

if (_opkgInitialized) {
if (name && version && arch) {
_inProgress.Package = Core::Service<PackageInfo>::Create<PackageInfo>(*name, *version, *arch);
_inProgress.Install = Core::Service<InstallInfo>::Create<InstallInfo>();
_inProgress.Package = Core::ServiceType<PackageInfo>::Create<PackageInfo>(*name, *version, *arch);
_inProgress.Install = Core::ServiceType<InstallInfo>::Create<InstallInfo>();
} else {
_isSyncing = true;
}
Expand Down
2 changes: 1 addition & 1 deletion PerformanceMetrics/PerformanceMetrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ POP_WARNING()
void PluginDeactivated(PluginHost::IShell& service);

private:
Core::Sink<Notification> _notification;
Core::SinkType<Notification> _notification;
std::unique_ptr<IPerfMetricsHandler> _handler;
};

Expand Down
4 changes: 2 additions & 2 deletions PlayerInfo/DeviceSettings/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ class PlayerInfoImplementation : public Exchange::IPlayerProperties, public Exch
public:
uint32_t AudioCodecs(Exchange::IPlayerProperties::IAudioCodecIterator*& iterator) const override
{
iterator = Core::Service<AudioIteratorImplementation>::Create<Exchange::IPlayerProperties::IAudioCodecIterator>(_audioCodecs);
iterator = Core::ServiceType<AudioIteratorImplementation>::Create<Exchange::IPlayerProperties::IAudioCodecIterator>(_audioCodecs);
return (iterator != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
uint32_t VideoCodecs(Exchange::IPlayerProperties::IVideoCodecIterator*& iterator) const override
{
iterator = Core::Service<VideoIteratorImplementation>::Create<Exchange::IPlayerProperties::IVideoCodecIterator>(_videoCodecs);
iterator = Core::ServiceType<VideoIteratorImplementation>::Create<Exchange::IPlayerProperties::IVideoCodecIterator>(_videoCodecs);
return (iterator != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}

Expand Down
4 changes: 2 additions & 2 deletions PlayerInfo/GStreamer/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ class PlayerInfoImplementation : public Exchange::IPlayerProperties {
public:
uint32_t AudioCodecs(Exchange::IPlayerProperties::IAudioCodecIterator*& codec) const override
{
codec = (Core::Service<AudioIteratorImplementation>::Create<Exchange::IPlayerProperties::IAudioCodecIterator>(_audioCodecs));
codec = (Core::ServiceType<AudioIteratorImplementation>::Create<Exchange::IPlayerProperties::IAudioCodecIterator>(_audioCodecs));
return (codec != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
uint32_t VideoCodecs(Exchange::IPlayerProperties::IVideoCodecIterator*& codec) const override
{
codec = (Core::Service<VideoIteratorImplementation>::Create<Exchange::IPlayerProperties::IVideoCodecIterator>(_videoCodecs));
codec = (Core::ServiceType<VideoIteratorImplementation>::Create<Exchange::IPlayerProperties::IVideoCodecIterator>(_videoCodecs));
return (codec != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
}
uint32_t Resolution(PlaybackResolution&) const override
Expand Down
4 changes: 2 additions & 2 deletions PlayerInfo/PlayerInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ namespace Plugin {
Exchange::IPlayerProperties::IAudioCodecIterator* _audioCodecs;
Exchange::IPlayerProperties::IVideoCodecIterator* _videoCodecs;
Exchange::Dolby::IOutput* _dolbyOut;
Core::Sink<DolbyNotification> _dolbyNotification;
Core::Sink<Notification> _notification;
Core::SinkType<DolbyNotification> _dolbyNotification;
Core::SinkType<Notification> _notification;
PluginHost::IShell* _service;
};

Expand Down
4 changes: 2 additions & 2 deletions RustBridge/RustBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ namespace WPEFramework {
uint32_t _timeOut;
uint32_t _connectionId;
Exchange::IRustBridge* _module;
Core::Sink<Notification> _notification;
Core::Sink< BridgeCallback> _callback;
Core::SinkType<Notification> _notification;
Core::SinkType< BridgeCallback> _callback;
Core::WorkerPool::JobType<RustBridge&> _cleaner;
};

Expand Down
Loading

0 comments on commit 76c12d9

Please sign in to comment.