/[tivodecode]/tivocom/trunk/CTivoDecode.h
ViewVC logotype

Contents of /tivocom/trunk/CTivoDecode.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 239 - (show annotations) (download)
Wed Aug 15 06:53:07 2007 UTC (14 years, 9 months ago) by jeremyd2019
File MIME type: text/plain
File size: 1811 byte(s)
add COM interface for tivodecode on windows.  Right now, it will allow access to file metadata only, as well as allowing getting and setting the MAK which TivoDesktop stores in the registry

1 // CTivoDecode.h : Declaration of the CTivoDecode
2
3 #pragma once
4 #include "resource.h" // main symbols
5
6 #include "tivocom.h"
7 #include "DTivoDecodeEvents_CP.h"
8
9
10 #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
11 #error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
12 #endif
13
14
15
16 // CTivoDecode
17
18 class ATL_NO_VTABLE CTivoDecode :
19 public CComObjectRootEx<CComSingleThreadModel>,
20 public CComCoClass<CTivoDecode, &CLSID_TivoDecode>,
21 public IConnectionPointContainerImpl<CTivoDecode>,
22 public CProxy_DTivoDecodeEvents<CTivoDecode>,
23 public IDispatchImpl<ITivoDecode, &IID_ITivoDecode, &LIBID_tivocomLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
24 {
25 public:
26 CTivoDecode()
27 {
28 }
29
30 DECLARE_REGISTRY_RESOURCEID(IDR_TIVODECODE)
31
32 DECLARE_NOT_AGGREGATABLE(CTivoDecode)
33
34 BEGIN_COM_MAP(CTivoDecode)
35 COM_INTERFACE_ENTRY(ITivoDecode)
36 COM_INTERFACE_ENTRY(IDispatch)
37 COM_INTERFACE_ENTRY(IConnectionPointContainer)
38 END_COM_MAP()
39
40 BEGIN_CONNECTION_POINT_MAP(CTivoDecode)
41 CONNECTION_POINT_ENTRY(__uuidof(DTivoDecodeEvents))
42 END_CONNECTION_POINT_MAP()
43
44
45 DECLARE_PROTECT_FINAL_CONSTRUCT()
46
47 HRESULT FinalConstruct()
48 {
49 return S_OK;
50 }
51
52 void FinalRelease()
53 {
54 }
55
56 public:
57
58 STDMETHOD(get_mak)(BSTR* pVal);
59 STDMETHOD(put_mak)(BSTR newVal);
60 STDMETHOD(OpenTivoFile)(BSTR bstrFileName, ITivoFile** pTivoFile);
61 };
62
63 OBJECT_ENTRY_AUTO(__uuidof(TivoDecode), CTivoDecode)

cvs@jdrake.com
ViewVC Help
Powered by ViewVC 1.1.13