/[tivodecode]/tivocom/trunk/tivocom.idl
ViewVC logotype

Contents of /tivocom/trunk/tivocom.idl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 254 - (show annotations) (download)
Sun Sep 9 23:26:20 2007 UTC (14 years, 4 months ago) by jeremyd2019
File size: 4574 byte(s)
rework interfaces (bumped typelib version to 1.1).  Add support for decoding the MPEG stream.  Added support to read and write from streams (implementing IStream) and make the versions which take filenames use a stream implementation that wraps file access.  Make OpenTivoFile take the MAK as a parameter.  It has a default value of "" (empty string), which means try to get the MAK from the registry, so either omit that param (for those languages which permit that) or specify it as empty string to use the MAK from the registry.  Added progress reporting of MPEG stream decoding via a connection point.  Progress is updated every 100 frames, and percent complete is provided if the tivo file stream supports Seek and Stat functions

1 // tivocom.idl : IDL source for tivocom
2 //
3
4 // This file will be processed by the MIDL tool to
5 // produce the type library (tivocom.tlb) and marshalling code.
6
7 import "oaidl.idl";
8 import "ocidl.idl";
9
10 interface ITivoFile;
11 interface ITivoChunk;
12 interface IChunkCollection;
13
14 [
15 object,
16 uuid(DEC76180-E858-4474-9651-D28A2F6D5086),
17 dual,
18 nonextensible,
19 helpstring("ITivoDecode Interface"),
20 pointer_default(unique)
21 ]
22 interface ITivoDecode : IDispatch{
23 [propget, id(1), helpstring("TiVo Desktop's Media Access Key")] HRESULT mak([out, retval] BSTR* pVal);
24 [propput, id(1), helpstring("TiVo Desktop's Media Access Key")] HRESULT mak([in] BSTR newVal);
25 [id(2), helpstring("OpenTivoFile(fileName, MAK)")] HRESULT OpenTivoFile([in] BSTR bstrFileName, [in, defaultvalue("")] BSTR bstrMAK, [out, retval] ITivoFile** pTivoFile);
26 [id(3), helpstring("OpenTivoStream(stream, MAK)")] HRESULT OpenTivoStream([in] IStream* pStm, [in, defaultvalue("")] BSTR bstrMAK, [out, retval] ITivoFile** pTivoFile);
27 };
28 [
29 object,
30 uuid(4806BF52-0CB5-4C11-99A2-FCEF18FB515F),
31 dual,
32 nonextensible,
33 helpstring("ITivoFile Interface"),
34 pointer_default(unique)
35 ]
36 interface ITivoFile : IDispatch{
37 [propget, id(1), helpstring("property filename")] HRESULT filename([out, retval] BSTR* pVal);
38 [propget, id(2), helpstring("property filetype")] HRESULT filetype([out, retval] BSTR* pVal);
39 [propget, id(3), helpstring("property dummy_4")] HRESULT dummy_4([out, retval] USHORT* pVal);
40 [propget, id(4), helpstring("property dummy_6")] HRESULT dummy_6([out, retval] USHORT* pVal);
41 [propget, id(5), helpstring("property dummy_8")] HRESULT dummy_8([out, retval] USHORT* pVal);
42 [propget, id(6), helpstring("property mpeg_offset")] HRESULT mpeg_offset([out, retval] UINT* pVal);
43 [propget, id(7), helpstring("property chunk_count")] HRESULT chunk_count([out, retval] USHORT* pVal);
44 [propget, id(8), helpstring("property chunks")] HRESULT chunks([out, retval] IChunkCollection** pVal);
45 [propget, id(9), helpstring("property mak")] HRESULT mak([out, retval] BSTR* pVal);
46 [propput, id(9), helpstring("property mak")] HRESULT mak([in] BSTR newVal);
47 [id(10), helpstring("method DecryptMPEGToFile")] HRESULT DecryptMPEGToFile([in] BSTR bstrFileName);
48 [id(11), helpstring("method DecryptMPEGToStream")] HRESULT DecryptMPEGToStream([in] IStream* pStm);
49 };
50 [
51 object,
52 uuid(283140E3-6648-4BEF-A09F-1AC150290061),
53 dual,
54 nonextensible,
55 helpstring("IChunkCollection Interface"),
56 pointer_default(unique)
57 ]
58 interface IChunkCollection : IDispatch{
59 [propget, id(1), helpstring("property Count")] HRESULT Count([out, retval] long* pVal);
60 [propget, id(DISPID_VALUE), helpstring("property Item")] HRESULT Item([in] long Index, [out, retval] ITivoChunk** pVal);
61 [propget, id(DISPID_NEWENUM), helpstring("property _NewEnum")] HRESULT _NewEnum([out, retval] IUnknown** pVal);
62 };
63 [
64 object,
65 uuid(F8CF4444-9F7A-4737-9379-526FDBFBD63B),
66 dual,
67 nonextensible,
68 helpstring("ITivoChunk Interface"),
69 pointer_default(unique)
70 ]
71 interface ITivoChunk : IDispatch{
72 [propget, id(1), helpstring("property chunk_size")] HRESULT chunk_size([out, retval] UINT* pVal);
73 [propget, id(2), helpstring("property data_size")] HRESULT data_size([out, retval] UINT* pVal);
74 [propget, id(3), helpstring("property chunk_id")] HRESULT chunk_id([out, retval] USHORT* pVal);
75 [propget, id(4), helpstring("property chunk_type")] HRESULT chunk_type([out, retval] USHORT* pVal);
76 [propget, id(5), helpstring("property data")] HRESULT data([out, retval] BSTR* pVal);
77 };
78 [
79 uuid(69D8EE75-0FD8-4855-80AA-A9550DB68A1C),
80 version(1.1),
81 helpstring("tivocom 1.0 Type Library")
82 ]
83 library tivocomLib
84 {
85 importlib("stdole2.tlb");
86 [
87 uuid(9296FFC5-DB17-47D1-B6B3-036194654446),
88 helpstring("DTivoDecodeEvents Interface")
89 ]
90 dispinterface DTivoDecodeEvents
91 {
92 properties:
93 methods:
94 };
95 [
96 uuid(DD96E118-AC82-413E-99FB-D01C3D645CE1),
97 helpstring("TivoDecode Class")
98 ]
99 coclass TivoDecode
100 {
101 [default] interface ITivoDecode;
102 [default, source] dispinterface DTivoDecodeEvents;
103 };
104
105 [
106 uuid(6B7A4EC6-9AB8-480B-A306-D8A2367956F4),
107 helpstring("DTivoFileEvents Interface")
108 ]
109 dispinterface DTivoFileEvents
110 {
111 properties:
112 methods:
113 [id(1), helpstring("method OnProgressChange")] HRESULT OnProgressChange([in] DWORD dwFrames, [in, defaultvalue(-1.0)] double dblPercentDone, [out, retval] VARIANT_BOOL* bStopProcessing);
114 };
115 [
116 uuid(D9FB5929-F2A8-405e-831F-B328BAD22D87),
117 helpstring("TivoDecode Class"),
118 noncreatable
119 ]
120 coclass TivoFile
121 {
122 [default] interface ITivoFile;
123 [default, source] dispinterface DTivoFileEvents;
124 };
125 };

cvs@jdrake.com
ViewVC Help
Powered by ViewVC 1.1.13