]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSWindows/DLLX/DNSSDEventManager.h
mDNSResponder-214.3.2.tar.gz
[apple/mdnsresponder.git] / mDNSWindows / DLLX / DNSSDEventManager.h
1 /* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2009 Apple Computer, Inc. All rights reserved.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16
17 Change History (most recent first):
18
19 $Log: DNSSDEventManager.h,v $
20 Revision 1.1 2009/05/26 04:43:54 herscher
21 <rdar://problem/3948252> COM component that can be used with any .NET language and VB.
22
23
24 */
25
26 #pragma once
27 #include "resource.h" // main symbols
28
29 #include "DLLX.h"
30 #include "_IDNSSDEvents_CP.H"
31
32
33 #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
34 #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."
35 #endif
36
37
38
39 // CDNSSDEventManager
40
41 class ATL_NO_VTABLE CDNSSDEventManager :
42 public CComObjectRootEx<CComSingleThreadModel>,
43 public CComCoClass<CDNSSDEventManager, &CLSID_DNSSDEventManager>,
44 public IConnectionPointContainerImpl<CDNSSDEventManager>,
45 public CProxy_IDNSSDEvents<CDNSSDEventManager>,
46 public IDispatchImpl<IDNSSDEventManager, &IID_IDNSSDEventManager, &LIBID_Bonjour, /*wMajor =*/ 1, /*wMinor =*/ 0>
47 {
48 public:
49 CDNSSDEventManager()
50 {
51 }
52
53 DECLARE_REGISTRY_RESOURCEID(IDR_DNSSDEVENTMANAGER)
54
55
56 BEGIN_COM_MAP(CDNSSDEventManager)
57 COM_INTERFACE_ENTRY(IDNSSDEventManager)
58 COM_INTERFACE_ENTRY(IDispatch)
59 COM_INTERFACE_ENTRY(IConnectionPointContainer)
60 END_COM_MAP()
61
62 BEGIN_CONNECTION_POINT_MAP(CDNSSDEventManager)
63 CONNECTION_POINT_ENTRY(__uuidof(_IDNSSDEvents))
64 END_CONNECTION_POINT_MAP()
65
66
67 DECLARE_PROTECT_FINAL_CONSTRUCT()
68
69 HRESULT FinalConstruct()
70 {
71 return S_OK;
72 }
73
74 void FinalRelease()
75 {
76 }
77
78 public:
79
80 };
81
82 OBJECT_ENTRY_AUTO(__uuidof(DNSSDEventManager), CDNSSDEventManager)