Commit 456ee26d authored by Jean-Paul Saman's avatar Jean-Paul Saman

activex: remove IVLCLog, IVLCMessagesIterator, IVLCMessage interface.

parent 450c4ed2
...@@ -40,11 +40,8 @@ library AXVLC ...@@ -40,11 +40,8 @@ library AXVLC
interface IVLCControl; interface IVLCControl;
interface IVLCAudio; interface IVLCAudio;
interface IVLCInput; interface IVLCInput;
interface IVLCLog; interface IVLCLogo;
interface IVLCMarquee; interface IVLCMarquee;
interface IVLCMessage;
interface IVLCMessageIterator;
interface IVLCMessages;
interface IVLCPlaylist; interface IVLCPlaylist;
interface IVLCSubtitle; interface IVLCSubtitle;
interface IVLCVideo; interface IVLCVideo;
...@@ -261,90 +258,6 @@ library AXVLC ...@@ -261,90 +258,6 @@ library AXVLC
HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout); HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);
}; };
[
odl,
uuid(9ED00AFA-7BCD-4FFF-8D48-7DD4DB2C800D),
helpstring("VLC Log Message"),
dual,
oleautomation
]
interface IVLCMessage: IDispatch
{
[id(DISPID_VALUE), propget]
HRESULT _Value([out, retval] VARIANT* message);
[propget, helpstring("Returns message severity.")]
HRESULT severity([out, retval] long* level);
[propget, helpstring("Returns message issuer type.")]
HRESULT type([out, retval] BSTR* type);
[propget, helpstring("Returns message issuer name.")]
HRESULT name([out, retval] BSTR* name);
[propget, helpstring("Returns message header.")]
HRESULT header([out, retval] BSTR* header);
[propget, helpstring("Returns message content.")]
HRESULT message([out, retval] BSTR* message);
};
[
odl,
uuid(15179CD8-CC12-4242-A58E-E412217FF343),
helpstring("VLC Log iterator"),
dual,
oleautomation
]
interface IVLCMessageIterator : IDispatch
{
[propget, helpstring("Returns whether a message is available.")]
HRESULT hasNext([out, retval] VARIANT_BOOL* hasNext);
[helpstring("Returns next message.")]
HRESULT next([out, retval] IVLCMessage** msg);
};
[
odl,
uuid(6C5CE55D-2D6C-4AAD-8299-C62D2371F106),
helpstring("VLC Log Messages Collection."),
dual,
oleautomation
]
interface IVLCMessages : IDispatch
{
[id(DISPID_NEWENUM), propget]
HRESULT _NewEnum([out, retval] IUnknown** _NewEnum);
[helpstring("Clear all messages from log.")]
HRESULT clear();
[propget, helpstring("Returns the number of messages.")]
HRESULT count([out, retval] long* count);
[helpstring("Returns an iterator for messages in log")]
HRESULT iterator([out, retval] IVLCMessageIterator** iter);
};
[
odl,
uuid(8E3BC3D9-62E9-48FB-8A6D-993F9ABC4A0A),
helpstring("VLC Log APIs"),
dual,
oleautomation
]
interface IVLCLog : IDispatch
{
[propget, helpstring("Returns messages in log")]
HRESULT messages([out, retval] IVLCMessages** iter);
[propget, helpstring("Returns/Sets the log versbosity level.")]
HRESULT verbosity([out, retval] long* level);
[propput, helpstring("Returns/Sets the log versbosity level.")]
HRESULT verbosity([in] long level);
};
[ [
odl, odl,
uuid(FD37FE32-82BC-4A25-B056-315F4DBB194D), uuid(FD37FE32-82BC-4A25-B056-315F4DBB194D),
...@@ -661,9 +574,6 @@ library AXVLC ...@@ -661,9 +574,6 @@ library AXVLC
[propget, helpstring("Returns the audio object.")] [propget, helpstring("Returns the audio object.")]
HRESULT input([out, retval] IVLCInput** obj); HRESULT input([out, retval] IVLCInput** obj);
[propget, helpstring("Returns the log object.")]
HRESULT log([out, retval] IVLCLog** obj);
[propget, helpstring("Returns the playlist object.")] [propget, helpstring("Returns the playlist object.")]
HRESULT playlist([out, retval] IVLCPlaylist** obj); HRESULT playlist([out, retval] IVLCPlaylist** obj);
......
/*** Autogenerated by WIDL 1.1.23 from axvlc.idl - Do not edit ***/ /*** Autogenerated by WIDL 1.1.32 from axvlc.idl - Do not edit ***/
#include <rpc.h> #include <rpc.h>
#include <rpcndr.h> #include <rpcndr.h>
...@@ -14,10 +14,6 @@ DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x ...@@ -14,10 +14,6 @@ DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x
DEFINE_GUID(DIID_DVLCEvents, 0xdf48072f, 0x5ef8, 0x434e, 0x9b,0x40, 0xe2,0xf3,0xae,0x75,0x9b,0x5f); DEFINE_GUID(DIID_DVLCEvents, 0xdf48072f, 0x5ef8, 0x434e, 0x9b,0x40, 0xe2,0xf3,0xae,0x75,0x9b,0x5f);
DEFINE_GUID(IID_IVLCAudio, 0x9e0bd17b, 0x2d3c, 0x4656, 0xb9,0x4d, 0x03,0x08,0x4f,0x3f,0xd9,0xd4); DEFINE_GUID(IID_IVLCAudio, 0x9e0bd17b, 0x2d3c, 0x4656, 0xb9,0x4d, 0x03,0x08,0x4f,0x3f,0xd9,0xd4);
DEFINE_GUID(IID_IVLCInput, 0x49e0dbd1, 0x9440, 0x466c, 0x9c,0x97, 0x95,0xc6,0x71,0x90,0xc6,0x03); DEFINE_GUID(IID_IVLCInput, 0x49e0dbd1, 0x9440, 0x466c, 0x9c,0x97, 0x95,0xc6,0x71,0x90,0xc6,0x03);
DEFINE_GUID(IID_IVLCMessage, 0x9ed00afa, 0x7bcd, 0x4fff, 0x8d,0x48, 0x7d,0xd4,0xdb,0x2c,0x80,0x0d);
DEFINE_GUID(IID_IVLCMessageIterator, 0x15179cd8, 0xcc12, 0x4242, 0xa5,0x8e, 0xe4,0x12,0x21,0x7f,0xf3,0x43);
DEFINE_GUID(IID_IVLCMessages, 0x6c5ce55d, 0x2d6c, 0x4aad, 0x82,0x99, 0xc6,0x2d,0x23,0x71,0xf1,0x06);
DEFINE_GUID(IID_IVLCLog, 0x8e3bc3d9, 0x62e9, 0x48fb, 0x8a,0x6d, 0x99,0x3f,0x9a,0xbc,0x4a,0x0a);
DEFINE_GUID(IID_IVLCPlaylistItems, 0xfd37fe32, 0x82bc, 0x4a25, 0xb0,0x56, 0x31,0x5f,0x4d,0xbb,0x19,0x4d); DEFINE_GUID(IID_IVLCPlaylistItems, 0xfd37fe32, 0x82bc, 0x4a25, 0xb0,0x56, 0x31,0x5f,0x4d,0xbb,0x19,0x4d);
DEFINE_GUID(IID_IVLCPlaylist, 0x54613049, 0x40bf, 0x4035, 0x9e,0x70, 0x0a,0x93,0x12,0xc0,0x18,0x8d); DEFINE_GUID(IID_IVLCPlaylist, 0x54613049, 0x40bf, 0x4035, 0x9e,0x70, 0x0a,0x93,0x12,0xc0,0x18,0x8d);
DEFINE_GUID(IID_IVLCSubtitle, 0x465e787a, 0x0556, 0x452f, 0x94,0x77, 0x95,0x4e,0x4a,0x94,0x00,0x03); DEFINE_GUID(IID_IVLCSubtitle, 0x465e787a, 0x0556, 0x452f, 0x94,0x77, 0x95,0x4e,0x4a,0x94,0x00,0x03);
......
/*** Autogenerated by WIDL 1.1.23 from axvlc.idl - Do not edit ***/ /*** Autogenerated by WIDL 1.1.32 from axvlc.idl - Do not edit ***/
#include <rpc.h> #include <rpc.h>
#include <rpcndr.h> #include <rpcndr.h>
...@@ -36,26 +36,6 @@ typedef interface IVLCAudio IVLCAudio; ...@@ -36,26 +36,6 @@ typedef interface IVLCAudio IVLCAudio;
typedef interface IVLCInput IVLCInput; typedef interface IVLCInput IVLCInput;
#endif #endif
#ifndef __IVLCMessage_FWD_DEFINED__
#define __IVLCMessage_FWD_DEFINED__
typedef interface IVLCMessage IVLCMessage;
#endif
#ifndef __IVLCMessageIterator_FWD_DEFINED__
#define __IVLCMessageIterator_FWD_DEFINED__
typedef interface IVLCMessageIterator IVLCMessageIterator;
#endif
#ifndef __IVLCMessages_FWD_DEFINED__
#define __IVLCMessages_FWD_DEFINED__
typedef interface IVLCMessages IVLCMessages;
#endif
#ifndef __IVLCLog_FWD_DEFINED__
#define __IVLCLog_FWD_DEFINED__
typedef interface IVLCLog IVLCLog;
#endif
#ifndef __IVLCPlaylistItems_FWD_DEFINED__ #ifndef __IVLCPlaylistItems_FWD_DEFINED__
#define __IVLCPlaylistItems_FWD_DEFINED__ #define __IVLCPlaylistItems_FWD_DEFINED__
typedef interface IVLCPlaylistItems IVLCPlaylistItems; typedef interface IVLCPlaylistItems IVLCPlaylistItems;
...@@ -120,9 +100,9 @@ typedef interface IVLCAudio IVLCAudio; ...@@ -120,9 +100,9 @@ typedef interface IVLCAudio IVLCAudio;
typedef interface IVLCInput IVLCInput; typedef interface IVLCInput IVLCInput;
#endif #endif
#ifndef __IVLCLog_FWD_DEFINED__ #ifndef __IVLCLogo_FWD_DEFINED__
#define __IVLCLog_FWD_DEFINED__ #define __IVLCLogo_FWD_DEFINED__
typedef interface IVLCLog IVLCLog; typedef interface IVLCLogo IVLCLogo;
#endif #endif
#ifndef __IVLCMarquee_FWD_DEFINED__ #ifndef __IVLCMarquee_FWD_DEFINED__
...@@ -130,21 +110,6 @@ typedef interface IVLCLog IVLCLog; ...@@ -130,21 +110,6 @@ typedef interface IVLCLog IVLCLog;
typedef interface IVLCMarquee IVLCMarquee; typedef interface IVLCMarquee IVLCMarquee;
#endif #endif
#ifndef __IVLCMessage_FWD_DEFINED__
#define __IVLCMessage_FWD_DEFINED__
typedef interface IVLCMessage IVLCMessage;
#endif
#ifndef __IVLCMessageIterator_FWD_DEFINED__
#define __IVLCMessageIterator_FWD_DEFINED__
typedef interface IVLCMessageIterator IVLCMessageIterator;
#endif
#ifndef __IVLCMessages_FWD_DEFINED__
#define __IVLCMessages_FWD_DEFINED__
typedef interface IVLCMessages IVLCMessages;
#endif
#ifndef __IVLCPlaylist_FWD_DEFINED__ #ifndef __IVLCPlaylist_FWD_DEFINED__
#define __IVLCPlaylist_FWD_DEFINED__ #define __IVLCPlaylist_FWD_DEFINED__
typedef interface IVLCPlaylist IVLCPlaylist; typedef interface IVLCPlaylist IVLCPlaylist;
...@@ -1398,572 +1363,6 @@ void __RPC_STUB IVLCInput_get_hasVout_Stub( ...@@ -1398,572 +1363,6 @@ void __RPC_STUB IVLCInput_get_hasVout_Stub(
#endif /* __IVLCInput_INTERFACE_DEFINED__ */ #endif /* __IVLCInput_INTERFACE_DEFINED__ */
/*****************************************************************************
* IVLCMessage interface
*/
#ifndef __IVLCMessage_INTERFACE_DEFINED__
#define __IVLCMessage_INTERFACE_DEFINED__
DEFINE_GUID(IID_IVLCMessage, 0x9ed00afa, 0x7bcd, 0x4fff, 0x8d,0x48, 0x7d,0xd4,0xdb,0x2c,0x80,0x0d);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IVLCMessage : public IDispatch
{
virtual HRESULT STDMETHODCALLTYPE get__Value(
VARIANT *message) = 0;
virtual HRESULT STDMETHODCALLTYPE get_severity(
LONG *level) = 0;
virtual HRESULT STDMETHODCALLTYPE get_type(
BSTR *type) = 0;
virtual HRESULT STDMETHODCALLTYPE get_name(
BSTR *name) = 0;
virtual HRESULT STDMETHODCALLTYPE get_header(
BSTR *header) = 0;
virtual HRESULT STDMETHODCALLTYPE get_message(
BSTR *message) = 0;
};
#else
typedef struct IVLCMessageVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IVLCMessage* This,
REFIID riid,
void **ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IVLCMessage* This);
ULONG (STDMETHODCALLTYPE *Release)(
IVLCMessage* This);
/*** IDispatch methods ***/
HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
IVLCMessage* This,
UINT *pctinfo);
HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
IVLCMessage* This,
UINT iTInfo,
LCID lcid,
ITypeInfo **ppTInfo);
HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
IVLCMessage* This,
REFIID riid,
LPOLESTR *rgszNames,
UINT cNames,
LCID lcid,
DISPID *rgDispId);
HRESULT (STDMETHODCALLTYPE *Invoke)(
IVLCMessage* This,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS *pDispParams,
VARIANT *pVarResult,
EXCEPINFO *pExcepInfo,
UINT *puArgErr);
/*** IVLCMessage methods ***/
HRESULT (STDMETHODCALLTYPE *get__Value)(
IVLCMessage* This,
VARIANT *message);
HRESULT (STDMETHODCALLTYPE *get_severity)(
IVLCMessage* This,
LONG *level);
HRESULT (STDMETHODCALLTYPE *get_type)(
IVLCMessage* This,
BSTR *type);
HRESULT (STDMETHODCALLTYPE *get_name)(
IVLCMessage* This,
BSTR *name);
HRESULT (STDMETHODCALLTYPE *get_header)(
IVLCMessage* This,
BSTR *header);
HRESULT (STDMETHODCALLTYPE *get_message)(
IVLCMessage* This,
BSTR *message);
END_INTERFACE
} IVLCMessageVtbl;
interface IVLCMessage {
CONST_VTBL IVLCMessageVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IVLCMessage_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IVLCMessage_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IVLCMessage_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define IVLCMessage_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IVLCMessage_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IVLCMessage_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IVLCMessage_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** IVLCMessage methods ***/
#define IVLCMessage_get__Value(This,message) (This)->lpVtbl->get__Value(This,message)
#define IVLCMessage_get_severity(This,level) (This)->lpVtbl->get_severity(This,level)
#define IVLCMessage_get_type(This,type) (This)->lpVtbl->get_type(This,type)
#define IVLCMessage_get_name(This,name) (This)->lpVtbl->get_name(This,name)
#define IVLCMessage_get_header(This,header) (This)->lpVtbl->get_header(This,header)
#define IVLCMessage_get_message(This,message) (This)->lpVtbl->get_message(This,message)
#endif
#endif
HRESULT STDMETHODCALLTYPE IVLCMessage_get__Value_Proxy(
IVLCMessage* This,
VARIANT *message);
void __RPC_STUB IVLCMessage_get__Value_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessage_get_severity_Proxy(
IVLCMessage* This,
LONG *level);
void __RPC_STUB IVLCMessage_get_severity_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessage_get_type_Proxy(
IVLCMessage* This,
BSTR *type);
void __RPC_STUB IVLCMessage_get_type_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessage_get_name_Proxy(
IVLCMessage* This,
BSTR *name);
void __RPC_STUB IVLCMessage_get_name_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessage_get_header_Proxy(
IVLCMessage* This,
BSTR *header);
void __RPC_STUB IVLCMessage_get_header_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessage_get_message_Proxy(
IVLCMessage* This,
BSTR *message);
void __RPC_STUB IVLCMessage_get_message_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IVLCMessage_INTERFACE_DEFINED__ */
/*****************************************************************************
* IVLCMessageIterator interface
*/
#ifndef __IVLCMessageIterator_INTERFACE_DEFINED__
#define __IVLCMessageIterator_INTERFACE_DEFINED__
DEFINE_GUID(IID_IVLCMessageIterator, 0x15179cd8, 0xcc12, 0x4242, 0xa5,0x8e, 0xe4,0x12,0x21,0x7f,0xf3,0x43);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IVLCMessageIterator : public IDispatch
{
virtual HRESULT STDMETHODCALLTYPE get_hasNext(
VARIANT_BOOL *hasNext) = 0;
virtual HRESULT STDMETHODCALLTYPE next(
IVLCMessage **msg) = 0;
};
#else
typedef struct IVLCMessageIteratorVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IVLCMessageIterator* This,
REFIID riid,
void **ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IVLCMessageIterator* This);
ULONG (STDMETHODCALLTYPE *Release)(
IVLCMessageIterator* This);
/*** IDispatch methods ***/
HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
IVLCMessageIterator* This,
UINT *pctinfo);
HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
IVLCMessageIterator* This,
UINT iTInfo,
LCID lcid,
ITypeInfo **ppTInfo);
HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
IVLCMessageIterator* This,
REFIID riid,
LPOLESTR *rgszNames,
UINT cNames,
LCID lcid,
DISPID *rgDispId);
HRESULT (STDMETHODCALLTYPE *Invoke)(
IVLCMessageIterator* This,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS *pDispParams,
VARIANT *pVarResult,
EXCEPINFO *pExcepInfo,
UINT *puArgErr);
/*** IVLCMessageIterator methods ***/
HRESULT (STDMETHODCALLTYPE *get_hasNext)(
IVLCMessageIterator* This,
VARIANT_BOOL *hasNext);
HRESULT (STDMETHODCALLTYPE *next)(
IVLCMessageIterator* This,
IVLCMessage **msg);
END_INTERFACE
} IVLCMessageIteratorVtbl;
interface IVLCMessageIterator {
CONST_VTBL IVLCMessageIteratorVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IVLCMessageIterator_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IVLCMessageIterator_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IVLCMessageIterator_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define IVLCMessageIterator_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IVLCMessageIterator_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IVLCMessageIterator_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IVLCMessageIterator_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** IVLCMessageIterator methods ***/
#define IVLCMessageIterator_get_hasNext(This,hasNext) (This)->lpVtbl->get_hasNext(This,hasNext)
#define IVLCMessageIterator_next(This,msg) (This)->lpVtbl->next(This,msg)
#endif
#endif
HRESULT STDMETHODCALLTYPE IVLCMessageIterator_get_hasNext_Proxy(
IVLCMessageIterator* This,
VARIANT_BOOL *hasNext);
void __RPC_STUB IVLCMessageIterator_get_hasNext_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessageIterator_next_Proxy(
IVLCMessageIterator* This,
IVLCMessage **msg);
void __RPC_STUB IVLCMessageIterator_next_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IVLCMessageIterator_INTERFACE_DEFINED__ */
/*****************************************************************************
* IVLCMessages interface
*/
#ifndef __IVLCMessages_INTERFACE_DEFINED__
#define __IVLCMessages_INTERFACE_DEFINED__
DEFINE_GUID(IID_IVLCMessages, 0x6c5ce55d, 0x2d6c, 0x4aad, 0x82,0x99, 0xc6,0x2d,0x23,0x71,0xf1,0x06);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IVLCMessages : public IDispatch
{
virtual HRESULT STDMETHODCALLTYPE get__NewEnum(
IUnknown **_NewEnum) = 0;
virtual HRESULT STDMETHODCALLTYPE clear(
) = 0;
virtual HRESULT STDMETHODCALLTYPE get_count(
LONG *count) = 0;
virtual HRESULT STDMETHODCALLTYPE iterator(
IVLCMessageIterator **iter) = 0;
};
#else
typedef struct IVLCMessagesVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IVLCMessages* This,
REFIID riid,
void **ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IVLCMessages* This);
ULONG (STDMETHODCALLTYPE *Release)(
IVLCMessages* This);
/*** IDispatch methods ***/
HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
IVLCMessages* This,
UINT *pctinfo);
HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
IVLCMessages* This,
UINT iTInfo,
LCID lcid,
ITypeInfo **ppTInfo);
HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
IVLCMessages* This,
REFIID riid,
LPOLESTR *rgszNames,
UINT cNames,
LCID lcid,
DISPID *rgDispId);
HRESULT (STDMETHODCALLTYPE *Invoke)(
IVLCMessages* This,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS *pDispParams,
VARIANT *pVarResult,
EXCEPINFO *pExcepInfo,
UINT *puArgErr);
/*** IVLCMessages methods ***/
HRESULT (STDMETHODCALLTYPE *get__NewEnum)(
IVLCMessages* This,
IUnknown **_NewEnum);
HRESULT (STDMETHODCALLTYPE *clear)(
IVLCMessages* This);
HRESULT (STDMETHODCALLTYPE *get_count)(
IVLCMessages* This,
LONG *count);
HRESULT (STDMETHODCALLTYPE *iterator)(
IVLCMessages* This,
IVLCMessageIterator **iter);
END_INTERFACE
} IVLCMessagesVtbl;
interface IVLCMessages {
CONST_VTBL IVLCMessagesVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IVLCMessages_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IVLCMessages_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IVLCMessages_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define IVLCMessages_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IVLCMessages_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IVLCMessages_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IVLCMessages_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** IVLCMessages methods ***/
#define IVLCMessages_get__NewEnum(This,_NewEnum) (This)->lpVtbl->get__NewEnum(This,_NewEnum)
#define IVLCMessages_clear(This) (This)->lpVtbl->clear(This)
#define IVLCMessages_get_count(This,count) (This)->lpVtbl->get_count(This,count)
#define IVLCMessages_iterator(This,iter) (This)->lpVtbl->iterator(This,iter)
#endif
#endif
HRESULT STDMETHODCALLTYPE IVLCMessages_get__NewEnum_Proxy(
IVLCMessages* This,
IUnknown **_NewEnum);
void __RPC_STUB IVLCMessages_get__NewEnum_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessages_clear_Proxy(
IVLCMessages* This);
void __RPC_STUB IVLCMessages_clear_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessages_get_count_Proxy(
IVLCMessages* This,
LONG *count);
void __RPC_STUB IVLCMessages_get_count_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCMessages_iterator_Proxy(
IVLCMessages* This,
IVLCMessageIterator **iter);
void __RPC_STUB IVLCMessages_iterator_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IVLCMessages_INTERFACE_DEFINED__ */
/*****************************************************************************
* IVLCLog interface
*/
#ifndef __IVLCLog_INTERFACE_DEFINED__
#define __IVLCLog_INTERFACE_DEFINED__
DEFINE_GUID(IID_IVLCLog, 0x8e3bc3d9, 0x62e9, 0x48fb, 0x8a,0x6d, 0x99,0x3f,0x9a,0xbc,0x4a,0x0a);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IVLCLog : public IDispatch
{
virtual HRESULT STDMETHODCALLTYPE get_messages(
IVLCMessages **iter) = 0;
virtual HRESULT STDMETHODCALLTYPE get_verbosity(
LONG *level) = 0;
virtual HRESULT STDMETHODCALLTYPE put_verbosity(
LONG level) = 0;
};
#else
typedef struct IVLCLogVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IVLCLog* This,
REFIID riid,
void **ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IVLCLog* This);
ULONG (STDMETHODCALLTYPE *Release)(
IVLCLog* This);
/*** IDispatch methods ***/
HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
IVLCLog* This,
UINT *pctinfo);
HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
IVLCLog* This,
UINT iTInfo,
LCID lcid,
ITypeInfo **ppTInfo);
HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
IVLCLog* This,
REFIID riid,
LPOLESTR *rgszNames,
UINT cNames,
LCID lcid,
DISPID *rgDispId);
HRESULT (STDMETHODCALLTYPE *Invoke)(
IVLCLog* This,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS *pDispParams,
VARIANT *pVarResult,
EXCEPINFO *pExcepInfo,
UINT *puArgErr);
/*** IVLCLog methods ***/
HRESULT (STDMETHODCALLTYPE *get_messages)(
IVLCLog* This,
IVLCMessages **iter);
HRESULT (STDMETHODCALLTYPE *get_verbosity)(
IVLCLog* This,
LONG *level);
HRESULT (STDMETHODCALLTYPE *put_verbosity)(
IVLCLog* This,
LONG level);
END_INTERFACE
} IVLCLogVtbl;
interface IVLCLog {
CONST_VTBL IVLCLogVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IVLCLog_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IVLCLog_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IVLCLog_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define IVLCLog_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IVLCLog_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IVLCLog_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IVLCLog_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** IVLCLog methods ***/
#define IVLCLog_get_messages(This,iter) (This)->lpVtbl->get_messages(This,iter)
#define IVLCLog_get_verbosity(This,level) (This)->lpVtbl->get_verbosity(This,level)
#define IVLCLog_put_verbosity(This,level) (This)->lpVtbl->put_verbosity(This,level)
#endif
#endif
HRESULT STDMETHODCALLTYPE IVLCLog_get_messages_Proxy(
IVLCLog* This,
IVLCMessages **iter);
void __RPC_STUB IVLCLog_get_messages_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCLog_get_verbosity_Proxy(
IVLCLog* This,
LONG *level);
void __RPC_STUB IVLCLog_get_verbosity_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCLog_put_verbosity_Proxy(
IVLCLog* This,
LONG level);
void __RPC_STUB IVLCLog_put_verbosity_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IVLCLog_INTERFACE_DEFINED__ */
/***************************************************************************** /*****************************************************************************
* IVLCPlaylistItems interface * IVLCPlaylistItems interface
*/ */
...@@ -3681,9 +3080,6 @@ interface IVLCControl2 : public IDispatch ...@@ -3681,9 +3080,6 @@ interface IVLCControl2 : public IDispatch
virtual HRESULT STDMETHODCALLTYPE get_input( virtual HRESULT STDMETHODCALLTYPE get_input(
IVLCInput **obj) = 0; IVLCInput **obj) = 0;
virtual HRESULT STDMETHODCALLTYPE get_log(
IVLCLog **obj) = 0;
virtual HRESULT STDMETHODCALLTYPE get_playlist( virtual HRESULT STDMETHODCALLTYPE get_playlist(
IVLCPlaylist **obj) = 0; IVLCPlaylist **obj) = 0;
...@@ -3825,10 +3221,6 @@ typedef struct IVLCControl2Vtbl { ...@@ -3825,10 +3221,6 @@ typedef struct IVLCControl2Vtbl {
IVLCControl2* This, IVLCControl2* This,
IVLCInput **obj); IVLCInput **obj);
HRESULT (STDMETHODCALLTYPE *get_log)(
IVLCControl2* This,
IVLCLog **obj);
HRESULT (STDMETHODCALLTYPE *get_playlist)( HRESULT (STDMETHODCALLTYPE *get_playlist)(
IVLCControl2* This, IVLCControl2* This,
IVLCPlaylist **obj); IVLCPlaylist **obj);
...@@ -3879,7 +3271,6 @@ interface IVLCControl2 { ...@@ -3879,7 +3271,6 @@ interface IVLCControl2 {
#define IVLCControl2_put_Toolbar(This,visible) (This)->lpVtbl->put_Toolbar(This,visible) #define IVLCControl2_put_Toolbar(This,visible) (This)->lpVtbl->put_Toolbar(This,visible)
#define IVLCControl2_get_audio(This,obj) (This)->lpVtbl->get_audio(This,obj) #define IVLCControl2_get_audio(This,obj) (This)->lpVtbl->get_audio(This,obj)
#define IVLCControl2_get_input(This,obj) (This)->lpVtbl->get_input(This,obj) #define IVLCControl2_get_input(This,obj) (This)->lpVtbl->get_input(This,obj)
#define IVLCControl2_get_log(This,obj) (This)->lpVtbl->get_log(This,obj)
#define IVLCControl2_get_playlist(This,obj) (This)->lpVtbl->get_playlist(This,obj) #define IVLCControl2_get_playlist(This,obj) (This)->lpVtbl->get_playlist(This,obj)
#define IVLCControl2_get_subtitle(This,obj) (This)->lpVtbl->get_subtitle(This,obj) #define IVLCControl2_get_subtitle(This,obj) (This)->lpVtbl->get_subtitle(This,obj)
#define IVLCControl2_get_video(This,obj) (This)->lpVtbl->get_video(This,obj) #define IVLCControl2_get_video(This,obj) (This)->lpVtbl->get_video(This,obj)
...@@ -4055,14 +3446,6 @@ void __RPC_STUB IVLCControl2_get_input_Stub( ...@@ -4055,14 +3446,6 @@ void __RPC_STUB IVLCControl2_get_input_Stub(
IRpcChannelBuffer* pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase); DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCControl2_get_log_Proxy(
IVLCControl2* This,
IVLCLog **obj);
void __RPC_STUB IVLCControl2_get_log_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IVLCControl2_get_playlist_Proxy( HRESULT STDMETHODCALLTYPE IVLCControl2_get_playlist_Proxy(
IVLCControl2* This, IVLCControl2* This,
IVLCPlaylist **obj); IVLCPlaylist **obj);
......
...@@ -656,14 +656,6 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption) ...@@ -656,14 +656,6 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
{ {
libvlc_instance_t* p_libvlc = _p_libvlc; libvlc_instance_t* p_libvlc = _p_libvlc;
IVLCLog *p_log;
if( SUCCEEDED(vlcControl2->get_log(&p_log)) )
{
// make sure the log is disabled
p_log->put_verbosity(-1);
p_log->Release();
}
_p_libvlc = NULL; _p_libvlc = NULL;
vlcDataObject->onClose(); vlcDataObject->onClose();
......
/***************************************************************************** /*****************************************************************************
* supporterrorinfo.cpp: ActiveX control for VLC * supporterrorinfo.cpp: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 the VideoLAN team * Copyright (C) 2005-2010 the VideoLAN team
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
...@@ -32,11 +32,8 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid) ...@@ -32,11 +32,8 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
{ {
if( (riid == IID_IVLCAudio) if( (riid == IID_IVLCAudio)
|| (riid == IID_IVLCInput) || (riid == IID_IVLCInput)
|| (riid == IID_IVLCLog)
|| (riid == IID_IVLCMarquee) || (riid == IID_IVLCMarquee)
|| (riid == IID_IVLCMessage) || (riid == IID_IVLCLogo)
|| (riid == IID_IVLCMessageIterator)
|| (riid == IID_IVLCMessages)
|| (riid == IID_IVLCPlaylist) || (riid == IID_IVLCPlaylist)
|| (riid == IID_IVLCPlaylistItems) || (riid == IID_IVLCPlaylistItems)
|| (riid == IID_IVLCSubtitle) || (riid == IID_IVLCSubtitle)
......
...@@ -63,10 +63,6 @@ HRESULT VLCInterfaceBase::loadTypeInfo(REFIID riid) ...@@ -63,10 +63,6 @@ HRESULT VLCInterfaceBase::loadTypeInfo(REFIID riid)
BIND_INTERFACE( VLCAudio ) BIND_INTERFACE( VLCAudio )
BIND_INTERFACE( VLCInput ) BIND_INTERFACE( VLCInput )
BIND_INTERFACE( VLCMessage )
BIND_INTERFACE( VLCMessages )
BIND_INTERFACE( VLCMessageIterator )
BIND_INTERFACE( VLCLog )
BIND_INTERFACE( VLCMarquee ) BIND_INTERFACE( VLCMarquee )
BIND_INTERFACE( VLCLogo ) BIND_INTERFACE( VLCLogo )
BIND_INTERFACE( VLCPlaylistItems ) BIND_INTERFACE( VLCPlaylistItems )
...@@ -473,80 +469,6 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout) ...@@ -473,80 +469,6 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
/****************************************************************************/ /****************************************************************************/
VLCLog::~VLCLog()
{
delete _p_vlcmessages;
if( _p_log )
libvlc_log_close(_p_log);
}
STDMETHODIMP VLCLog::get_messages(IVLCMessages** obj)
{
if( NULL == obj )
return E_POINTER;
*obj = _p_vlcmessages;
if( NULL != _p_vlcmessages )
{
_p_vlcmessages->AddRef();
return NOERROR;
}
return E_OUTOFMEMORY;
};
STDMETHODIMP VLCLog::get_verbosity(long* level)
{
if( NULL == level )
return E_POINTER;
if( _p_log )
{
libvlc_instance_t* p_libvlc;
HRESULT hr = getVLC(&p_libvlc);
if( SUCCEEDED(hr) )
*level = libvlc_get_log_verbosity(p_libvlc);
return hr;
}
else
{
/* log is not enabled, return -1 */
*level = -1;
return NOERROR;
}
};
STDMETHODIMP VLCLog::put_verbosity(long verbosity)
{
libvlc_instance_t* p_libvlc;
HRESULT hr = getVLC(&p_libvlc);
if( SUCCEEDED(hr) )
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
if( verbosity >= 0 )
{
if( ! _p_log )
{
_p_log = libvlc_log_open(p_libvlc, &ex);
hr = exception_bridge(&ex);
}
if( SUCCEEDED(hr) )
libvlc_set_log_verbosity(p_libvlc, (unsigned)verbosity);
}
else if( _p_log )
{
/* close log when verbosity is set to -1 */
libvlc_log_close(_p_log);
_p_log = NULL;
}
hr = exception_bridge(&ex);
}
return hr;
};
/****************************************************************************/
HRESULT VLCMarquee::do_put_int(unsigned idx, LONG val) HRESULT VLCMarquee::do_put_int(unsigned idx, LONG val)
{ {
libvlc_media_player_t *p_md; libvlc_media_player_t *p_md;
...@@ -650,266 +572,6 @@ STDMETHODIMP VLCMarquee::put_text(BSTR val) ...@@ -650,266 +572,6 @@ STDMETHODIMP VLCMarquee::put_text(BSTR val)
/****************************************************************************/ /****************************************************************************/
/* STL forward iterator used by VLCEnumIterator class to implement IEnumVARIANT */
class VLCMessageSTLIterator
{
public:
VLCMessageSTLIterator(IVLCMessageIterator* iter) : iter(iter), msg(NULL)
{
// get first message
operator++();
};
VLCMessageSTLIterator(const VLCMessageSTLIterator& other)
{
iter = other.iter;
if( iter )
iter->AddRef();
msg = other.msg;
if( msg )
msg->AddRef();
};
virtual ~VLCMessageSTLIterator()
{
if( msg )
msg->Release();
if( iter )
iter->Release();
};
// we only need prefix ++ operator
VLCMessageSTLIterator& operator++()
{
VARIANT_BOOL hasNext = VARIANT_FALSE;
if( iter )
{
iter->get_hasNext(&hasNext);
if( msg )
{
msg->Release();
msg = NULL;
}
if( VARIANT_TRUE == hasNext ) {
iter->next(&msg);
}
}
return *this;
};
VARIANT operator*() const
{
VARIANT v;
VariantInit(&v);
if( msg )
{
if( SUCCEEDED(msg->QueryInterface(IID_IDispatch,
(LPVOID*)&V_DISPATCH(&v))) )
{
V_VT(&v) = VT_DISPATCH;
}
}
return v;
};
bool operator==(const VLCMessageSTLIterator& other) const
{
return msg == other.msg;
};
bool operator!=(const VLCMessageSTLIterator& other) const
{
return msg != other.msg;
};
private:
IVLCMessageIterator* iter;
IVLCMessage* msg;
};
//////////////////////////////////////////////////////////////////////////////
STDMETHODIMP VLCMessages::get__NewEnum(LPUNKNOWN* _NewEnum)
{
if( NULL == _NewEnum )
return E_POINTER;
IVLCMessageIterator* iter = NULL;
iterator(&iter);
*_NewEnum= new VLCEnumIterator<IID_IEnumVARIANT,
IEnumVARIANT,
VARIANT,
VLCMessageSTLIterator>
(VLCMessageSTLIterator(iter), VLCMessageSTLIterator(NULL));
return *_NewEnum ? S_OK : E_OUTOFMEMORY;
};
STDMETHODIMP VLCMessages::clear()
{
libvlc_log_t *p_log = _p_vlclog->_p_log;
if( p_log )
libvlc_log_clear(p_log);
return NOERROR;
};
STDMETHODIMP VLCMessages::get_count(long* count)
{
if( NULL == count )
return E_POINTER;
libvlc_log_t *p_log = _p_vlclog->_p_log;
*count = libvlc_log_count(p_log);
return S_OK;
};
STDMETHODIMP VLCMessages::iterator(IVLCMessageIterator** iter)
{
if( NULL == iter )
return E_POINTER;
*iter = new VLCMessageIterator(Instance(), _p_vlclog);
return *iter ? S_OK : E_OUTOFMEMORY;
};
/****************************************************************************/
VLCMessageIterator::VLCMessageIterator(VLCPlugin *p, VLCLog* p_vlclog ):
VLCInterface<VLCMessageIterator,IVLCMessageIterator>(p),
_refcount(1),
_p_vlclog(p_vlclog),
_p_iter(_p_vlclog && _p_vlclog->_p_log ?
libvlc_log_get_iterator(_p_vlclog->_p_log, NULL) : NULL)
{
}
STDMETHODIMP VLCMessageIterator::get_hasNext(VARIANT_BOOL* hasNext)
{
if( NULL == hasNext )
return E_POINTER;
*hasNext = (_p_iter && _p_vlclog->_p_log &&
libvlc_log_iterator_has_next(_p_iter)) ?
VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
};
STDMETHODIMP VLCMessageIterator::next(IVLCMessage** message)
{
HRESULT hr = S_OK;
if( NULL == message )
return E_POINTER;
if( _p_iter && _p_vlclog->_p_log )
{
struct libvlc_log_message_t buffer;
buffer.sizeof_msg = sizeof(buffer);
libvlc_exception_t ex;
libvlc_exception_init(&ex);
libvlc_log_iterator_next(_p_iter, &buffer, &ex);
*message = new VLCMessage(Instance(), buffer);
if( !message )
hr = E_OUTOFMEMORY;
}
return hr;
};
/****************************************************************************/
inline const char *msgSeverity(int sev)
{
switch( sev )
{
case 0:
return "info";
case 1:
return "error";
case 2:
return "warning";
default:
return "debug";
}
};
STDMETHODIMP VLCMessage::get__Value(VARIANT* _Value)
{
if( NULL == _Value )
return E_POINTER;
char buffer[256];
snprintf(buffer, sizeof(buffer), "%s %s %s: %s",
_msg.psz_type, _msg.psz_name, msgSeverity(_msg.i_severity), _msg.psz_message);
V_VT(_Value) = VT_BSTR;
V_BSTR(_Value) = BSTRFromCStr(CP_UTF8, buffer);
return S_OK;
};
STDMETHODIMP VLCMessage::get_severity(long* level)
{
if( NULL == level )
return E_POINTER;
*level = _msg.i_severity;
return S_OK;
};
STDMETHODIMP VLCMessage::get_type(BSTR* type)
{
if( NULL == type )
return E_POINTER;
*type = BSTRFromCStr(CP_UTF8, _msg.psz_type);
return NOERROR;
};
STDMETHODIMP VLCMessage::get_name(BSTR* name)
{
if( NULL == name )
return E_POINTER;
*name = BSTRFromCStr(CP_UTF8, _msg.psz_name);
return NOERROR;
};
STDMETHODIMP VLCMessage::get_header(BSTR* header)
{
if( NULL == header )
return E_POINTER;
*header = BSTRFromCStr(CP_UTF8, _msg.psz_header);
return NOERROR;
};
STDMETHODIMP VLCMessage::get_message(BSTR* message)
{
if( NULL == message )
return E_POINTER;
*message = BSTRFromCStr(CP_UTF8, _msg.psz_message);
return NOERROR;
};
/****************************************************************************/
STDMETHODIMP VLCPlaylistItems::get_count(long* count) STDMETHODIMP VLCPlaylistItems::get_count(long* count)
{ {
if( NULL == count ) if( NULL == count )
...@@ -1782,7 +1444,6 @@ VLCControl2::VLCControl2(VLCPlugin *p_instance) : ...@@ -1782,7 +1444,6 @@ VLCControl2::VLCControl2(VLCPlugin *p_instance) :
_p_typeinfo(NULL), _p_typeinfo(NULL),
_p_vlcaudio(new VLCAudio(p_instance)), _p_vlcaudio(new VLCAudio(p_instance)),
_p_vlcinput(new VLCInput(p_instance)), _p_vlcinput(new VLCInput(p_instance)),
_p_vlclog(new VLCLog(p_instance)),
_p_vlcplaylist(new VLCPlaylist(p_instance)), _p_vlcplaylist(new VLCPlaylist(p_instance)),
_p_vlcsubtitle(new VLCSubtitle(p_instance)), _p_vlcsubtitle(new VLCSubtitle(p_instance)),
_p_vlcvideo(new VLCVideo(p_instance)) _p_vlcvideo(new VLCVideo(p_instance))
...@@ -1794,7 +1455,6 @@ VLCControl2::~VLCControl2() ...@@ -1794,7 +1455,6 @@ VLCControl2::~VLCControl2()
delete _p_vlcvideo; delete _p_vlcvideo;
delete _p_vlcsubtitle; delete _p_vlcsubtitle;
delete _p_vlcplaylist; delete _p_vlcplaylist;
delete _p_vlclog;
delete _p_vlcinput; delete _p_vlcinput;
delete _p_vlcaudio; delete _p_vlcaudio;
if( _p_typeinfo ) if( _p_typeinfo )
...@@ -2058,11 +1718,6 @@ STDMETHODIMP VLCControl2::get_input(IVLCInput** obj) ...@@ -2058,11 +1718,6 @@ STDMETHODIMP VLCControl2::get_input(IVLCInput** obj)
return object_get(obj,_p_vlcinput); return object_get(obj,_p_vlcinput);
} }
STDMETHODIMP VLCControl2::get_log(IVLCLog** obj)
{
return object_get(obj,_p_vlclog);
}
STDMETHODIMP VLCControl2::get_playlist(IVLCPlaylist** obj) STDMETHODIMP VLCControl2::get_playlist(IVLCPlaylist** obj)
{ {
return object_get(obj,_p_vlcplaylist); return object_get(obj,_p_vlcplaylist);
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* vlccontrol.h: ActiveX control for VLC * vlccontrol.h: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2006 the VideoLAN team * Copyright (C) 2006 the VideoLAN team
* Copyright (C) 2010 M2X BV
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl> * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
...@@ -172,114 +173,6 @@ public: ...@@ -172,114 +173,6 @@ public:
STDMETHODIMP get_hasVout(VARIANT_BOOL*); STDMETHODIMP get_hasVout(VARIANT_BOOL*);
}; };
class VLCMessage: public VLCInterface<VLCMessage,IVLCMessage>
{
public:
VLCMessage(VLCPlugin *p, struct libvlc_log_message_t &msg):
VLCInterface<VLCMessage,IVLCMessage>(p),
_refcount(1),
_msg(msg) { }
STDMETHODIMP_(ULONG) AddRef(void)
{ return InterlockedIncrement(&_refcount); }
STDMETHODIMP_(ULONG) Release(void)
{
ULONG refcount = InterlockedDecrement(&_refcount);
if( 0 == refcount )
{
delete this;
return 0;
}
return refcount;
};
// IVLCMessage methods
STDMETHODIMP get__Value(VARIANT *);
STDMETHODIMP get_severity(long *);
STDMETHODIMP get_type(BSTR *);
STDMETHODIMP get_name(BSTR *);
STDMETHODIMP get_header(BSTR *);
STDMETHODIMP get_message(BSTR *);
private:
LONG _refcount;
struct libvlc_log_message_t _msg;
};
class VLCLog;
class VLCMessageIterator: public
VLCInterface<VLCMessageIterator,IVLCMessageIterator>
{
public:
VLCMessageIterator(VLCPlugin *p, VLCLog *p_vlclog );
~VLCMessageIterator() { if( _p_iter ) libvlc_log_iterator_free(_p_iter); }
STDMETHODIMP_(ULONG) AddRef(void)
{ return InterlockedIncrement(&_refcount); };
STDMETHODIMP_(ULONG) Release(void)
{
ULONG refcount = InterlockedDecrement(&_refcount);
if( 0 == refcount )
{
delete this;
return 0;
}
return refcount;
}
// IVLCMessageIterator methods
STDMETHODIMP get_hasNext(VARIANT_BOOL*);
STDMETHODIMP next(IVLCMessage**);
private:
LONG _refcount;
VLCLog* _p_vlclog;
libvlc_log_iterator_t* _p_iter;
};
class VLCMessages: public VLCInterface<VLCMessages,IVLCMessages>
{
public:
VLCMessages(VLCPlugin *p, VLCLog *p_vlclog):
VLCInterface<VLCMessages,IVLCMessages>(p),
_p_vlclog(p_vlclog) { }
// IVLCMessages methods
STDMETHODIMP get__NewEnum(LPUNKNOWN*);
STDMETHODIMP clear();
STDMETHODIMP get_count(long*);
STDMETHODIMP iterator(IVLCMessageIterator**);
protected:
VLCLog* _p_vlclog;
};
class VLCLog: public VLCInterface<VLCLog,IVLCLog>
{
public:
friend class VLCMessages;
friend class VLCMessageIterator;
VLCLog(VLCPlugin *p): VLCInterface<VLCLog,IVLCLog>(p), _p_log(NULL),
_p_vlcmessages(new VLCMessages(p, this)) { }
virtual ~VLCLog();
// IVLCLog methods
STDMETHODIMP get_messages(IVLCMessages**);
STDMETHODIMP get_verbosity(long *);
STDMETHODIMP put_verbosity(long);
protected:
libvlc_log_t *_p_log;
IVLCMessages *_p_vlcmessages;
};
class VLCMarquee: public VLCInterface<VLCMarquee,IVLCMarquee> class VLCMarquee: public VLCInterface<VLCMarquee,IVLCMarquee>
{ {
public: public:
...@@ -484,7 +377,6 @@ public: ...@@ -484,7 +377,6 @@ public:
STDMETHODIMP get_audio(IVLCAudio**); STDMETHODIMP get_audio(IVLCAudio**);
STDMETHODIMP get_input(IVLCInput**); STDMETHODIMP get_input(IVLCInput**);
STDMETHODIMP get_log(IVLCLog**);
STDMETHODIMP get_playlist(IVLCPlaylist**); STDMETHODIMP get_playlist(IVLCPlaylist**);
STDMETHODIMP get_subtitle(IVLCSubtitle**); STDMETHODIMP get_subtitle(IVLCSubtitle**);
STDMETHODIMP get_video(IVLCVideo**); STDMETHODIMP get_video(IVLCVideo**);
...@@ -498,7 +390,6 @@ private: ...@@ -498,7 +390,6 @@ private:
IVLCAudio *_p_vlcaudio; IVLCAudio *_p_vlcaudio;
IVLCInput *_p_vlcinput; IVLCInput *_p_vlcinput;
IVLCLog *_p_vlclog;
IVLCPlaylist *_p_vlcplaylist; IVLCPlaylist *_p_vlcplaylist;
IVLCSubtitle *_p_vlcsubtitle; IVLCSubtitle *_p_vlcsubtitle;
IVLCVideo *_p_vlcvideo; IVLCVideo *_p_vlcvideo;
......
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