From: Apple Date: Fri, 31 Jan 2020 03:01:55 +0000 (+0000) Subject: mDNSResponder-1096.0.2.tar.gz X-Git-Tag: macos-1015^0 X-Git-Url: https://git.saurik.com/apple/mdnsresponder.git/commitdiff_plain/f0cc3e7bc1739685ceff19319ba9edb49279b495 mDNSResponder-1096.0.2.tar.gz --- diff --git a/.gitignore b/.gitignore index 119688d..a5a43a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ mDNSMacOSX/*.xcodeproj/project.xcworkspace mDNSMacOSX/*.xcodeproj/xcuserdata .svn +.DS_Store build +objects *~.m *~.c *~.h +*~ diff --git a/Clients/FirefoxExtension/CDNSSDService.cpp b/Clients/FirefoxExtension/CDNSSDService.cpp deleted file mode 100755 index ae57da9..0000000 --- a/Clients/FirefoxExtension/CDNSSDService.cpp +++ /dev/null @@ -1,394 +0,0 @@ -/* -*- Mode: C; tab-width: 4 -*- - * - * Copyright (c) 2009 Apple Computer, Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "CDNSSDService.h" -#include "nsThreadUtils.h" -#include "nsIEventTarget.h" -#include "private/pprio.h" -#include -#include - - -NS_IMPL_ISUPPORTS2(CDNSSDService, IDNSSDService, nsIRunnable) - -CDNSSDService::CDNSSDService() -: - m_master( 1 ), - m_threadPool( NULL ), - m_mainRef( NULL ), - m_subRef( NULL ), - m_listener( NULL ), - m_fileDesc( NULL ), - m_job( NULL ) -{ - nsresult err; - - if ( DNSServiceCreateConnection( &m_mainRef ) != kDNSServiceErr_NoError ) - { - err = NS_ERROR_FAILURE; - goto exit; - } - - if ( ( m_fileDesc = PR_ImportTCPSocket( DNSServiceRefSockFD( m_mainRef ) ) ) == NULL ) - { - err = NS_ERROR_FAILURE; - goto exit; - } - - if ( ( m_threadPool = PR_CreateThreadPool( 1, 1, 8192 ) ) == NULL ) - { - err = NS_ERROR_FAILURE; - goto exit; - } - - err = SetupNotifications(); - -exit: - - if ( err != NS_OK ) - { - Cleanup(); - } -} - - -CDNSSDService::CDNSSDService( DNSServiceRef ref, nsISupports * listener ) -: - m_master( 0 ), - m_threadPool( NULL ), - m_mainRef( ref ), - m_subRef( ref ), - m_listener( listener ), - m_fileDesc( NULL ), - m_job( NULL ) -{ -} - - -CDNSSDService::~CDNSSDService() -{ - Cleanup(); -} - - -void -CDNSSDService::Cleanup() -{ - if ( m_master ) - { - if ( m_job ) - { - PR_CancelJob( m_job ); - m_job = NULL; - } - - if ( m_threadPool != NULL ) - { - PR_ShutdownThreadPool( m_threadPool ); - m_threadPool = NULL; - } - - if ( m_fileDesc != NULL ) - { - PR_Close( m_fileDesc ); - m_fileDesc = NULL; - } - - if ( m_mainRef ) - { - DNSServiceRefDeallocate( m_mainRef ); - m_mainRef = NULL; - } - } - else - { - if ( m_subRef ) - { - DNSServiceRefDeallocate( m_subRef ); - m_subRef = NULL; - } - } -} - - -nsresult -CDNSSDService::SetupNotifications() -{ - NS_PRECONDITION( m_threadPool != NULL, "m_threadPool is NULL" ); - NS_PRECONDITION( m_fileDesc != NULL, "m_fileDesc is NULL" ); - NS_PRECONDITION( m_job == NULL, "m_job is not NULL" ); - - m_iod.socket = m_fileDesc; - m_iod.timeout = PR_INTERVAL_MAX; - m_job = PR_QueueJob_Read( m_threadPool, &m_iod, Read, this, PR_FALSE ); - return ( m_job ) ? NS_OK : NS_ERROR_FAILURE; -} - - -/* IDNSSDService browse (in long interfaceIndex, in AString regtype, in AString domain, in IDNSSDBrowseListener listener); */ -NS_IMETHODIMP -CDNSSDService::Browse(PRInt32 interfaceIndex, const nsAString & regtype, const nsAString & domain, IDNSSDBrowseListener *listener, IDNSSDService **_retval NS_OUTPARAM) -{ - CDNSSDService * service = NULL; - DNSServiceErrorType dnsErr = 0; - nsresult err = 0; - - *_retval = NULL; - - if ( !m_mainRef ) - { - err = NS_ERROR_NOT_AVAILABLE; - goto exit; - } - - try - { - service = new CDNSSDService( m_mainRef, listener ); - } - catch ( ... ) - { - service = NULL; - } - - if ( service == NULL ) - { - err = NS_ERROR_FAILURE; - goto exit; - } - - dnsErr = DNSServiceBrowse( &service->m_subRef, kDNSServiceFlagsShareConnection, interfaceIndex, NS_ConvertUTF16toUTF8( regtype ).get(), NS_ConvertUTF16toUTF8( domain ).get(), ( DNSServiceBrowseReply ) BrowseReply, service ); - - if ( dnsErr != kDNSServiceErr_NoError ) - { - err = NS_ERROR_FAILURE; - goto exit; - } - - listener->AddRef(); - service->AddRef(); - *_retval = service; - err = NS_OK; - -exit: - - if ( err && service ) - { - delete service; - service = NULL; - } - - return err; -} - - -/* IDNSSDService resolve (in long interfaceIndex, in AString name, in AString regtype, in AString domain, in IDNSSDResolveListener listener); */ -NS_IMETHODIMP -CDNSSDService::Resolve(PRInt32 interfaceIndex, const nsAString & name, const nsAString & regtype, const nsAString & domain, IDNSSDResolveListener *listener, IDNSSDService **_retval NS_OUTPARAM) -{ - CDNSSDService * service; - DNSServiceErrorType dnsErr; - nsresult err; - - *_retval = NULL; - - if ( !m_mainRef ) - { - err = NS_ERROR_NOT_AVAILABLE; - goto exit; - } - - try - { - service = new CDNSSDService( m_mainRef, listener ); - } - catch ( ... ) - { - service = NULL; - } - - if ( service == NULL ) - { - err = NS_ERROR_FAILURE; - goto exit; - } - - dnsErr = DNSServiceResolve( &service->m_subRef, kDNSServiceFlagsShareConnection, interfaceIndex, NS_ConvertUTF16toUTF8( name ).get(), NS_ConvertUTF16toUTF8( regtype ).get(), NS_ConvertUTF16toUTF8( domain ).get(), ( DNSServiceResolveReply ) ResolveReply, service ); - - if ( dnsErr != kDNSServiceErr_NoError ) - { - err = NS_ERROR_FAILURE; - goto exit; - } - - listener->AddRef(); - service->AddRef(); - *_retval = service; - err = NS_OK; - -exit: - - if ( err && service ) - { - delete service; - service = NULL; - } - - return err; -} - - -/* void stop (); */ -NS_IMETHODIMP -CDNSSDService::Stop() -{ - if ( m_subRef ) - { - DNSServiceRefDeallocate( m_subRef ); - m_subRef = NULL; - } - - return NS_OK; -} - - -void -CDNSSDService::Read( void * arg ) -{ - NS_PRECONDITION( arg != NULL, "arg is NULL" ); - - NS_DispatchToMainThread( ( CDNSSDService* ) arg ); -} - - -NS_IMETHODIMP -CDNSSDService::Run() -{ - nsresult err = NS_OK; - - NS_PRECONDITION( m_mainRef != NULL, "m_mainRef is NULL" ); - - m_job = NULL; - - if ( PR_Available( m_fileDesc ) > 0 ) - { - if ( DNSServiceProcessResult( m_mainRef ) != kDNSServiceErr_NoError ) - { - err = NS_ERROR_FAILURE; - } - } - - if ( !err ) - { - err = SetupNotifications(); - } - - return err; -} - - -void DNSSD_API -CDNSSDService::BrowseReply - ( - DNSServiceRef sdRef, - DNSServiceFlags flags, - uint32_t interfaceIndex, - DNSServiceErrorType errorCode, - const char * serviceName, - const char * regtype, - const char * replyDomain, - void * context - ) -{ - CDNSSDService * self = ( CDNSSDService* ) context; - - // This should never be NULL, but let's be defensive. - - if ( self != NULL ) - { - IDNSSDBrowseListener * listener = ( IDNSSDBrowseListener* ) self->m_listener; - - // Same for this - - if ( listener != NULL ) - { - listener->OnBrowse( self, ( flags & kDNSServiceFlagsAdd ) ? PR_TRUE : PR_FALSE, interfaceIndex, errorCode, NS_ConvertUTF8toUTF16( serviceName ), NS_ConvertUTF8toUTF16( regtype ), NS_ConvertUTF8toUTF16( replyDomain ) ); - } - } -} - - -void DNSSD_API -CDNSSDService::ResolveReply - ( - DNSServiceRef sdRef, - DNSServiceFlags flags, - uint32_t interfaceIndex, - DNSServiceErrorType errorCode, - const char * fullname, - const char * hosttarget, - uint16_t port, - uint16_t txtLen, - const unsigned char * txtRecord, - void * context - ) -{ - CDNSSDService * self = ( CDNSSDService* ) context; - - // This should never be NULL, but let's be defensive. - - if ( self != NULL ) - { - IDNSSDResolveListener * listener = ( IDNSSDResolveListener* ) self->m_listener; - - // Same for this - - if ( listener != NULL ) - { - std::string path = ""; - const void * value = NULL; - uint8_t valueLen = 0; - - value = TXTRecordGetValuePtr( txtLen, txtRecord, "path", &valueLen ); - - if ( value && valueLen ) - { - char * temp; - - temp = new char[ valueLen + 2 ]; - - if ( temp ) - { - char * dst = temp; - - memset( temp, 0, valueLen + 2 ); - - if ( ( ( char* ) value )[ 0 ] != '/' ) - { - *dst++ = '/'; - } - - memcpy( dst, value, valueLen ); - path = temp; - delete [] temp; - } - } - - listener->OnResolve( self, interfaceIndex, errorCode, NS_ConvertUTF8toUTF16( fullname ), NS_ConvertUTF8toUTF16( hosttarget ) , ntohs( port ), NS_ConvertUTF8toUTF16( path.c_str() ) ); - } - } -} - diff --git a/Clients/FirefoxExtension/CDNSSDService.h b/Clients/FirefoxExtension/CDNSSDService.h deleted file mode 100755 index 33eaa71..0000000 --- a/Clients/FirefoxExtension/CDNSSDService.h +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: C; tab-width: 4 -*- - * - * Copyright (c) 2009 Apple Computer, Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef _CDNSSDSERVICE_H -#define _CDNSSDSERVICE_H - -#include "IDNSSDService.h" -#include "nsCOMPtr.h" -#include "nsComponentManagerUtils.h" -#include "nsIThread.h" -#include "nsIRunnable.h" -#include "prtpool.h" -#include -#include -#include - - -#define CDNSSDSERVICE_CONTRACTID "@apple.com/DNSSDService;1" -#define CDNSSDSERVICE_CLASSNAME "CDNSSDService" -#define CDNSSDSERVICE_CID { 0x944ED267, 0x465A, 0x4989, { 0x82, 0x72, 0x7E, 0xE9, 0x28, 0x6C, 0x99, 0xA5 } } - - -/* Header file */ -class CDNSSDService : public IDNSSDService, nsIRunnable -{ -public: -NS_DECL_ISUPPORTS -NS_DECL_IDNSSDSERVICE -NS_DECL_NSIRUNNABLE - -CDNSSDService(); -CDNSSDService( DNSServiceRef mainRef, nsISupports * listener ); - -virtual ~CDNSSDService(); - -private: - -static void DNSSD_API -BrowseReply -( - DNSServiceRef sdRef, - DNSServiceFlags flags, - uint32_t interfaceIndex, - DNSServiceErrorType errorCode, - const char * serviceName, - const char * regtype, - const char * replyDomain, - void * context -); - -static void DNSSD_API -ResolveReply -( - DNSServiceRef sdRef, - DNSServiceFlags flags, - uint32_t interfaceIndex, - DNSServiceErrorType errorCode, - const char * fullname, - const char * hosttarget, - uint16_t port, - uint16_t txtLen, - const unsigned char * txtRecord, - void * context -); - -static void -Read -( - void * arg -); - -nsresult -SetupNotifications(); - -void -Cleanup(); - -char m_master; -PRThreadPool * m_threadPool; -DNSServiceRef m_mainRef; -DNSServiceRef m_subRef; -nsISupports * m_listener; -PRFileDesc * m_fileDesc; -PRJobIoDesc m_iod; -PRJob * m_job; -}; - - -#endif diff --git a/Clients/FirefoxExtension/CDNSSDServiceModule.cpp b/Clients/FirefoxExtension/CDNSSDServiceModule.cpp deleted file mode 100755 index 3833c5a..0000000 --- a/Clients/FirefoxExtension/CDNSSDServiceModule.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C; tab-width: 4 -*- - * - * Copyright (c) 2009 Apple Computer, Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "nsIGenericFactory.h" -#include "CDNSSDService.h" - -NS_COM_GLUE nsresult -NS_NewGenericModule2(nsModuleInfo const *info, nsIModule* *result); - -NS_GENERIC_FACTORY_CONSTRUCTOR(CDNSSDService) - -static nsModuleComponentInfo components[] = -{ - { - CDNSSDSERVICE_CLASSNAME, - CDNSSDSERVICE_CID, - CDNSSDSERVICE_CONTRACTID, - CDNSSDServiceConstructor, - } -}; - -NS_IMPL_NSGETMODULE("CDNSSDServiceModule", components) - diff --git a/Clients/FirefoxExtension/DNSSDService.sln b/Clients/FirefoxExtension/DNSSDService.sln deleted file mode 100755 index 68534f4..0000000 --- a/Clients/FirefoxExtension/DNSSDService.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DNSSDService", "DNSSDService.vcproj", "{7826EA27-D4CC-4FAA-AD23-DF813823227B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7826EA27-D4CC-4FAA-AD23-DF813823227B}.Debug|Win32.ActiveCfg = Debug|Win32 - {7826EA27-D4CC-4FAA-AD23-DF813823227B}.Debug|Win32.Build.0 = Debug|Win32 - {7826EA27-D4CC-4FAA-AD23-DF813823227B}.Release|Win32.ActiveCfg = Release|Win32 - {7826EA27-D4CC-4FAA-AD23-DF813823227B}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Clients/FirefoxExtension/FirefoxExtension.rc b/Clients/FirefoxExtension/FirefoxExtension.rc deleted file mode 100644 index 998e5e9..0000000 --- a/Clients/FirefoxExtension/FirefoxExtension.rc +++ /dev/null @@ -1,102 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "WinVersRes.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""WinVersRes.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION MASTER_PROD_VERS - PRODUCTVERSION MASTER_PROD_VERS - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", MASTER_COMPANY_NAME - VALUE "FileDescription", "Firefox Extension Library" - VALUE "FileVersion", MASTER_PROD_VERS_STR - VALUE "InternalName", "DNSSDService.dll" - VALUE "LegalCopyright", MASTER_LEGAL_COPYRIGHT - VALUE "OriginalFilename", "DNSSDService.dll" - VALUE "ProductName", MASTER_PROD_NAME - VALUE "ProductVersion", MASTER_PROD_VERS_STR - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Clients/FirefoxExtension/FirefoxExtension.vcproj b/Clients/FirefoxExtension/FirefoxExtension.vcproj deleted file mode 100755 index 352fdd6..0000000 --- a/Clients/FirefoxExtension/FirefoxExtension.vcproj +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Clients/FirefoxExtension/FirefoxExtension.vcxproj b/Clients/FirefoxExtension/FirefoxExtension.vcxproj deleted file mode 100755 index 1d02a4e..0000000 --- a/Clients/FirefoxExtension/FirefoxExtension.vcxproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {7826EA27-D4CC-4FAA-AD23-DF813823227B} - - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - DNSSDService - DNSSDService - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\$(OutDir)DNSSDService.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\mDNSShared;$(SRCROOT)\AppleInternal\XULRunner\include\xpcom;$(SRCROOT)\AppleInternal\XULRunner\include\nspr;$(SRCROOT)\AppleInternal\XULRunner\include\string;$(SRCROOT)\AppleInternal\XULRunner\include\pref;$(SRCROOT)\AppleInternal\XULRunner\sdk\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_WINDOWS;_USRDLL;DNSSDSERVICE_EXPORTS;XP_WIN;XP_WIN32;%(PreprocessorDefinitions) - true - MultiThreaded - true - - - $(IntDir) - $(IntDir) - $(IntDir)vc80.pdb - Level3 - true - %(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ../../mDNSWindows;%(AdditionalIncludeDirectories) - - - /NXCOMPAT /DYNAMICBASE /SAFESEH %(AdditionalOptions) - $(SRCROOT)\AppleInternal\XULRunner\lib\nspr4.lib;$(SRCROOT)\AppleInternal\XULRunner\lib\xpcom.lib;$(SRCROOT)\AppleInternal\XULRunner\lib\xpcomglue_s.lib;ws2_32.lib;../../mDNSWindows/DLLStub/$(Platform)/$(Configuration)/dnssdStatic.lib;%(AdditionalDependencies) - $(OutDir)DNSSDService.dll - true - %(AdditionalLibraryDirectories) - .\$(OutDir)DNSSDService.pdb - .\$(OutDir)DNSSDService.lib - MachineX86 - - - true - .\$(OutDir)DNSSDService.bsc - - - xcopy /I/Y $(Platform)\$(Configuration)\DNSSDService.dll extension\platform\WINNT\components -if not "%RC_XBS%" == "YES" goto END -if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\FirefoxExtension" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\FirefoxExtension" -xcopy /E/I/Y "extension" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\FirefoxExtension" -:END - - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\$(OutDir)DNSSDService.tlb - - - - - Disabled - ..\..\mDNSShared;$(SRCROOT)\AppleInternal\XULRunner\include\xpcom;$(SRCROOT)\AppleInternal\XULRunner\include\nspr;$(SRCROOT)\AppleInternal\XULRunner\include\string;$(SRCROOT)\AppleInternal\XULRunner\include\pref;$(SRCROOT)\AppleInternal\XULRunner\sdk\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;DNSSDSERVICE_EXPORTS;XP_WIN;XP_WIN32;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - $(IntDir) - $(IntDir) - $(IntDir)vc80.pdb - Level3 - true - ProgramDatabase - %(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ../../mDNSWindows;%(AdditionalIncludeDirectories) - - - /NXCOMPAT /DYNAMICBASE /SAFESEH %(AdditionalOptions) - $(SRCROOT)\AppleInternal\XULRunner\lib\nspr4.lib;$(SRCROOT)\AppleInternal\XULRunner\lib\xpcom.lib;$(SRCROOT)\AppleInternal\XULRunner\lib\xpcomglue_s.lib;ws2_32.lib;../../mDNSWindows/DLLStub/$(Platform)/$(Configuration)/dnssdStatic.lib;%(AdditionalDependencies) - $(OutDir)DNSSDService.dll - true - %(AdditionalLibraryDirectories) - true - .\$(OutDir)DNSSDService.pdb - .\$(OutDir)DNSSDService.lib - MachineX86 - - - true - .\$(OutDir)DNSSDService.bsc - - - xcopy /I/Y $(Platform)\$(Configuration)\DNSSDService.dll extension\platform\WINNT\components - - - - - - - - - - - - - - - - - - - {3a2b6325-3053-4236-84bd-aa9be2e323e5} - false - - - - - - \ No newline at end of file diff --git a/Clients/FirefoxExtension/FirefoxExtension.vcxproj.filters b/Clients/FirefoxExtension/FirefoxExtension.vcxproj.filters deleted file mode 100755 index 02c1c55..0000000 --- a/Clients/FirefoxExtension/FirefoxExtension.vcxproj.filters +++ /dev/null @@ -1,47 +0,0 @@ - - - - - {89e57cc2-d6b1-4e68-ad57-71223df12d28} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {4d103fe8-9737-47c7-9190-6f7b5666ecf5} - h;hpp;hxx;hm;inl - - - {4dae44a8-3da8-43c0-a749-2d1e0610c66f} - idl - - - {ac7dbdd1-2fe3-416d-9cab-2d663c05f252} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - - - Resource Files - - - - - IDL - - - \ No newline at end of file diff --git a/Clients/FirefoxExtension/IDNSSDService.h b/Clients/FirefoxExtension/IDNSSDService.h deleted file mode 100755 index e4784d4..0000000 --- a/Clients/FirefoxExtension/IDNSSDService.h +++ /dev/null @@ -1,263 +0,0 @@ -/* - * DO NOT EDIT. THIS FILE IS GENERATED FROM IDNSSDService.idl - */ - -#ifndef __gen_IDNSSDService_h__ -#define __gen_IDNSSDService_h__ - - -#ifndef __gen_nsISupports_h__ -#include "nsISupports.h" -#endif - -/* For IDL files that don't want to include root IDL files. */ -#ifndef NS_NO_VTABLE -#define NS_NO_VTABLE -#endif -class IDNSSDService; /* forward declaration */ - - -/* starting interface: IDNSSDBrowseListener */ -#define IDNSSDBROWSELISTENER_IID_STR "27346495-a1ed-458a-a5bc-587df9a26b4f" - -#define IDNSSDBROWSELISTENER_IID \ - {0x27346495, 0xa1ed, 0x458a, \ - { 0xa5, 0xbc, 0x58, 0x7d, 0xf9, 0xa2, 0x6b, 0x4f }} - -class NS_NO_VTABLE NS_SCRIPTABLE IDNSSDBrowseListener : public nsISupports { -public: - -NS_DECLARE_STATIC_IID_ACCESSOR(IDNSSDBROWSELISTENER_IID) - -/* void onBrowse (in IDNSSDService service, in boolean add, in long interfaceIndex, in long error, in AString serviceName, in AString regtype, in AString domain); */ -NS_SCRIPTABLE NS_IMETHOD OnBrowse(IDNSSDService *service, PRBool add, PRInt32 interfaceIndex, PRInt32 error, const nsAString & serviceName, const nsAString & regtype, const nsAString & domain) = 0; - -}; - -NS_DEFINE_STATIC_IID_ACCESSOR(IDNSSDBrowseListener, IDNSSDBROWSELISTENER_IID) - -/* Use this macro when declaring classes that implement this interface. */ -#define NS_DECL_IDNSSDBROWSELISTENER \ - NS_SCRIPTABLE NS_IMETHOD OnBrowse(IDNSSDService *service, PRBool add, PRInt32 interfaceIndex, PRInt32 error, const nsAString &serviceName, const nsAString ®type, const nsAString &domain); - -/* Use this macro to declare functions that forward the behavior of this interface to another object. */ -#define NS_FORWARD_IDNSSDBROWSELISTENER(_to) \ - NS_SCRIPTABLE NS_IMETHOD OnBrowse(IDNSSDService *service, PRBool add, PRInt32 interfaceIndex, PRInt32 error, const nsAString &serviceName, const nsAString ®type, const nsAString &domain) { return _to OnBrowse(service, add, interfaceIndex, error, serviceName, regtype, domain); } - -/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ -#define NS_FORWARD_SAFE_IDNSSDBROWSELISTENER(_to) \ - NS_SCRIPTABLE NS_IMETHOD OnBrowse(IDNSSDService *service, PRBool add, PRInt32 interfaceIndex, PRInt32 error, const nsAString &serviceName, const nsAString ®type, const nsAString &domain) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnBrowse(service, add, interfaceIndex, error, serviceName, regtype, domain); } - -#if 0 -/* Use the code below as a template for the implementation class for this interface. */ - -/* Header file */ -class _MYCLASS_ : public IDNSSDBrowseListener -{ -public: -NS_DECL_ISUPPORTS -NS_DECL_IDNSSDBROWSELISTENER - -_MYCLASS_(); - -private: -~_MYCLASS_(); - -protected: -/* additional members */ -}; - -/* Implementation file */ -NS_IMPL_ISUPPORTS1(_MYCLASS_, IDNSSDBrowseListener) - -_MYCLASS_::_MYCLASS_() -{ - /* member initializers and constructor code */ -} - -_MYCLASS_::~_MYCLASS_() -{ - /* destructor code */ -} - -/* void onBrowse (in IDNSSDService service, in boolean add, in long interfaceIndex, in long error, in AString serviceName, in AString regtype, in AString domain); */ -NS_IMETHODIMP _MYCLASS_::OnBrowse(IDNSSDService *service, PRBool add, PRInt32 interfaceIndex, PRInt32 error, const nsAString & serviceName, const nsAString & regtype, const nsAString & domain) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -/* End of implementation class template. */ -#endif - - -/* starting interface: IDNSSDResolveListener */ -#define IDNSSDRESOLVELISTENER_IID_STR "6620e18f-47f3-47c6-941f-126a5fd4fcf7" - -#define IDNSSDRESOLVELISTENER_IID \ - {0x6620e18f, 0x47f3, 0x47c6, \ - { 0x94, 0x1f, 0x12, 0x6a, 0x5f, 0xd4, 0xfc, 0xf7 }} - -class NS_NO_VTABLE NS_SCRIPTABLE IDNSSDResolveListener : public nsISupports { -public: - -NS_DECLARE_STATIC_IID_ACCESSOR(IDNSSDRESOLVELISTENER_IID) - -/* void onResolve (in IDNSSDService service, in long interfaceIndex, in long error, in AString fullname, in AString host, in short port, in AString path); */ -NS_SCRIPTABLE NS_IMETHOD OnResolve(IDNSSDService *service, PRInt32 interfaceIndex, PRInt32 error, const nsAString & fullname, const nsAString & host, PRInt16 port, const nsAString & path) = 0; - -}; - -NS_DEFINE_STATIC_IID_ACCESSOR(IDNSSDResolveListener, IDNSSDRESOLVELISTENER_IID) - -/* Use this macro when declaring classes that implement this interface. */ -#define NS_DECL_IDNSSDRESOLVELISTENER \ - NS_SCRIPTABLE NS_IMETHOD OnResolve(IDNSSDService *service, PRInt32 interfaceIndex, PRInt32 error, const nsAString &fullname, const nsAString &host, PRInt16 port, const nsAString &path); - -/* Use this macro to declare functions that forward the behavior of this interface to another object. */ -#define NS_FORWARD_IDNSSDRESOLVELISTENER(_to) \ - NS_SCRIPTABLE NS_IMETHOD OnResolve(IDNSSDService *service, PRInt32 interfaceIndex, PRInt32 error, const nsAString &fullname, const nsAString &host, PRInt16 port, const nsAString &path) { return _to OnResolve(service, interfaceIndex, error, fullname, host, port, path); } - -/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ -#define NS_FORWARD_SAFE_IDNSSDRESOLVELISTENER(_to) \ - NS_SCRIPTABLE NS_IMETHOD OnResolve(IDNSSDService *service, PRInt32 interfaceIndex, PRInt32 error, const nsAString &fullname, const nsAString &host, PRInt16 port, const nsAString &path) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnResolve(service, interfaceIndex, error, fullname, host, port, path); } - -#if 0 -/* Use the code below as a template for the implementation class for this interface. */ - -/* Header file */ -class _MYCLASS_ : public IDNSSDResolveListener -{ -public: -NS_DECL_ISUPPORTS -NS_DECL_IDNSSDRESOLVELISTENER - -_MYCLASS_(); - -private: -~_MYCLASS_(); - -protected: -/* additional members */ -}; - -/* Implementation file */ -NS_IMPL_ISUPPORTS1(_MYCLASS_, IDNSSDResolveListener) - -_MYCLASS_::_MYCLASS_() -{ - /* member initializers and constructor code */ -} - -_MYCLASS_::~_MYCLASS_() -{ - /* destructor code */ -} - -/* void onResolve (in IDNSSDService service, in long interfaceIndex, in long error, in AString fullname, in AString host, in short port, in AString path); */ -NS_IMETHODIMP _MYCLASS_::OnResolve(IDNSSDService *service, PRInt32 interfaceIndex, PRInt32 error, const nsAString & fullname, const nsAString & host, PRInt16 port, const nsAString & path) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -/* End of implementation class template. */ -#endif - - -/* starting interface: IDNSSDService */ -#define IDNSSDSERVICE_IID_STR "3a3539ff-f8d8-40b4-8d02-5ea73c51fa12" - -#define IDNSSDSERVICE_IID \ - {0x3a3539ff, 0xf8d8, 0x40b4, \ - { 0x8d, 0x02, 0x5e, 0xa7, 0x3c, 0x51, 0xfa, 0x12 }} - -class NS_NO_VTABLE NS_SCRIPTABLE IDNSSDService : public nsISupports { -public: - -NS_DECLARE_STATIC_IID_ACCESSOR(IDNSSDSERVICE_IID) - -/* IDNSSDService browse (in long interfaceIndex, in AString regtype, in AString domain, in IDNSSDBrowseListener listener); */ -NS_SCRIPTABLE NS_IMETHOD Browse(PRInt32 interfaceIndex, const nsAString & regtype, const nsAString & domain, IDNSSDBrowseListener *listener, IDNSSDService **_retval NS_OUTPARAM) = 0; - -/* IDNSSDService resolve (in long interfaceIndex, in AString name, in AString regtype, in AString domain, in IDNSSDResolveListener listener); */ -NS_SCRIPTABLE NS_IMETHOD Resolve(PRInt32 interfaceIndex, const nsAString & name, const nsAString & regtype, const nsAString & domain, IDNSSDResolveListener *listener, IDNSSDService **_retval NS_OUTPARAM) = 0; - -/* void stop (); */ -NS_SCRIPTABLE NS_IMETHOD Stop(void) = 0; - -}; - -NS_DEFINE_STATIC_IID_ACCESSOR(IDNSSDService, IDNSSDSERVICE_IID) - -/* Use this macro when declaring classes that implement this interface. */ -#define NS_DECL_IDNSSDSERVICE \ - NS_SCRIPTABLE NS_IMETHOD Browse(PRInt32 interfaceIndex, const nsAString ®type, const nsAString &domain, IDNSSDBrowseListener *listener, IDNSSDService **_retval NS_OUTPARAM); \ - NS_SCRIPTABLE NS_IMETHOD Resolve(PRInt32 interfaceIndex, const nsAString &name, const nsAString ®type, const nsAString &domain, IDNSSDResolveListener *listener, IDNSSDService **_retval NS_OUTPARAM); \ - NS_SCRIPTABLE NS_IMETHOD Stop(void); - -/* Use this macro to declare functions that forward the behavior of this interface to another object. */ -#define NS_FORWARD_IDNSSDSERVICE(_to) \ - NS_SCRIPTABLE NS_IMETHOD Browse(PRInt32 interfaceIndex, const nsAString ®type, const nsAString &domain, IDNSSDBrowseListener *listener, IDNSSDService **_retval NS_OUTPARAM) { return _to Browse(interfaceIndex, regtype, domain, listener, _retval); } \ - NS_SCRIPTABLE NS_IMETHOD Resolve(PRInt32 interfaceIndex, const nsAString &name, const nsAString ®type, const nsAString &domain, IDNSSDResolveListener *listener, IDNSSDService **_retval NS_OUTPARAM) { return _to Resolve(interfaceIndex, name, regtype, domain, listener, _retval); } \ - NS_SCRIPTABLE NS_IMETHOD Stop(void) { return _to Stop(); } - -/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ -#define NS_FORWARD_SAFE_IDNSSDSERVICE(_to) \ - NS_SCRIPTABLE NS_IMETHOD Browse(PRInt32 interfaceIndex, const nsAString ®type, const nsAString &domain, IDNSSDBrowseListener *listener, IDNSSDService **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Browse(interfaceIndex, regtype, domain, listener, _retval); } \ - NS_SCRIPTABLE NS_IMETHOD Resolve(PRInt32 interfaceIndex, const nsAString &name, const nsAString ®type, const nsAString &domain, IDNSSDResolveListener *listener, IDNSSDService **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(interfaceIndex, name, regtype, domain, listener, _retval); } \ - NS_SCRIPTABLE NS_IMETHOD Stop(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(); } - -#if 0 -/* Use the code below as a template for the implementation class for this interface. */ - -/* Header file */ -class _MYCLASS_ : public IDNSSDService -{ -public: -NS_DECL_ISUPPORTS -NS_DECL_IDNSSDSERVICE - -_MYCLASS_(); - -private: -~_MYCLASS_(); - -protected: -/* additional members */ -}; - -/* Implementation file */ -NS_IMPL_ISUPPORTS1(_MYCLASS_, IDNSSDService) - -_MYCLASS_::_MYCLASS_() -{ - /* member initializers and constructor code */ -} - -_MYCLASS_::~_MYCLASS_() -{ - /* destructor code */ -} - -/* IDNSSDService browse (in long interfaceIndex, in AString regtype, in AString domain, in IDNSSDBrowseListener listener); */ -NS_IMETHODIMP _MYCLASS_::Browse(PRInt32 interfaceIndex, const nsAString & regtype, const nsAString & domain, IDNSSDBrowseListener *listener, IDNSSDService **_retval NS_OUTPARAM) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -/* IDNSSDService resolve (in long interfaceIndex, in AString name, in AString regtype, in AString domain, in IDNSSDResolveListener listener); */ -NS_IMETHODIMP _MYCLASS_::Resolve(PRInt32 interfaceIndex, const nsAString & name, const nsAString & regtype, const nsAString & domain, IDNSSDResolveListener *listener, IDNSSDService **_retval NS_OUTPARAM) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -/* void stop (); */ -NS_IMETHODIMP _MYCLASS_::Stop() -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -/* End of implementation class template. */ -#endif - - -#endif /* __gen_IDNSSDService_h__ */ diff --git a/Clients/FirefoxExtension/IDNSSDService.idl b/Clients/FirefoxExtension/IDNSSDService.idl deleted file mode 100755 index d0f62c8..0000000 --- a/Clients/FirefoxExtension/IDNSSDService.idl +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- Mode: C; tab-width: 4 -*- - * - * Copyright (c) 2009 Apple Computer, Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "nsISupports.idl" - -interface IDNSSDService; - - -[scriptable, function, uuid(27346495-A1ED-458A-A5BC-587DF9A26B4F)] -interface IDNSSDBrowseListener : nsISupports -{ - void - onBrowse( in IDNSSDService service, in boolean add, in long interfaceIndex, in long error, in AString serviceName, in AString regtype, in AString domain ); -}; - - -[scriptable, function, uuid(6620E18F-47F3-47C6-941F-126A5FD4FCF7)] -interface IDNSSDResolveListener : nsISupports -{ - void - onResolve( in IDNSSDService service, in long interfaceIndex, in long error, in AString fullname, in AString host, in short port, in AString path ); -}; - - -[scriptable, uuid(3A3539FF-F8D8-40B4-8D02-5EA73C51FA12)] -interface IDNSSDService : nsISupports -{ - IDNSSDService - browse( in long interfaceIndex, in AString regtype, in AString domain, in IDNSSDBrowseListener listener ); - - IDNSSDService - resolve( in long interfaceIndex, in AString name, in AString regtype, in AString domain, in IDNSSDResolveListener listener ); - - void - stop(); -}; diff --git a/Clients/FirefoxExtension/extension/chrome.manifest b/Clients/FirefoxExtension/extension/chrome.manifest deleted file mode 100755 index f1daf86..0000000 --- a/Clients/FirefoxExtension/extension/chrome.manifest +++ /dev/null @@ -1,6 +0,0 @@ -content bonjour4firefox content/ -locale bonjour4firefox en-US locale/en-US/ -skin bonjour4firefox classic/1.0 skin/ -skin bonjour4firefox classic/1.0 skin-darwin/ os=darwin -overlay chrome://browser/content/browser.xul chrome://bonjour4firefox/content/browserOverlay.xul -style chrome://global/content/customizeToolbar.xul chrome://bonjour4firefox/skin/overlay.css diff --git a/Clients/FirefoxExtension/extension/components/IDNSSDService.xpt b/Clients/FirefoxExtension/extension/components/IDNSSDService.xpt deleted file mode 100755 index bfda3e5..0000000 Binary files a/Clients/FirefoxExtension/extension/components/IDNSSDService.xpt and /dev/null differ diff --git a/Clients/FirefoxExtension/extension/content/_internal_bonjour4firefox.png b/Clients/FirefoxExtension/extension/content/_internal_bonjour4firefox.png deleted file mode 100755 index baf8b21..0000000 Binary files a/Clients/FirefoxExtension/extension/content/_internal_bonjour4firefox.png and /dev/null differ diff --git a/Clients/FirefoxExtension/extension/content/_internal_listImage.png b/Clients/FirefoxExtension/extension/content/_internal_listImage.png deleted file mode 100755 index 278efe3..0000000 Binary files a/Clients/FirefoxExtension/extension/content/_internal_listImage.png and /dev/null differ diff --git a/Clients/FirefoxExtension/extension/content/bonjour4firefox.css b/Clients/FirefoxExtension/extension/content/bonjour4firefox.css deleted file mode 100755 index 2e7eb2c..0000000 --- a/Clients/FirefoxExtension/extension/content/bonjour4firefox.css +++ /dev/null @@ -1,16 +0,0 @@ -tree.sidebar-placesTree treechildren::-moz-tree-row(selected) -{ - background-color: #6f81a9; - background-image: url("chrome://browser/skin/places/selected-gradient.png"); - background-repeat: repeat-x; - background-position: bottom left; - border-top: 1px solid #979797; -} - - -tree.sidebar-placesTree treechildren::-moz-tree-separator -{ - border-top: 1px solid #505d6d; - margin: 0 10px; -} - diff --git a/Clients/FirefoxExtension/extension/content/bonjour4firefox.xul b/Clients/FirefoxExtension/extension/content/bonjour4firefox.xul deleted file mode 100755 index 2be0c69..0000000 --- a/Clients/FirefoxExtension/extension/content/bonjour4firefox.xul +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Clients/FirefoxExtension/extension/content/browserOverlay.xul b/Clients/FirefoxExtension/extension/content/browserOverlay.xul deleted file mode 100755 index 3b4d668..0000000 --- a/Clients/FirefoxExtension/extension/content/browserOverlay.xul +++ /dev/null @@ -1,32 +0,0 @@ - - - - -