Skip to content

Commit b687aae

Browse files
committed
Use the new templated IteratorType
1 parent 9aeaf10 commit b687aae

7 files changed

Lines changed: 23 additions & 22 deletions

File tree

DeviceInfo/DeviceInfoImplementation.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ namespace Plugin {
77
using AudioCapabilitiesJsonArray = Core::JSON::ArrayType<Core::JSON::EnumType<Exchange::IDeviceAudioCapabilities::AudioCapability>>;
88
using MS12CapabilitiesJsonArray = Core::JSON::ArrayType<Core::JSON::EnumType<Exchange::IDeviceAudioCapabilities::MS12Capability>>;
99
using MS12ProfilesJsonArray = Core::JSON::ArrayType<Core::JSON::EnumType<Exchange::IDeviceAudioCapabilities::MS12Profile>>;
10-
using AudioCapabilityIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IAudioCapabilityIterator>;
11-
using MS12CapabilityIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IMS12CapabilityIterator>;
12-
using MS12ProfileIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IMS12ProfileIterator>;
10+
using AudioCapabilityIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IAudioCapabilityIterator, std::vector<Exchange::IDeviceAudioCapabilities::AudioCapability>>;
11+
using MS12CapabilityIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IMS12CapabilityIterator, std::vector<Exchange::IDeviceAudioCapabilities::MS12Capability>>;
12+
using MS12ProfileIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IMS12ProfileIterator, std::vector<Exchange::IDeviceAudioCapabilities::MS12Profile>>;
1313

1414
using ResolutionJsonArray = Core::JSON::ArrayType<Core::JSON::EnumType<Exchange::IDeviceVideoCapabilities::ScreenResolution>>;
15-
using ResolutionIteratorImplementation = RPC::IteratorType<Exchange::IDeviceVideoCapabilities::IScreenResolutionIterator>;
15+
using ResolutionIteratorImplementation = RPC::IteratorType<Exchange::IDeviceVideoCapabilities::IScreenResolutionIterator, std::vector<Exchange::IDeviceVideoCapabilities::ScreenResolution>>;
1616

1717
uint32_t DeviceInfoImplementation::Configure(const PluginHost::IShell* service)
1818
{
@@ -81,7 +81,7 @@ namespace Plugin {
8181
return pair.first;
8282
});
8383

84-
audioOutputs = Core::ServiceType<AudioOutputIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IAudioOutputIterator>(audioOutputList);
84+
audioOutputs = Core::ServiceType<AudioOutputIteratorImplementation>::Create<Exchange::IDeviceAudioCapabilities::IAudioOutputIterator>(std::move(audioOutputList));
8585
return (audioOutputs != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
8686
}
8787

@@ -122,7 +122,7 @@ namespace Plugin {
122122
return pair.first;
123123
});
124124

125-
videoOutputs = Core::ServiceType<VideoOutputIteratorImplementation>::Create<Exchange::IDeviceVideoCapabilities::IVideoOutputIterator>(videoOutputList);
125+
videoOutputs = Core::ServiceType<VideoOutputIteratorImplementation>::Create<Exchange::IDeviceVideoCapabilities::IVideoOutputIterator>(std::move(videoOutputList));
126126

127127
return (videoOutputs != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
128128
}

DeviceInfo/DeviceInfoImplementation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ namespace Plugin {
152152
};
153153
using AudioOutputMap = std::map<Exchange::IDeviceAudioCapabilities::AudioOutput, AudioOutputCapability>;
154154
using AudioOutputList = std::vector<Exchange::IDeviceAudioCapabilities::AudioOutput>;
155-
using AudioOutputIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IAudioOutputIterator>;
155+
using AudioOutputIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IAudioOutputIterator, std::vector<Exchange::IDeviceAudioCapabilities::AudioOutput>>;
156156

