-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHostObject.idl
123 lines (91 loc) · 5.11 KB
/
HostObject.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/** $VER: HostObject.idl (2024.12.01) P. Stuer **/
import "oaidl.idl";
import "ocidl.idl";
[uuid(661566A3-CB7A-4901-A64B-4C0C603BBA48), version(0.2)]
library HostObjectLibrary
{
struct image_t
{
long Width;
long Height;
SAFEARRAY(byte) Bytes;
};
//! [AddHostObjectInterface]
[uuid(3a14c9c0-bc3e-453f-a314-4ce4a0ec81d8), object, local]
interface IHostObject : IUnknown
{
[propget] HRESULT componentVersion([out, retval] __int32 * version);
[propget] HRESULT componentVersionText([out, retval] BSTR * versionText);
HRESULT print([in] BSTR text);
HRESULT stop();
HRESULT play([in] VARIANT_BOOL paused);
HRESULT pause([in] VARIANT_BOOL paused);
HRESULT previous();
HRESULT next();
HRESULT random();
HRESULT togglePause();
HRESULT toggleMute();
HRESULT toggleStopAfterCurrent();
HRESULT volumeUp();
HRESULT volumeDown();
HRESULT seek([in] double time);
HRESULT seekDelta([in] double delta);
[propget] HRESULT isPlaying([out, retval] VARIANT_BOOL * value);
[propget] HRESULT isPaused([out, retval] VARIANT_BOOL * value);
[propget] HRESULT stopAfterCurrent([out, retval] VARIANT_BOOL * value);
[propput] HRESULT stopAfterCurrent([in] VARIANT_BOOL value);
[propget] HRESULT length([out, retval] double * value);
[propget] HRESULT position([out, retval] double * value);
[propget] HRESULT canSeek([out, retval] VARIANT_BOOL * value);
[propget] HRESULT volume([out, retval] double * value);
[propput] HRESULT volume([in] double value);
[propget] HRESULT isMuted([out, retval] VARIANT_BOOL * value);
HRESULT getFormattedText([in] BSTR text, [out, retval] BSTR * formattedText);
HRESULT getArtwork([in] BSTR type, [out, retval] BSTR * image);
// Files
HRESULT readAllText([in] BSTR filePath, [in] __int32 codePage, [out, retval] BSTR * text);
HRESULT readImage([in] BSTR filePath, [out, retval] BSTR * image);
HRESULT readDirectory([in] BSTR pathName, [in, defaultvalue("*.*")] BSTR searchPattern, [out, retval] BSTR * json);
// Playlists
[propget] HRESULT playlistCount([out, retval] int * count);
[propget] HRESULT activePlaylist([out, retval] int * index);
[propput] HRESULT activePlaylist([in] int index);
[propget] HRESULT playingPlaylist([out, retval] int * index);
[propput] HRESULT playingPlaylist([in] int index);
HRESULT getPlaylistName([in] int index, [out, retval] BSTR * name);
HRESULT setPlaylistName([in] int index, [in] BSTR name);
HRESULT findPlaylist([in] BSTR name, [out, retval] int * index);
HRESULT getPlaylistItemCount([in] int playlistIndex, [out, retval] int * itemCount);
HRESULT getSelectedPlaylistItemCount([in] int playlistIndex, [in] int maxItems, [out, retval] int * itemCount);
HRESULT getFocusedPlaylistItem([in] int playlistIndex, [out, retval] int * itemIndex);
HRESULT setFocusedPlaylistItem([in] int playlistIndex, [in] int itemIndex);
HRESULT ensurePlaylistItemVisible([in] int playlistIndex, [in] int itemIndex);
HRESULT executePlaylistDefaultAction([in] int playlistIndex, [in] int itemIndex);
HRESULT isPlaylistItemSelected([in] int playlistIndex, [in] int itemIndex, [out, retval] VARIANT_BOOL * result);
HRESULT createPlaylist([in] int playlistIndex, [in] BSTR name, [out, retval] int * newPlaylistIndex);
HRESULT addPath([in] int playlistIndex, [in] int itemIndex, [in] BSTR filePath, [in] VARIANT_BOOL selectAddedItem);
HRESULT duplicatePlaylist([in] int playlistIndex, [in] BSTR name, [out, retval] int * newPlaylistIndex);
HRESULT getPlaylistItems([in] int playlistIndex, [out, retval] BSTR * json);
HRESULT selectPlaylistItem([in] int playlistIndex, [in] int itemIndex);
HRESULT deselectPlaylistItem([in] int playlistIndex, [in] int itemIndex);
HRESULT getSelectedPlaylistItems([in] int playlistIndex, [out, retval] BSTR * json);
HRESULT removeSelectedPlaylistItems([in] int playlistIndex);
HRESULT removeUnselectedPlaylistItems([in] int playlistIndex);
HRESULT clearPlaylistSelection([in] int playlistIndex);
HRESULT removePlaylistItem([in] int playlistIndex, [in] int itemIndex);
HRESULT clearPlaylist([in] int playlistIndex);
HRESULT deletePlaylist([in] int playlistIndex);
// Auto Playlists
HRESULT createAutoPlaylist([in] int playlistIndex, [in] BSTR name, [in] BSTR query, [in, defaultvalue("*.*")] BSTR sort, [in, defaultvalue(0)] unsigned __int32 flags, [out, retval] int * newPlaylistIndex);
HRESULT isAutoPlaylist([in] int playlistIndex, [out, retval] VARIANT_BOOL * result);
// Playback Order
[propget] HRESULT playbackOrder([out, retval] int * index);
[propput] HRESULT playbackOrder([in] int index);
};
[uuid(637abc45-11f7-4dde-84b4-317d62a638d3)]
coclass HostObject
{
[default] interface IHostObject;
interface IDispatch;
};
}