[vlc-commits] activex: Rename versionInfo method
Hugo Beauzée-Luyssen
git at videolan.org
Tue Apr 21 10:16:20 CEST 2015
npapi-vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Apr 15 12:46:52 2015 +0200| [24bfac7da2017165e4c1af91493dcae6bab68ccc] | committer: Hugo Beauzée-Luyssen
activex: Rename versionInfo method
This make the build fail with MSVC, since it is case insensitive, and therefore conflicts with the versionInfo method
refs #14239 #14271
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=24bfac7da2017165e4c1af91493dcae6bab68ccc
---
activex/axvlc.idl | 7 ++++---
activex/vlccontrol2.cpp | 16 +++-------------
activex/vlccontrol2.h | 4 ++--
3 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/activex/axvlc.idl b/activex/axvlc.idl
index 3d557cd..5df6538 100644
--- a/activex/axvlc.idl
+++ b/activex/axvlc.idl
@@ -81,6 +81,7 @@ library AXVLC
const int DISPID_BaseURL = 110;
const int DISPID_Toolbar = 111;
const int DISPID_FSEnabled = 112;
+ const int DISPID_Version = 113;
[
odl,
@@ -663,11 +664,11 @@ library AXVLC
[id(DISPID_MRL), propput, helpstring("Returns/sets the default MRL in playlist")]
HRESULT MRL([in] BSTR mrl);
- [propget, helpstring("Returns VLC Version.")]
+ [propget, helpstring("Returns the VLC version")]
HRESULT VersionInfo([out, retval] BSTR* version);
- [helpstring("Returns VLC Version.")]
- HRESULT versionInfo([out, retval] BSTR* version);
+ [helpstring("Returns the VLC version")]
+ HRESULT getVersionInfo([out, retval] BSTR* version);
[id(DISPID_Visible), propget, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
HRESULT Visible([out, retval] VARIANT_BOOL* visible);
diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
index a995a36..720c91d 100644
--- a/activex/vlccontrol2.cpp
+++ b/activex/vlccontrol2.cpp
@@ -1204,22 +1204,12 @@ STDMETHODIMP VLCControl2::get_VersionInfo(BSTR *version)
return E_FAIL;
};
-STDMETHODIMP VLCControl2::versionInfo(BSTR *version)
+STDMETHODIMP VLCControl2::getVersionInfo(BSTR *version)
{
- if( NULL == version )
- return E_POINTER;
-
- const char *versionStr = libvlc_get_version();
- if( NULL != versionStr )
- {
- *version = BSTRFromCStr(CP_UTF8, versionStr);
-
- return (NULL == *version) ? E_OUTOFMEMORY : NOERROR;
- }
- *version = NULL;
- return E_FAIL;
+ return get_VersionInfo(version);
};
+
STDMETHODIMP VLCControl2::get_Visible(VARIANT_BOOL *isVisible)
{
if( NULL == isVisible )
diff --git a/activex/vlccontrol2.h b/activex/vlccontrol2.h
index 139ca8b..ddf3328 100644
--- a/activex/vlccontrol2.h
+++ b/activex/vlccontrol2.h
@@ -364,7 +364,7 @@ public:
virtual ~VLCControl2();
// IUnknown methods
- STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
+ STDMETHODIMP QueryInterface(REFIID riid, void **ppv) override
{
if( NULL == ppv )
return E_POINTER;
@@ -402,7 +402,7 @@ public:
STDMETHODIMP get_StartTime(long *seconds);
STDMETHODIMP put_StartTime(long seconds);
STDMETHODIMP get_VersionInfo(BSTR *version);
- STDMETHODIMP versionInfo(BSTR *version);
+ STDMETHODIMP getVersionInfo(BSTR *version);
STDMETHODIMP get_Visible(VARIANT_BOOL *visible);
STDMETHODIMP put_Visible(VARIANT_BOOL visible);
STDMETHODIMP get_Volume(long *volume);
More information about the vlc-commits
mailing list