157157
struct VideoOutputCapability {
158158
std::list<IDeviceVideoCapabilities::ScreenResolution> Resolutions;
@@ -161,7 +161,7 @@ namespace Plugin {
161161
};
162162
using VideoOutputMap = std::map<Exchange::IDeviceVideoCapabilities::VideoOutput, VideoOutputCapability>;
163163
using VideoOutputList = std::vector<Exchange::IDeviceVideoCapabilities::VideoOutput>;
164-
using VideoOutputIteratorImplementation = RPC::IteratorType<Exchange::IDeviceVideoCapabilities::IVideoOutputIterator>;
164+
using VideoOutputIteratorImplementation = RPC::IteratorType<Exchange::IDeviceVideoCapabilities::IVideoOutputIterator, std::vector<Exchange::IDeviceVideoCapabilities::VideoOutput>>;
165165

166166
public:
167167
DeviceInfoImplementation(const DeviceInfoImplementation&) = delete;

DisplayInfo/DeviceSettings/PlatformImplementation.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class DisplayInfoImplementation :
5151
public Exchange::IHDRProperties,
5252
public Exchange::IDisplayProperties {
5353
private:
54-
using HdrteratorImplementation = RPC::IteratorType<Exchange::IHDRProperties::IHDRIterator>;
55-
using ColorimetryIteratorImplementation = RPC::IteratorType<Exchange::IDisplayProperties::IColorimetryIterator>;
54+
using HdrteratorImplementation = RPC::IteratorType<Exchange::IHDRProperties::IHDRIterator, std::vector<Exchange::IHDRProperties::HDRType>>;
55+
using ColorimetryIteratorImplementation = RPC::IteratorType<Exchange::IDisplayProperties::IColorimetryIterator, std::vector<Exchange::IDisplayProperties::ColorimetryType>>;
5656
public:
5757
DisplayInfoImplementation()
5858
{
@@ -622,7 +622,7 @@ class DisplayInfoImplementation :
622622
TRACE(Trace::Error, (_T("HDMI not connected!")));
623623
ret = Core::ERROR_GENERAL;
624624
}
625-
colorimetry = Core::ServiceType<ColorimetryIteratorImplementation>::Create<Exchange::IDisplayProperties::IColorimetryIterator>(colorimetryCaps);
625+
colorimetry = Core::ServiceType<ColorimetryIteratorImplementation>::Create<Exchange::IDisplayProperties::IColorimetryIterator>(std::move(colorimetryCaps));
626626
return (colorimetry != nullptr && ret == Core::ERROR_NONE ? Core::ERROR_NONE : Core::ERROR_GENERAL);
627627
}
628628

@@ -694,7 +694,7 @@ class DisplayInfoImplementation :
694694
if (capabilities & dsHDRSTANDARD_Invalid)hdrCapabilities.push_back(HDR_OFF);
695695

696696

697-
type = Core::ServiceType<HdrteratorImplementation>::Create<Exchange::IHDRProperties::IHDRIterator>(hdrCapabilities);
697+
type = Core::ServiceType<HdrteratorImplementation>::Create<Exchange::IHDRProperties::IHDRIterator>(std::move(hdrCapabilities));
698698
return (type != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
699699
}
700700
// @property
@@ -722,7 +722,7 @@ class DisplayInfoImplementation :
722722
if (capabilities & dsHDRSTANDARD_TechnicolorPrime) hdrCapabilities.push_back(HDR_TECHNICOLOR);
723723
if (capabilities & dsHDRSTANDARD_Invalid)hdrCapabilities.push_back(HDR_OFF);
724724

725-
type = Core::ServiceType<HdrteratorImplementation>::Create<Exchange::IHDRProperties::IHDRIterator>(hdrCapabilities);
725+
type = Core::ServiceType<HdrteratorImplementation>::Create<Exchange::IHDRProperties::IHDRIterator>(std::move(hdrCapabilities));
726726
return (type != nullptr ? Core::ERROR_NONE : Core::ERROR_GENERAL);
727727
}
728728
// @property

