Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
181f3d45
Commit
181f3d45
authored
Nov 27, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- activex: future proofing the APIs and some misc fixes
parent
bbf771f9
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
532 additions
and
46 deletions
+532
-46
activex/axvlc.idl
activex/axvlc.idl
+28
-6
activex/axvlc.tlb
activex/axvlc.tlb
+0
-0
activex/axvlc_idl.c
activex/axvlc_idl.c
+4
-1
activex/axvlc_idl.h
activex/axvlc_idl.h
+221
-20
activex/main.cpp
activex/main.cpp
+16
-10
activex/supporterrorinfo.cpp
activex/supporterrorinfo.cpp
+1
-0
activex/vlccontrol2.cpp
activex/vlccontrol2.cpp
+205
-7
activex/vlccontrol2.h
activex/vlccontrol2.h
+57
-2
No files found.
activex/axvlc.idl
View file @
181f3d45
...
@@ -284,7 +284,7 @@ library AXVLC
...
@@ -284,7 +284,7 @@ library AXVLC
[
[
odl
,
odl
,
uuid
(
6
C5CE55D
-
2
D6C
-
4
AAD
-
8299
-
C62D2371F106
),
uuid
(
6
C5CE55D
-
2
D6C
-
4
AAD
-
8299
-
C62D2371F106
),
helpstring
(
"VLC Log
APIs
"
),
helpstring
(
"VLC Log
Messages Collection.
"
),
dual
,
dual
,
oleautomation
oleautomation
]
]
...
@@ -321,6 +321,25 @@ library AXVLC
...
@@ -321,6 +321,25 @@ library AXVLC
HRESULT
verbosity
(
[
in
]
long
level
)
;
HRESULT
verbosity
(
[
in
]
long
level
)
;
}
;
}
;
[
odl
,
uuid
(
FD37FE32
-
82B
C
-
4
A25
-
B056
-
315
F4DBB194D
),
helpstring
(
"VLC Playlist Items collection"
),
dual
,
oleautomation
]
interface
IVLCPlaylistItems
:
IDispatch
{
[
propget
,
helpstring
(
"Returns number of items in playlist."
)
]
HRESULT
count
(
[
out
,
retval
]
long
*
count
)
;
[
helpstring
(
"Remove all items from playlist."
)
]
HRESULT
clear
()
;
[
helpstring
(
"remove item from playlist."
)
]
HRESULT
remove
(
[
in
]
long
itemId
)
;
}
;
[
[
odl
,
odl
,
uuid
(
54613049
-
40B
F
-
4035
-
9
E70
-
0
A9312C0188D
),
uuid
(
54613049
-
40B
F
-
4035
-
9
E70
-
0
A9312C0188D
),
...
@@ -330,20 +349,20 @@ library AXVLC
...
@@ -330,20 +349,20 @@ library AXVLC
]
]
interface
IVLCPlaylist
:
IDispatch
interface
IVLCPlaylist
:
IDispatch
{
{
[
propget
,
helpstring
(
"Returns number of items in playlist.
"
)
]
[
hidden
,
propget
,
helpstring
(
"Returns number of items in playlist. (deprecated)
"
)
]
HRESULT
itemCount
(
[
out
,
retval
]
long
*
count
)
;
HRESULT
itemCount
(
[
out
,
retval
]
long
*
count
)
;
[
propget
,
helpstring
(
"Returns whether playback displays video."
)
]
[
propget
,
helpstring
(
"Returns whether playback displays video."
)
]
HRESULT
isPlaying
(
[
out
,
retval
]
VARIANT_BOOL
*
playing
)
;
HRESULT
isPlaying
(
[
out
,
retval
]
VARIANT_BOOL
*
playing
)
;
[
helpstring
(
"Add a playlist item."
)
]
[
helpstring
(
"Add a playlist item."
)
]
HRESULT
add
(
[
in
]
BSTR
uri
,
[
in
,
optional
]
VARIANT
name
,
[
in
,
optional
]
VARIANT
options
,
[
out
,
retval
]
long
*
item
)
;
HRESULT
add
(
[
in
]
BSTR
uri
,
[
in
,
optional
]
VARIANT
name
,
[
in
,
optional
]
VARIANT
options
,
[
out
,
retval
]
long
*
item
Id
)
;
[
helpstring
(
"Play/Resume the playlist."
)
]
[
helpstring
(
"Play/Resume the playlist."
)
]
HRESULT
play
()
;
HRESULT
play
()
;
[
helpstring
(
"Play item in playlist."
)
]
[
helpstring
(
"Play item in playlist."
)
]
HRESULT
playItem
(
[
in
]
long
item
)
;
HRESULT
playItem
(
[
in
]
long
item
Id
)
;
[
helpstring
(
"Play/Pause current clip."
)
]
[
helpstring
(
"Play/Pause current clip."
)
]
HRESULT
togglePause
()
;
HRESULT
togglePause
()
;
...
@@ -357,11 +376,14 @@ library AXVLC
...
@@ -357,11 +376,14 @@ library AXVLC
[
helpstring
(
"Advance to previous item in playlist."
)
]
[
helpstring
(
"Advance to previous item in playlist."
)
]
HRESULT
prev
()
;
HRESULT
prev
()
;
[
h
elpstring
(
"Remove all items from playlist.
"
)
]
[
h
idden
,
helpstring
(
"Remove all items from playlist. (deprecated)
"
)
]
HRESULT
clear
()
;
HRESULT
clear
()
;
[
h
elpstring
(
"remove item from playlist.
"
)
]
[
h
idden
,
helpstring
(
"Remove item from playlist. (deprecated)
"
)
]
HRESULT
removeItem
(
[
in
]
long
item
)
;
HRESULT
removeItem
(
[
in
]
long
item
)
;
[
propget
,
helpstring
(
"Returns the playlist items collection object."
)
]
HRESULT
items
(
[
out
,
retval
]
IVLCPlaylistItems
**
obj
)
;
}
;
}
;
[
[
...
...
activex/axvlc.tlb
View file @
181f3d45
No preview for this file type
activex/axvlc_idl.c
View file @
181f3d45
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
/* File created by MIDL compiler version 6.00.0361 */
/* File created by MIDL compiler version 6.00.0361 */
/* at
Thu Nov 16 09:55:42
2006
/* at
Mon Nov 27 17:47:26
2006
*/
*/
/* Compiler settings for axvlc.idl:
/* Compiler settings for axvlc.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
Oicf, W1, Zp8, env=Win32 (32b run)
...
@@ -106,6 +106,9 @@ MIDL_DEFINE_GUID(IID, IID_IVLCControl2,0x2D719729,0x5333,0x406C,0xBF,0x12,0x8D,0
...
@@ -106,6 +106,9 @@ MIDL_DEFINE_GUID(IID, IID_IVLCControl2,0x2D719729,0x5333,0x406C,0xBF,0x12,0x8D,0
MIDL_DEFINE_GUID
(
IID
,
DIID_DVLCEvents
,
0xDF48072F
,
0x5EF8
,
0x434e
,
0x9B
,
0x40
,
0xE2
,
0xF3
,
0xAE
,
0x75
,
0x9B
,
0x5F
);
MIDL_DEFINE_GUID
(
IID
,
DIID_DVLCEvents
,
0xDF48072F
,
0x5EF8
,
0x434e
,
0x9B
,
0x40
,
0xE2
,
0xF3
,
0xAE
,
0x75
,
0x9B
,
0x5F
);
MIDL_DEFINE_GUID
(
IID
,
IID_IVLCPlaylistItems
,
0xFD37FE32
,
0x82BC
,
0x4A25
,
0xB0
,
0x56
,
0x31
,
0x5F
,
0x4D
,
0xBB
,
0x19
,
0x4D
);
MIDL_DEFINE_GUID
(
CLSID
,
CLSID_VLCPlugin
,
0xE23FE9C6
,
0x778E
,
0x49D4
,
0xB5
,
0x37
,
0x38
,
0xFC
,
0xDE
,
0x48
,
0x87
,
0xD8
);
MIDL_DEFINE_GUID
(
CLSID
,
CLSID_VLCPlugin
,
0xE23FE9C6
,
0x778E
,
0x49D4
,
0xB5
,
0x37
,
0x38
,
0xFC
,
0xDE
,
0x48
,
0x87
,
0xD8
);
...
...
activex/axvlc_idl.h
View file @
181f3d45
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 6.00.0361 */
/* File created by MIDL compiler version 6.00.0361 */
/* at
Thu Nov 16 09:55:42
2006
/* at
Mon Nov 27 17:47:26
2006
*/
*/
/* Compiler settings for axvlc.idl:
/* Compiler settings for axvlc.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
Oicf, W1, Zp8, env=Win32 (32b run)
...
@@ -107,6 +107,12 @@ typedef interface DVLCEvents DVLCEvents;
...
@@ -107,6 +107,12 @@ typedef interface DVLCEvents DVLCEvents;
#endif
/* __DVLCEvents_FWD_DEFINED__ */
#endif
/* __DVLCEvents_FWD_DEFINED__ */
#ifndef __IVLCPlaylistItems_FWD_DEFINED__
#define __IVLCPlaylistItems_FWD_DEFINED__
typedef
interface
IVLCPlaylistItems
IVLCPlaylistItems
;
#endif
/* __IVLCPlaylistItems_FWD_DEFINED__ */
#ifndef __VLCPlugin_FWD_DEFINED__
#ifndef __VLCPlugin_FWD_DEFINED__
#define __VLCPlugin_FWD_DEFINED__
#define __VLCPlugin_FWD_DEFINED__
...
@@ -2353,7 +2359,7 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2353,7 +2359,7 @@ EXTERN_C const IID IID_IVLCPlaylist;
IVLCPlaylist
:
public
IDispatch
IVLCPlaylist
:
public
IDispatch
{
{
public:
public:
virtual
/* [helpstring][propget] */
HRESULT
STDMETHODCALLTYPE
get_itemCount
(
virtual
/* [helpstring][propget]
[hidden]
*/
HRESULT
STDMETHODCALLTYPE
get_itemCount
(
/* [retval][out] */
long
*
count
)
=
0
;
/* [retval][out] */
long
*
count
)
=
0
;
virtual
/* [helpstring][propget] */
HRESULT
STDMETHODCALLTYPE
get_isPlaying
(
virtual
/* [helpstring][propget] */
HRESULT
STDMETHODCALLTYPE
get_isPlaying
(
...
@@ -2363,12 +2369,12 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2363,12 +2369,12 @@ EXTERN_C const IID IID_IVLCPlaylist;
/* [in] */
BSTR
uri
,
/* [in] */
BSTR
uri
,
/* [optional][in] */
VARIANT
name
,
/* [optional][in] */
VARIANT
name
,
/* [optional][in] */
VARIANT
options
,
/* [optional][in] */
VARIANT
options
,
/* [retval][out] */
long
*
item
)
=
0
;
/* [retval][out] */
long
*
item
Id
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
play
(
void
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
play
(
void
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
playItem
(
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
playItem
(
/* [in] */
long
item
)
=
0
;
/* [in] */
long
item
Id
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
togglePause
(
void
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
togglePause
(
void
)
=
0
;
...
@@ -2378,11 +2384,14 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2378,11 +2384,14 @@ EXTERN_C const IID IID_IVLCPlaylist;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
prev
(
void
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
prev
(
void
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
clear
(
void
)
=
0
;
virtual
/* [helpstring]
[hidden]
*/
HRESULT
STDMETHODCALLTYPE
clear
(
void
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
removeItem
(
virtual
/* [helpstring]
[hidden]
*/
HRESULT
STDMETHODCALLTYPE
removeItem
(
/* [in] */
long
item
)
=
0
;
/* [in] */
long
item
)
=
0
;
virtual
/* [helpstring][propget] */
HRESULT
STDMETHODCALLTYPE
get_items
(
/* [retval][out] */
IVLCPlaylistItems
**
obj
)
=
0
;
};
};
#else
/* C style interface */
#else
/* C style interface */
...
@@ -2431,7 +2440,7 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2431,7 +2440,7 @@ EXTERN_C const IID IID_IVLCPlaylist;
/* [out] */
EXCEPINFO
*
pExcepInfo
,
/* [out] */
EXCEPINFO
*
pExcepInfo
,
/* [out] */
UINT
*
puArgErr
);
/* [out] */
UINT
*
puArgErr
);
/* [helpstring][propget] */
HRESULT
(
STDMETHODCALLTYPE
*
get_itemCount
)(
/* [helpstring][propget]
[hidden]
*/
HRESULT
(
STDMETHODCALLTYPE
*
get_itemCount
)(
IVLCPlaylist
*
This
,
IVLCPlaylist
*
This
,
/* [retval][out] */
long
*
count
);
/* [retval][out] */
long
*
count
);
...
@@ -2444,14 +2453,14 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2444,14 +2453,14 @@ EXTERN_C const IID IID_IVLCPlaylist;
/* [in] */
BSTR
uri
,
/* [in] */
BSTR
uri
,
/* [optional][in] */
VARIANT
name
,
/* [optional][in] */
VARIANT
name
,
/* [optional][in] */
VARIANT
options
,
/* [optional][in] */
VARIANT
options
,
/* [retval][out] */
long
*
item
);
/* [retval][out] */
long
*
item
Id
);
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
play
)(
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
play
)(
IVLCPlaylist
*
This
);
IVLCPlaylist
*
This
);
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
playItem
)(
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
playItem
)(
IVLCPlaylist
*
This
,
IVLCPlaylist
*
This
,
/* [in] */
long
item
);
/* [in] */
long
item
Id
);
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
togglePause
)(
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
togglePause
)(
IVLCPlaylist
*
This
);
IVLCPlaylist
*
This
);
...
@@ -2465,13 +2474,17 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2465,13 +2474,17 @@ EXTERN_C const IID IID_IVLCPlaylist;
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
prev
)(
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
prev
)(
IVLCPlaylist
*
This
);
IVLCPlaylist
*
This
);
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
clear
)(
/* [helpstring]
[hidden]
*/
HRESULT
(
STDMETHODCALLTYPE
*
clear
)(
IVLCPlaylist
*
This
);
IVLCPlaylist
*
This
);
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
removeItem
)(
/* [helpstring]
[hidden]
*/
HRESULT
(
STDMETHODCALLTYPE
*
removeItem
)(
IVLCPlaylist
*
This
,
IVLCPlaylist
*
This
,
/* [in] */
long
item
);
/* [in] */
long
item
);
/* [helpstring][propget] */
HRESULT
(
STDMETHODCALLTYPE
*
get_items
)(
IVLCPlaylist
*
This
,
/* [retval][out] */
IVLCPlaylistItems
**
obj
);
END_INTERFACE
END_INTERFACE
}
IVLCPlaylistVtbl
;
}
IVLCPlaylistVtbl
;
...
@@ -2514,14 +2527,14 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2514,14 +2527,14 @@ EXTERN_C const IID IID_IVLCPlaylist;
#define IVLCPlaylist_get_isPlaying(This,playing) \
#define IVLCPlaylist_get_isPlaying(This,playing) \
(This)->lpVtbl -> get_isPlaying(This,playing)
(This)->lpVtbl -> get_isPlaying(This,playing)
#define IVLCPlaylist_add(This,uri,name,options,item) \
#define IVLCPlaylist_add(This,uri,name,options,item
Id
) \
(This)->lpVtbl -> add(This,uri,name,options,item)
(This)->lpVtbl -> add(This,uri,name,options,item
Id
)
#define IVLCPlaylist_play(This) \
#define IVLCPlaylist_play(This) \
(This)->lpVtbl -> play(This)
(This)->lpVtbl -> play(This)
#define IVLCPlaylist_playItem(This,item) \
#define IVLCPlaylist_playItem(This,item
Id
) \
(This)->lpVtbl -> playItem(This,item)
(This)->lpVtbl -> playItem(This,item
Id
)
#define IVLCPlaylist_togglePause(This) \
#define IVLCPlaylist_togglePause(This) \
(This)->lpVtbl -> togglePause(This)
(This)->lpVtbl -> togglePause(This)
...
@@ -2541,6 +2554,9 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2541,6 +2554,9 @@ EXTERN_C const IID IID_IVLCPlaylist;
#define IVLCPlaylist_removeItem(This,item) \
#define IVLCPlaylist_removeItem(This,item) \
(This)->lpVtbl -> removeItem(This,item)
(This)->lpVtbl -> removeItem(This,item)
#define IVLCPlaylist_get_items(This,obj) \
(This)->lpVtbl -> get_items(This,obj)
#endif
/* COBJMACROS */
#endif
/* COBJMACROS */
...
@@ -2548,7 +2564,7 @@ EXTERN_C const IID IID_IVLCPlaylist;
...
@@ -2548,7 +2564,7 @@ EXTERN_C const IID IID_IVLCPlaylist;
/* [helpstring][propget] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_get_itemCount_Proxy
(
/* [helpstring][propget]
[hidden]
*/
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_get_itemCount_Proxy
(
IVLCPlaylist
*
This
,
IVLCPlaylist
*
This
,
/* [retval][out] */
long
*
count
);
/* [retval][out] */
long
*
count
);
...
@@ -2577,7 +2593,7 @@ void __RPC_STUB IVLCPlaylist_get_isPlaying_Stub(
...
@@ -2577,7 +2593,7 @@ void __RPC_STUB IVLCPlaylist_get_isPlaying_Stub(
/* [in] */
BSTR
uri
,
/* [in] */
BSTR
uri
,
/* [optional][in] */
VARIANT
name
,
/* [optional][in] */
VARIANT
name
,
/* [optional][in] */
VARIANT
options
,
/* [optional][in] */
VARIANT
options
,
/* [retval][out] */
long
*
item
);
/* [retval][out] */
long
*
item
Id
);
void
__RPC_STUB
IVLCPlaylist_add_Stub
(
void
__RPC_STUB
IVLCPlaylist_add_Stub
(
...
@@ -2600,7 +2616,7 @@ void __RPC_STUB IVLCPlaylist_play_Stub(
...
@@ -2600,7 +2616,7 @@ void __RPC_STUB IVLCPlaylist_play_Stub(
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_playItem_Proxy
(
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_playItem_Proxy
(
IVLCPlaylist
*
This
,
IVLCPlaylist
*
This
,
/* [in] */
long
item
);
/* [in] */
long
item
Id
);
void
__RPC_STUB
IVLCPlaylist_playItem_Stub
(
void
__RPC_STUB
IVLCPlaylist_playItem_Stub
(
...
@@ -2654,7 +2670,7 @@ void __RPC_STUB IVLCPlaylist_prev_Stub(
...
@@ -2654,7 +2670,7 @@ void __RPC_STUB IVLCPlaylist_prev_Stub(
DWORD
*
_pdwStubPhase
);
DWORD
*
_pdwStubPhase
);
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_clear_Proxy
(
/* [helpstring]
[hidden]
*/
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_clear_Proxy
(
IVLCPlaylist
*
This
);
IVLCPlaylist
*
This
);
...
@@ -2665,7 +2681,7 @@ void __RPC_STUB IVLCPlaylist_clear_Stub(
...
@@ -2665,7 +2681,7 @@ void __RPC_STUB IVLCPlaylist_clear_Stub(
DWORD
*
_pdwStubPhase
);
DWORD
*
_pdwStubPhase
);
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_removeItem_Proxy
(
/* [helpstring]
[hidden]
*/
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_removeItem_Proxy
(
IVLCPlaylist
*
This
,
IVLCPlaylist
*
This
,
/* [in] */
long
item
);
/* [in] */
long
item
);
...
@@ -2677,6 +2693,18 @@ void __RPC_STUB IVLCPlaylist_removeItem_Stub(
...
@@ -2677,6 +2693,18 @@ void __RPC_STUB IVLCPlaylist_removeItem_Stub(
DWORD
*
_pdwStubPhase
);
DWORD
*
_pdwStubPhase
);
/* [helpstring][propget] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylist_get_items_Proxy
(
IVLCPlaylist
*
This
,
/* [retval][out] */
IVLCPlaylistItems
**
obj
);
void
__RPC_STUB
IVLCPlaylist_get_items_Stub
(
IRpcStubBuffer
*
This
,
IRpcChannelBuffer
*
_pRpcChannelBuffer
,
PRPC_MESSAGE
_pRpcMessage
,
DWORD
*
_pdwStubPhase
);
#endif
/* __IVLCPlaylist_INTERFACE_DEFINED__ */
#endif
/* __IVLCPlaylist_INTERFACE_DEFINED__ */
...
@@ -3598,6 +3626,179 @@ EXTERN_C const IID DIID_DVLCEvents;
...
@@ -3598,6 +3626,179 @@ EXTERN_C const IID DIID_DVLCEvents;
#endif
/* __DVLCEvents_DISPINTERFACE_DEFINED__ */
#endif
/* __DVLCEvents_DISPINTERFACE_DEFINED__ */
#ifndef __IVLCPlaylistItems_INTERFACE_DEFINED__
#define __IVLCPlaylistItems_INTERFACE_DEFINED__
/* interface IVLCPlaylistItems */
/* [object][oleautomation][dual][helpstring][uuid] */
EXTERN_C
const
IID
IID_IVLCPlaylistItems
;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE
(
"FD37FE32-82BC-4A25-B056-315F4DBB194D"
)
IVLCPlaylistItems
:
public
IDispatch
{
public:
virtual
/* [helpstring][propget] */
HRESULT
STDMETHODCALLTYPE
get_count
(
/* [retval][out] */
long
*
count
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
clear
(
void
)
=
0
;
virtual
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
remove
(
/* [in] */
long
itemId
)
=
0
;
};
#else
/* C style interface */
typedef
struct
IVLCPlaylistItemsVtbl
{
BEGIN_INTERFACE
HRESULT
(
STDMETHODCALLTYPE
*
QueryInterface
)(
IVLCPlaylistItems
*
This
,
/* [in] */
REFIID
riid
,
/* [iid_is][out] */
void
**
ppvObject
);
ULONG
(
STDMETHODCALLTYPE
*
AddRef
)(
IVLCPlaylistItems
*
This
);
ULONG
(
STDMETHODCALLTYPE
*
Release
)(
IVLCPlaylistItems
*
This
);
HRESULT
(
STDMETHODCALLTYPE
*
GetTypeInfoCount
)(
IVLCPlaylistItems
*
This
,
/* [out] */
UINT
*
pctinfo
);
HRESULT
(
STDMETHODCALLTYPE
*
GetTypeInfo
)(
IVLCPlaylistItems
*
This
,
/* [in] */
UINT
iTInfo
,
/* [in] */
LCID
lcid
,
/* [out] */
ITypeInfo
**
ppTInfo
);
HRESULT
(
STDMETHODCALLTYPE
*
GetIDsOfNames
)(
IVLCPlaylistItems
*
This
,
/* [in] */
REFIID
riid
,
/* [size_is][in] */
LPOLESTR
*
rgszNames
,
/* [in] */
UINT
cNames
,
/* [in] */
LCID
lcid
,
/* [size_is][out] */
DISPID
*
rgDispId
);
/* [local] */
HRESULT
(
STDMETHODCALLTYPE
*
Invoke
)(
IVLCPlaylistItems
*
This
,
/* [in] */
DISPID
dispIdMember
,
/* [in] */
REFIID
riid
,
/* [in] */
LCID
lcid
,
/* [in] */
WORD
wFlags
,
/* [out][in] */
DISPPARAMS
*
pDispParams
,
/* [out] */
VARIANT
*
pVarResult
,
/* [out] */
EXCEPINFO
*
pExcepInfo
,
/* [out] */
UINT
*
puArgErr
);
/* [helpstring][propget] */
HRESULT
(
STDMETHODCALLTYPE
*
get_count
)(
IVLCPlaylistItems
*
This
,
/* [retval][out] */
long
*
count
);
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
clear
)(
IVLCPlaylistItems
*
This
);
/* [helpstring] */
HRESULT
(
STDMETHODCALLTYPE
*
remove
)(
IVLCPlaylistItems
*
This
,
/* [in] */
long
itemId
);
END_INTERFACE
}
IVLCPlaylistItemsVtbl
;
interface
IVLCPlaylistItems
{
CONST_VTBL
struct
IVLCPlaylistItemsVtbl
*
lpVtbl
;
};
#ifdef COBJMACROS
#define IVLCPlaylistItems_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IVLCPlaylistItems_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IVLCPlaylistItems_Release(This) \
(This)->lpVtbl -> Release(This)
#define IVLCPlaylistItems_GetTypeInfoCount(This,pctinfo) \
(This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
#define IVLCPlaylistItems_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
(This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IVLCPlaylistItems_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
(This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IVLCPlaylistItems_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
(This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IVLCPlaylistItems_get_count(This,count) \
(This)->lpVtbl -> get_count(This,count)
#define IVLCPlaylistItems_clear(This) \
(This)->lpVtbl -> clear(This)
#define IVLCPlaylistItems_remove(This,itemId) \
(This)->lpVtbl -> remove(This,itemId)
#endif
/* COBJMACROS */
#endif
/* C style interface */
/* [helpstring][propget] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylistItems_get_count_Proxy
(
IVLCPlaylistItems
*
This
,
/* [retval][out] */
long
*
count
);
void
__RPC_STUB
IVLCPlaylistItems_get_count_Stub
(
IRpcStubBuffer
*
This
,
IRpcChannelBuffer
*
_pRpcChannelBuffer
,
PRPC_MESSAGE
_pRpcMessage
,
DWORD
*
_pdwStubPhase
);
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylistItems_clear_Proxy
(
IVLCPlaylistItems
*
This
);
void
__RPC_STUB
IVLCPlaylistItems_clear_Stub
(
IRpcStubBuffer
*
This
,
IRpcChannelBuffer
*
_pRpcChannelBuffer
,
PRPC_MESSAGE
_pRpcMessage
,
DWORD
*
_pdwStubPhase
);
/* [helpstring] */
HRESULT
STDMETHODCALLTYPE
IVLCPlaylistItems_remove_Proxy
(
IVLCPlaylistItems
*
This
,
/* [in] */
long
itemId
);
void
__RPC_STUB
IVLCPlaylistItems_remove_Stub
(
IRpcStubBuffer
*
This
,
IRpcChannelBuffer
*
_pRpcChannelBuffer
,
PRPC_MESSAGE
_pRpcMessage
,
DWORD
*
_pdwStubPhase
);
#endif
/* __IVLCPlaylistItems_INTERFACE_DEFINED__ */
EXTERN_C
const
CLSID
CLSID_VLCPlugin
;
EXTERN_C
const
CLSID
CLSID_VLCPlugin
;
#ifdef __cplusplus
#ifdef __cplusplus
...
...
activex/main.cpp
View file @
181f3d45
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
#include <windows.h>
#include <windows.h>
#include <shlwapi.h>
#include <shlwapi.h>
#include <guiddef.h>
using
namespace
std
;
using
namespace
std
;
#define COMPANY_STR "VideoLAN"
#define COMPANY_STR "VideoLAN"
...
@@ -43,10 +45,11 @@ using namespace std;
...
@@ -43,10 +45,11 @@ using namespace std;
#define GUID_STRLEN 39
#define GUID_STRLEN 39
/*
/*
** MingW headers do not declare those
** MingW headers
& libs
do not declare those
*/
*/
extern
const
CATID
CATID_SafeForInitializing
;
static
DEFINE_GUID
(
_CATID_InternetAware
,
0x0DE86A58
,
0x2BAA
,
0x11CF
,
0xA2
,
0x29
,
0x00
,
0xAA
,
0x00
,
0x3D
,
0x73
,
0x52
);
extern
const
CATID
CATID_SafeForScripting
;
static
DEFINE_GUID
(
_CATID_SafeForInitializing
,
0x7DD95802
,
0x9882
,
0x11CF
,
0x9F
,
0xA9
,
0x00
,
0xAA
,
0x00
,
0x6C
,
0x42
,
0xC4
);
static
DEFINE_GUID
(
_CATID_SafeForScripting
,
0x7DD95801
,
0x9882
,
0x11CF
,
0x9F
,
0xA9
,
0x00
,
0xAA
,
0x00
,
0x6C
,
0x42
,
0xC4
);
static
LONG
i_class_ref
=
0
;
static
LONG
i_class_ref
=
0
;
static
HINSTANCE
h_instance
=
0
;
static
HINSTANCE
h_instance
=
0
;
...
@@ -150,8 +153,9 @@ STDAPI DllUnregisterServer(VOID)
...
@@ -150,8 +153,9 @@ STDAPI DllUnregisterServer(VOID)
CATID
implCategories
[]
=
{
CATID
implCategories
[]
=
{
CATID_Control
,
CATID_Control
,
CATID_PersistsToPropertyBag
,
CATID_PersistsToPropertyBag
,
CATID_SafeForInitializing
,
_CATID_InternetAware
,
CATID_SafeForScripting
,
_CATID_SafeForInitializing
,
_CATID_SafeForScripting
,
};
};
pcr
->
UnRegisterClassImplCategories
(
CLSID_VLCPlugin
,
pcr
->
UnRegisterClassImplCategories
(
CLSID_VLCPlugin
,
...
@@ -318,8 +322,9 @@ STDAPI DllRegisterServer(VOID)
...
@@ -318,8 +322,9 @@ STDAPI DllRegisterServer(VOID)
CATID
implCategories
[]
=
{
CATID
implCategories
[]
=
{
CATID_Control
,
CATID_Control
,
CATID_PersistsToPropertyBag
,
CATID_PersistsToPropertyBag
,
CATID_SafeForInitializing
,
_CATID_InternetAware
,
CATID_SafeForScripting
,
_CATID_SafeForInitializing
,
_CATID_SafeForScripting
,
};
};
pcr
->
RegisterClassImplCategories
(
CLSID_VLCPlugin
,
pcr
->
RegisterClassImplCategories
(
CLSID_VLCPlugin
,
...
@@ -459,3 +464,4 @@ STDAPI_(BOOL) DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpReserved )
...
@@ -459,3 +464,4 @@ STDAPI_(BOOL) DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpReserved )
};
};
#endif
#endif
activex/supporterrorinfo.cpp
View file @
181f3d45
...
@@ -37,6 +37,7 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
...
@@ -37,6 +37,7 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
||
(
riid
==
IID_IVLCMessageIterator
)
||
(
riid
==
IID_IVLCMessageIterator
)
||
(
riid
==
IID_IVLCMessages
)
||
(
riid
==
IID_IVLCMessages
)
||
(
riid
==
IID_IVLCPlaylist
)
||
(
riid
==
IID_IVLCPlaylist
)
||
(
riid
==
IID_IVLCPlaylistItems
)
||
(
riid
==
IID_IVLCVideo
)
||
(
riid
==
IID_IVLCVideo
)
||
(
riid
==
IID_IVLCControl2
)
)
||
(
riid
==
IID_IVLCControl2
)
)
{
{
...
...
activex/vlccontrol2.cpp
View file @
181f3d45
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
#include "utils.h"
#include "utils.h"
#include <shlwapi.h>
#include <wininet.h>
using
namespace
std
;
using
namespace
std
;
VLCAudio
::~
VLCAudio
()
VLCAudio
::~
VLCAudio
()
...
@@ -581,6 +584,7 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
...
@@ -581,6 +584,7 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
VLCLog
::~
VLCLog
()
VLCLog
::~
VLCLog
()
{
{
delete
_p_vlcmessages
;
if
(
_p_log
)
if
(
_p_log
)
libvlc_log_close
(
_p_log
,
NULL
);
libvlc_log_close
(
_p_log
,
NULL
);
...
@@ -1202,8 +1206,157 @@ STDMETHODIMP VLCMessage::get_message(BSTR* message)
...
@@ -1202,8 +1206,157 @@ STDMETHODIMP VLCMessage::get_message(BSTR* message)
/*******************************************************************************/
/*******************************************************************************/
VLCPlaylistItems
::~
VLCPlaylistItems
()
{
if
(
_p_typeinfo
)
_p_typeinfo
->
Release
();
};
HRESULT
VLCPlaylistItems
::
loadTypeInfo
(
void
)
{
HRESULT
hr
=
NOERROR
;
if
(
NULL
==
_p_typeinfo
)
{
ITypeLib
*
p_typelib
;
hr
=
_p_instance
->
getTypeLib
(
LOCALE_USER_DEFAULT
,
&
p_typelib
);
if
(
SUCCEEDED
(
hr
)
)
{
hr
=
p_typelib
->
GetTypeInfoOfGuid
(
IID_IVLCPlaylistItems
,
&
_p_typeinfo
);
if
(
FAILED
(
hr
)
)
{
_p_typeinfo
=
NULL
;
}
p_typelib
->
Release
();
}
}
return
hr
;
};
STDMETHODIMP
VLCPlaylistItems
::
GetTypeInfoCount
(
UINT
*
pctInfo
)
{
if
(
NULL
==
pctInfo
)
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
loadTypeInfo
())
)
*
pctInfo
=
1
;
else
*
pctInfo
=
0
;
return
NOERROR
;
};
STDMETHODIMP
VLCPlaylistItems
::
GetTypeInfo
(
UINT
iTInfo
,
LCID
lcid
,
LPTYPEINFO
*
ppTInfo
)
{
if
(
NULL
==
ppTInfo
)
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
loadTypeInfo
())
)
{
_p_typeinfo
->
AddRef
();
*
ppTInfo
=
_p_typeinfo
;
return
NOERROR
;
}
*
ppTInfo
=
NULL
;
return
E_NOTIMPL
;
};
STDMETHODIMP
VLCPlaylistItems
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
{
if
(
SUCCEEDED
(
loadTypeInfo
())
)
{
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
}
return
E_NOTIMPL
;
};
STDMETHODIMP
VLCPlaylistItems
::
Invoke
(
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
if
(
SUCCEEDED
(
loadTypeInfo
())
)
{
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
return
E_NOTIMPL
;
};
STDMETHODIMP
VLCPlaylistItems
::
get_count
(
long
*
count
)
{
if
(
NULL
==
count
)
return
E_POINTER
;
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
*
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylistItems
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
STDMETHODIMP
VLCPlaylistItems
::
clear
()
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_playlist_clear
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylistItems
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
STDMETHODIMP
VLCPlaylistItems
::
remove
(
long
item
)
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_playlist_delete_item
(
p_libvlc
,
item
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylistItems
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
/*******************************************************************************/
VLCPlaylist
::~
VLCPlaylist
()
VLCPlaylist
::~
VLCPlaylist
()
{
{
delete
_p_vlcplaylistitems
;
if
(
_p_typeinfo
)
if
(
_p_typeinfo
)
_p_typeinfo
->
Release
();
_p_typeinfo
->
Release
();
};
};
...
@@ -1344,18 +1497,49 @@ STDMETHODIMP VLCPlaylist::add(BSTR uri, VARIANT name, VARIANT options, long* ite
...
@@ -1344,18 +1497,49 @@ STDMETHODIMP VLCPlaylist::add(BSTR uri, VARIANT name, VARIANT options, long* ite
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_exception_init
(
&
ex
);
char
*
psz_uri
=
NULL
;
if
(
SysStringLen
(
_p_instance
->
getBaseURL
())
>
0
)
{
DWORD
len
=
INTERNET_MAX_URL_LENGTH
;
LPOLESTR
abs_url
=
(
LPOLESTR
)
CoTaskMemAlloc
(
sizeof
(
OLECHAR
)
*
len
);
if
(
NULL
!=
abs_url
)
{
/*
** if the MRL a relative URL, we should end up with an absolute URL
*/
if
(
SUCCEEDED
(
UrlCombineW
(
_p_instance
->
getBaseURL
(),
uri
,
abs_url
,
&
len
,
URL_ESCAPE_UNSAFE
|
URL_PLUGGABLE_PROTOCOL
))
)
{
psz_uri
=
CStrFromBSTR
(
CP_UTF8
,
abs_url
);
}
else
{
psz_uri
=
CStrFromBSTR
(
CP_UTF8
,
uri
);
}
CoTaskMemFree
(
abs_url
);
}
}
else
{
/*
** baseURL is empty, assume MRL is absolute
*/
psz_uri
=
CStrFromBSTR
(
CP_UTF8
,
uri
);
}
if
(
NULL
==
psz_uri
)
{
return
E_OUTOFMEMORY
;
}
int
i_options
;
int
i_options
;
char
**
ppsz_options
;
char
**
ppsz_options
;
hr
=
VLCControl
::
CreateTargetOptions
(
CP_UTF8
,
&
options
,
&
ppsz_options
,
&
i_options
);
hr
=
VLCControl
::
CreateTargetOptions
(
CP_UTF8
,
&
options
,
&
ppsz_options
,
&
i_options
);
if
(
FAILED
(
hr
)
)
if
(
FAILED
(
hr
)
)
return
hr
;
char
*
psz_uri
=
CStrFromBSTR
(
CP_UTF8
,
uri
);
if
(
NULL
==
psz_uri
)
{
{
VLCControl
::
FreeTargetOptions
(
ppsz_options
,
i_options
);
CoTaskMemFree
(
psz_uri
);
return
E_OUTOFMEMORY
;
return
hr
;
}
}
char
*
psz_name
=
NULL
;
char
*
psz_name
=
NULL
;
...
@@ -1566,6 +1750,20 @@ STDMETHODIMP VLCPlaylist::removeItem(long item)
...
@@ -1566,6 +1750,20 @@ STDMETHODIMP VLCPlaylist::removeItem(long item)
return
hr
;
return
hr
;
};
};
STDMETHODIMP
VLCPlaylist
::
get_items
(
IVLCPlaylistItems
**
obj
)
{
if
(
NULL
==
obj
)
return
E_POINTER
;
*
obj
=
_p_vlcplaylistitems
;
if
(
NULL
!=
_p_vlcplaylistitems
)
{
_p_vlcplaylistitems
->
AddRef
();
return
NOERROR
;
}
return
E_OUTOFMEMORY
;
};
/*******************************************************************************/
/*******************************************************************************/
VLCVideo
::~
VLCVideo
()
VLCVideo
::~
VLCVideo
()
...
@@ -1826,7 +2024,7 @@ STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect)
...
@@ -1826,7 +2024,7 @@ STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect)
libvlc_input_free
(
p_input
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
_p_instance
->
setErrorInfo
(
IID_IVLC
Playlist
,
_p_instance
->
setErrorInfo
(
IID_IVLC
Video
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
return
E_FAIL
;
...
...
activex/vlccontrol2.h
View file @
181f3d45
...
@@ -318,7 +318,8 @@ public:
...
@@ -318,7 +318,8 @@ public:
VLCLog
(
VLCPlugin
*
p_instance
)
:
VLCLog
(
VLCPlugin
*
p_instance
)
:
_p_log
(
NULL
),
_p_log
(
NULL
),
_p_instance
(
p_instance
),
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
_p_typeinfo
(
NULL
),
_p_vlcmessages
(
NULL
)
{
{
_p_vlcmessages
=
new
VLCMessages
(
p_instance
,
this
);
_p_vlcmessages
=
new
VLCMessages
(
p_instance
,
this
);
};
};
...
@@ -367,11 +368,63 @@ private:
...
@@ -367,11 +368,63 @@ private:
VLCMessages
*
_p_vlcmessages
;
VLCMessages
*
_p_vlcmessages
;
};
};
class
VLCPlaylistItems
:
public
IVLCPlaylistItems
{
public:
VLCPlaylistItems
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
virtual
~
VLCPlaylistItems
();
// IUnknown methods
STDMETHODIMP
QueryInterface
(
REFIID
riid
,
void
**
ppv
)
{
if
(
NULL
==
ppv
)
return
E_POINTER
;
if
(
(
IID_IUnknown
==
riid
)
||
(
IID_IDispatch
==
riid
)
||
(
IID_IVLCPlaylistItems
==
riid
)
)
{
AddRef
();
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
this
);
return
NOERROR
;
}
// behaves as a standalone object
return
E_NOINTERFACE
;
};
STDMETHODIMP_
(
ULONG
)
AddRef
(
void
)
{
return
_p_instance
->
pUnkOuter
->
AddRef
();
};
STDMETHODIMP_
(
ULONG
)
Release
(
void
)
{
return
_p_instance
->
pUnkOuter
->
Release
();
};
// IDispatch methods
STDMETHODIMP
GetTypeInfoCount
(
UINT
*
);
STDMETHODIMP
GetTypeInfo
(
UINT
,
LCID
,
LPTYPEINFO
*
);
STDMETHODIMP
GetIDsOfNames
(
REFIID
,
LPOLESTR
*
,
UINT
,
LCID
,
DISPID
*
);
STDMETHODIMP
Invoke
(
DISPID
,
REFIID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
UINT
*
);
// IVLCPlaylistItems methods
STDMETHODIMP
get_count
(
long
*
);
STDMETHODIMP
clear
();
STDMETHODIMP
remove
(
long
);
protected:
HRESULT
loadTypeInfo
();
private:
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
};
class
VLCPlaylist
:
public
IVLCPlaylist
class
VLCPlaylist
:
public
IVLCPlaylist
{
{
public:
public:
VLCPlaylist
(
VLCPlugin
*
p_instance
)
:
VLCPlaylist
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
),
_p_vlcplaylistitems
(
NULL
)
{
_p_vlcplaylistitems
=
new
VLCPlaylistItems
(
p_instance
);
};
virtual
~
VLCPlaylist
();
virtual
~
VLCPlaylist
();
// IUnknown methods
// IUnknown methods
...
@@ -412,6 +465,7 @@ public:
...
@@ -412,6 +465,7 @@ public:
STDMETHODIMP
prev
();
STDMETHODIMP
prev
();
STDMETHODIMP
clear
();
STDMETHODIMP
clear
();
STDMETHODIMP
removeItem
(
long
);
STDMETHODIMP
removeItem
(
long
);
STDMETHODIMP
get_items
(
IVLCPlaylistItems
**
);
protected:
protected:
HRESULT
loadTypeInfo
();
HRESULT
loadTypeInfo
();
...
@@ -420,6 +474,7 @@ private:
...
@@ -420,6 +474,7 @@ private:
VLCPlugin
*
_p_instance
;
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
ITypeInfo
*
_p_typeinfo
;
VLCPlaylistItems
*
_p_vlcplaylistitems
;
};
};
class
VLCVideo
:
public
IVLCVideo
class
VLCVideo
:
public
IVLCVideo
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment