Commit 23fa2660 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

ActiveX: implement versionInfo() to match NPAPI

parent 48fefca5
......@@ -657,6 +657,9 @@ library AXVLC
[propget, helpstring("Returns VLC Version.")]
HRESULT VersionInfo([out, retval] BSTR* version);
[helpstring("Returns VLC Version.")]
HRESULT versionInfo([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);
[id(DISPID_Visible), propput, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
......
......@@ -3634,6 +3634,9 @@ IVLCControl2 : public IDispatch
virtual HRESULT STDMETHODCALLTYPE get_VersionInfo(
BSTR *version) = 0;
virtual HRESULT STDMETHODCALLTYPE versionInfo(
BSTR *version) = 0;
virtual HRESULT STDMETHODCALLTYPE get_Visible(
VARIANT_BOOL *visible) = 0;
......@@ -3777,6 +3780,10 @@ typedef struct IVLCControl2Vtbl {
IVLCControl2* This,
BSTR *version);
HRESULT (STDMETHODCALLTYPE *versionInfo)(
IVLCControl2* This,
BSTR *version);
HRESULT (STDMETHODCALLTYPE *get_Visible)(
IVLCControl2* This,
VARIANT_BOOL *visible);
......@@ -3869,6 +3876,7 @@ interface IVLCControl2 {
#define IVLCControl2_get_MRL(This,mrl) (This)->lpVtbl->get_MRL(This,mrl)
#define IVLCControl2_put_MRL(This,mrl) (This)->lpVtbl->put_MRL(This,mrl)
#define IVLCControl2_get_VersionInfo(This,version) (This)->lpVtbl->get_VersionInfo(This,version)
#define IVLCControl2_versionInfo(This,version) (This)->lpVtbl->versionInfo(This,version)
#define IVLCControl2_get_Visible(This,visible) (This)->lpVtbl->get_Visible(This,visible)
#define IVLCControl2_put_Visible(This,visible) (This)->lpVtbl->put_Visible(This,visible)
#define IVLCControl2_get_Volume(This,volume) (This)->lpVtbl->get_Volume(This,volume)
......@@ -3977,6 +3985,14 @@ void __RPC_STUB IVLCControl2_get_VersionInfo_Stub(
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCControl2_versionInfo_Proxy(
IVLCControl2* This,
BSTR *version);
void __RPC_STUB IVLCControl2_versionInfo_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCControl2_get_Visible_Proxy(
IVLCControl2* This,
VARIANT_BOOL *visible);
......
......@@ -1433,6 +1433,22 @@ STDMETHODIMP VLCControl2::get_VersionInfo(BSTR *version)
return E_FAIL;
};
STDMETHODIMP VLCControl2::versionInfo(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;
};
STDMETHODIMP VLCControl2::get_Visible(VARIANT_BOOL *isVisible)
{
if( NULL == isVisible )
......
......@@ -411,6 +411,7 @@ public:
STDMETHODIMP get_StartTime(long *seconds);
STDMETHODIMP put_StartTime(long seconds);
STDMETHODIMP get_VersionInfo(BSTR *version);
STDMETHODIMP versionInfo(BSTR *version);
STDMETHODIMP get_Visible(VARIANT_BOOL *visible);
STDMETHODIMP put_Visible(VARIANT_BOOL visible);
STDMETHODIMP get_Volume(long *volume);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment