@@ -22,12 +22,26 @@ struct ExtensionVersion {
2222 ExtensionVersion (int majorV, int minorV = 0 , int microV = 0 )
2323 : major_v(majorV), minor_v(minorV), micro_v(microV) {}
2424
25+ bool operator ==(const ExtensionVersion& other) const {
26+ return major_v == other.major_v && minor_v == other.minor_v && micro_v == other.micro_v ;
27+ }
28+
29+ bool operator >(const ExtensionVersion& other) const {
30+ return major_v > other.major_v || (major_v == other.major_v && minor_v > other.minor_v )
31+ || (major_v == other.major_v && minor_v == other.minor_v && micro_v > other.micro_v );
32+ }
33+
2534 bool operator <(const ExtensionVersion& other) const {
26- return major_v < other.major_v || minor_v < other.minor_v || micro_v < other.micro_v ;
35+ return major_v < other.major_v || (major_v == other.major_v && minor_v < other.minor_v )
36+ || (major_v == other.major_v && minor_v == other.minor_v && micro_v < other.micro_v );
2737 }
2838
29- bool operator ==(const ExtensionVersion& other) const {
30- return major_v == other.major_v && minor_v == other.minor_v && micro_v == other.micro_v ;
39+ bool operator <=(const ExtensionVersion& other) const {
40+ return !operator >(other);
41+ }
42+
43+ bool operator >=(const ExtensionVersion& other) const {
44+ return !operator <(other);
3145 }
3246};
3347
@@ -42,36 +56,45 @@ struct ExtensionVersion {
4256
4357class IExtensionProvider ;
4458class IExtensionProviderV2 ;
59+ class IExtensionProviderV3 ;
4560class IAudioFilter ;
4661class IExtensionVideoFilter ;
62+ class IScreenCaptureSource ;
4763
4864template <class T >
4965struct ExtensionInterfaceVersion ;
5066
5167template <>
5268struct ExtensionInterfaceVersion <IExtensionProvider> {
53- static ExtensionVersion version () {
69+ static ExtensionVersion Version () {
5470 return ExtensionVersion (1 , 0 , 0 );
5571 }
5672};
5773
5874template <>
5975struct ExtensionInterfaceVersion <IExtensionProviderV2> {
60- static ExtensionVersion version () {
61- return BUMP_MAJOR_VERSION (ExtensionInterfaceVersion<IExtensionProvider>::version ());
76+ static ExtensionVersion Version () {
77+ return BUMP_MAJOR_VERSION (ExtensionInterfaceVersion<IExtensionProvider>::Version ());
6278 }
6379};
6480
6581template <>
6682struct ExtensionInterfaceVersion <IAudioFilter> {
67- static ExtensionVersion version () {
83+ static ExtensionVersion Version () {
6884 return ExtensionVersion (1 , 0 , 0 );
6985 }
7086};
7187
7288template <>
7389struct ExtensionInterfaceVersion <IExtensionVideoFilter> {
74- static ExtensionVersion version () {
90+ static ExtensionVersion Version () {
91+ return ExtensionVersion (1 , 0 , 0 );
92+ }
93+ };
94+
95+ template <>
96+ struct ExtensionInterfaceVersion <IScreenCaptureSource> {
97+ static ExtensionVersion Version () {
7598 return ExtensionVersion (1 , 0 , 0 );
7699 }
77100};
0 commit comments