MessageControl/MessageControl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ namespace Plugin {
424424

425425
_client.Modules(list);
426426

427-
using Implementation = RPC::IteratorType<RPC::IStringIterator>;
428-
modules = Core::ServiceType<Implementation>::Create<RPC::IStringIterator>(list);
427+
using Implementation = RPC::IteratorType<RPC::IStringIterator, std::vector<string>>;
428+
modules = Core::ServiceType<Implementation>::Create<RPC::IStringIterator>(std::move(list));
429429

430430
return (Core::ERROR_NONE);
431431
}
@@ -440,8 +440,8 @@ namespace Plugin {
440440
list.push_back( { static_cast<messagetype>(index.Type()), index.Category(), index.Module(), index.Enabled() } );
441441
}
442442

443-
using Implementation = RPC::IteratorType<Exchange::IMessageControl::IControlIterator>;
444-
controls = Core::ServiceType<Implementation>::Create<Exchange::IMessageControl::IControlIterator>(list);
443+
using Implementation = RPC::IteratorType<Exchange::IMessageControl::IControlIterator, std::vector<Exchange::IMessageControl::Control>>;
444+
controls = Core::ServiceType<Implementation>::Create<Exchange::IMessageControl::IControlIterator>(std::move(list));
445445

446446
return (Core::ERROR_NONE);
447447
}

PlayerInfo/DeviceSettings/PlatformImplementation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ class PlayerInfoImplementation : public Exchange::IPlayerProperties, public Exch
108108
};
109109

110110
private:
111-
using AudioIteratorImplementation = RPC::IteratorType<Exchange::IPlayerProperties::IAudioCodecIterator>;
112-
using VideoIteratorImplementation = RPC::IteratorType<Exchange::IPlayerProperties::IVideoCodecIterator>;
111+
using AudioIteratorImplementation = RPC::IteratorType<Exchange::IPlayerProperties::IAudioCodecIterator, std::vector<Exchange::IPlayerProperties::AudioCodec>>;
112+
using VideoIteratorImplementation = RPC::IteratorType<Exchange::IPlayerProperties::IVideoCodecIterator, std::vector<Exchange::IPlayerProperties::VideoCodec>>;
113113

114114
typedef std::map<const string, const Exchange::IPlayerProperties::AudioCodec> AudioCaps;
115115
typedef std::map<const string, const Exchange::IPlayerProperties::VideoCodec> VideoCaps;

PlayerInfo/GStreamer/PlatformImplementation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ class PlayerInfoImplementation : public Exchange::IPlayerProperties {
9595
};
9696

9797
private:
98-
using AudioIteratorImplementation = RPC::IteratorType<Exchange::IPlayerProperties::IAudioCodecIterator>;
99-
using VideoIteratorImplementation = RPC::IteratorType<Exchange::IPlayerProperties::IVideoCodecIterator>;
98+
using AudioIteratorImplementation = RPC::IteratorType<Exchange::IPlayerProperties::IAudioCodecIterator, std::vector<Exchange::IPlayerProperties::AudioCodec>>;
99+
using VideoIteratorImplementation = RPC::IteratorType<Exchange::IPlayerProperties::IVideoCodecIterator, std::vector<Exchange::IPlayerProperties::VideoCodec>>;
100100

101101
typedef std::map<const string, const Exchange::IPlayerProperties::AudioCodec> AudioCaps;
102102
typedef std::map<const string, const Exchange::IPlayerProperties::VideoCodec> VideoCaps;

WebKitBrowser/WebKitBrowser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ namespace Plugin {
339339
list.push_back(iterator.Current().Value());
340340
}
341341

342-
languages = Core::ServiceType<RPC::IteratorType<RPC::IStringIterator>>::Create<RPC::IStringIterator>(list);
342+
using LangIterImpl = RPC::IteratorType<RPC::IStringIterator, std::vector<string>>;
343+
languages = Core::ServiceType<LangIterImpl>::Create<RPC::IStringIterator>(std::move(list));
343344

344345
return (Core::ERROR_NONE);
345346
}

0 commit comments

Comments
 (0)