From 263eeeabe5fb4d3daa8a9134371ca9a3e45875b0 Mon Sep 17 00:00:00 2001 From: Apple Date: Fri, 8 Oct 2010 23:06:12 +0000 Subject: [PATCH] mDNSResponder-258.13.tar.gz --- Clients/BonjourExample/BonjourExample.cpp | 12 +- Clients/BonjourExample/stdafx.cpp | 12 +- Clients/BonjourExample/stdafx.h | 12 +- Clients/ClientCommon.c | 13 +- Clients/ClientCommon.h | 10 +- Clients/DNS-SD.VisualStudio/dns-sd.sdk.rc | 102 + Clients/DNS-SD.VisualStudio/dns-sd.sdk.vcproj | 408 + Clients/DNS-SD.VisualStudio/dns-sd.vcproj | 2 +- Clients/DNSServiceBrowser.NET/AssemblyInfo.cs | 13 +- .../DNSServiceBrowser.cs | 33 +- .../DNSServiceBrowser.VB/DNSServiceBrowser.vb | 16 + Clients/DNSServiceBrowser.m | 63 +- Clients/DNSServiceReg.m | 16 - Clients/ExplorerPlugin/ClassFactory.cpp | 16 - Clients/ExplorerPlugin/ClassFactory.h | 18 +- Clients/ExplorerPlugin/ExplorerBar.cpp | 25 +- Clients/ExplorerPlugin/ExplorerBar.h | 22 +- Clients/ExplorerPlugin/ExplorerBarWindow.cpp | 123 +- Clients/ExplorerPlugin/ExplorerBarWindow.h | 44 +- Clients/ExplorerPlugin/ExplorerPlugin.cpp | 43 +- Clients/ExplorerPlugin/ExplorerPlugin.def | 16 - Clients/ExplorerPlugin/ExplorerPlugin.h | 25 +- Clients/ExplorerPlugin/ExplorerPlugin.vcproj | 4 +- .../ExplorerPlugin/ExplorerPluginLocRes.rc | 2 +- .../ExplorerPluginLocRes.vcproj | 4 +- .../ExplorerPlugin/ExplorerPluginRes.vcproj | 12 +- Clients/ExplorerPlugin/LoginDialog.cpp | 18 +- Clients/ExplorerPlugin/LoginDialog.h | 18 +- Clients/ExplorerPlugin/Resource.h | 3 - Clients/ExplorerPlugin/StdAfx.cpp | 18 +- Clients/ExplorerPlugin/StdAfx.h | 21 +- Clients/FirefoxExtension/CDNSSDService.cpp | 394 + Clients/FirefoxExtension/CDNSSDService.h | 104 + .../FirefoxExtension/CDNSSDServiceModule.cpp | 37 + Clients/FirefoxExtension/DNSSDService.sln | 20 + Clients/FirefoxExtension/FirefoxExtension.rc | 102 + .../FirefoxExtension/FirefoxExtension.vcproj | 282 + Clients/FirefoxExtension/IDNSSDService.h | 263 + Clients/FirefoxExtension/IDNSSDService.idl | 50 + .../extension/chrome.manifest | 6 + .../extension/components/IDNSSDService.xpt | Bin 0 -> 376 bytes .../extension/content/bonjour4firefox.css | 16 + .../extension/content/bonjour4firefox.png | Bin 0 -> 1589 bytes .../extension/content/bonjour4firefox.xul | 222 + .../extension/content/browserOverlay.xul | 32 + .../extension/content/listImage.png | Bin 0 -> 3417 bytes .../extension/content/overlay.js | 21 + .../defaults/preferences/bonjour4firefox.js | 2 + .../FirefoxExtension/extension/install.rdf | 19 + .../locale/en-US/bonjour4firefox.dtd | 6 + .../locale/en-US/bonjour4firefox.properties | 4 + Clients/FirefoxExtension/extension/readme.txt | 21 + .../extension/skin-darwin/overlay.css | 17 + .../extension/skin-darwin/toolbar-button.png | Bin 0 -> 6798 bytes .../extension/skin/overlay.css | 21 + .../extension/skin/toolbar-button.png | Bin 0 -> 5022 bytes Clients/FirefoxExtension/readme.txt | 16 + Clients/FirefoxExtension/resource.h | 27 + Clients/Java/DNSSDUnitTest.java | 25 +- Clients/Makefile | 39 - Clients/PrinterSetupWizard/FirstPage.cpp | 27 +- Clients/PrinterSetupWizard/FirstPage.h | 16 +- Clients/PrinterSetupWizard/FourthPage.cpp | 110 +- Clients/PrinterSetupWizard/FourthPage.h | 22 +- Clients/PrinterSetupWizard/Logger.cpp | 13 - Clients/PrinterSetupWizard/Logger.h | 8 - .../PrinterSetupWizard/PrinterSetupWizard.rc | 2 +- .../PrinterSetupWizard.vcproj | 8 +- .../PrinterSetupWizardApp.cpp | 39 +- .../PrinterSetupWizardApp.h | 17 +- .../PrinterSetupWizardLocRes.rc | 6 +- .../PrinterSetupWizardLocRes.vcproj | 4 +- .../PrinterSetupWizardRes.rc | 2 +- .../PrinterSetupWizardRes.vcproj | 20 +- .../PrinterSetupWizardSheet.cpp | 653 +- .../PrinterSetupWizardSheet.h | 129 +- Clients/PrinterSetupWizard/SecondPage.cpp | 180 +- Clients/PrinterSetupWizard/SecondPage.h | 38 +- Clients/PrinterSetupWizard/ThirdPage.cpp | 199 +- Clients/PrinterSetupWizard/ThirdPage.h | 42 +- Clients/PrinterSetupWizard/UtilTypes.h | 71 +- .../PrinterSetupWizard/res/NetworkPrinter.ico | Bin 82726 -> 287934 bytes Clients/PrinterSetupWizard/resource.h | 3 - Clients/PrinterSetupWizard/resource_exe.h | 6 +- Clients/PrinterSetupWizard/resource_loc_res.h | 4 + Clients/PrinterSetupWizard/resource_res.h | 4 + Clients/PrinterSetupWizard/stdafx.cpp | 13 +- Clients/PrinterSetupWizard/stdafx.h | 16 +- Clients/SimpleChat.NET/AssemblyInfo.cs | 14 +- Clients/SimpleChat.NET/SimpleChat.cs | 710 +- Clients/SimpleChat.VB/SimpleChat.vb | 15 + Clients/dns-sd.c | 150 +- .../mDNSNetMonitor.rc | 103 + .../mDNSNetMonitor.vcproj | 12 +- .../mDNSNetMonitor.VisualStudio/resource.h | 14 + Makefile | 4 +- mDNSCore/DNSCommon.c | 964 +- mDNSCore/DNSCommon.h | 180 +- mDNSCore/DNSDigest.c | 101 +- mDNSCore/mDNS.c | 5631 +++++------ mDNSCore/mDNSDebug.h | 177 +- mDNSCore/mDNSEmbeddedAPI.h | 1532 +-- mDNSCore/uDNS.c | 4284 ++++----- mDNSCore/uDNS.h | 234 +- mDNSMacOS9/CarbonResource.r | 10 - mDNSMacOS9/Mac OS Test Responder.c | 43 - mDNSMacOS9/Mac OS Test Searcher.c | 51 - mDNSMacOS9/Responder.c | 14 - mDNSMacOS9/Searcher.c | 17 - mDNSMacOS9/SubTypeTester.c | 31 - mDNSMacOS9/mDNSLibrary.c | 20 - mDNSMacOS9/mDNSLibraryLoader.c | 11 - mDNSMacOS9/mDNSLibraryResources.r | 167 - mDNSMacOS9/mDNSMacOS9.c | 116 - mDNSMacOS9/mDNSMacOS9.h | 17 - mDNSMacOS9/mDNSPrefix.h | 17 - mDNSMacOSX/DNSServiceDiscoveryDefines.h | 16 - mDNSMacOSX/LegacyNATTraversal.c | 376 +- .../PreferencePane/ConfigurationAuthority.c | 19 +- .../PreferencePane/ConfigurationAuthority.h | 9 +- .../PreferencePane/ConfigurationRights.h | 12 +- .../PreferencePane/DNSServiceDiscoveryPref.h | 25 +- .../PreferencePane/DNSServiceDiscoveryPref.m | 58 +- .../PreferencePane/PrivilegedOperations.c | 34 +- .../PreferencePane/PrivilegedOperations.h | 25 +- mDNSMacOSX/PreferencePane/ddnswriteconfig.m | 54 +- mDNSMacOSX/PreferencePane/installtool | 13 - mDNSMacOSX/SamplemDNSClient.c | 40 +- mDNSMacOSX/daemon.c | 1018 +- mDNSMacOSX/helper-entitlements.plist | 12 + mDNSMacOSX/helper-error.h | 29 - mDNSMacOSX/helper-main.c | 112 +- mDNSMacOSX/helper-server.h | 18 - mDNSMacOSX/helper-stubs.c | 85 +- mDNSMacOSX/helper.c | 620 +- mDNSMacOSX/helper.h | 66 +- mDNSMacOSX/helpermsg-types.h | 12 - mDNSMacOSX/helpermsg.defs | 80 +- mDNSMacOSX/mDNSMacOSX.c | 8220 ++++++++++------- mDNSMacOSX/mDNSMacOSX.h | 220 +- mDNSMacOSX/mDNSResponder.sb | 155 +- .../mDNSResponder.xcodeproj/project.pbxproj | 142 +- mDNSMacOSX/mDNSResponderHelper.8 | 6 - mDNSMacOSX/pfkey.c | 7 + mDNSMacOSX/safe_vproc.c | 26 +- mDNSMacOSX/safe_vproc.h | 7 - mDNSPosix/Client.c | 78 +- mDNSPosix/ExampleClientApp.c | 34 - mDNSPosix/ExampleClientApp.h | 19 - mDNSPosix/Identify.c | 38 +- mDNSPosix/Makefile | 262 - mDNSPosix/NetMonitor.c | 130 +- mDNSPosix/PosixDaemon.c | 92 +- mDNSPosix/ProxyResponder.c | 118 - mDNSPosix/Responder.c | 141 +- mDNSPosix/libnss_mdns.8 | 1 - mDNSPosix/mDNSPosix.c | 128 +- mDNSPosix/mDNSPosix.h | 65 +- mDNSPosix/mDNSUNP.c | 142 +- mDNSPosix/mDNSUNP.h | 68 +- mDNSPosix/mdnsd.sh | 28 - mDNSPosix/nss_mdns.conf.5 | 1 - mDNSPosix/parselog.py | 12 - mDNSResponder.sln | 108 +- mDNSShared/CommonServices.h | 40 +- mDNSShared/DebugServices.c | 27 - mDNSShared/DebugServices.h | 25 +- mDNSShared/GenLinkedList.c | 15 +- mDNSShared/GenLinkedList.h | 19 +- mDNSShared/Java/BaseListener.java | 13 - mDNSShared/Java/BrowseListener.java | 13 - mDNSShared/Java/DNSRecord.java | 14 - mDNSShared/Java/DNSSD.java | 80 +- mDNSShared/Java/DNSSDException.java | 24 +- mDNSShared/Java/DNSSDRecordRegistrar.java | 13 - mDNSShared/Java/DNSSDRegistration.java | 16 - mDNSShared/Java/DNSSDService.java | 13 - mDNSShared/Java/DomainListener.java | 13 - mDNSShared/Java/JNISupport.c | 82 +- mDNSShared/Java/QueryListener.java | 16 - mDNSShared/Java/RegisterListener.java | 13 - mDNSShared/Java/RegisterRecordListener.java | 11 - mDNSShared/Java/ResolveListener.java | 15 +- mDNSShared/Java/TXTRecord.java | 27 - mDNSShared/PlatformCommon.c | 73 - mDNSShared/PlatformCommon.h | 29 - mDNSShared/dns-sd.1 | 21 - mDNSShared/dns_sd.h | 293 +- mDNSShared/dnsextd.8 | 9 - mDNSShared/dnsextd.c | 298 +- mDNSShared/dnsextd.h | 22 - mDNSShared/dnsextd_lexer.l | 24 - mDNSShared/dnsextd_parser.y | 37 +- mDNSShared/dnssd_clientlib.c | 73 - mDNSShared/dnssd_clientshim.c | 137 +- mDNSShared/dnssd_clientstub.c | 693 +- mDNSShared/dnssd_ipc.c | 56 - mDNSShared/dnssd_ipc.h | 138 +- mDNSShared/mDNS.1 | 27 - mDNSShared/mDNSDebug.c | 59 +- mDNSShared/mDNSResponder.8 | 33 - mDNSShared/uds_daemon.c | 1664 ++-- mDNSShared/uds_daemon.h | 112 +- mDNSVxWorks/mDNSVxWorks.c | 30 +- mDNSVxWorks/mDNSVxWorks.h | 12 +- mDNSVxWorks/mDNSVxWorksIPv4Only.c | 117 - mDNSVxWorks/mDNSVxWorksIPv4Only.h | 20 +- .../{ThirdPage.cpp => BrowsingPage.cpp} | 85 +- .../{ThirdPage.h => BrowsingPage.h} | 29 +- mDNSWindows/ControlPanel/ConfigDialog.cpp | 13 +- mDNSWindows/ControlPanel/ConfigDialog.h | 13 +- .../ControlPanel/ConfigPropertySheet.cpp | 297 +- .../ControlPanel/ConfigPropertySheet.h | 56 +- mDNSWindows/ControlPanel/ControlPanel.cpp | 20 +- mDNSWindows/ControlPanel/ControlPanel.def | 12 - mDNSWindows/ControlPanel/ControlPanel.h | 13 +- mDNSWindows/ControlPanel/ControlPanel.rc | 393 +- mDNSWindows/ControlPanel/ControlPanel.vcproj | 247 +- mDNSWindows/ControlPanel/ControlPanelExe.cpp | 110 +- mDNSWindows/ControlPanel/ControlPanelExe.h | 22 +- .../ControlPanel/ControlPanelExe.vcproj | 8 + .../ControlPanel/ControlPanelLocRes.rc | 270 + .../ControlPanel/ControlPanelLocRes.vcproj | 487 + mDNSWindows/ControlPanel/ControlPanelRes.rc | 134 + .../ControlPanel/ControlPanelRes.vcproj | 518 ++ mDNSWindows/ControlPanel/FirstPage.cpp | 315 - mDNSWindows/ControlPanel/FourthPage.cpp | 56 +- mDNSWindows/ControlPanel/FourthPage.h | 16 +- mDNSWindows/ControlPanel/RegistrationPage.cpp | 387 + .../{FirstPage.h => RegistrationPage.h} | 53 +- mDNSWindows/ControlPanel/SecondPage.cpp | 124 +- mDNSWindows/ControlPanel/SecondPage.h | 16 +- mDNSWindows/ControlPanel/ServicesPage.cpp | 273 + mDNSWindows/ControlPanel/ServicesPage.h | 123 + mDNSWindows/ControlPanel/SharedSecret.cpp | 25 +- mDNSWindows/ControlPanel/SharedSecret.h | 19 +- mDNSWindows/ControlPanel/res/EnergySaver.ico | Bin 0 -> 16958 bytes mDNSWindows/ControlPanel/res/controlpanel.ico | Bin 22486 -> 1434518 bytes mDNSWindows/ControlPanel/resource.h | 57 +- mDNSWindows/ControlPanel/stdafx.cpp | 13 +- mDNSWindows/ControlPanel/stdafx.h | 16 +- mDNSWindows/DLL.NET/AssemblyInfo.cpp | 24 - mDNSWindows/DLL.NET/PString.h | 14 - mDNSWindows/DLL.NET/Stdafx.cpp | 13 - mDNSWindows/DLL.NET/Stdafx.h | 23 - mDNSWindows/DLL.NET/dnssd_NET.cpp | 43 - mDNSWindows/DLL.NET/dnssd_NET.h | 35 - mDNSWindows/DLL/dllmain.c | 21 +- mDNSWindows/DLL/dnssd.def | 26 - mDNSWindows/DLL/dnssd.vcproj | 4 +- mDNSWindows/DLLStub/DLLStub.vcproj | 2 + mDNSWindows/DLLX/DLLX.cpp | 294 +- mDNSWindows/DLLX/DLLX.def | 36 +- mDNSWindows/DLLX/DLLX.idl | 576 +- mDNSWindows/DLLX/DNSSDEventManager.cpp | 30 +- mDNSWindows/DLLX/DNSSDEventManager.h | 183 +- mDNSWindows/DLLX/DNSSDRecord.cpp | 135 +- mDNSWindows/DLLX/DNSSDRecord.h | 261 +- mDNSWindows/DLLX/DNSSDService.cpp | 2997 ++++-- mDNSWindows/DLLX/DNSSDService.h | 498 +- mDNSWindows/DLLX/StringServices.cpp | 486 +- mDNSWindows/DLLX/StringServices.h | 135 +- mDNSWindows/DLLX/TXTRecord.cpp | 555 +- mDNSWindows/DLLX/TXTRecord.h | 288 +- mDNSWindows/DLLX/dlldatax.c | 60 +- mDNSWindows/DLLX/dlldatax.h | 57 +- mDNSWindows/DLLX/stdafx.h | 114 +- .../Windows/Resources/Application.rc2 | 27 +- .../Windows/Sources/AboutDialog.cpp | 36 +- .../Windows/Sources/AboutDialog.h | 36 +- .../Windows/Sources/Application.cpp | 36 +- .../Windows/Sources/Application.h | 33 +- .../Windows/Sources/ChooserDialog.cpp | 76 +- .../Windows/Sources/ChooserDialog.h | 36 +- .../Windows/Sources/LoginDialog.cpp | 18 +- .../Windows/Sources/LoginDialog.h | 18 +- .../Windows/Sources/StdAfx.cpp | 33 +- .../Windows/Sources/StdAfx.h | 36 +- .../WindowsCE/Sources/Application.cpp | 21 +- .../WindowsCE/Sources/Application.h | 21 +- .../WindowsCE/Sources/BrowserDialog.cpp | 34 +- .../WindowsCE/Sources/BrowserDialog.h | 28 +- .../WindowsCE/Sources/StdAfx.cpp | 21 +- .../WindowsCE/Sources/StdAfx.h | 21 +- mDNSWindows/Java/Java.vcproj | 30 +- mDNSWindows/Java/jdns_sd.rc | 23 +- mDNSWindows/Java/makefile | 41 +- mDNSWindows/Java/makefile64 | 143 + mDNSWindows/NSPTool/NSPTool.c | 23 +- mDNSWindows/NSPTool/Prefix.h | 15 +- mDNSWindows/PosixCompat.c | 57 +- mDNSWindows/PosixCompat.h | 10 +- mDNSWindows/RegNames.h | 20 +- mDNSWindows/Secret.c | 16 +- mDNSWindows/Secret.h | 13 +- mDNSWindows/SystemService/EventLog.mc | 11 + mDNSWindows/SystemService/Firewall.cpp | 184 +- mDNSWindows/SystemService/Firewall.h | 20 +- mDNSWindows/SystemService/Prefix.h | 18 +- mDNSWindows/SystemService/Service.c | 1563 ++-- mDNSWindows/SystemService/Service.h | 8 - mDNSWindows/SystemService/Service.rc | 1 + mDNSWindows/SystemService/Service.vcproj | 52 +- mDNSWindows/SystemService/main.c | 8 - mDNSWindows/VPCDetect.cpp | 15 +- mDNSWindows/VPCDetect.h | 15 +- mDNSWindows/WinServices.cpp | 16 +- mDNSWindows/WinServices.h | 16 +- mDNSWindows/WinVersRes.h | 203 +- mDNSWindows/isocode.h | 7 +- mDNSWindows/loclibrary.c | 3 - mDNSWindows/loclibrary.h | 3 - mDNSWindows/mDNSWin32.c | 3071 +++--- mDNSWindows/mDNSWin32.h | 290 +- mDNSWindows/mdnsNSP/mdnsNSP.c | 85 +- mDNSWindows/mdnsNSP/mdnsNSP.def | 21 - 316 files changed, 26538 insertions(+), 27752 deletions(-) create mode 100755 Clients/DNS-SD.VisualStudio/dns-sd.sdk.rc create mode 100755 Clients/DNS-SD.VisualStudio/dns-sd.sdk.vcproj create mode 100755 Clients/FirefoxExtension/CDNSSDService.cpp create mode 100755 Clients/FirefoxExtension/CDNSSDService.h create mode 100755 Clients/FirefoxExtension/CDNSSDServiceModule.cpp create mode 100755 Clients/FirefoxExtension/DNSSDService.sln create mode 100644 Clients/FirefoxExtension/FirefoxExtension.rc create mode 100755 Clients/FirefoxExtension/FirefoxExtension.vcproj create mode 100755 Clients/FirefoxExtension/IDNSSDService.h create mode 100755 Clients/FirefoxExtension/IDNSSDService.idl create mode 100755 Clients/FirefoxExtension/extension/chrome.manifest create mode 100755 Clients/FirefoxExtension/extension/components/IDNSSDService.xpt create mode 100755 Clients/FirefoxExtension/extension/content/bonjour4firefox.css create mode 100755 Clients/FirefoxExtension/extension/content/bonjour4firefox.png create mode 100755 Clients/FirefoxExtension/extension/content/bonjour4firefox.xul create mode 100755 Clients/FirefoxExtension/extension/content/browserOverlay.xul create mode 100755 Clients/FirefoxExtension/extension/content/listImage.png create mode 100755 Clients/FirefoxExtension/extension/content/overlay.js create mode 100755 Clients/FirefoxExtension/extension/defaults/preferences/bonjour4firefox.js create mode 100755 Clients/FirefoxExtension/extension/install.rdf create mode 100755 Clients/FirefoxExtension/extension/locale/en-US/bonjour4firefox.dtd create mode 100755 Clients/FirefoxExtension/extension/locale/en-US/bonjour4firefox.properties create mode 100755 Clients/FirefoxExtension/extension/readme.txt create mode 100644 Clients/FirefoxExtension/extension/skin-darwin/overlay.css create mode 100644 Clients/FirefoxExtension/extension/skin-darwin/toolbar-button.png create mode 100755 Clients/FirefoxExtension/extension/skin/overlay.css create mode 100755 Clients/FirefoxExtension/extension/skin/toolbar-button.png create mode 100644 Clients/FirefoxExtension/readme.txt create mode 100644 Clients/FirefoxExtension/resource.h create mode 100644 Clients/mDNSNetMonitor.VisualStudio/mDNSNetMonitor.rc create mode 100644 Clients/mDNSNetMonitor.VisualStudio/resource.h create mode 100644 mDNSMacOSX/helper-entitlements.plist rename mDNSWindows/ControlPanel/{ThirdPage.cpp => BrowsingPage.cpp} (82%) rename mDNSWindows/ControlPanel/{ThirdPage.h => BrowsingPage.h} (83%) create mode 100755 mDNSWindows/ControlPanel/ControlPanelLocRes.rc create mode 100755 mDNSWindows/ControlPanel/ControlPanelLocRes.vcproj create mode 100755 mDNSWindows/ControlPanel/ControlPanelRes.rc create mode 100755 mDNSWindows/ControlPanel/ControlPanelRes.vcproj delete mode 100755 mDNSWindows/ControlPanel/FirstPage.cpp create mode 100755 mDNSWindows/ControlPanel/RegistrationPage.cpp rename mDNSWindows/ControlPanel/{FirstPage.h => RegistrationPage.h} (62%) create mode 100755 mDNSWindows/ControlPanel/ServicesPage.cpp create mode 100755 mDNSWindows/ControlPanel/ServicesPage.h create mode 100755 mDNSWindows/ControlPanel/res/EnergySaver.ico create mode 100644 mDNSWindows/Java/makefile64 create mode 100644 mDNSWindows/SystemService/EventLog.mc diff --git a/Clients/BonjourExample/BonjourExample.cpp b/Clients/BonjourExample/BonjourExample.cpp index ff50a39..f517456 100644 --- a/Clients/BonjourExample/BonjourExample.cpp +++ b/Clients/BonjourExample/BonjourExample.cpp @@ -13,17 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: BonjourExample.cpp,v $ -Revision 1.2 2006/08/14 23:23:57 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.1 2005/05/20 22:01:01 bradley -Bonjour for Windows example code to browse for HTTP services and deliver via Window messages. - -*/ + */ #include "stdafx.h" diff --git a/Clients/BonjourExample/stdafx.cpp b/Clients/BonjourExample/stdafx.cpp index c6899cd..a28f2b5 100644 --- a/Clients/BonjourExample/stdafx.cpp +++ b/Clients/BonjourExample/stdafx.cpp @@ -13,17 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: stdafx.cpp,v $ -Revision 1.2 2006/08/14 23:23:57 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.1 2005/05/20 22:01:02 bradley -Bonjour for Windows example code to browse for HTTP services and deliver via Window messages. - -*/ + */ // Standard source file to build the pre-compiled header. diff --git a/Clients/BonjourExample/stdafx.h b/Clients/BonjourExample/stdafx.h index 461d119..2d51905 100644 --- a/Clients/BonjourExample/stdafx.h +++ b/Clients/BonjourExample/stdafx.h @@ -13,17 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: stdafx.h,v $ -Revision 1.2 2006/08/14 23:23:57 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.1 2005/05/20 22:01:02 bradley -Bonjour for Windows example code to browse for HTTP services and deliver via Window messages. - -*/ + */ // Standard Windows pre-compiled header file. diff --git a/Clients/ClientCommon.c b/Clients/ClientCommon.c index f25fbb6..812efbe 100644 --- a/Clients/ClientCommon.c +++ b/Clients/ClientCommon.c @@ -36,18 +36,7 @@ * OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT * (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Change History (most recent first): - -$Log: ClientCommon.c,v $ -Revision 1.2 2008/05/08 00:42:03 cheshire -Removed some unnecessary header files - -Revision 1.1 2008/05/08 00:25:48 cheshire - GetNextLabel insufficiently defensive - - -*/ + */ #include #include // For stdout, stderr diff --git a/Clients/ClientCommon.h b/Clients/ClientCommon.h index 5c28307..afe5b7a 100644 --- a/Clients/ClientCommon.h +++ b/Clients/ClientCommon.h @@ -36,14 +36,6 @@ * OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT * (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Change History (most recent first): - -$Log: ClientCommon.h,v $ -Revision 1.1 2008/05/08 00:25:48 cheshire - GetNextLabel insufficiently defensive - - -*/ + */ extern const char *GetNextLabel(const char *cstr, char label[64]); diff --git a/Clients/DNS-SD.VisualStudio/dns-sd.sdk.rc b/Clients/DNS-SD.VisualStudio/dns-sd.sdk.rc new file mode 100755 index 0000000..9274716 --- /dev/null +++ b/Clients/DNS-SD.VisualStudio/dns-sd.sdk.rc @@ -0,0 +1,102 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.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" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,0 + PRODUCTVERSION 1,0,0,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Apple Inc." + VALUE "FileDescription", "Bonjour Console Utility" + VALUE "FileVersion", "1.0.0.0" + VALUE "InternalName", "dns-sd.exe" + VALUE "LegalCopyright", "Copyright (C) 2010 Apple Inc." + VALUE "OriginalFilename", "dns-sd.exe" + VALUE "ProductName", "Bonjour" + VALUE "ProductVersion", "1.0.0.0" + 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/DNS-SD.VisualStudio/dns-sd.sdk.vcproj b/Clients/DNS-SD.VisualStudio/dns-sd.sdk.vcproj new file mode 100755 index 0000000..41daa81 --- /dev/null +++ b/Clients/DNS-SD.VisualStudio/dns-sd.sdk.vcproj @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clients/DNS-SD.VisualStudio/dns-sd.vcproj b/Clients/DNS-SD.VisualStudio/dns-sd.vcproj index db1a499..58e79e4 100755 --- a/Clients/DNS-SD.VisualStudio/dns-sd.vcproj +++ b/Clients/DNS-SD.VisualStudio/dns-sd.vcproj @@ -271,7 +271,7 @@ /> Update the .NET code to use the new Bonjour COM component - -Revision 1.7 2006/08/14 23:23:58 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.6 2005/02/10 22:35:06 cheshire - Update name - -Revision 1.5 2004/09/21 16:26:58 shersche -Check to make sure browse list selected item is not null before resolving -Submitted by: prepin@gmail.com - -Revision 1.4 2004/09/13 19:38:17 shersche -Changed code to reflect namespace and type changes to dnssd.NET library - -Revision 1.3 2004/09/11 00:38:14 shersche -DNSService APIs now assume port in host format. Check for null text record in resolve callback. - -Revision 1.2 2004/07/22 23:15:25 shersche -Fix service names for teleport, tftp, and bootps - -Revision 1.1 2004/07/19 07:54:24 shersche -Initial revision - - - -*/ + */ using System; using System.Drawing; diff --git a/Clients/DNSServiceBrowser.VB/DNSServiceBrowser.vb b/Clients/DNSServiceBrowser.VB/DNSServiceBrowser.vb index 1e7a7ae..dbbced9 100644 --- a/Clients/DNSServiceBrowser.VB/DNSServiceBrowser.vb +++ b/Clients/DNSServiceBrowser.VB/DNSServiceBrowser.vb @@ -1,3 +1,19 @@ +' +' Copyright (c) 2010 Apple 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. +' + Public Class DNSServiceBrowser Public WithEvents MyEventManager As New Bonjour.DNSSDEventManager diff --git a/Clients/DNSServiceBrowser.m b/Clients/DNSServiceBrowser.m index ac4f1ab..b4e0414 100755 --- a/Clients/DNSServiceBrowser.m +++ b/Clients/DNSServiceBrowser.m @@ -13,65 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: DNSServiceBrowser.m,v $ -Revision 1.35 2006/11/27 08:27:49 mkrochma -Fix a crashing bug - -Revision 1.34 2006/11/24 05:41:07 mkrochma -More cleanup and more service types - -Revision 1.33 2006/11/24 01:34:24 mkrochma -Display interface index and query for IPv6 addresses even when there's no IPv4 - -Revision 1.32 2006/11/24 00:25:31 mkrochma - Tools: DNS Service Browser contains some bugs - -Revision 1.31 2006/08/14 23:23:55 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.30 2005/01/27 17:46:16 cheshire -Added comment - -Revision 1.29 2004/06/04 20:58:36 cheshire -Move DNSServiceBrowser from mDNSMacOSX directory to Clients directory - -Revision 1.28 2004/05/18 23:51:26 cheshire -Tidy up all checkin comments to use consistent "" format for bug numbers - -Revision 1.27 2003/11/19 18:49:48 rpantos - couple of little tweaks to previous checkin - -Revision 1.26 2003/11/07 19:35:20 rpantos - Display multiple IP addresses. Connect using host rather than IP addr. - -Revision 1.25 2003/10/29 05:16:54 rpantos -Checkpoint: transition from DNSServiceDiscovery.h to dns_sd.h - -Revision 1.24 2003/10/28 02:25:45 rpantos - Cancel pending resolve when focus changes or service disappears. - -Revision 1.23 2003/10/28 01:29:15 rpantos - Restructure a bit to make arrow keys work & views behave better. - -Revision 1.22 2003/10/28 01:23:27 rpantos - Bail if mDNS cannot be initialized at startup. - -Revision 1.21 2003/10/28 01:19:45 rpantos - Do not put a trailing '.' on service names. Handle PATH for HTTP txtRecords. - -Revision 1.20 2003/10/28 01:13:49 rpantos - Remove filter when displaying browse results. - -Revision 1.19 2003/10/28 01:10:14 rpantos - Change 'compare' to 'caseInsensitiveCompare' to fix sort order. - -Revision 1.18 2003/08/12 19:55:07 cheshire -Update to APSL 2.0 - -*/ + */ #import #include @@ -209,6 +151,9 @@ InterfaceIndexToName(uint32_t interface, char *interfaceName) } else if (interface == kDNSServiceInterfaceIndexLocalOnly) { // Only available locally on this machine. strlcpy(interfaceName, "local", IF_NAMESIZE); + } else if (interface == kDNSServiceInterfaceIndexP2P) { + // Peer-to-peer. + strlcpy(interfaceName, "p2p", IF_NAMESIZE); } else { // Converts interface index to interface name. if_indextoname(interface, interfaceName); diff --git a/Clients/DNSServiceReg.m b/Clients/DNSServiceReg.m index 49e0c36..3f2620f 100644 --- a/Clients/DNSServiceReg.m +++ b/Clients/DNSServiceReg.m @@ -13,22 +13,6 @@ * 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. - - Change History (most recent first): - -$Log: DNSServiceReg.m,v $ -Revision 1.16 2006/08/14 23:23:55 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.15 2004/06/05 02:01:08 cheshire -Move DNSServiceRegistration from mDNSMacOSX directory to Clients directory - -Revision 1.14 2004/03/04 19:20:23 cheshire -Remove invalid UTF-8 character - -Revision 1.13 2003/08/12 19:55:07 cheshire -Update to APSL 2.0 - */ #include "dns_sd.h" diff --git a/Clients/ExplorerPlugin/ClassFactory.cpp b/Clients/ExplorerPlugin/ClassFactory.cpp index f77e182..e578e23 100644 --- a/Clients/ExplorerPlugin/ClassFactory.cpp +++ b/Clients/ExplorerPlugin/ClassFactory.cpp @@ -13,22 +13,6 @@ * 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. - - Change History (most recent first): - -$Log: ClassFactory.cpp,v $ -Revision 1.3 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.2 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - */ #include "StdAfx.h" diff --git a/Clients/ExplorerPlugin/ClassFactory.h b/Clients/ExplorerPlugin/ClassFactory.h index f5fe9d5..5eb4bbd 100644 --- a/Clients/ExplorerPlugin/ClassFactory.h +++ b/Clients/ExplorerPlugin/ClassFactory.h @@ -13,23 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: ClassFactory.h,v $ -Revision 1.3 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.2 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #ifndef __CLASS_FACTORY__ #define __CLASS_FACTORY__ diff --git a/Clients/ExplorerPlugin/ExplorerBar.cpp b/Clients/ExplorerPlugin/ExplorerBar.cpp index 3aea9a2..644515f 100644 --- a/Clients/ExplorerPlugin/ExplorerBar.cpp +++ b/Clients/ExplorerPlugin/ExplorerBar.cpp @@ -13,30 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: ExplorerBar.cpp,v $ -Revision 1.5 2009/03/30 18:44:53 herscher - Current Bonjour code does not compile on Windows - Move build train to Visual Studio 2005 - -Revision 1.4 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.3 2004/07/26 05:44:08 shersche -remove extraneous debug statement - -Revision 1.2 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #include "StdAfx.h" diff --git a/Clients/ExplorerPlugin/ExplorerBar.h b/Clients/ExplorerPlugin/ExplorerBar.h index 988f8c3..d1a8444 100644 --- a/Clients/ExplorerPlugin/ExplorerBar.h +++ b/Clients/ExplorerPlugin/ExplorerBar.h @@ -13,27 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: ExplorerBar.h,v $ -Revision 1.4 2009/03/30 18:46:13 herscher - Current Bonjour code does not compile on Windows - Move build train to Visual Studio 2005 - -Revision 1.3 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.2 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #ifndef __EXPLORER_BAR__ #define __EXPLORER_BAR__ diff --git a/Clients/ExplorerPlugin/ExplorerBarWindow.cpp b/Clients/ExplorerPlugin/ExplorerBarWindow.cpp index 7b5b2ea..5e0692a 100644 --- a/Clients/ExplorerPlugin/ExplorerBarWindow.cpp +++ b/Clients/ExplorerPlugin/ExplorerBarWindow.cpp @@ -13,103 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: ExplorerBarWindow.cpp,v $ -Revision 1.23 2009/03/30 18:47:40 herscher - Current Bonjour code does not compile on Windows - Move build train to Visual Studio 2005 - -Revision 1.22 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.21 2005/04/06 01:13:07 shersche - Use the product icon instead of globe icon for 'About' link. - -Revision 1.20 2005/03/18 02:43:02 shersche - Use standard IE website icon for 'About Bonjour', only using globe icon if standard icon cannot be loaded - -Revision 1.19 2005/03/16 03:46:27 shersche - Use Bonjour icon for all discovered sites - -Revision 1.18 2005/02/26 01:24:05 shersche -Remove display lines in tree control - -Revision 1.17 2005/02/25 19:57:30 shersche - Remove FTP browsing from plugin - -Revision 1.16 2005/02/08 23:31:06 shersche -Move "About ..." item underneath WebSites, change icons for discovered sites and "About ..." item - -Revision 1.15 2005/01/27 22:38:27 shersche -add About item to tree list - -Revision 1.14 2005/01/25 17:55:39 shersche - Get bitmaps from non-localizable resource module -Bug #: 3911084 - -Revision 1.13 2005/01/06 21:13:09 shersche - Handle kDNSServiceErr_Firewall return codes -Bug #: 3796779 - -Revision 1.12 2004/10/26 00:56:03 cheshire -Use "#if 0" instead of commenting out code - -Revision 1.11 2004/10/18 23:49:17 shersche - Remove trailing dot from hostname, because some flavors of Windows have difficulty parsing hostnames with a trailing dot. -Bug #: 3841564 - -Revision 1.10 2004/09/02 02:18:58 cheshire -Minor textual cleanup to improve readability - -Revision 1.9 2004/09/02 02:11:56 cheshire - Fix incorrect testing of MoreComing flag - -Revision 1.8 2004/07/26 05:47:31 shersche -use TXTRecord APIs, fix bug in locating service to be removed - -Revision 1.7 2004/07/22 16:08:20 shersche -clean up debug print statements, re-enable code inadvertently commented out - -Revision 1.6 2004/07/22 05:27:20 shersche - Check to make sure error isn't WSAEWOULDBLOCK when canceling browse -Bug #: 3735827 - -Revision 1.5 2004/07/20 06:49:18 shersche -clean up socket handling code - -Revision 1.4 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.3 2004/06/27 14:59:59 shersche -reference count service info to handle multi-homed hosts - -Revision 1.2 2004/06/23 16:09:34 shersche -Add the resolve DNSServiceRef to list of extant refs. This fixes the "doesn't resolve when double clicking" problem - -Submitted by: Scott Herscher - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.5 2004/04/15 01:00:05 bradley -Removed support for automatically querying for A/AAAA records when resolving names. Platforms -without .local name resolving support will need to manually query for A/AAAA records as needed. - -Revision 1.4 2004/04/09 21:03:15 bradley -Changed port numbers to use network byte order for consistency with other platforms. - -Revision 1.3 2004/04/08 09:43:43 bradley -Changed callback calling conventions to __stdcall so they can be used with C# delegates. - -Revision 1.2 2004/02/21 04:36:19 bradley -Enable dot local name lookups now that the NSP is being installed. - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #include "StdAfx.h" @@ -234,6 +138,9 @@ int ExplorerBarWindow::OnCreate( LPCREATESTRUCT inCreateStruct ) ServiceHandlerEntry * e; + s.LoadString( IDS_ABOUT ); + m_about = mTree.InsertItem( s, 0, 0 ); + // Web Site Handler e = new ServiceHandlerEntry; @@ -245,9 +152,6 @@ int ExplorerBarWindow::OnCreate( LPCREATESTRUCT inCreateStruct ) e->needsLogin = false; mServiceHandlers.Add( e ); - s.LoadString( IDS_ABOUT ); - m_about = mTree.InsertItem( s, 0, 0 ); - err = DNSServiceBrowse( &e->ref, 0, 0, e->type, NULL, BrowseCallBack, e ); require_noerr( err, exit ); @@ -256,6 +160,25 @@ int ExplorerBarWindow::OnCreate( LPCREATESTRUCT inCreateStruct ) m_serviceRefs.push_back(e->ref); +#if defined( _BROWSE_FOR_HTTPS_ ) + e = new ServiceHandlerEntry; + check( e ); + e->type = "_https._tcp"; + e->urlScheme = "https://"; + e->ref = NULL; + e->obj = this; + e->needsLogin = false; + mServiceHandlers.Add( e ); + + err = DNSServiceBrowse( &e->ref, 0, 0, e->type, NULL, BrowseCallBack, e ); + require_noerr( err, exit ); + + err = WSAAsyncSelect((SOCKET) DNSServiceRefSockFD(e->ref), m_hWnd, WM_PRIVATE_SERVICE_EVENT, FD_READ|FD_CLOSE); + require_noerr( err, exit ); + + m_serviceRefs.push_back(e->ref); +#endif + m_imageList.Create( 16, 16, ILC_MASK | ILC_COLOR16, 2, 0); bitmap.Attach( ::LoadBitmap( GetNonLocalizedResources(), MAKEINTRESOURCE( IDB_LOGO ) ) ); diff --git a/Clients/ExplorerPlugin/ExplorerBarWindow.h b/Clients/ExplorerPlugin/ExplorerBarWindow.h index 0bbbcae..cda61ec 100644 --- a/Clients/ExplorerPlugin/ExplorerBarWindow.h +++ b/Clients/ExplorerPlugin/ExplorerBarWindow.h @@ -13,49 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: ExplorerBarWindow.h,v $ -Revision 1.9 2009/03/30 18:49:15 herscher - Current Bonjour code does not compile on Windows - Move build train to Visual Studio 2005 - -Revision 1.8 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.7 2005/02/25 19:57:30 shersche - Remove FTP browsing from plugin - -Revision 1.6 2005/01/27 22:27:03 shersche -Add m_about member for "About ..." tree item - -Revision 1.5 2004/07/26 05:47:31 shersche -use TXTRecord APIs, fix bug in locating service to be removed - -Revision 1.4 2004/07/20 06:49:18 shersche -clean up socket handling code - -Revision 1.3 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.2 2004/06/27 14:59:59 shersche -reference count service info to handle multi-homed hosts - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.3 2004/04/15 01:00:05 bradley -Removed support for automatically querying for A/AAAA records when resolving names. Platforms -without .local name resolving support will need to manually query for A/AAAA records as needed. - -Revision 1.2 2004/04/08 09:43:43 bradley -Changed callback calling conventions to __stdcall so they can be used with C# delegates. - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #ifndef __EXPLORER_BAR_WINDOW__ #define __EXPLORER_BAR_WINDOW__ diff --git a/Clients/ExplorerPlugin/ExplorerPlugin.cpp b/Clients/ExplorerPlugin/ExplorerPlugin.cpp index b83dac8..fb1b7c2 100644 --- a/Clients/ExplorerPlugin/ExplorerPlugin.cpp +++ b/Clients/ExplorerPlugin/ExplorerPlugin.cpp @@ -13,48 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: ExplorerPlugin.cpp,v $ -Revision 1.10 2009/03/30 18:51:04 herscher - Current Bonjour code does not compile on Windows - Move build train to Visual Studio 2005 - -Revision 1.9 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.8 2005/06/30 18:01:54 shersche - Cause IE to rebuild cache so we don't have to reboot following an install. - -Revision 1.7 2005/02/23 02:00:45 shersche - Delete all the registry entries when component is unregistered - -Revision 1.6 2005/01/25 17:56:45 shersche - Load resource DLLs, get icons and bitmaps from resource DLLs -Bug #: 3911084 - -Revision 1.5 2004/09/15 10:33:54 shersche - Install XP toolbar button (8 bit mask) if running on XP platform, otherwise install 1 bit mask toolbar button -Bug #: 3721611 - -Revision 1.4 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.3 2004/06/26 14:12:07 shersche -Register the toolbar button - -Revision 1.2 2004/06/24 20:09:39 shersche -Change text -Submitted by: herscher - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #include "StdAfx.h" diff --git a/Clients/ExplorerPlugin/ExplorerPlugin.def b/Clients/ExplorerPlugin/ExplorerPlugin.def index acef773..8b931d1 100644 --- a/Clients/ExplorerPlugin/ExplorerPlugin.def +++ b/Clients/ExplorerPlugin/ExplorerPlugin.def @@ -14,22 +14,6 @@ ; See the License for the specific language governing permissions and ; limitations under the License. ; -; Change History (most recent first): -; -; $Log: ExplorerPlugin.def,v $ -; Revision 1.3 2006/08/14 23:24:00 cheshire -; Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 -; -; Revision 1.2 2004/07/13 21:24:21 rpantos -; Fix for . -; -; Revision 1.1 2004/06/18 04:34:59 rpantos -; Move to Clients from mDNSWindows -; -; Revision 1.1 2004/01/30 03:01:56 bradley -; Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. -; -; LIBRARY ExplorerPlugin diff --git a/Clients/ExplorerPlugin/ExplorerPlugin.h b/Clients/ExplorerPlugin/ExplorerPlugin.h index 307c99a..9b87d97 100644 --- a/Clients/ExplorerPlugin/ExplorerPlugin.h +++ b/Clients/ExplorerPlugin/ExplorerPlugin.h @@ -13,30 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: ExplorerPlugin.h,v $ -Revision 1.5 2009/03/30 18:52:02 herscher - Current Bonjour code does not compile on Windows - Move build train to Visual Studio 2005 - -Revision 1.4 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.3 2005/01/25 18:35:38 shersche -Declare APIs for obtaining handles to resource modules - -Revision 1.2 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #pragma once diff --git a/Clients/ExplorerPlugin/ExplorerPlugin.vcproj b/Clients/ExplorerPlugin/ExplorerPlugin.vcproj index 78e7443..c157cfb 100644 --- a/Clients/ExplorerPlugin/ExplorerPlugin.vcproj +++ b/Clients/ExplorerPlugin/ExplorerPlugin.vcproj @@ -343,7 +343,7 @@ /> diff --git a/Clients/ExplorerPlugin/ExplorerPluginLocRes.rc b/Clients/ExplorerPlugin/ExplorerPluginLocRes.rc index b17cf3b..9f4c4f5 100755 --- a/Clients/ExplorerPlugin/ExplorerPluginLocRes.rc +++ b/Clients/ExplorerPlugin/ExplorerPluginLocRes.rc @@ -131,7 +131,7 @@ BEGIN CONTROL "",IDC_COMPONENT_VERSION,"Static", SS_SIMPLE | WS_GROUP,142,10,122,8 LTEXT "Copyright (c) 2004-2007 Apple Inc. All rights reserved. Apple and the Apple logo are trademarks of Apple Inc., registered in the U.S. and other countries.", - IDC_LEGAL,92,31,123,50,0,WS_EX_RTLREADING + IDC_LEGAL,92,31,123,50,0 END diff --git a/Clients/ExplorerPlugin/ExplorerPluginLocRes.vcproj b/Clients/ExplorerPlugin/ExplorerPluginLocRes.vcproj index 54b0392..f354cf2 100755 --- a/Clients/ExplorerPlugin/ExplorerPluginLocRes.vcproj +++ b/Clients/ExplorerPlugin/ExplorerPluginLocRes.vcproj @@ -340,7 +340,7 @@ /> diff --git a/Clients/ExplorerPlugin/ExplorerPluginRes.vcproj b/Clients/ExplorerPlugin/ExplorerPluginRes.vcproj index 3c73311..6b940ac 100755 --- a/Clients/ExplorerPlugin/ExplorerPluginRes.vcproj +++ b/Clients/ExplorerPlugin/ExplorerPluginRes.vcproj @@ -336,7 +336,7 @@ /> @@ -468,11 +468,11 @@ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest" > . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #include #include diff --git a/Clients/ExplorerPlugin/LoginDialog.h b/Clients/ExplorerPlugin/LoginDialog.h index 0f7bee6..e53beb6 100644 --- a/Clients/ExplorerPlugin/LoginDialog.h +++ b/Clients/ExplorerPlugin/LoginDialog.h @@ -13,23 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: LoginDialog.h,v $ -Revision 1.3 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.2 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #ifndef __LOGIN_DIALOG__ #define __LOGIN_DIALOG__ diff --git a/Clients/ExplorerPlugin/Resource.h b/Clients/ExplorerPlugin/Resource.h index 9b1f0ab..7235f38 100644 --- a/Clients/ExplorerPlugin/Resource.h +++ b/Clients/ExplorerPlugin/Resource.h @@ -13,9 +13,6 @@ * 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. - - Change History (most recent first): - */ // Include the core resources diff --git a/Clients/ExplorerPlugin/StdAfx.cpp b/Clients/ExplorerPlugin/StdAfx.cpp index 1d64495..768fa3f 100644 --- a/Clients/ExplorerPlugin/StdAfx.cpp +++ b/Clients/ExplorerPlugin/StdAfx.cpp @@ -13,22 +13,6 @@ * 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. - - Change History (most recent first): - -$Log: StdAfx.cpp,v $ -Revision 1.3 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.2 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #include "StdAfx.h" diff --git a/Clients/ExplorerPlugin/StdAfx.h b/Clients/ExplorerPlugin/StdAfx.h index 7976129..69e8216 100644 --- a/Clients/ExplorerPlugin/StdAfx.h +++ b/Clients/ExplorerPlugin/StdAfx.h @@ -13,26 +13,7 @@ * 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. - - Change History (most recent first): - -$Log: StdAfx.h,v $ -Revision 1.4 2006/08/14 23:24:00 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.3 2005/10/19 19:50:34 herscher -Workaround a bug in the latest Microsoft Platform SDK when compiling C++ files that include (directly or indirectly) - -Revision 1.2 2004/07/13 21:24:21 rpantos -Fix for . - -Revision 1.1 2004/06/18 04:34:59 rpantos -Move to Clients from mDNSWindows - -Revision 1.1 2004/01/30 03:01:56 bradley -Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer. - -*/ + */ #ifndef __STDAFX__ #define __STDAFX__ diff --git a/Clients/FirefoxExtension/CDNSSDService.cpp b/Clients/FirefoxExtension/CDNSSDService.cpp new file mode 100755 index 0000000..ae57da9 --- /dev/null +++ b/Clients/FirefoxExtension/CDNSSDService.cpp @@ -0,0 +1,394 @@ +/* -*- 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 new file mode 100755 index 0000000..f22ee7b --- /dev/null +++ b/Clients/FirefoxExtension/CDNSSDService.h @@ -0,0 +1,104 @@ +/* -*- 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 new file mode 100755 index 0000000..3833c5a --- /dev/null +++ b/Clients/FirefoxExtension/CDNSSDServiceModule.cpp @@ -0,0 +1,37 @@ +/* -*- 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 new file mode 100755 index 0000000..68534f4 --- /dev/null +++ b/Clients/FirefoxExtension/DNSSDService.sln @@ -0,0 +1,20 @@ + +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 new file mode 100644 index 0000000..998e5e9 --- /dev/null +++ b/Clients/FirefoxExtension/FirefoxExtension.rc @@ -0,0 +1,102 @@ +// 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 new file mode 100755 index 0000000..352fdd6 --- /dev/null +++ b/Clients/FirefoxExtension/FirefoxExtension.vcproj @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clients/FirefoxExtension/IDNSSDService.h b/Clients/FirefoxExtension/IDNSSDService.h new file mode 100755 index 0000000..fc7408f --- /dev/null +++ b/Clients/FirefoxExtension/IDNSSDService.h @@ -0,0 +1,263 @@ +/* + * 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 & regtype, 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 & regtype, 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 & regtype, 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 & regtype, const nsAString & domain, IDNSSDBrowseListener *listener, IDNSSDService **_retval NS_OUTPARAM); \ + NS_SCRIPTABLE NS_IMETHOD Resolve(PRInt32 interfaceIndex, const nsAString & name, const nsAString & regtype, 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 & regtype, 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 & regtype, 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 & regtype, 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 & regtype, 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 new file mode 100755 index 0000000..d0f62c8 --- /dev/null +++ b/Clients/FirefoxExtension/IDNSSDService.idl @@ -0,0 +1,50 @@ +/* -*- 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 new file mode 100755 index 0000000..f1daf86 --- /dev/null +++ b/Clients/FirefoxExtension/extension/chrome.manifest @@ -0,0 +1,6 @@ +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 new file mode 100755 index 0000000000000000000000000000000000000000..bfda3e58cc9d1c358db09bcfbf5b7ddee32058d8 GIT binary patch literal 376 zcmazDaQ64*3aKne^~p@)<&t7#VqjrlV60$ZU{C_$i48yk3=TjjHz36bVKOkNo1{!# z_|~;+>7Iz%pNq2nf#SSSIVCGo%l|)aIBe-V?gf>LNK<&&@BZ2S*c5r8 ztoSQ`z5~TqLgn`76?+Dk78K+cl@v30y7&bLyEql)mlp$_S6q^sms$j}9_#=|_J&Ce z%ne)(OhC931R2;E7!Ks;LDWMv2d5U5WhSSBbTNahn92%OJ&A!S0jM9Ohk;=Z8&q^B y&`cJD_!0(?d_xl01q?;0#rZj9sSL#>`2|qpgCIf}j=KkO9L#BqaK}M4FaQ9Xm1WET literal 0 HcmV?d00001 diff --git a/Clients/FirefoxExtension/extension/content/bonjour4firefox.css b/Clients/FirefoxExtension/extension/content/bonjour4firefox.css new file mode 100755 index 0000000..2e7eb2c --- /dev/null +++ b/Clients/FirefoxExtension/extension/content/bonjour4firefox.css @@ -0,0 +1,16 @@ +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.png b/Clients/FirefoxExtension/extension/content/bonjour4firefox.png new file mode 100755 index 0000000000000000000000000000000000000000..baf8b21501de61c15344b287073a8bd5db89972b GIT binary patch literal 1589 zcmV-52Fm$~P)qViB4q6oECigs$J zQ=IWpYg=kzbZn_*Y8`Fu4E0Bys(@H!TCH}hV^u)ZA{IwcP@#52K@g~lAdq)RLN?hv zw!2JsCPL}I?vMS>Irp6JyL)r)2>}1|0|oNi+8Pk5u6_r=L@P13^~~eUoQhvtAK+zs zzA*>padz2PyTTbelLk<%+vPHmPO^P(d3i6l&f*IK=EA)9f?(qhP`naA?RUXY!t!@( zr3p(s4#yv#mVRCpSa`Uq{1Z$dC?P~dG=}kj&*ukrn|;in)19Jy^v=>9I}L0;%)Tzw z*J^*Ps(c5hE%OjhAArmc0ECSI!fT8pf`aj2Y4E`#hbnflxefKT$f1J=j=(7T9pgqB z^+wR&+Yd&DN7(I3qN1ZV;UeL=#)}tbu=xo4%37Fl7zjmqutL)$qkHoKZUr7;7%(p1 ze*CGKOdB&9ln4*a-MD_8&Plp5a6+V3sp3lFHQGI)Vc|6>%Hs_^dp5`E7zZAY2lxSq z@%g-hn!581(8=RRlO4|S7D-4jKBBi&C(RTFvu+=|vB2l%&71oh8-Ck5BPxmx5{X=HkH?@<$`_-0z2P-JF2GrJm%~~( z=u#Gk&RtWKsF8dBA?RSRqow)Ub(;2nZ?T#`yKbwK1*7iX(3|ybjMxPU&Y_jOhX|5b&|?p~2xUu82dU z(eja4EWWSNXolqq!jG-+7ehhJMl6CqgIcb z0&a>TNT&_s3Rt{YcUJ4LJJJXtah~;)l9IeirMlQ=cP>7E?sP00;~wL(f<7R{07Te; zSBeAE`qCCysZji-nWf$5a+1L9cE`C~t`%GXiw-AQf*{DPoTab2xcHKsTyuCtMD@6H zd@UENI#}^R3oOGs7nYtIh*@qL$lr6)k@NoUiHkO>)1hs*Zyo6B>?no-WE6`;`NdmH z+Vy%}Zhc+NX_+i~eqR2{0gjBr)4%+@)}YsQQIzLRafoDx$zVcA4`^PHmifhsyrnH{ z-U~Omv7upu-Y~k^Y&1skd05p;a{1CnJw3QmsaRpNT2Q~=FJPKMN>NlS<)#vZB4HK; z!;5G?9pv}ZKr9aODpcyd+1X3BbDMZUfDLwcccWgfH{EP9rgq-%*eS&E3pg&gW_Q?C zLBSz%6h&mrSb+I_0gUnaxXn7IijIkGl}IGFMIzA^xm@1Hk+X;fI;^eLYT5p8sX24X zLb}LrnOk~wW8sDql@{&OI*V!P8T64ul@Z+!yB0C-zY0tYyTBsOX1XcaMNz;f z5M*(&$#~;h6XEsw79%h+d-59RPb=Vo5JIC#=*#g_j|M+nJ)bKG#EyF%+n6tuq0Bi3 z#slqXk0?#0C{tgrD-!bk+k9czmyVLvUk~K3E9-Z9u)D2yq6N615JKTnFEe5g9yXqk{HH)*Vo!Is7(vlp%wM90 nAczwf4?8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clients/FirefoxExtension/extension/content/browserOverlay.xul b/Clients/FirefoxExtension/extension/content/browserOverlay.xul new file mode 100755 index 0000000..3b4d668 --- /dev/null +++ b/Clients/FirefoxExtension/extension/content/browserOverlay.xul @@ -0,0 +1,32 @@ + + + + +