1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2009 Apple Computer, Inc. All rights reserved.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef _CDNSSDSERVICE_H
20 #define _CDNSSDSERVICE_H
22 #include "IDNSSDService.h"
24 #include "nsComponentManagerUtils.h"
25 #include "nsIThread.h"
26 #include "nsIRunnable.h"
33 #define CDNSSDSERVICE_CONTRACTID "@apple.com/DNSSDService;1"
34 #define CDNSSDSERVICE_CLASSNAME "CDNSSDService"
35 #define CDNSSDSERVICE_CID { 0x944ED267, 0x465A, 0x4989, { 0x82, 0x72, 0x7E, 0xE9, 0x28, 0x6C, 0x99, 0xA5 } }
39 class CDNSSDService
: public IDNSSDService
, nsIRunnable
47 CDNSSDService( DNSServiceRef mainRef
, nsISupports
* listener
);
49 virtual ~CDNSSDService();
57 DNSServiceFlags flags
,
58 uint32_t interfaceIndex
,
59 DNSServiceErrorType errorCode
,
60 const char * serviceName
,
62 const char * replyDomain
,
70 DNSServiceFlags flags
,
71 uint32_t interfaceIndex
,
72 DNSServiceErrorType errorCode
,
73 const char * fullname
,
74 const char * hosttarget
,
77 const unsigned char * txtRecord
,
94 PRThreadPool
* m_threadPool
;
95 DNSServiceRef m_mainRef
;
96 DNSServiceRef m_subRef
;
97 nsISupports
* m_listener
;
98 PRFileDesc
* m_fileDesc
;