mDNS: Import
The sources can be obtained via: http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-544.tar.gz
199
mDNSResponder/Clients/BonjourExample/BonjourExample.cpp
Normal file
@ -0,0 +1,199 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2005 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 "stdafx.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "dns_sd.h"
|
||||
|
||||
// Constants
|
||||
|
||||
#define BONJOUR_EVENT ( WM_USER + 0x100 ) // Message sent to the Window when a Bonjour event occurs.
|
||||
|
||||
// Prototypes
|
||||
|
||||
static LRESULT CALLBACK WndProc( HWND inWindow, UINT inMsg, WPARAM inWParam, LPARAM inLParam );
|
||||
|
||||
static void DNSSD_API
|
||||
BrowserCallBack(
|
||||
DNSServiceRef inServiceRef,
|
||||
DNSServiceFlags inFlags,
|
||||
uint32_t inIFI,
|
||||
DNSServiceErrorType inError,
|
||||
const char * inName,
|
||||
const char * inType,
|
||||
const char * inDomain,
|
||||
void * inContext );
|
||||
|
||||
// Globals
|
||||
|
||||
DNSServiceRef gServiceRef = NULL;
|
||||
|
||||
// Main entry point for application.
|
||||
|
||||
int _tmain( int argc, _TCHAR *argv[] )
|
||||
{
|
||||
HINSTANCE instance;
|
||||
WNDCLASSEX wcex;
|
||||
HWND wind;
|
||||
MSG msg;
|
||||
DNSServiceErrorType err;
|
||||
|
||||
(void) argc; // Unused
|
||||
(void) argv; // Unused
|
||||
|
||||
// Create the window. This window won't actually be shown, but it demonstrates how to use Bonjour
|
||||
// with Windows GUI applications by having Bonjour events processed as messages to a Window.
|
||||
|
||||
instance = GetModuleHandle( NULL );
|
||||
assert( instance );
|
||||
|
||||
wcex.cbSize = sizeof( wcex );
|
||||
wcex.style = 0;
|
||||
wcex.lpfnWndProc = (WNDPROC) WndProc;
|
||||
wcex.cbClsExtra = 0;
|
||||
wcex.cbWndExtra = 0;
|
||||
wcex.hInstance = instance;
|
||||
wcex.hIcon = NULL;
|
||||
wcex.hCursor = NULL;
|
||||
wcex.hbrBackground = NULL;
|
||||
wcex.lpszMenuName = NULL;
|
||||
wcex.lpszClassName = TEXT( "BonjourExample" );
|
||||
wcex.hIconSm = NULL;
|
||||
RegisterClassEx( &wcex );
|
||||
|
||||
wind = CreateWindow( wcex.lpszClassName, wcex.lpszClassName, 0, CW_USEDEFAULT, 0, CW_USEDEFAULT,
|
||||
0, NULL, NULL, instance, NULL );
|
||||
assert( wind );
|
||||
|
||||
// Start browsing for services and associate the Bonjour browser with our window using the
|
||||
// WSAAsyncSelect mechanism. Whenever something related to the Bonjour browser occurs, our
|
||||
// private Windows message will be sent to our window so we can give Bonjour a chance to
|
||||
// process it. This allows Bonjour to avoid using a secondary thread (and all the issues
|
||||
// with synchronization that would introduce), but still process everything asynchronously.
|
||||
// This also simplifies app code because Bonjour will only run when we explicitly call it.
|
||||
|
||||
err = DNSServiceBrowse(
|
||||
&gServiceRef, // Receives reference to Bonjour browser object.
|
||||
0, // No flags.
|
||||
kDNSServiceInterfaceIndexAny, // Browse on all network interfaces.
|
||||
"_http._tcp", // Browse for HTTP service types.
|
||||
NULL, // Browse on the default domain (e.g. local.).
|
||||
BrowserCallBack, // Callback function when Bonjour events occur.
|
||||
NULL ); // No callback context needed.
|
||||
assert( err == kDNSServiceErr_NoError );
|
||||
|
||||
err = WSAAsyncSelect( (SOCKET) DNSServiceRefSockFD( gServiceRef ), wind, BONJOUR_EVENT, FD_READ | FD_CLOSE );
|
||||
assert( err == kDNSServiceErr_NoError );
|
||||
|
||||
fprintf( stderr, "Browsing for _http._tcp\n" );
|
||||
|
||||
// Main event loop for the application. All Bonjour events are dispatched while in this loop.
|
||||
|
||||
while( GetMessage( &msg, NULL, 0, 0 ) )
|
||||
{
|
||||
TranslateMessage( &msg );
|
||||
DispatchMessage( &msg );
|
||||
}
|
||||
|
||||
// Clean up Bonjour. This is not strictly necessary since the normal process cleanup will
|
||||
// close Bonjour socket(s) and release memory, but it's here to demonstrate how to do it.
|
||||
|
||||
if( gServiceRef )
|
||||
{
|
||||
WSAAsyncSelect( (SOCKET) DNSServiceRefSockFD( gServiceRef ), wind, BONJOUR_EVENT, 0 );
|
||||
DNSServiceRefDeallocate( gServiceRef );
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
// Callback for the Window. Bonjour events are delivered here.
|
||||
|
||||
static LRESULT CALLBACK WndProc( HWND inWindow, UINT inMsg, WPARAM inWParam, LPARAM inLParam )
|
||||
{
|
||||
LRESULT result;
|
||||
DNSServiceErrorType err;
|
||||
|
||||
switch( inMsg )
|
||||
{
|
||||
case BONJOUR_EVENT:
|
||||
|
||||
// Process the Bonjour event. All Bonjour callbacks occur from within this function.
|
||||
// If an error occurs while trying to process the result, it most likely means that
|
||||
// something serious has gone wrong with Bonjour, such as it being terminated. This
|
||||
// does not normally occur, but code should be prepared to handle it. If the error
|
||||
// is ignored, the window will receive a constant stream of BONJOUR_EVENT messages so
|
||||
// if an error occurs, we disassociate the DNSServiceRef from the window, deallocate
|
||||
// it, and invalidate the reference so we don't try to deallocate it again on quit.
|
||||
// Since this is a simple example app, if this error occurs, we quit the app too.
|
||||
|
||||
err = DNSServiceProcessResult( gServiceRef );
|
||||
if( err != kDNSServiceErr_NoError )
|
||||
{
|
||||
fprintf( stderr, "### ERROR! serious Bonjour error: %d\n", err );
|
||||
|
||||
WSAAsyncSelect( (SOCKET) DNSServiceRefSockFD( gServiceRef ), inWindow, BONJOUR_EVENT, 0 );
|
||||
DNSServiceRefDeallocate( gServiceRef );
|
||||
gServiceRef = NULL;
|
||||
|
||||
PostQuitMessage( 0 );
|
||||
}
|
||||
result = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
result = DefWindowProc( inWindow, inMsg, inWParam, inLParam );
|
||||
break;
|
||||
}
|
||||
return( result );
|
||||
}
|
||||
|
||||
// Callback for Bonjour browser events. Called when services are added or removed.
|
||||
|
||||
static void DNSSD_API
|
||||
BrowserCallBack(
|
||||
DNSServiceRef inServiceRef,
|
||||
DNSServiceFlags inFlags,
|
||||
uint32_t inIFI,
|
||||
DNSServiceErrorType inError,
|
||||
const char * inName,
|
||||
const char * inType,
|
||||
const char * inDomain,
|
||||
void * inContext )
|
||||
{
|
||||
(void) inServiceRef; // Unused
|
||||
(void) inContext; // Unused
|
||||
|
||||
if( inError == kDNSServiceErr_NoError )
|
||||
{
|
||||
const char * action;
|
||||
const char * more;
|
||||
|
||||
if( inFlags & kDNSServiceFlagsAdd ) action = "ADD";
|
||||
else action = "RMV";
|
||||
if( inFlags & kDNSServiceFlagsMoreComing ) more = " (MORE)";
|
||||
else more = "";
|
||||
|
||||
fprintf( stderr, "%s %30s.%s%s on interface %d%s\n", action, inName, inType, inDomain, (int) inIFI, more );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stderr, "Bonjour browser error occurred: %d\n", inError );
|
||||
}
|
||||
}
|
21
mDNSResponder/Clients/BonjourExample/BonjourExample.sln
Normal file
@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BonjourExample", "BonjourExample.vcproj", "{0A842379-799E-414C-BF1F-BF11A8D3A8A8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{0A842379-799E-414C-BF1F-BF11A8D3A8A8}.Debug.ActiveCfg = Debug|Win32
|
||||
{0A842379-799E-414C-BF1F-BF11A8D3A8A8}.Debug.Build.0 = Debug|Win32
|
||||
{0A842379-799E-414C-BF1F-BF11A8D3A8A8}.Release.ActiveCfg = Release|Win32
|
||||
{0A842379-799E-414C-BF1F-BF11A8D3A8A8}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
156
mDNSResponder/Clients/BonjourExample/BonjourExample.vcproj
Normal file
@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="BonjourExample"
|
||||
ProjectGUID="{0A842379-799E-414C-BF1F-BF11A8D3A8A8}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../mDNSShared"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
StringPooling="TRUE"
|
||||
MinimalRebuild="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
BasicRuntimeChecks="3"
|
||||
SmallerTypeCheck="TRUE"
|
||||
RuntimeLibrary="5"
|
||||
BufferSecurityCheck="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="TRUE"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(OutDir)/BonjourExample.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/BonjourExample.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
GlobalOptimizations="TRUE"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories="../../mDNSShared"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
BufferSecurityCheck="FALSE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="4"
|
||||
WarnAsError="TRUE"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="2"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(OutDir)/BonjourExample.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\BonjourExample.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mDNSWindows\Dll\release\dnssd.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
20
mDNSResponder/Clients/BonjourExample/stdafx.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2005 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.
|
||||
*/
|
||||
|
||||
// Standard source file to build the pre-compiled header.
|
||||
|
||||
#include "stdafx.h"
|
30
mDNSResponder/Clients/BonjourExample/stdafx.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2005 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.
|
||||
*/
|
||||
|
||||
// Standard Windows pre-compiled header file.
|
||||
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
75
mDNSResponder/Clients/ClientCommon.c
Normal file
@ -0,0 +1,75 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2008 Apple Inc. All rights reserved.
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
|
||||
* ("Apple") in consideration of your agreement to the following terms, and your
|
||||
* use, installation, modification or redistribution of this Apple software
|
||||
* constitutes acceptance of these terms. If you do not agree with these terms,
|
||||
* please do not use, install, modify or redistribute this Apple software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject
|
||||
* to these terms, Apple grants you a personal, non-exclusive license, under Apple's
|
||||
* copyrights in this original Apple software (the "Apple Software"), to use,
|
||||
* reproduce, modify and redistribute the Apple Software, with or without
|
||||
* modifications, in source and/or binary forms; provided that if you redistribute
|
||||
* the Apple Software in its entirety and without modifications, you must retain
|
||||
* this notice and the following text and disclaimers in all such redistributions of
|
||||
* the Apple Software. Neither the name, trademarks, service marks or logos of
|
||||
* Apple Computer, Inc. may be used to endorse or promote products derived from the
|
||||
* Apple Software without specific prior written permission from Apple. Except as
|
||||
* expressly stated in this notice, no other rights or licenses, express or implied,
|
||||
* are granted by Apple herein, including but not limited to any patent rights that
|
||||
* may be infringed by your derivative works or by other works in which the Apple
|
||||
* Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
|
||||
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
|
||||
* COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h> // For stdout, stderr
|
||||
|
||||
#include "ClientCommon.h"
|
||||
|
||||
const char *GetNextLabel(const char *cstr, char label[64])
|
||||
{
|
||||
char *ptr = label;
|
||||
while (*cstr && *cstr != '.') // While we have characters in the label...
|
||||
{
|
||||
char c = *cstr++;
|
||||
if (c == '\\' && *cstr) // If we have a backslash, and it's not the last character of the string
|
||||
{
|
||||
c = *cstr++;
|
||||
if (isdigit(cstr[-1]) && isdigit(cstr[0]) && isdigit(cstr[1]))
|
||||
{
|
||||
int v0 = cstr[-1] - '0'; // then interpret as three-digit decimal
|
||||
int v1 = cstr[ 0] - '0';
|
||||
int v2 = cstr[ 1] - '0';
|
||||
int val = v0 * 100 + v1 * 10 + v2;
|
||||
// If valid three-digit decimal value, use it
|
||||
// Note that although ascii nuls are possible in DNS labels
|
||||
// we're building a C string here so we have no way to represent that
|
||||
if (val == 0) val = '-';
|
||||
if (val <= 255) { c = (char)val; cstr += 2; }
|
||||
}
|
||||
}
|
||||
*ptr++ = c;
|
||||
if (ptr >= label+64) { label[63] = 0; return(NULL); } // Illegal label more than 63 bytes
|
||||
}
|
||||
*ptr = 0; // Null-terminate label text
|
||||
if (ptr == label) return(NULL); // Illegal empty label
|
||||
if (*cstr) cstr++; // Skip over the trailing dot (if present)
|
||||
return(cstr);
|
||||
}
|
41
mDNSResponder/Clients/ClientCommon.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2008 Apple Inc. All rights reserved.
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
|
||||
* ("Apple") in consideration of your agreement to the following terms, and your
|
||||
* use, installation, modification or redistribution of this Apple software
|
||||
* constitutes acceptance of these terms. If you do not agree with these terms,
|
||||
* please do not use, install, modify or redistribute this Apple software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject
|
||||
* to these terms, Apple grants you a personal, non-exclusive license, under Apple's
|
||||
* copyrights in this original Apple software (the "Apple Software"), to use,
|
||||
* reproduce, modify and redistribute the Apple Software, with or without
|
||||
* modifications, in source and/or binary forms; provided that if you redistribute
|
||||
* the Apple Software in its entirety and without modifications, you must retain
|
||||
* this notice and the following text and disclaimers in all such redistributions of
|
||||
* the Apple Software. Neither the name, trademarks, service marks or logos of
|
||||
* Apple Computer, Inc. may be used to endorse or promote products derived from the
|
||||
* Apple Software without specific prior written permission from Apple. Except as
|
||||
* expressly stated in this notice, no other rights or licenses, express or implied,
|
||||
* are granted by Apple herein, including but not limited to any patent rights that
|
||||
* may be infringed by your derivative works or by other works in which the Apple
|
||||
* Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
|
||||
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
|
||||
* COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
|
||||
* 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.
|
||||
*/
|
||||
|
||||
extern const char *GetNextLabel(const char *cstr, char label[64]);
|
12
mDNSResponder/Clients/DNS-SD.VisualStudio/DNS-SD.manifest
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Apple.Bonjour.DNS-SD" type="win32"/>
|
||||
<description>Command line utility.</description>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
12
mDNSResponder/Clients/DNS-SD.VisualStudio/DNS-SD64.manifest
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" processorArchitecture="amd64" name="Apple.Bonjour.DNS-SD" type="win32"/>
|
||||
<description>Command Line Utility</description>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
103
mDNSResponder/Clients/DNS-SD.VisualStudio/dns-sd.rc
Executable file
@ -0,0 +1,103 @@
|
||||
// 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"
|
||||
"\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 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", MASTER_COMPANY_NAME
|
||||
VALUE "FileDescription", "Bonjour Console Utility"
|
||||
VALUE "FileVersion", MASTER_PROD_VERS_STR
|
||||
VALUE "InternalName", "dns-sd.exe"
|
||||
VALUE "LegalCopyright", MASTER_LEGAL_COPYRIGHT
|
||||
VALUE "OriginalFilename", "dns-sd.exe"
|
||||
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
|
||||
|
102
mDNSResponder/Clients/DNS-SD.VisualStudio/dns-sd.sdk.rc
Executable file
@ -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
|
||||
|
408
mDNSResponder/Clients/DNS-SD.VisualStudio/dns-sd.sdk.vcproj
Executable file
@ -0,0 +1,408 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="dns-sd"
|
||||
ProjectGUID="{AA230639-E115-4A44-AA5A-44A61235BA50}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(BONJOUR_SDK_HOME)/Include"
|
||||
PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_CONSOLE;NOT_HAVE_GETOPT;NOT_HAVE_SETLINEBUF;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NXCOMPAT /DYNAMICBASE /SAFESEH"
|
||||
AdditionalDependencies=""$(BONJOUR_SDK_HOME)/Lib/$(PlatformName)/dnssd.lib" ws2_32.lib"
|
||||
OutputFile="$(OutDir)/dns-sd.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/dns-sd.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="DNS-SD.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(BONJOUR_SDK_HOME)/Include"
|
||||
PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_CONSOLE;NOT_HAVE_GETOPT;NOT_HAVE_SETLINEBUF;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NXCOMPAT /DYNAMICBASE"
|
||||
AdditionalDependencies=""$(BONJOUR_SDK_HOME)/Lib/$(PlatformName)/dnssd.lib" ws2_32.lib"
|
||||
OutputFile="$(OutDir)/dns-sd.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/dns-sd.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="DNS-SD64.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="$(BONJOUR_SDK_HOME)/Include"
|
||||
PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_CONSOLE;NOT_HAVE_GETOPT;NOT_HAVE_SETLINEBUF;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NXCOMPAT /DYNAMICBASE /SAFESEH"
|
||||
AdditionalDependencies=""$(BONJOUR_SDK_HOME)/Lib/$(PlatformName)/dnssd.lib" ws2_32.lib"
|
||||
OutputFile="$(OutDir)/dns-sd.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="DNS-SD.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="$(BONJOUR_SDK_HOME)/Include"
|
||||
PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_CONSOLE;NOT_HAVE_GETOPT;NOT_HAVE_SETLINEBUF;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NXCOMPAT /DYNAMICBASE"
|
||||
AdditionalDependencies=""$(BONJOUR_SDK_HOME)/Lib/$(PlatformName)/dnssd.lib" ws2_32.lib"
|
||||
OutputFile="$(OutDir)/dns-sd.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="DNS-SD64.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\ClientCommon.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dns-sd.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\ClientCommon.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="resource.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath="dns-sd.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
408
mDNSResponder/Clients/DNS-SD.VisualStudio/dns-sd.vcproj
Executable file
272
mDNSResponder/Clients/DNS-SD.VisualStudio/dns-sd.vcxproj
Executable file
@ -0,0 +1,272 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{AA230639-E115-4A44-AA5A-44A61235BA50}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../mDNSShared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;_DEBUG;_CONSOLE;NOT_HAVE_GETOPT;NOT_HAVE_SETLINEBUF;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/NXCOMPAT /DYNAMICBASE /SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>../../mDNSWindows/DLL/$(Platform)/$(Configuration)/dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)dns-sd.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)dns-sd.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>DNS-SD.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../mDNSShared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;_DEBUG;_CONSOLE;NOT_HAVE_GETOPT;NOT_HAVE_SETLINEBUF;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/NXCOMPAT /DYNAMICBASE %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>../../mDNSWindows/DLL/$(Platform)/$(Configuration)/dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)dns-sd.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)dns-sd.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>DNS-SD64.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>../../mDNSShared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_CONSOLE;NOT_HAVE_GETOPT;NOT_HAVE_SETLINEBUF;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/NXCOMPAT /DYNAMICBASE /SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>../../mDNSWindows/DLL/$(Platform)/$(Configuration)/dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)dns-sd.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>DNS-SD.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PostBuildEvent>
|
||||
<Command>if not "%RC_XBS%" == "YES" goto END
|
||||
if not exist "$(DSTROOT)\WINDOWS\system32\$(Platform)" mkdir "$(DSTROOT)\WINDOWS\system32\$(Platform)"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\DNSServiceBrowser" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\DNSServiceBrowser"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\SimpleChat" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\SimpleChat"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser\My Project" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser\My Project"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\SimpleChat" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\SimpleChat"
|
||||
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\WINDOWS\system32\$(Platform)"
|
||||
xcopy /I/Y "$(ProjectDir)..\dns-sd.c" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
xcopy /I/Y "$(ProjectDir)..\ClientCommon.c" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
xcopy /I/Y "$(ProjectDir)..\ClientCommon.h" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
xcopy /I/Y "$(ProjectDir)resource.h" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
xcopy /I/Y "$(ProjectDir)DNS-SD.manifest" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
xcopy /I/Y "$(ProjectDir)DNS-SD64.manifest" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
xcopy /I/Y "$(ProjectDir)dns-sd.sdk.rc" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
move /Y "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C\dns-sd.sdk.rc" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C\dns-sd.rc"
|
||||
xcopy /I/Y "$(ProjectDir)dns-sd.sdk.vcproj" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
move /Y "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C\dns-sd.sdk.vcproj" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C\dns-sd.vcproj"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.NET\App.ico" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\DNSServiceBrowser"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.NET\AssemblyInfo.cs" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\DNSServiceBrowser"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.NET\DNSServiceBrowser.NET.csproj" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\DNSServiceBrowser"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.NET\DNSServiceBrowser.cs" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\DNSServiceBrowser"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.NET\DNSServiceBrowser.resx" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\DNSServiceBrowser"
|
||||
xcopy /I/Y "$(ProjectDir)..\SimpleChat.NET\App.ico" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\SimpleChat"
|
||||
xcopy /I/Y "$(ProjectDir)..\SimpleChat.NET\AssemblyInfo.cs" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\SimpleChat"
|
||||
xcopy /I/Y "$(ProjectDir)..\SimpleChat.NET\SimpleChat.NET.csproj" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\SimpleChat"
|
||||
xcopy /I/Y "$(ProjectDir)..\SimpleChat.NET\SimpleChat.cs" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\SimpleChat"
|
||||
xcopy /I/Y "$(ProjectDir)..\SimpleChat.NET\SimpleChat.resx" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\CS\SimpleChat"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.VB\DNSServiceBrowser.Designer.vb" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.VB\DNSServiceBrowser.VB.vbproj" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.VB\DNSServiceBrowser.resx" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser"
|
||||
xcopy /I/Y "$(ProjectDir)..\DNSServiceBrowser.VB\DNSServiceBrowser.vb" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser"
|
||||
xcopy /E/Y "$(ProjectDir)..\DNSServiceBrowser.VB\My Project" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\DNSServiceBrowser\My Project"
|
||||
xcopy /E/Y "$(ProjectDir)..\SimpleChat.VB" "$(DSTROOT)\Program Files\Bonjour SDK\Samples\VB\SimpleChat"
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>../../mDNSShared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_CONSOLE;NOT_HAVE_GETOPT;NOT_HAVE_SETLINEBUF;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/NXCOMPAT /DYNAMICBASE %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>../../mDNSWindows/DLL/$(Platform)/$(Configuration)/dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)dns-sd.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>DNS-SD64.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PostBuildEvent>
|
||||
<Command>if not "%RC_XBS%" == "YES" goto END
|
||||
if not exist "$(DSTROOT)\WINDOWS\system32\$(Platform)" mkdir "$(DSTROOT)\WINDOWS\system32\$(Platform)"
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\Samples\C"
|
||||
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\WINDOWS\system32\$(Platform)"
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\ClientCommon.c" />
|
||||
<ClCompile Include="..\dns-sd.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\ClientCommon.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="dns-sd.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
38
mDNSResponder/Clients/DNS-SD.VisualStudio/dns-sd.vcxproj.filters
Executable file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{663cbcf4-ce8e-49eb-9826-0676fba94350}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{f5fcca0d-918b-46ba-bb91-2f2f9d9ddbba}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{a7d985ec-3f36-4554-a707-5256b2e719b6}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\ClientCommon.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\dns-sd.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\ClientCommon.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="dns-sd.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
14
mDNSResponder/Clients/DNS-SD.VisualStudio/resource.h
Executable file
@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by dns-sd.rc
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
737
mDNSResponder/Clients/DNS-SD.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,737 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
FFF520490671177900DA3D49 /* Build All */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = 21D91E890B12A03D003981D9 /* Build configuration list for PBXAggregateTarget "Build All" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
FF383826067117F300FEF615 /* PBXTargetDependency */,
|
||||
FF383828067117F600FEF615 /* PBXTargetDependency */,
|
||||
FF1E351806711B6A003DD5BC /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Build All";
|
||||
productName = "Build All";
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8DD76F770486A8DE00D96B5E /* dns-sd.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* dns-sd.c */; settings = {ATTRIBUTES = (); }; };
|
||||
FF1B6915067114AF002304DD /* DNSServiceBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = FF1B6914067114AF002304DD /* DNSServiceBrowser.m */; };
|
||||
FF1E351C06711BCF003DD5BC /* DNSServiceReg.m in Sources */ = {isa = PBXBuildFile; fileRef = FF1E351B06711BCF003DD5BC /* DNSServiceReg.m */; };
|
||||
FF1E352606711BD6003DD5BC /* DNSServiceReg.nib in Resources */ = {isa = PBXBuildFile; fileRef = FF1E352506711BD6003DD5BC /* DNSServiceReg.nib */; };
|
||||
FF2704F90F12A60900299571 /* ClientCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = FF2704F80F12A60900299571 /* ClientCommon.c */; };
|
||||
FF964AA10671153B0099215A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF964AA00671153B0099215A /* Foundation.framework */; };
|
||||
FF964CAA0671155C0099215A /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF964CA90671155C0099215A /* AppKit.framework */; };
|
||||
FF964DAC067115710099215A /* DNSServiceBrowser.nib in Resources */ = {isa = PBXBuildFile; fileRef = FF964DAB067115710099215A /* DNSServiceBrowser.nib */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
FF1E351706711B6A003DD5BC /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FF1E351206711B5C003DD5BC;
|
||||
remoteInfo = DNSServiceReg;
|
||||
};
|
||||
FF383825067117F300FEF615 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8DD76F740486A8DE00D96B5E;
|
||||
remoteInfo = "dns-sd";
|
||||
};
|
||||
FF383827067117F600FEF615 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FF1B691006711383002304DD;
|
||||
remoteInfo = "DNS Service Browser";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F7B0486A8DE00D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08FB7796FE84155DC02AAC07 /* dns-sd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "dns-sd.c"; sourceTree = "<group>"; };
|
||||
8DD76F7E0486A8DE00D96B5E /* dns-sd */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = "dns-sd"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FF1B691106711383002304DD /* DNS Service Browser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DNS Service Browser.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FF1B6914067114AF002304DD /* DNSServiceBrowser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DNSServiceBrowser.m; sourceTree = "<group>"; };
|
||||
FF1E351306711B5C003DD5BC /* DNS Service Registration.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DNS Service Registration.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FF1E351B06711BCF003DD5BC /* DNSServiceReg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DNSServiceReg.m; sourceTree = "<group>"; };
|
||||
FF1E352506711BD6003DD5BC /* DNSServiceReg.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = DNSServiceReg.nib; sourceTree = "<group>"; };
|
||||
FF2704F80F12A60900299571 /* ClientCommon.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ClientCommon.c; sourceTree = "<group>"; };
|
||||
FF964AA00671153B0099215A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
FF964CA90671155C0099215A /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
FF964DAB067115710099215A /* DNSServiceBrowser.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = DNSServiceBrowser.nib; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F780486A8DE00D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FF1B690F06711383002304DD /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FF964AA10671153B0099215A /* Foundation.framework in Frameworks */,
|
||||
FF964CAA0671155C0099215A /* AppKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FF1E351106711B5C003DD5BC /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* mDNS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
21D91EBD0B12A2B6003981D9 /* Resources */,
|
||||
08FB779DFE84155DC02AAC07 /* Frameworks */,
|
||||
19C28FBDFE9D53C911CA2CBB /* Products */,
|
||||
);
|
||||
name = mDNS;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7796FE84155DC02AAC07 /* dns-sd.c */,
|
||||
FF2704F80F12A60900299571 /* ClientCommon.c */,
|
||||
FF1B6914067114AF002304DD /* DNSServiceBrowser.m */,
|
||||
FF1E351B06711BCF003DD5BC /* DNSServiceReg.m */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB779DFE84155DC02AAC07 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FF964CA90671155C0099215A /* AppKit.framework */,
|
||||
FF964AA00671153B0099215A /* Foundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FBDFE9D53C911CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F7E0486A8DE00D96B5E /* dns-sd */,
|
||||
FF1B691106711383002304DD /* DNS Service Browser.app */,
|
||||
FF1E351306711B5C003DD5BC /* DNS Service Registration.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
21D91EBD0B12A2B6003981D9 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FF964DAB067115710099215A /* DNSServiceBrowser.nib */,
|
||||
FF1E352506711BD6003DD5BC /* DNSServiceReg.nib */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
8DD76F750486A8DE00D96B5E /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FF1B690C06711383002304DD /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FF1E350E06711B5C003DD5BC /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F740486A8DE00D96B5E /* dns-sd */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 21D91E7D0B12A03D003981D9 /* Build configuration list for PBXNativeTarget "dns-sd" */;
|
||||
buildPhases = (
|
||||
8DD76F750486A8DE00D96B5E /* Headers */,
|
||||
8DD76F760486A8DE00D96B5E /* Sources */,
|
||||
8DD76F780486A8DE00D96B5E /* Frameworks */,
|
||||
8DD76F7A0486A8DE00D96B5E /* Rez */,
|
||||
8DD76F7B0486A8DE00D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "dns-sd";
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = mDNS;
|
||||
productReference = 8DD76F7E0486A8DE00D96B5E /* dns-sd */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
FF1B691006711383002304DD /* DNS Service Browser */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 21D91E810B12A03D003981D9 /* Build configuration list for PBXNativeTarget "DNS Service Browser" */;
|
||||
buildPhases = (
|
||||
FF1B690C06711383002304DD /* Headers */,
|
||||
FF1B690D06711383002304DD /* Resources */,
|
||||
FF1B690E06711383002304DD /* Sources */,
|
||||
FF1B690F06711383002304DD /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "DNS Service Browser";
|
||||
productName = "DNS Service Browser";
|
||||
productReference = FF1B691106711383002304DD /* DNS Service Browser.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FF1E351206711B5C003DD5BC /* DNS Service Registration */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 21D91E850B12A03D003981D9 /* Build configuration list for PBXNativeTarget "DNS Service Registration" */;
|
||||
buildPhases = (
|
||||
FF1E350E06711B5C003DD5BC /* Headers */,
|
||||
FF1E350F06711B5C003DD5BC /* Resources */,
|
||||
FF1E351006711B5C003DD5BC /* Sources */,
|
||||
FF1E351106711B5C003DD5BC /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "DNS Service Registration";
|
||||
productName = "DNS Service Registration";
|
||||
productReference = FF1E351306711B5C003DD5BC /* DNS Service Registration.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 21D91E8D0B12A03D003981D9 /* Build configuration list for PBXProject "DNS-SD" */;
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* mDNS */;
|
||||
projectDirPath = "";
|
||||
targets = (
|
||||
FFF520490671177900DA3D49 /* Build All */,
|
||||
8DD76F740486A8DE00D96B5E /* dns-sd */,
|
||||
FF1B691006711383002304DD /* DNS Service Browser */,
|
||||
FF1E351206711B5C003DD5BC /* DNS Service Registration */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
FF1B690D06711383002304DD /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FF964DAC067115710099215A /* DNSServiceBrowser.nib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FF1E350F06711B5C003DD5BC /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FF1E352606711BD6003DD5BC /* DNSServiceReg.nib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXRezBuildPhase section */
|
||||
8DD76F7A0486A8DE00D96B5E /* Rez */ = {
|
||||
isa = PBXRezBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXRezBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F760486A8DE00D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8DD76F770486A8DE00D96B5E /* dns-sd.c in Sources */,
|
||||
FF2704F90F12A60900299571 /* ClientCommon.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FF1B690E06711383002304DD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FF1B6915067114AF002304DD /* DNSServiceBrowser.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FF1E351006711B5C003DD5BC /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FF1E351C06711BCF003DD5BC /* DNSServiceReg.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
FF1E351806711B6A003DD5BC /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = FF1E351206711B5C003DD5BC /* DNS Service Registration */;
|
||||
targetProxy = FF1E351706711B6A003DD5BC /* PBXContainerItemProxy */;
|
||||
};
|
||||
FF383826067117F300FEF615 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8DD76F740486A8DE00D96B5E /* dns-sd */;
|
||||
targetProxy = FF383825067117F300FEF615 /* PBXContainerItemProxy */;
|
||||
};
|
||||
FF383828067117F600FEF615 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = FF1B691006711383002304DD /* DNS Service Browser */;
|
||||
targetProxy = FF383827067117F600FEF615 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
21D91E7E0B12A03D003981D9 /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUGGING_SYMBOLS = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_ENABLE_TRIGRAPHS = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INSTALL_PATH = "$(HOME)/bin";
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OPTIMIZATION_CFLAGS = "-O0";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "dns-sd";
|
||||
REZ_EXECUTABLE = YES;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
21D91E7F0B12A03D003981D9 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_ENABLE_TRIGRAPHS = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INSTALL_PATH = "$(HOME)/bin";
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "dns-sd";
|
||||
REZ_EXECUTABLE = YES;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
21D91E800B12A03D003981D9 /* Default */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_ENABLE_TRIGRAPHS = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INSTALL_PATH = "$(HOME)/bin";
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "dns-sd";
|
||||
REZ_EXECUTABLE = YES;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Default;
|
||||
};
|
||||
21D91E820B12A03D003981D9 /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUGGING_SYMBOLS = YES;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INFOPLIST_FILE = "DNSServiceBrowser-Info.plist";
|
||||
INSTALL_PATH = "$(USER_APPS_DIR)";
|
||||
OPTIMIZATION_CFLAGS = "-O0";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "DNS Service Browser";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wmost";
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
21D91E830B12A03D003981D9 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INFOPLIST_FILE = "DNSServiceBrowser-Info.plist";
|
||||
INSTALL_PATH = "$(USER_APPS_DIR)";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "DNS Service Browser";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wmost";
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
21D91E840B12A03D003981D9 /* Default */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INFOPLIST_FILE = "DNSServiceBrowser-Info.plist";
|
||||
INSTALL_PATH = "$(USER_APPS_DIR)";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "DNS Service Browser";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wmost";
|
||||
};
|
||||
name = Default;
|
||||
};
|
||||
21D91E860B12A03D003981D9 /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUGGING_SYMBOLS = YES;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INFOPLIST_FILE = "DNSServiceReg-Info.plist";
|
||||
INSTALL_PATH = "$(USER_APPS_DIR)";
|
||||
OPTIMIZATION_CFLAGS = "-O0";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "DNS Service Registration";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wmost";
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
21D91E870B12A03D003981D9 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INFOPLIST_FILE = "DNSServiceReg-Info.plist";
|
||||
INSTALL_PATH = "$(USER_APPS_DIR)";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "DNS Service Registration";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wmost";
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
21D91E880B12A03D003981D9 /* Default */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
HEADER_SEARCH_PATHS = ../mDNSShared;
|
||||
INFOPLIST_FILE = "DNSServiceReg-Info.plist";
|
||||
INSTALL_PATH = "$(USER_APPS_DIR)";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "DNS Service Registration";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wmost";
|
||||
};
|
||||
name = Default;
|
||||
};
|
||||
21D91E8A0B12A03D003981D9 /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUGGING_SYMBOLS = YES;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
OPTIMIZATION_CFLAGS = "-O0";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "Build All";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
21D91E8B0B12A03D003981D9 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "Build All";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
21D91E8C0B12A03D003981D9 /* Default */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = "Build All";
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Default;
|
||||
};
|
||||
21D91E8E0B12A03D003981D9 /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
21D91E8F0B12A03D003981D9 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
21D91E900B12A03D003981D9 /* Default */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
};
|
||||
name = Default;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
21D91E7D0B12A03D003981D9 /* Build configuration list for PBXNativeTarget "dns-sd" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
21D91E7E0B12A03D003981D9 /* Development */,
|
||||
21D91E7F0B12A03D003981D9 /* Deployment */,
|
||||
21D91E800B12A03D003981D9 /* Default */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Default;
|
||||
};
|
||||
21D91E810B12A03D003981D9 /* Build configuration list for PBXNativeTarget "DNS Service Browser" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
21D91E820B12A03D003981D9 /* Development */,
|
||||
21D91E830B12A03D003981D9 /* Deployment */,
|
||||
21D91E840B12A03D003981D9 /* Default */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Default;
|
||||
};
|
||||
21D91E850B12A03D003981D9 /* Build configuration list for PBXNativeTarget "DNS Service Registration" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
21D91E860B12A03D003981D9 /* Development */,
|
||||
21D91E870B12A03D003981D9 /* Deployment */,
|
||||
21D91E880B12A03D003981D9 /* Default */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Default;
|
||||
};
|
||||
21D91E890B12A03D003981D9 /* Build configuration list for PBXAggregateTarget "Build All" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
21D91E8A0B12A03D003981D9 /* Development */,
|
||||
21D91E8B0B12A03D003981D9 /* Deployment */,
|
||||
21D91E8C0B12A03D003981D9 /* Default */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Default;
|
||||
};
|
||||
21D91E8D0B12A03D003981D9 /* Build configuration list for PBXProject "DNS-SD" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
21D91E8E0B12A03D003981D9 /* Development */,
|
||||
21D91E8F0B12A03D003981D9 /* Deployment */,
|
||||
21D91E900B12A03D003981D9 /* Default */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Default;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
30
mDNSResponder/Clients/DNSServiceBrowser-Info.plist
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>DNS Service Browser</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.DNSServiceBrowser</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>DNSServiceBrowser</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
mDNSResponder/Clients/DNSServiceBrowser.NET/App.ico
Executable file
After Width: | Height: | Size: 1.1 KiB |
75
mDNSResponder/Clients/DNSServiceBrowser.NET/AssemblyInfo.cs
Executable file
@ -0,0 +1,75 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 1997-2004 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.
|
||||
*/
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
119
mDNSResponder/Clients/DNSServiceBrowser.NET/DNSServiceBrowser.NET.csproj
Executable file
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{DE8DB97E-37A3-43ED-9A5E-CCC5F6DE9CB4}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>DNSServiceBrowser_NET</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>DNSServiceBrowser_NET</RootNamespace>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<Name>System.Drawing</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<Name>System.Windows.Forms</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="App.ico" />
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DNSServiceBrowser.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="DNSServiceBrowser.resx">
|
||||
<DependentUpon>DNSServiceBrowser.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="Bonjour">
|
||||
<Guid>{18FBED6D-F2B7-4EC8-A4A4-46282E635308}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
734
mDNSResponder/Clients/DNSServiceBrowser.NET/DNSServiceBrowser.cs
Executable file
@ -0,0 +1,734 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 1997-2004 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.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using Bonjour;
|
||||
|
||||
namespace DNSServiceBrowser_NET
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Form1.
|
||||
/// </summary>
|
||||
public class Form1 : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.ComboBox typeBox;
|
||||
private System.Windows.Forms.ListBox browseList;
|
||||
private Bonjour.DNSSDEventManager eventManager = null;
|
||||
private Bonjour.DNSSDService service = null;
|
||||
private Bonjour.DNSSDService browser = null;
|
||||
private Bonjour.DNSSDService resolver = null;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox nameField;
|
||||
private System.Windows.Forms.TextBox typeField;
|
||||
private System.Windows.Forms.TextBox domainField;
|
||||
private System.Windows.Forms.TextBox hostField;
|
||||
private System.Windows.Forms.TextBox portField;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.ListBox serviceTextField;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
|
||||
//
|
||||
// Create the DNSSDEventManager. You can then associate event handlers
|
||||
// with the instance that will be invoked when the event occurs
|
||||
//
|
||||
// In this example, we're associating ServiceFound, ServiceLost,
|
||||
// ServiceResolved, and OperationFailed event handlers with the
|
||||
// event manager instance.
|
||||
//
|
||||
eventManager = new DNSSDEventManager();
|
||||
eventManager.ServiceFound += new _IDNSSDEvents_ServiceFoundEventHandler(this.ServiceFound);
|
||||
eventManager.ServiceLost += new _IDNSSDEvents_ServiceLostEventHandler(this.ServiceLost);
|
||||
eventManager.ServiceResolved += new _IDNSSDEvents_ServiceResolvedEventHandler(this.ServiceResolved);
|
||||
eventManager.OperationFailed += new _IDNSSDEvents_OperationFailedEventHandler(this.OperationFailed);
|
||||
|
||||
service = new DNSSDService();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
typeBox.SelectedItem = "_http._tcp";
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if (components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
|
||||
//
|
||||
// Clean up
|
||||
//
|
||||
if (resolver != null)
|
||||
{
|
||||
resolver.Stop();
|
||||
}
|
||||
|
||||
if (browser != null)
|
||||
{
|
||||
browser.Stop();
|
||||
}
|
||||
|
||||
if (service != null)
|
||||
{
|
||||
service.Stop();
|
||||
}
|
||||
|
||||
eventManager.ServiceFound -= new _IDNSSDEvents_ServiceFoundEventHandler(this.ServiceFound);
|
||||
eventManager.ServiceLost -= new _IDNSSDEvents_ServiceLostEventHandler(this.ServiceLost);
|
||||
eventManager.ServiceResolved -= new _IDNSSDEvents_ServiceResolvedEventHandler(this.ServiceResolved);
|
||||
eventManager.OperationFailed -= new _IDNSSDEvents_OperationFailedEventHandler(this.OperationFailed);
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.browseList = new System.Windows.Forms.ListBox();
|
||||
this.typeBox = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.nameField = new System.Windows.Forms.TextBox();
|
||||
this.typeField = new System.Windows.Forms.TextBox();
|
||||
this.domainField = new System.Windows.Forms.TextBox();
|
||||
this.hostField = new System.Windows.Forms.TextBox();
|
||||
this.portField = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.serviceTextField = new System.Windows.Forms.ListBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// browseList
|
||||
//
|
||||
this.browseList.Location = new System.Drawing.Point(8, 48);
|
||||
this.browseList.Name = "browseList";
|
||||
this.browseList.Size = new System.Drawing.Size(488, 147);
|
||||
this.browseList.TabIndex = 0;
|
||||
this.browseList.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
|
||||
//
|
||||
// typeBox
|
||||
//
|
||||
this.typeBox.Items.AddRange(new object[]
|
||||
{
|
||||
"_accessone._tcp",
|
||||
"_accountedge._tcp",
|
||||
"_actionitems._tcp",
|
||||
"_addressbook._tcp",
|
||||
"_aecoretech._tcp",
|
||||
"_afpovertcp._tcp",
|
||||
"_airport._tcp",
|
||||
"_animolmd._tcp",
|
||||
"_animobserver._tcp",
|
||||
"_apple-sasl._tcp",
|
||||
"_aquamon._tcp",
|
||||
"_async._tcp",
|
||||
"_auth._tcp",
|
||||
"_beep._tcp",
|
||||
"_bfagent._tcp",
|
||||
"_bootps._udp",
|
||||
"_bousg._tcp",
|
||||
"_bsqdea._tcp",
|
||||
"_cheat._tcp",
|
||||
"_chess._tcp",
|
||||
"_clipboard._tcp",
|
||||
"_collection._tcp",
|
||||
"_contactserver._tcp",
|
||||
"_cvspserver._tcp",
|
||||
"_cytv._tcp",
|
||||
"_daap._tcp",
|
||||
"_difi._tcp",
|
||||
"_distcc._tcp",
|
||||
"_dossier._tcp",
|
||||
"_dpap._tcp",
|
||||
"_earphoria._tcp",
|
||||
"_ebms._tcp",
|
||||
"_ebreg._tcp",
|
||||
"_ecbyesfsgksc._tcp",
|
||||
"_eheap._tcp",
|
||||
"_embrace._tcp",
|
||||
"_eppc._tcp",
|
||||
"_eventserver._tcp",
|
||||
"_exec._tcp",
|
||||
"_facespan._tcp",
|
||||
"_faxstfx._tcp",
|
||||
"_fish._tcp",
|
||||
"_fjork._tcp",
|
||||
"_fmpro-internal._tcp",
|
||||
"_ftp._tcp",
|
||||
"_ftpcroco._tcp",
|
||||
"_gbs-smp._tcp",
|
||||
"_gbs-stp._tcp",
|
||||
"_grillezvous._tcp",
|
||||
"_h323._tcp",
|
||||
"_http._tcp",
|
||||
"_hotwayd._tcp",
|
||||
"_hydra._tcp",
|
||||
"_ica-networking._tcp",
|
||||
"_ichalkboard._tcp",
|
||||
"_ichat._tcp",
|
||||
"_iconquer._tcp",
|
||||
"_ifolder._tcp",
|
||||
"_ilynx._tcp",
|
||||
"_imap._tcp",
|
||||
"_imidi._tcp",
|
||||
"_ipbroadcaster._tcp",
|
||||
"_ipp._tcp",
|
||||
"_isparx._tcp",
|
||||
"_ispq-vc._tcp",
|
||||
"_ishare._tcp",
|
||||
"_isticky._tcp",
|
||||
"_istorm._tcp",
|
||||
"_iwork._tcp",
|
||||
"_lan2p._tcp",
|
||||
"_ldap._tcp",
|
||||
"_liaison._tcp",
|
||||
"_login._tcp",
|
||||
"_lontalk._tcp",
|
||||
"_lonworks._tcp",
|
||||
"_macfoh-remote._tcp",
|
||||
"_macminder._tcp",
|
||||
"_moneyworks._tcp",
|
||||
"_mp3sushi._tcp",
|
||||
"_mttp._tcp",
|
||||
"_ncbroadcast._tcp",
|
||||
"_ncdirect._tcp",
|
||||
"_ncsyncserver._tcp",
|
||||
"_net-assistant._tcp",
|
||||
"_newton-dock._tcp",
|
||||
"_nfs._udp",
|
||||
"_nssocketport._tcp",
|
||||
"_odabsharing._tcp",
|
||||
"_omni-bookmark._tcp",
|
||||
"_openbase._tcp",
|
||||
"_p2pchat._udp",
|
||||
"_pdl-datastream._tcp",
|
||||
"_poch._tcp",
|
||||
"_pop3._tcp",
|
||||
"_postgresql._tcp",
|
||||
"_presence._tcp",
|
||||
"_printer._tcp",
|
||||
"_ptp._tcp",
|
||||
"_quinn._tcp",
|
||||
"_raop._tcp",
|
||||
"_rce._tcp",
|
||||
"_realplayfavs._tcp",
|
||||
"_riousbprint._tcp",
|
||||
"_rfb._tcp",
|
||||
"_rtsp._tcp",
|
||||
"_safarimenu._tcp",
|
||||
"_sallingclicker._tcp",
|
||||
"_scone._tcp",
|
||||
"_sdsharing._tcp",
|
||||
"_see._tcp",
|
||||
"_seeCard._tcp",
|
||||
"_serendipd._tcp",
|
||||
"_servermgr._tcp",
|
||||
"_shell._tcp",
|
||||
"_shout._tcp",
|
||||
"_shoutcast._tcp",
|
||||
"_soap._tcp",
|
||||
"_spike._tcp",
|
||||
"_spincrisis._tcp",
|
||||
"_spl-itunes._tcp",
|
||||
"_spr-itunes._tcp",
|
||||
"_ssh._tcp",
|
||||
"_ssscreenshare._tcp",
|
||||
"_strateges._tcp",
|
||||
"_sge-exec._tcp",
|
||||
"_sge-qmaster._tcp",
|
||||
"_stickynotes._tcp",
|
||||
"_sxqdea._tcp",
|
||||
"_sybase-tds._tcp",
|
||||
"_teamlist._tcp",
|
||||
"_teleport._udp",
|
||||
"_telnet._tcp",
|
||||
"_tftp._udp",
|
||||
"_ticonnectmgr._tcp",
|
||||
"_tinavigator._tcp",
|
||||
"_tryst._tcp",
|
||||
"_upnp._tcp",
|
||||
"_utest._tcp",
|
||||
"_vue4rendercow._tcp",
|
||||
"_webdav._tcp",
|
||||
"_whamb._tcp",
|
||||
"_wired._tcp",
|
||||
"_workstation._tcp",
|
||||
"_wormhole._tcp",
|
||||
"_workgroup._tcp",
|
||||
"_ws._tcp",
|
||||
"_xserveraid._tcp",
|
||||
"_xsync._tcp",
|
||||
"_xtshapro._tcp"
|
||||
});
|
||||
|
||||
this.typeBox.Location = new System.Drawing.Point(8, 16);
|
||||
this.typeBox.Name = "typeBox";
|
||||
this.typeBox.Size = new System.Drawing.Size(192, 21);
|
||||
this.typeBox.Sorted = true;
|
||||
this.typeBox.TabIndex = 3;
|
||||
this.typeBox.SelectedIndexChanged += new System.EventHandler(this.typeBox_SelectedIndexChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(8, 208);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(48, 16);
|
||||
this.label1.TabIndex = 4;
|
||||
this.label1.Text = "Name:";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(8, 240);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(48, 16);
|
||||
this.label2.TabIndex = 5;
|
||||
this.label2.Text = "Type:";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Location = new System.Drawing.Point(8, 272);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(48, 16);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "Domain:";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Location = new System.Drawing.Point(8, 304);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(48, 16);
|
||||
this.label4.TabIndex = 7;
|
||||
this.label4.Text = "Host:";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// nameField
|
||||
//
|
||||
this.nameField.Location = new System.Drawing.Point(56, 208);
|
||||
this.nameField.Name = "nameField";
|
||||
this.nameField.ReadOnly = true;
|
||||
this.nameField.Size = new System.Drawing.Size(168, 20);
|
||||
this.nameField.TabIndex = 8;
|
||||
this.nameField.Text = "";
|
||||
//
|
||||
// typeField
|
||||
//
|
||||
this.typeField.Location = new System.Drawing.Point(56, 240);
|
||||
this.typeField.Name = "typeField";
|
||||
this.typeField.ReadOnly = true;
|
||||
this.typeField.Size = new System.Drawing.Size(168, 20);
|
||||
this.typeField.TabIndex = 9;
|
||||
this.typeField.Text = "";
|
||||
//
|
||||
// domainField
|
||||
//
|
||||
this.domainField.Location = new System.Drawing.Point(56, 272);
|
||||
this.domainField.Name = "domainField";
|
||||
this.domainField.ReadOnly = true;
|
||||
this.domainField.Size = new System.Drawing.Size(168, 20);
|
||||
this.domainField.TabIndex = 10;
|
||||
this.domainField.Text = "";
|
||||
//
|
||||
// hostField
|
||||
//
|
||||
this.hostField.Location = new System.Drawing.Point(56, 304);
|
||||
this.hostField.Name = "hostField";
|
||||
this.hostField.ReadOnly = true;
|
||||
this.hostField.Size = new System.Drawing.Size(168, 20);
|
||||
this.hostField.TabIndex = 11;
|
||||
this.hostField.Text = "";
|
||||
|
||||
//
|
||||
// portField
|
||||
//
|
||||
this.portField.Location = new System.Drawing.Point(56, 336);
|
||||
this.portField.Name = "portField";
|
||||
this.portField.ReadOnly = true;
|
||||
this.portField.Size = new System.Drawing.Size(168, 20);
|
||||
this.portField.TabIndex = 12;
|
||||
this.portField.Text = "";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Location = new System.Drawing.Point(8, 336);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(48, 16);
|
||||
this.label5.TabIndex = 14;
|
||||
this.label5.Text = "Port:";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// serviceTextField
|
||||
//
|
||||
this.serviceTextField.HorizontalScrollbar = true;
|
||||
this.serviceTextField.Location = new System.Drawing.Point(264, 208);
|
||||
this.serviceTextField.Name = "serviceTextField";
|
||||
this.serviceTextField.Size = new System.Drawing.Size(232, 147);
|
||||
this.serviceTextField.TabIndex = 16;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(512, 365);
|
||||
this.Controls.AddRange(new System.Windows.Forms.Control[] {
|
||||
this.serviceTextField,
|
||||
this.label5,
|
||||
this.portField,
|
||||
this.hostField,
|
||||
this.domainField,
|
||||
this.typeField,
|
||||
this.nameField,
|
||||
this.label4,
|
||||
this.label3,
|
||||
this.label2,
|
||||
this.label1,
|
||||
this.typeBox,
|
||||
this.browseList});
|
||||
this.Name = "Form1";
|
||||
this.Text = "DNSServices Browser";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
//
|
||||
// BrowseData
|
||||
//
|
||||
// This class is used to store data associated
|
||||
// with a DNSService.Browse() operation
|
||||
//
|
||||
public class BrowseData
|
||||
{
|
||||
public uint InterfaceIndex;
|
||||
public String Name;
|
||||
public String Type;
|
||||
public String Domain;
|
||||
public int Refs;
|
||||
|
||||
public override String
|
||||
ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
|
||||
public override bool
|
||||
Equals(object other)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (other != null)
|
||||
{
|
||||
result = (this.Name == other.ToString());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override int
|
||||
GetHashCode()
|
||||
{
|
||||
return Name.GetHashCode();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// ResolveData
|
||||
//
|
||||
// This class is used to store data associated
|
||||
// with a DNSService.Resolve() operation
|
||||
//
|
||||
public class ResolveData
|
||||
{
|
||||
public uint InterfaceIndex;
|
||||
public String FullName;
|
||||
public String HostName;
|
||||
public int Port;
|
||||
public TXTRecord TxtRecord;
|
||||
|
||||
public override String
|
||||
ToString()
|
||||
{
|
||||
return FullName;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Populate()
|
||||
//
|
||||
// Populate this form with data associated with a
|
||||
// DNSService.Resolve() call
|
||||
//
|
||||
public void
|
||||
Populate(BrowseData browseData, ResolveData resolveData)
|
||||
{
|
||||
nameField.Text = browseData.Name;
|
||||
typeField.Text = browseData.Type;
|
||||
domainField.Text = browseData.Domain;
|
||||
hostField.Text = resolveData.HostName;
|
||||
portField.Text = resolveData.Port.ToString();
|
||||
|
||||
serviceTextField.Items.Clear();
|
||||
|
||||
//
|
||||
// When we print the text record, we're going to assume that every value
|
||||
// is a string.
|
||||
//
|
||||
if (resolveData.TxtRecord != null)
|
||||
{
|
||||
for (uint idx = 0; idx < resolveData.TxtRecord.GetCount(); idx++)
|
||||
{
|
||||
String key;
|
||||
Byte[] bytes;
|
||||
|
||||
key = resolveData.TxtRecord.GetKeyAtIndex(idx);
|
||||
bytes = (Byte[])resolveData.TxtRecord.GetValueAtIndex(idx);
|
||||
|
||||
if (key.Length > 0)
|
||||
{
|
||||
String val = "";
|
||||
|
||||
if (bytes != null)
|
||||
{
|
||||
val = Encoding.ASCII.GetString(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
serviceTextField.Items.Add(key + "=" + val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// called when the type field changes
|
||||
//
|
||||
private void typeBox_SelectedIndexChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
browseList.Items.Clear();
|
||||
|
||||
//
|
||||
// Stop the current browse operation
|
||||
//
|
||||
if (browser != null)
|
||||
{
|
||||
browser.Stop();
|
||||
}
|
||||
|
||||
nameField.Text = "";
|
||||
typeField.Text = "";
|
||||
domainField.Text = "";
|
||||
hostField.Text = "";
|
||||
portField.Text = "";
|
||||
serviceTextField.Items.Clear();
|
||||
|
||||
try
|
||||
{
|
||||
//
|
||||
// Selecting a service type will start a new browse operation.
|
||||
//
|
||||
browser = service.Browse( 0, 0, typeBox.SelectedItem.ToString(), null, eventManager );
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("Browse Failed", "Error");
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
if (resolver != null)
|
||||
{
|
||||
resolver.Stop();
|
||||
resolver = null;
|
||||
}
|
||||
|
||||
if (browseList.SelectedItem != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
BrowseData data = (BrowseData) browseList.SelectedItem;
|
||||
|
||||
//
|
||||
// Clicking on a service instance results in starting a resolve operation
|
||||
// that will call us back with information about the service
|
||||
//
|
||||
resolver = service.Resolve(0, data.InterfaceIndex, data.Name, data.Type, data.Domain, eventManager);
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("Resolve Failed", "Error");
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// ServiceFound
|
||||
//
|
||||
// This call is invoked by the DNSService core. We create
|
||||
// a BrowseData object and invoked the appropriate method
|
||||
// in the GUI thread so we can update the UI
|
||||
//
|
||||
public void ServiceFound
|
||||
(
|
||||
DNSSDService sref,
|
||||
DNSSDFlags flags,
|
||||
uint ifIndex,
|
||||
String serviceName,
|
||||
String regType,
|
||||
String domain
|
||||
)
|
||||
{
|
||||
int index = browseList.Items.IndexOf(serviceName);
|
||||
|
||||
//
|
||||
// Check to see if we've seen this service before. If the machine has multiple
|
||||
// interfaces, we could potentially get called back multiple times for the
|
||||
// same service. Implementing a simple reference counting scheme will address
|
||||
// the problem of the same service showing up more than once in the browse list.
|
||||
//
|
||||
if (index == -1)
|
||||
{
|
||||
BrowseData data = new BrowseData();
|
||||
|
||||
data.InterfaceIndex = ifIndex;
|
||||
data.Name = serviceName;
|
||||
data.Type = regType;
|
||||
data.Domain = domain;
|
||||
data.Refs = 1;
|
||||
|
||||
browseList.Items.Add(data);
|
||||
browseList.Invalidate();
|
||||
}
|
||||
else
|
||||
{
|
||||
BrowseData data = (BrowseData) browseList.Items[index];
|
||||
data.Refs++;
|
||||
}
|
||||
}
|
||||
|
||||
public void ServiceLost
|
||||
(
|
||||
DNSSDService sref,
|
||||
DNSSDFlags flags,
|
||||
uint ifIndex,
|
||||
String serviceName,
|
||||
String regType,
|
||||
String domain
|
||||
)
|
||||
{
|
||||
int index = browseList.Items.IndexOf(serviceName);
|
||||
|
||||
//
|
||||
// See above comment in ServiceFound about reference counting
|
||||
//
|
||||
if (index != -1)
|
||||
{
|
||||
BrowseData data = (BrowseData) browseList.Items[index];
|
||||
|
||||
data.Refs--;
|
||||
|
||||
if (data.Refs == 0)
|
||||
{
|
||||
browseList.Items.Remove(data);
|
||||
browseList.Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ServiceResolved
|
||||
(
|
||||
DNSSDService sref,
|
||||
DNSSDFlags flags,
|
||||
uint ifIndex,
|
||||
String fullName,
|
||||
String hostName,
|
||||
ushort port,
|
||||
TXTRecord txtRecord
|
||||
)
|
||||
{
|
||||
ResolveData data = new ResolveData();
|
||||
|
||||
data.InterfaceIndex = ifIndex;
|
||||
data.FullName = fullName;
|
||||
data.HostName = hostName;
|
||||
data.Port = port;
|
||||
data.TxtRecord = txtRecord;
|
||||
|
||||
//
|
||||
// Don't forget to stop the resolver. This eases the burden on the network
|
||||
//
|
||||
resolver.Stop();
|
||||
resolver = null;
|
||||
|
||||
Populate((BrowseData) browseList.SelectedItem, data);
|
||||
}
|
||||
|
||||
public void OperationFailed
|
||||
(
|
||||
DNSSDService sref,
|
||||
DNSSDError error
|
||||
)
|
||||
{
|
||||
MessageBox.Show("Operation failed: error code: " + error, "Error");
|
||||
}
|
||||
}
|
||||
}
|
102
mDNSResponder/Clients/DNSServiceBrowser.NET/DNSServiceBrowser.resx
Executable file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="$this.Name">
|
||||
<value>Form1</value>
|
||||
</data>
|
||||
</root>
|
206
mDNSResponder/Clients/DNSServiceBrowser.VB/DNSServiceBrowser.Designer.vb
generated
Normal file
@ -0,0 +1,206 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class DNSServiceBrowser
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox
|
||||
Me.ServiceNames = New System.Windows.Forms.ListBox
|
||||
Me.Label1 = New System.Windows.Forms.Label
|
||||
Me.Label2 = New System.Windows.Forms.Label
|
||||
Me.Label3 = New System.Windows.Forms.Label
|
||||
Me.Label4 = New System.Windows.Forms.Label
|
||||
Me.Label5 = New System.Windows.Forms.Label
|
||||
Me.NameField = New System.Windows.Forms.TextBox
|
||||
Me.PortField = New System.Windows.Forms.TextBox
|
||||
Me.HostField = New System.Windows.Forms.TextBox
|
||||
Me.DomainField = New System.Windows.Forms.TextBox
|
||||
Me.TypeField = New System.Windows.Forms.TextBox
|
||||
Me.TextRecord = New System.Windows.Forms.ListBox
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Items.AddRange(New Object() {"_accessone._tcp", "_accountedge._tcp", "_actionitems._tcp", "_addressbook._tcp", "_aecoretech._tcp", "_afpovertcp._tcp", "_airport._tcp", "_animobserver._tcp", "_animolmd._tcp", "_apple-sasl._tcp", "_aquamon._tcp", "_async._tcp", "_auth._tcp", "_beep._tcp", "_bfagent._tcp", "_bootps._udp", "_bousg._tcp", "_bsqdea._tcp", "_cheat._tcp", "_chess._tcp", "_clipboard._tcp", "_collection._tcp", "_contactserver._tcp", "_cvspserver._tcp", "_cytv._tcp", "_daap._tcp", "_difi._tcp", "_distcc._tcp", "_dossier._tcp", "_dpap._tcp", "_earphoria._tcp", "_ebms._tcp", "_ebreg._tcp", "_ecbyesfsgksc._tcp", "_eheap._tcp", "_embrace._tcp", "_eppc._tcp", "_eventserver._tcp", "_exec._tcp", "_facespan._tcp", "_faxstfx._tcp", "_fish._tcp", "_fjork._tcp", "_fmpro-internal._tcp", "_ftp._tcp", "_ftpcroco._tcp", "_gbs-smp._tcp", "_gbs-stp._tcp", "_grillezvous._tcp", "_h323._tcp", "_hotwayd._tcp", "_http._tcp", "_hydra._tcp", "_ica-networking._tcp", "_ichalkboard._tcp", "_ichat._tcp", "_iconquer._tcp", "_ifolder._tcp", "_ilynx._tcp", "_imap._tcp", "_imidi._tcp", "_ipbroadcaster._tcp", "_ipp._tcp", "_ishare._tcp", "_isparx._tcp", "_ispq-vc._tcp", "_isticky._tcp", "_istorm._tcp", "_iwork._tcp", "_lan2p._tcp", "_ldap._tcp", "_liaison._tcp", "_login._tcp", "_lontalk._tcp", "_lonworks._tcp", "_macfoh-remote._tcp", "_macminder._tcp", "_moneyworks._tcp", "_mp3sushi._tcp", "_mttp._tcp", "_ncbroadcast._tcp", "_ncdirect._tcp", "_ncsyncserver._tcp", "_net-assistant._tcp", "_newton-dock._tcp", "_nfs._udp", "_nssocketport._tcp", "_odabsharing._tcp", "_omni-bookmark._tcp", "_openbase._tcp", "_p2pchat._udp", "_pdl-datastream._tcp", "_poch._tcp", "_pop3._tcp", "_postgresql._tcp", "_presence._tcp", "_printer._tcp", "_ptp._tcp", "_quinn._tcp", "_raop._tcp", "_rce._tcp", "_realplayfavs._tcp", "_rfb._tcp", "_riousbprint._tcp", "_rtsp._tcp", "_safarimenu._tcp", "_sallingclicker._tcp", "_scone._tcp", "_sdsharing._tcp", "_see._tcp", "_seeCard._tcp", "_serendipd._tcp", "_servermgr._tcp", "_sge-exec._tcp", "_sge-qmaster._tcp", "_shell._tcp", "_shout._tcp", "_shoutcast._tcp", "_soap._tcp", "_spike._tcp", "_spincrisis._tcp", "_spl-itunes._tcp", "_spr-itunes._tcp", "_ssh._tcp", "_ssscreenshare._tcp", "_stickynotes._tcp", "_strateges._tcp", "_sxqdea._tcp", "_sybase-tds._tcp", "_teamlist._tcp", "_teleport._udp", "_telnet._tcp", "_tftp._udp", "_ticonnectmgr._tcp", "_tinavigator._tcp", "_tryst._tcp", "_upnp._tcp", "_utest._tcp", "_vue4rendercow._tcp", "_webdav._tcp", "_whamb._tcp", "_wired._tcp", "_workgroup._tcp", "_workstation._tcp", "_wormhole._tcp", "_ws._tcp", "_xserveraid._tcp", "_xsync._tcp", "_xtshapro._tcp"})
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(13, 13)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(252, 21)
|
||||
Me.ComboBox1.Sorted = True
|
||||
Me.ComboBox1.TabIndex = 0
|
||||
'
|
||||
'ServiceNames
|
||||
'
|
||||
Me.ServiceNames.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.ServiceNames.FormattingEnabled = True
|
||||
Me.ServiceNames.Location = New System.Drawing.Point(13, 41)
|
||||
Me.ServiceNames.Name = "ServiceNames"
|
||||
Me.ServiceNames.Size = New System.Drawing.Size(662, 251)
|
||||
Me.ServiceNames.Sorted = True
|
||||
Me.ServiceNames.TabIndex = 1
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(16, 311)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(38, 13)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "Name:"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(16, 439)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(29, 13)
|
||||
Me.Label2.TabIndex = 3
|
||||
Me.Label2.Text = "Port:"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(16, 407)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(32, 13)
|
||||
Me.Label3.TabIndex = 4
|
||||
Me.Label3.Text = "Host:"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(16, 374)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(46, 13)
|
||||
Me.Label4.TabIndex = 5
|
||||
Me.Label4.Text = "Domain:"
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Location = New System.Drawing.Point(16, 342)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(34, 13)
|
||||
Me.Label5.TabIndex = 6
|
||||
Me.Label5.Text = "Type:"
|
||||
'
|
||||
'NameField
|
||||
'
|
||||
Me.NameField.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.NameField.Location = New System.Drawing.Point(69, 309)
|
||||
Me.NameField.Name = "NameField"
|
||||
Me.NameField.ReadOnly = True
|
||||
Me.NameField.Size = New System.Drawing.Size(195, 20)
|
||||
Me.NameField.TabIndex = 7
|
||||
'
|
||||
'PortField
|
||||
'
|
||||
Me.PortField.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.PortField.Location = New System.Drawing.Point(69, 436)
|
||||
Me.PortField.Name = "PortField"
|
||||
Me.PortField.ReadOnly = True
|
||||
Me.PortField.Size = New System.Drawing.Size(195, 20)
|
||||
Me.PortField.TabIndex = 8
|
||||
'
|
||||
'HostField
|
||||
'
|
||||
Me.HostField.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.HostField.Location = New System.Drawing.Point(69, 403)
|
||||
Me.HostField.Name = "HostField"
|
||||
Me.HostField.ReadOnly = True
|
||||
Me.HostField.Size = New System.Drawing.Size(195, 20)
|
||||
Me.HostField.TabIndex = 9
|
||||
'
|
||||
'DomainField
|
||||
'
|
||||
Me.DomainField.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.DomainField.Location = New System.Drawing.Point(69, 371)
|
||||
Me.DomainField.Name = "DomainField"
|
||||
Me.DomainField.ReadOnly = True
|
||||
Me.DomainField.Size = New System.Drawing.Size(195, 20)
|
||||
Me.DomainField.TabIndex = 10
|
||||
'
|
||||
'TypeField
|
||||
'
|
||||
Me.TypeField.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.TypeField.Location = New System.Drawing.Point(69, 340)
|
||||
Me.TypeField.Name = "TypeField"
|
||||
Me.TypeField.ReadOnly = True
|
||||
Me.TypeField.Size = New System.Drawing.Size(195, 20)
|
||||
Me.TypeField.TabIndex = 11
|
||||
'
|
||||
'TextRecord
|
||||
'
|
||||
Me.TextRecord.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TextRecord.FormattingEnabled = True
|
||||
Me.TextRecord.Location = New System.Drawing.Point(278, 309)
|
||||
Me.TextRecord.Name = "TextRecord"
|
||||
Me.TextRecord.SelectionMode = System.Windows.Forms.SelectionMode.None
|
||||
Me.TextRecord.Size = New System.Drawing.Size(397, 147)
|
||||
Me.TextRecord.TabIndex = 12
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(690, 480)
|
||||
Me.Controls.Add(Me.TextRecord)
|
||||
Me.Controls.Add(Me.TypeField)
|
||||
Me.Controls.Add(Me.DomainField)
|
||||
Me.Controls.Add(Me.HostField)
|
||||
Me.Controls.Add(Me.PortField)
|
||||
Me.Controls.Add(Me.NameField)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.ServiceNames)
|
||||
Me.Controls.Add(Me.ComboBox1)
|
||||
Me.Name = "Form1"
|
||||
Me.Text = "Bonjour Browser"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents ServiceNames As System.Windows.Forms.ListBox
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||
Friend WithEvents Label4 As System.Windows.Forms.Label
|
||||
Friend WithEvents Label5 As System.Windows.Forms.Label
|
||||
Friend WithEvents NameField As System.Windows.Forms.TextBox
|
||||
Friend WithEvents PortField As System.Windows.Forms.TextBox
|
||||
Friend WithEvents HostField As System.Windows.Forms.TextBox
|
||||
Friend WithEvents DomainField As System.Windows.Forms.TextBox
|
||||
Friend WithEvents TypeField As System.Windows.Forms.TextBox
|
||||
Friend WithEvents TextRecord As System.Windows.Forms.ListBox
|
||||
|
||||
End Class
|
@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FB79E297-5703-435C-A829-51AA51CD71C2}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>DNSServiceBrowser.VB.My.MyApplication</StartupObject>
|
||||
<RootNamespace>DNSServiceBrowser.VB</RootNamespace>
|
||||
<AssemblyName>DNSServiceBrowser.VB</AssemblyName>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>DNSServiceBrowser.VB.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>DNSServiceBrowser.VB.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DNSServiceBrowser.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DNSServiceBrowser.Designer.vb">
|
||||
<DependentUpon>DNSServiceBrowser.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="DNSServiceBrowser.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>DNSServiceBrowser.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="Bonjour">
|
||||
<Guid>{18FBED6D-F2B7-4EC8-A4A4-46282E635308}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
196
mDNSResponder/Clients/DNSServiceBrowser.VB/DNSServiceBrowser.vb
Normal file
@ -0,0 +1,196 @@
|
||||
'
|
||||
' 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
|
||||
|
||||
Private m_service As New Bonjour.DNSSDService
|
||||
Private m_browser As Bonjour.DNSSDService
|
||||
Private m_resolver As Bonjour.DNSSDService
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Windows Form Designer.
|
||||
InitializeComponent()
|
||||
|
||||
ComboBox1.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
'Called when a service is found as a result of a browse operation
|
||||
Public Sub MyEventManager_ServiceFound(ByVal browser As Bonjour.DNSSDService, ByVal flags As Bonjour.DNSSDFlags, ByVal ifIndex As UInteger, ByVal serviceName As String, ByVal regtype As String, ByVal domain As String) Handles MyEventManager.ServiceFound
|
||||
Dim index As Integer
|
||||
index = ServiceNames.Items.IndexOf(serviceName)
|
||||
'
|
||||
' A simple reference counting scheme is implemented so that the same service
|
||||
' does not show up more than once in the browse list. This can happen
|
||||
' if the machine has more than one network interface.
|
||||
'
|
||||
' If we have not seen this service before, then it is added to the browse list
|
||||
' Otherwise it's reference count is bumped up.
|
||||
'
|
||||
If index = -1 Then
|
||||
Dim browseData As New BrowseData
|
||||
browseData.ServiceName = serviceName
|
||||
browseData.RegType = regtype
|
||||
browseData.Domain = domain
|
||||
browseData.Refs = 1
|
||||
ServiceNames.Items.Add(browseData)
|
||||
Else
|
||||
Dim browseData As BrowseData
|
||||
browseData = ServiceNames.Items([index])
|
||||
browseData.Refs += 1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub MyEventManager_ServiceLost(ByVal browser As Bonjour.DNSSDService, ByVal flags As Bonjour.DNSSDFlags, ByVal ifIndex As UInteger, ByVal serviceName As String, ByVal regtype As String, ByVal domain As String) Handles MyEventManager.ServiceLost
|
||||
Dim index As Integer
|
||||
'
|
||||
' See the above about reference counting
|
||||
'
|
||||
index = ServiceNames.Items.IndexOf(serviceName)
|
||||
If index <> -1 Then
|
||||
Dim browseData As BrowseData
|
||||
browseData = ServiceNames.Items([index])
|
||||
browseData.Refs -= 1
|
||||
If browseData.Refs = 0 Then
|
||||
ServiceNames.Items.Remove(serviceName)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub MyEventManager_ServiceResolved(ByVal resolver As Bonjour.DNSSDService, ByVal flags As Bonjour.DNSSDFlags, ByVal ifIndex As UInteger, ByVal fullname As String, ByVal hostname As String, ByVal port As UShort, ByVal record As Bonjour.TXTRecord) Handles MyEventManager.ServiceResolved
|
||||
'
|
||||
' Once the service is resolved, the resolve operation is stopped. This reduces the burdne on the network
|
||||
'
|
||||
m_resolver.Stop()
|
||||
m_resolver = Nothing
|
||||
Dim browseData As BrowseData = ServiceNames.Items.Item(ServiceNames.SelectedIndex)
|
||||
NameField.Text = browseData.ServiceName
|
||||
TypeField.Text = browseData.RegType
|
||||
DomainField.Text = browseData.Domain
|
||||
HostField.Text = hostname
|
||||
PortField.Text = port
|
||||
|
||||
'
|
||||
' The values found in the text record are assumed to be human readable strings.
|
||||
'
|
||||
If record IsNot Nothing Then
|
||||
For i As UInteger = 0 To record.GetCount() - 1
|
||||
Dim key As String = record.GetKeyAtIndex(i)
|
||||
If key.Length() > 0 Then
|
||||
TextRecord.Items.Add(key + "=" + System.Text.Encoding.ASCII.GetString(record.GetValueAtIndex(i)))
|
||||
End If
|
||||
Next i
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ClearServiceInfo()
|
||||
TextRecord.Items.Clear()
|
||||
NameField.Text = ""
|
||||
TypeField.Text = ""
|
||||
DomainField.Text = ""
|
||||
HostField.Text = ""
|
||||
PortField.Text = ""
|
||||
End Sub
|
||||
|
||||
Private Sub ServiceNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ServiceNames.SelectedIndexChanged
|
||||
If m_resolver IsNot Nothing Then
|
||||
m_resolver.Stop()
|
||||
End If
|
||||
Me.ClearServiceInfo()
|
||||
Dim browseData As BrowseData = ServiceNames.Items.Item(ServiceNames.SelectedIndex)
|
||||
|
||||
'
|
||||
' Selecting a service instance starts a new resolve operation
|
||||
'
|
||||
m_resolver = m_service.Resolve(0, 0, browseData.ServiceName, browseData.RegType, browseData.Domain, MyEventManager)
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
|
||||
If m_browser IsNot Nothing Then
|
||||
m_browser.Stop()
|
||||
End If
|
||||
|
||||
ServiceNames.Items.Clear()
|
||||
Me.ClearServiceInfo()
|
||||
|
||||
'
|
||||
' Selecting a service type start a new browse operation
|
||||
'
|
||||
|
||||
m_browser = m_service.Browse(0, 0, ComboBox1.Items.Item(ComboBox1.SelectedIndex), "", MyEventManager)
|
||||
End Sub
|
||||
|
||||
Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextRecord.SelectedIndexChanged
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Public Class BrowseData
|
||||
Private m_serviceName As String
|
||||
Private m_regType As String
|
||||
Private m_domain As String
|
||||
Private m_refs As Integer
|
||||
|
||||
Property ServiceName() As String
|
||||
Get
|
||||
Return m_serviceName
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_serviceName = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property RegType() As String
|
||||
Get
|
||||
Return m_regType
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_regType = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Domain() As String
|
||||
Get
|
||||
Return m_domain
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_domain = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Refs As Integer
|
||||
Get
|
||||
Return m_refs
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_refs = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Function Equals(obj As Object) As Boolean
|
||||
If obj Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return m_serviceName.Equals(obj.ToString)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return m_serviceName
|
||||
End Function
|
||||
|
||||
End Class
|
38
mDNSResponder/Clients/DNSServiceBrowser.VB/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.4918
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
' or if you encounter build errors in this file, go to the Project Designer
|
||||
' (go to Project Properties or double-click the My Project node in
|
||||
' Solution Explorer), and make changes on the Application tab.
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.DNSServiceBrowser.VB.DNSServiceBrowser
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>DNSServiceBrowser</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("VBTester")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Porchdog Software, Inc.")>
|
||||
<Assembly: AssemblyProduct("VBTester")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Porchdog Software, Inc. 2009")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("fa682747-1bdc-4ddb-962e-e3e3a9291b22")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
62
mDNSResponder/Clients/DNSServiceBrowser.VB/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.3082
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'<summary>
|
||||
' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'<summary>
|
||||
' Returns the cached ResourceManager instance used by this class.
|
||||
'</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VBTester.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'<summary>
|
||||
' Overrides the current thread's CurrentUICulture property for all
|
||||
' resource lookups using this strongly typed resource class.
|
||||
'</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
73
mDNSResponder/Clients/DNSServiceBrowser.VB/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.3082
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.DNSServiceBrowser.VB.My.MySettings
|
||||
Get
|
||||
Return Global.DNSServiceBrowser.VB.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
679
mDNSResponder/Clients/DNSServiceBrowser.m
Executable file
@ -0,0 +1,679 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2002-2003 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.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/select.h>
|
||||
#include <netinet/in.h>
|
||||
#include <unistd.h>
|
||||
#include <dns_sd.h>
|
||||
|
||||
@class ServiceController; // holds state corresponding to outstanding DNSServiceRef
|
||||
|
||||
@interface BrowserController : NSObject
|
||||
{
|
||||
IBOutlet id nameField;
|
||||
IBOutlet id typeField;
|
||||
|
||||
IBOutlet id serviceDisplayTable;
|
||||
IBOutlet id typeColumn;
|
||||
IBOutlet id nameColumn;
|
||||
IBOutlet id serviceTypeField;
|
||||
IBOutlet id serviceNameField;
|
||||
|
||||
IBOutlet id hostField;
|
||||
IBOutlet id ipAddressField;
|
||||
IBOutlet id ip6AddressField;
|
||||
IBOutlet id portField;
|
||||
IBOutlet id interfaceField;
|
||||
IBOutlet id textField;
|
||||
|
||||
NSMutableArray *_srvtypeKeys;
|
||||
NSMutableArray *_srvnameKeys;
|
||||
NSMutableArray *_sortedServices;
|
||||
NSMutableDictionary *_servicesDict;
|
||||
|
||||
ServiceController *_serviceBrowser;
|
||||
ServiceController *_serviceResolver;
|
||||
ServiceController *_ipv4AddressResolver;
|
||||
ServiceController *_ipv6AddressResolver;
|
||||
}
|
||||
|
||||
- (void)notifyTypeSelectionChange:(NSNotification*)note;
|
||||
- (void)notifyNameSelectionChange:(NSNotification*)note;
|
||||
|
||||
- (IBAction)connect:(id)sender;
|
||||
|
||||
- (IBAction)handleTableClick:(id)sender;
|
||||
- (IBAction)removeSelected:(id)sender;
|
||||
- (IBAction)addNewService:(id)sender;
|
||||
|
||||
- (IBAction)update:(NSString *)Type;
|
||||
|
||||
- (void)updateBrowseWithName:(const char *)name type:(const char *)resulttype domain:(const char *)domain interface:(uint32_t)interface flags:(DNSServiceFlags)flags;
|
||||
- (void)resolveClientWitHost:(NSString *)host port:(uint16_t)port interfaceIndex:(uint32_t)interface txtRecord:(const char*)txtRecord txtLen:(uint16_t)txtLen;
|
||||
- (void)updateAddress:(uint16_t)rrtype addr:(const void *)buff addrLen:(uint16_t)addrLen host:(const char*)host interfaceIndex:(uint32_t)interface more:(boolean_t)moreToCome;
|
||||
|
||||
- (void)_cancelPendingResolve;
|
||||
- (void)_clearResolvedInfo;
|
||||
|
||||
@end
|
||||
|
||||
// The ServiceController manages cleanup of DNSServiceRef & runloop info for an outstanding request
|
||||
@interface ServiceController : NSObject
|
||||
{
|
||||
DNSServiceRef fServiceRef;
|
||||
CFSocketRef fSocketRef;
|
||||
CFRunLoopSourceRef fRunloopSrc;
|
||||
}
|
||||
|
||||
- (id)initWithServiceRef:(DNSServiceRef)ref;
|
||||
- (void)addToCurrentRunLoop;
|
||||
- (DNSServiceRef)serviceRef;
|
||||
- (void)dealloc;
|
||||
|
||||
@end // interface ServiceController
|
||||
|
||||
|
||||
static void
|
||||
ProcessSockData(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info)
|
||||
{
|
||||
DNSServiceRef serviceRef = (DNSServiceRef)info;
|
||||
DNSServiceErrorType err = DNSServiceProcessResult(serviceRef);
|
||||
if (err != kDNSServiceErr_NoError) {
|
||||
printf("DNSServiceProcessResult() returned an error! %d\n", err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ServiceBrowseReply(DNSServiceRef sdRef, DNSServiceFlags servFlags, uint32_t interfaceIndex, DNSServiceErrorType errorCode,
|
||||
const char *serviceName, const char *regtype, const char *replyDomain, void *context)
|
||||
{
|
||||
if (errorCode == kDNSServiceErr_NoError) {
|
||||
[(BrowserController*)context updateBrowseWithName:serviceName type:regtype domain:replyDomain interface:interfaceIndex flags:servFlags];
|
||||
} else {
|
||||
printf("ServiceBrowseReply got an error! %d\n", errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ServiceResolveReply(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode,
|
||||
const char *fullname, const char *hosttarget, uint16_t port, uint16_t txtLen, const char *txtRecord, void *context)
|
||||
{
|
||||
if (errorCode == kDNSServiceErr_NoError) {
|
||||
[(BrowserController*)context resolveClientWitHost:[NSString stringWithUTF8String:hosttarget] port:port interfaceIndex:interfaceIndex txtRecord:txtRecord txtLen:txtLen];
|
||||
} else {
|
||||
printf("ServiceResolveReply got an error! %d\n", errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
QueryRecordReply(DNSServiceRef DNSServiceRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode,
|
||||
const char *fullname, uint16_t rrtype, uint16_t rrclass, uint16_t rdlen, const void *rdata, uint32_t ttl, void *context)
|
||||
{
|
||||
if (errorCode == kDNSServiceErr_NoError) {
|
||||
[(BrowserController*)context updateAddress:rrtype addr:rdata addrLen:rdlen host:fullname interfaceIndex:interfaceIndex more:(flags & kDNSServiceFlagsMoreComing)];
|
||||
} else {
|
||||
printf("QueryRecordReply got an error! %d\n", errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
InterfaceIndexToName(uint32_t interface, char *interfaceName)
|
||||
{
|
||||
assert(interfaceName);
|
||||
|
||||
if (interface == kDNSServiceInterfaceIndexAny) {
|
||||
// All active network interfaces.
|
||||
strlcpy(interfaceName, "all", IF_NAMESIZE);
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@implementation BrowserController //Begin implementation of BrowserController methods
|
||||
|
||||
- (void)registerDefaults
|
||||
{
|
||||
NSMutableDictionary *regDict = [NSMutableDictionary dictionary];
|
||||
|
||||
NSArray *typeArray = [NSArray arrayWithObjects:@"_afpovertcp._tcp",
|
||||
@"_smb._tcp",
|
||||
@"_rfb._tcp",
|
||||
@"_ssh._tcp",
|
||||
@"_ftp._tcp",
|
||||
@"_http._tcp",
|
||||
@"_printer._tcp",
|
||||
@"_ipp._tcp",
|
||||
@"_airport._tcp",
|
||||
@"_presence._tcp",
|
||||
@"_daap._tcp",
|
||||
@"_dpap._tcp",
|
||||
nil];
|
||||
|
||||
NSArray *nameArray = [NSArray arrayWithObjects:@"AppleShare Servers",
|
||||
@"Windows Sharing",
|
||||
@"Screen Sharing",
|
||||
@"Secure Shell",
|
||||
@"FTP Servers",
|
||||
@"Web Servers",
|
||||
@"LPR Printers",
|
||||
@"IPP Printers",
|
||||
@"AirPort Base Stations",
|
||||
@"iChat Buddies",
|
||||
@"iTunes Libraries",
|
||||
@"iPhoto Libraries",
|
||||
nil];
|
||||
|
||||
[regDict setObject:typeArray forKey:@"SrvTypeKeys"];
|
||||
[regDict setObject:nameArray forKey:@"SrvNameKeys"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:regDict];
|
||||
}
|
||||
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_srvtypeKeys = nil;
|
||||
_srvnameKeys = nil;
|
||||
_serviceBrowser = nil;
|
||||
_serviceResolver = nil;
|
||||
_ipv4AddressResolver = nil;
|
||||
_ipv6AddressResolver = nil;
|
||||
_sortedServices = [[NSMutableArray alloc] init];
|
||||
_servicesDict = [[NSMutableDictionary alloc] init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[typeField sizeLastColumnToFit];
|
||||
[nameField sizeLastColumnToFit];
|
||||
[nameField setDoubleAction:@selector(connect:)];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(notifyTypeSelectionChange:) name:NSTableViewSelectionDidChangeNotification object:typeField];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(notifyNameSelectionChange:) name:NSTableViewSelectionDidChangeNotification object:nameField];
|
||||
|
||||
_srvtypeKeys = [[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvTypeKeys"] mutableCopy];
|
||||
_srvnameKeys = [[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvNameKeys"] mutableCopy];
|
||||
|
||||
if (!_srvtypeKeys || !_srvnameKeys) {
|
||||
[_srvtypeKeys release];
|
||||
[_srvnameKeys release];
|
||||
[self registerDefaults];
|
||||
_srvtypeKeys = [[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvTypeKeys"] mutableCopy];
|
||||
_srvnameKeys = [[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvNameKeys"] mutableCopy];
|
||||
}
|
||||
|
||||
[typeField reloadData];
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_srvtypeKeys release];
|
||||
[_srvnameKeys release];
|
||||
[_servicesDict release];
|
||||
[_sortedServices release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
-(void)tableView:(NSTableView *)theTableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(int)row
|
||||
{
|
||||
if (row < 0) return;
|
||||
}
|
||||
|
||||
|
||||
- (int)numberOfRowsInTableView:(NSTableView *)theTableView //Begin mandatory TableView methods
|
||||
{
|
||||
if (theTableView == typeField) {
|
||||
return [_srvnameKeys count];
|
||||
}
|
||||
if (theTableView == nameField) {
|
||||
return [_servicesDict count];
|
||||
}
|
||||
if (theTableView == serviceDisplayTable) {
|
||||
return [_srvnameKeys count];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
- (id)tableView:(NSTableView *)theTableView objectValueForTableColumn:(NSTableColumn *)theColumn row:(int)rowIndex
|
||||
{
|
||||
if (theTableView == typeField) {
|
||||
return [_srvnameKeys objectAtIndex:rowIndex];
|
||||
}
|
||||
if (theTableView == nameField) {
|
||||
return [[_servicesDict objectForKey:[_sortedServices objectAtIndex:rowIndex]] name];
|
||||
}
|
||||
if (theTableView == serviceDisplayTable) {
|
||||
if (theColumn == typeColumn) {
|
||||
return [_srvtypeKeys objectAtIndex:rowIndex];
|
||||
}
|
||||
if (theColumn == nameColumn) {
|
||||
return [_srvnameKeys objectAtIndex:rowIndex];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (void)notifyTypeSelectionChange:(NSNotification*)note
|
||||
{
|
||||
[self _cancelPendingResolve];
|
||||
|
||||
int index = [[note object] selectedRow];
|
||||
if (index != -1) {
|
||||
[self update:[_srvtypeKeys objectAtIndex:index]];
|
||||
} else {
|
||||
[self update:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)notifyNameSelectionChange:(NSNotification*)note
|
||||
{
|
||||
[self _cancelPendingResolve];
|
||||
|
||||
int index = [[note object] selectedRow];
|
||||
if (index == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the currently selected service
|
||||
NSNetService *service = [_servicesDict objectForKey:[_sortedServices objectAtIndex:index]];
|
||||
|
||||
DNSServiceRef serviceRef;
|
||||
DNSServiceErrorType err = DNSServiceResolve(&serviceRef,
|
||||
(DNSServiceFlags)0,
|
||||
kDNSServiceInterfaceIndexAny,
|
||||
(const char *)[[service name] UTF8String],
|
||||
(const char *)[[service type] UTF8String],
|
||||
(const char *)[[service domain] UTF8String],
|
||||
(DNSServiceResolveReply)ServiceResolveReply,
|
||||
self);
|
||||
|
||||
if (kDNSServiceErr_NoError == err) {
|
||||
_serviceResolver = [[ServiceController alloc] initWithServiceRef:serviceRef];
|
||||
[_serviceResolver addToCurrentRunLoop];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)update:(NSString *)theType
|
||||
{
|
||||
[_servicesDict removeAllObjects];
|
||||
[_sortedServices removeAllObjects];
|
||||
[nameField reloadData];
|
||||
|
||||
// get rid of the previous browser if one exists
|
||||
if (_serviceBrowser != nil) {
|
||||
[_serviceBrowser release];
|
||||
_serviceBrowser = nil;
|
||||
}
|
||||
|
||||
if (theType) {
|
||||
DNSServiceRef serviceRef;
|
||||
DNSServiceErrorType err = DNSServiceBrowse(&serviceRef, (DNSServiceFlags)0, 0, [theType UTF8String], NULL, ServiceBrowseReply, self);
|
||||
if (kDNSServiceErr_NoError == err) {
|
||||
_serviceBrowser = [[ServiceController alloc] initWithServiceRef:serviceRef];
|
||||
[_serviceBrowser addToCurrentRunLoop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)updateBrowseWithName:(const char *)name type:(const char *)type domain:(const char *)domain interface:(uint32_t)interface flags:(DNSServiceFlags)flags
|
||||
{
|
||||
NSString *key = [NSString stringWithFormat:@"%s.%s%s%d", name, type, domain, interface];
|
||||
NSNetService *service = [[NSNetService alloc] initWithDomain:[NSString stringWithUTF8String:domain] type:[NSString stringWithUTF8String:type] name:[NSString stringWithUTF8String:name]];
|
||||
|
||||
if (flags & kDNSServiceFlagsAdd) {
|
||||
[_servicesDict setObject:service forKey:key];
|
||||
} else {
|
||||
[_servicesDict removeObjectForKey:key];
|
||||
}
|
||||
|
||||
// If not expecting any more data, then reload (redraw) TableView with newly found data
|
||||
if (!(flags & kDNSServiceFlagsMoreComing)) {
|
||||
|
||||
// Save the current TableView selection
|
||||
int index = [nameField selectedRow];
|
||||
NSString *selected = (index != -1) ? [[_sortedServices objectAtIndex:index] copy] : nil;
|
||||
|
||||
[_sortedServices release];
|
||||
_sortedServices = [[_servicesDict allKeys] mutableCopy];
|
||||
[_sortedServices sortUsingSelector:@selector(caseInsensitiveCompare:)];
|
||||
[nameField reloadData];
|
||||
|
||||
// Restore the previous TableView selection
|
||||
index = selected ? [_sortedServices indexOfObject:selected] : NSNotFound;
|
||||
if (index != NSNotFound) {
|
||||
[nameField selectRowIndexes:[NSIndexSet indexSetWithIndex:index] byExtendingSelection:NO];
|
||||
[nameField scrollRowToVisible:index];
|
||||
}
|
||||
|
||||
[selected release];
|
||||
}
|
||||
|
||||
[service release];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
- (void)resolveClientWitHost:(NSString *)host port:(uint16_t)port interfaceIndex:(uint32_t)interface txtRecord:(const char*)txtRecord txtLen:(uint16_t)txtLen
|
||||
{
|
||||
DNSServiceRef serviceRef;
|
||||
|
||||
if (_ipv4AddressResolver) {
|
||||
[_ipv4AddressResolver release];
|
||||
_ipv4AddressResolver = nil;
|
||||
}
|
||||
|
||||
if (_ipv6AddressResolver) {
|
||||
[_ipv6AddressResolver release];
|
||||
_ipv6AddressResolver = nil;
|
||||
}
|
||||
|
||||
// Start an async lookup for IPv4 addresses
|
||||
DNSServiceErrorType err = DNSServiceQueryRecord(&serviceRef, (DNSServiceFlags)0, interface, [host UTF8String], kDNSServiceType_A, kDNSServiceClass_IN, QueryRecordReply, self);
|
||||
if (err == kDNSServiceErr_NoError) {
|
||||
_ipv4AddressResolver = [[ServiceController alloc] initWithServiceRef:serviceRef];
|
||||
[_ipv4AddressResolver addToCurrentRunLoop];
|
||||
}
|
||||
|
||||
// Start an async lookup for IPv6 addresses
|
||||
err = DNSServiceQueryRecord(&serviceRef, (DNSServiceFlags)0, interface, [host UTF8String], kDNSServiceType_AAAA, kDNSServiceClass_IN, QueryRecordReply, self);
|
||||
if (err == kDNSServiceErr_NoError) {
|
||||
_ipv6AddressResolver = [[ServiceController alloc] initWithServiceRef:serviceRef];
|
||||
[_ipv6AddressResolver addToCurrentRunLoop];
|
||||
}
|
||||
|
||||
char interfaceName[IF_NAMESIZE];
|
||||
InterfaceIndexToName(interface, interfaceName);
|
||||
|
||||
[hostField setStringValue:host];
|
||||
[interfaceField setStringValue:[NSString stringWithUTF8String:interfaceName]];
|
||||
[portField setIntValue:ntohs(port)];
|
||||
|
||||
// kind of a hack: munge txtRecord so it's human-readable
|
||||
if (txtLen > 0) {
|
||||
char *readableText = (char*) malloc(txtLen);
|
||||
if (readableText != nil) {
|
||||
ByteCount index, subStrLen;
|
||||
memcpy(readableText, txtRecord, txtLen);
|
||||
for (index=0; index < txtLen - 1; index += subStrLen + 1) {
|
||||
subStrLen = readableText[index];
|
||||
readableText[index] = ' ';
|
||||
}
|
||||
[textField setStringValue:[NSString stringWithCString:&readableText[1] length:txtLen - 1]];
|
||||
free(readableText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)updateAddress:(uint16_t)rrtype addr:(const void *)buff addrLen:(uint16_t)addrLen host:(const char*) host interfaceIndex:(uint32_t)interface more:(boolean_t)moreToCome
|
||||
{
|
||||
char addrBuff[256];
|
||||
|
||||
if (rrtype == kDNSServiceType_A) {
|
||||
inet_ntop(AF_INET, buff, addrBuff, sizeof(addrBuff));
|
||||
if ([[ipAddressField stringValue] length] > 0) {
|
||||
[ipAddressField setStringValue:[NSString stringWithFormat:@"%@, ", [ipAddressField stringValue]]];
|
||||
}
|
||||
[ipAddressField setStringValue:[NSString stringWithFormat:@"%@%s", [ipAddressField stringValue], addrBuff]];
|
||||
|
||||
if (!moreToCome) {
|
||||
[_ipv4AddressResolver release];
|
||||
_ipv4AddressResolver = nil;
|
||||
}
|
||||
} else if (rrtype == kDNSServiceType_AAAA) {
|
||||
inet_ntop(AF_INET6, buff, addrBuff, sizeof(addrBuff));
|
||||
if ([[ip6AddressField stringValue] length] > 0) {
|
||||
[ip6AddressField setStringValue:[NSString stringWithFormat:@"%@, ", [ip6AddressField stringValue]]];
|
||||
}
|
||||
[ip6AddressField setStringValue:[NSString stringWithFormat:@"%@%s", [ip6AddressField stringValue], addrBuff]];
|
||||
|
||||
if (!moreToCome) {
|
||||
[_ipv6AddressResolver release];
|
||||
_ipv6AddressResolver = nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)connect:(id)sender
|
||||
{
|
||||
NSString *host = [hostField stringValue];
|
||||
NSString *txtRecord = [textField stringValue];
|
||||
int port = [portField intValue];
|
||||
|
||||
int index = [nameField selectedRow];
|
||||
NSString *selected = (index >= 0) ? [_sortedServices objectAtIndex:index] : nil;
|
||||
NSString *type = [[_servicesDict objectForKey:selected] type];
|
||||
|
||||
if ([type isEqual:@"_http._tcp."]) {
|
||||
NSString *pathDelim = @"path=";
|
||||
NSRange where;
|
||||
|
||||
// If the TXT record specifies a path, extract it.
|
||||
where = [txtRecord rangeOfString:pathDelim options:NSCaseInsensitiveSearch];
|
||||
if (where.length) {
|
||||
NSRange targetRange = { where.location + where.length, [txtRecord length] - where.location - where.length };
|
||||
NSRange endDelim = [txtRecord rangeOfString:@"\n" options:kNilOptions range:targetRange];
|
||||
|
||||
if (endDelim.length) // if a delimiter was found, truncate the target range
|
||||
targetRange.length = endDelim.location - targetRange.location;
|
||||
|
||||
NSString *path = [txtRecord substringWithRange:targetRange];
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%d%@", host, port, path]]];
|
||||
} else {
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%d", host, port]]];
|
||||
}
|
||||
}
|
||||
else if ([type isEqual:@"_ftp._tcp."]) [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"ftp://%@:%d/", host, port]]];
|
||||
else if ([type isEqual:@"_ssh._tcp."]) [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"ssh://%@:%d/", host, port]]];
|
||||
else if ([type isEqual:@"_afpovertcp._tcp."]) [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"afp://%@:%d/", host, port]]];
|
||||
else if ([type isEqual:@"_smb._tcp."]) [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"smb://%@:%d/", host, port]]];
|
||||
else if ([type isEqual:@"_rfb._tcp."]) [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"vnc://%@:%d/", host, port]]];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)handleTableClick:(id)sender
|
||||
{
|
||||
//populate the text fields
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)removeSelected:(id)sender
|
||||
{
|
||||
// remove the selected row and force a refresh
|
||||
|
||||
int selectedRow = [serviceDisplayTable selectedRow];
|
||||
|
||||
if (selectedRow) {
|
||||
|
||||
[_srvtypeKeys removeObjectAtIndex:selectedRow];
|
||||
[_srvnameKeys removeObjectAtIndex:selectedRow];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setObject:_srvtypeKeys forKey:@"SrvTypeKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:_srvnameKeys forKey:@"SrvNameKeys"];
|
||||
|
||||
[typeField reloadData];
|
||||
[serviceDisplayTable reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)addNewService:(id)sender
|
||||
{
|
||||
// add new entries from the edit fields to the arrays for the defaults
|
||||
NSString *newType = [serviceTypeField stringValue];
|
||||
NSString *newName = [serviceNameField stringValue];
|
||||
|
||||
// 3282283: trim trailing '.' from service type field
|
||||
if ([newType length] && [newType hasSuffix:@"."])
|
||||
newType = [newType substringToIndex:[newType length] - 1];
|
||||
|
||||
if ([newType length] && [newName length]) {
|
||||
[_srvtypeKeys addObject:newType];
|
||||
[_srvnameKeys addObject:newName];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setObject:_srvtypeKeys forKey:@"SrvTypeKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:_srvnameKeys forKey:@"SrvNameKeys"];
|
||||
|
||||
[typeField reloadData];
|
||||
[serviceDisplayTable reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)_cancelPendingResolve
|
||||
{
|
||||
[_ipv4AddressResolver release];
|
||||
_ipv4AddressResolver = nil;
|
||||
|
||||
[_ipv6AddressResolver release];
|
||||
_ipv6AddressResolver = nil;
|
||||
|
||||
[_serviceResolver release];
|
||||
_serviceResolver = nil;
|
||||
|
||||
[self _clearResolvedInfo];
|
||||
}
|
||||
|
||||
|
||||
- (void)_clearResolvedInfo
|
||||
{
|
||||
[hostField setStringValue:@""];
|
||||
[ipAddressField setStringValue:@""];
|
||||
[ip6AddressField setStringValue:@""];
|
||||
[portField setStringValue:@""];
|
||||
[interfaceField setStringValue:@""];
|
||||
[textField setStringValue:@""];
|
||||
}
|
||||
|
||||
@end // implementation BrowserController
|
||||
|
||||
|
||||
@implementation ServiceController : NSObject
|
||||
{
|
||||
DNSServiceRef fServiceRef;
|
||||
CFSocketRef fSocketRef;
|
||||
CFRunLoopSourceRef fRunloopSrc;
|
||||
}
|
||||
|
||||
|
||||
- (id)initWithServiceRef:(DNSServiceRef)ref
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
fServiceRef = ref;
|
||||
fSocketRef = NULL;
|
||||
fRunloopSrc = NULL;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)addToCurrentRunLoop
|
||||
{
|
||||
CFSocketContext context = { 0, (void*)fServiceRef, NULL, NULL, NULL };
|
||||
|
||||
fSocketRef = CFSocketCreateWithNative(kCFAllocatorDefault, DNSServiceRefSockFD(fServiceRef), kCFSocketReadCallBack, ProcessSockData, &context);
|
||||
if (fSocketRef) {
|
||||
// Prevent CFSocketInvalidate from closing DNSServiceRef's socket.
|
||||
CFOptionFlags sockFlags = CFSocketGetSocketFlags(fSocketRef);
|
||||
CFSocketSetSocketFlags(fSocketRef, sockFlags & (~kCFSocketCloseOnInvalidate));
|
||||
fRunloopSrc = CFSocketCreateRunLoopSource(kCFAllocatorDefault, fSocketRef, 0);
|
||||
}
|
||||
if (fRunloopSrc) {
|
||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), fRunloopSrc, kCFRunLoopDefaultMode);
|
||||
} else {
|
||||
printf("Could not listen to runloop socket\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (DNSServiceRef)serviceRef
|
||||
{
|
||||
return fServiceRef;
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (fSocketRef) {
|
||||
CFSocketInvalidate(fSocketRef); // Note: Also closes the underlying socket
|
||||
CFRelease(fSocketRef);
|
||||
|
||||
// Workaround that gives time to CFSocket's select thread so it can remove the socket from its
|
||||
// FD set before we close the socket by calling DNSServiceRefDeallocate. <rdar://problem/3585273>
|
||||
usleep(1000);
|
||||
}
|
||||
|
||||
if (fRunloopSrc) {
|
||||
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), fRunloopSrc, kCFRunLoopDefaultMode);
|
||||
CFRelease(fRunloopSrc);
|
||||
}
|
||||
|
||||
DNSServiceRefDeallocate(fServiceRef);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end // implementation ServiceController
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
37
mDNSResponder/Clients/DNSServiceBrowser.nib/classes.nib
generated
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
ACTIONS = {
|
||||
addNewService = id;
|
||||
connect = id;
|
||||
handleDomainClick = id;
|
||||
handleNameClick = id;
|
||||
handleTableClick = id;
|
||||
handleTypeClick = id;
|
||||
loadDomains = id;
|
||||
removeSelected = id;
|
||||
};
|
||||
CLASS = BrowserController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
domainField = id;
|
||||
hostField = id;
|
||||
interfaceField = id;
|
||||
ip6AddressField = id;
|
||||
ipAddressField = id;
|
||||
nameColumn = id;
|
||||
nameField = id;
|
||||
portField = id;
|
||||
serviceDisplayTable = id;
|
||||
serviceNameField = id;
|
||||
serviceTypeField = id;
|
||||
textField = id;
|
||||
typeColumn = id;
|
||||
typeField = id;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
22
mDNSResponder/Clients/DNSServiceBrowser.nib/info.nib
generated
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>257 25 522 680 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
<string>22 474 271 44 0 0 1152 746 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>201</integer>
|
||||
<integer>220</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8L2127</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
mDNSResponder/Clients/DNSServiceBrowser.nib/objects.nib
generated
Normal file
30
mDNSResponder/Clients/DNSServiceReg-Info.plist
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>DNS Service Registration</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.DNS_Service_Registration</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.0d1</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>DNSServiceReg</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
274
mDNSResponder/Clients/DNSServiceReg.m
Normal file
@ -0,0 +1,274 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2002-2003 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 "dns_sd.h"
|
||||
|
||||
@interface RegistrationController : NSObject
|
||||
{
|
||||
IBOutlet NSTableColumn *typeColumn;
|
||||
IBOutlet NSTableColumn *nameColumn;
|
||||
IBOutlet NSTableColumn *portColumn;
|
||||
IBOutlet NSTableColumn *domainColumn;
|
||||
IBOutlet NSTableColumn *textColumn;
|
||||
|
||||
IBOutlet NSTableView *serviceDisplayTable;
|
||||
|
||||
IBOutlet NSTextField *serviceTypeField;
|
||||
IBOutlet NSTextField *serviceNameField;
|
||||
IBOutlet NSTextField *servicePortField;
|
||||
IBOutlet NSTextField *serviceDomainField;
|
||||
IBOutlet NSTextField *serviceTextField;
|
||||
|
||||
NSMutableArray *srvtypeKeys;
|
||||
NSMutableArray *srvnameKeys;
|
||||
NSMutableArray *srvportKeys;
|
||||
NSMutableArray *srvdomainKeys;
|
||||
NSMutableArray *srvtextKeys;
|
||||
|
||||
NSMutableDictionary *registeredDict;
|
||||
}
|
||||
|
||||
- (IBAction)registerService:(id)sender;
|
||||
- (IBAction)unregisterService:(id)sender;
|
||||
|
||||
- (IBAction)addNewService:(id)sender;
|
||||
- (IBAction)removeSelected:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
void reg_reply
|
||||
(
|
||||
DNSServiceRef sdRef,
|
||||
DNSServiceFlags flags,
|
||||
DNSServiceErrorType errorCode,
|
||||
const char *name,
|
||||
const char *regtype,
|
||||
const char *domain,
|
||||
void *context
|
||||
)
|
||||
{
|
||||
// registration reply
|
||||
printf("Got a reply from the server with error %d\n", errorCode);
|
||||
return;
|
||||
}
|
||||
|
||||
static void myCFSocketCallBack(CFSocketRef cfs, CFSocketCallBackType CallBackType, CFDataRef address, const void *data, void *context)
|
||||
{
|
||||
DNSServiceProcessResult((DNSServiceRef)context);
|
||||
}
|
||||
|
||||
static void addDNSServiceRefToRunLoop(DNSServiceRef ref)
|
||||
{
|
||||
int s = DNSServiceRefSockFD(ref);
|
||||
CFSocketContext myCFSocketContext = { 0, ref, NULL, NULL, NULL };
|
||||
CFSocketRef c = CFSocketCreateWithNative(kCFAllocatorDefault, s, kCFSocketReadCallBack, myCFSocketCallBack, &myCFSocketContext);
|
||||
CFRunLoopSourceRef rls = CFSocketCreateRunLoopSource(kCFAllocatorDefault, c, 0);
|
||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode);
|
||||
CFRelease(rls);
|
||||
}
|
||||
|
||||
|
||||
@implementation RegistrationController
|
||||
|
||||
- (void)registerDefaults
|
||||
{
|
||||
NSMutableDictionary *regDict = [NSMutableDictionary dictionary];
|
||||
|
||||
NSArray *typeArray = [NSArray arrayWithObjects:@"_ftp._tcp.", @"_ssh._tcp.", @"_tftp._tcp.", @"_http._tcp.", @"_printer._tcp.", @"_afpovertcp._tcp.", nil];
|
||||
NSArray *nameArray = [NSArray arrayWithObjects:@"My ftp Server", @"My Computer", @"Testing Boot Image", @"A Web Server", @"Steve's Printer", @"Company AppleShare Server", nil];
|
||||
NSArray *portArray = [NSArray arrayWithObjects:@"21", @"22", @"69", @"80", @"515", @"548", nil];
|
||||
NSArray *domainArray = [NSArray arrayWithObjects:@"", @"", @"", @"", @"", @"", nil];
|
||||
NSArray *textArray = [NSArray arrayWithObjects:@"", @"", @"image=mybootimage", @"path=/index.html", @"rn=lpt1", @"Vol=Public", nil];
|
||||
|
||||
[regDict setObject:typeArray forKey:@"SrvTypeKeys"];
|
||||
[regDict setObject:nameArray forKey:@"SrvNameKeys"];
|
||||
[regDict setObject:portArray forKey:@"SrvPortKeys"];
|
||||
[regDict setObject:domainArray forKey:@"SrvDomainKeys"];
|
||||
[regDict setObject:textArray forKey:@"SrvTextKeys"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:regDict];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
srvtypeKeys = [[NSMutableArray array] retain]; //Define arrays for Type, Domain, and Name
|
||||
srvnameKeys = [[NSMutableArray array] retain];
|
||||
srvportKeys = [[NSMutableArray array] retain];
|
||||
srvdomainKeys = [[NSMutableArray array] retain];
|
||||
srvtextKeys = [[NSMutableArray array] retain];
|
||||
|
||||
registeredDict = [[NSMutableDictionary alloc] init];
|
||||
|
||||
[self registerDefaults];
|
||||
return [super init];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib //BrowserController startup procedure
|
||||
{
|
||||
[srvtypeKeys addObjectsFromArray:[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvTypeKeys"]];
|
||||
[srvnameKeys addObjectsFromArray:[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvNameKeys"]];
|
||||
[srvportKeys addObjectsFromArray:[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvPortKeys"]];
|
||||
[srvdomainKeys addObjectsFromArray:[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvDomainKeys"]];
|
||||
[srvtextKeys addObjectsFromArray:[[NSUserDefaults standardUserDefaults] arrayForKey:@"SrvTextKeys"]];
|
||||
|
||||
[serviceDisplayTable reloadData]; //Reload (redraw) data in fields
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (IBAction)registerService:(id)sender
|
||||
{
|
||||
int selectedRow = [serviceDisplayTable selectedRow];
|
||||
CFMachPortContext context;
|
||||
DNSServiceRef dns_client;
|
||||
|
||||
if (selectedRow < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *key = [srvtypeKeys objectAtIndex:selectedRow];
|
||||
if ([registeredDict objectForKey:key]) { printf("Already registered\n"); return; }
|
||||
|
||||
context.version = 1;
|
||||
context.info = 0;
|
||||
context.retain = NULL;
|
||||
context.release = NULL;
|
||||
context.copyDescription = NULL;
|
||||
unsigned char txtbuffer[300];
|
||||
strncpy(txtbuffer+1, [[srvtextKeys objectAtIndex:selectedRow] UTF8String], sizeof(txtbuffer)-1);
|
||||
txtbuffer[0] = strlen(txtbuffer+1);
|
||||
|
||||
DNSServiceErrorType err = DNSServiceRegister
|
||||
(
|
||||
&dns_client, 0, 0,
|
||||
[[srvnameKeys objectAtIndex:selectedRow] UTF8String],
|
||||
[key UTF8String],
|
||||
[[srvdomainKeys objectAtIndex:selectedRow] UTF8String],
|
||||
NULL, htons([[srvportKeys objectAtIndex:selectedRow] intValue]),
|
||||
txtbuffer[0]+1, txtbuffer,
|
||||
reg_reply,
|
||||
nil
|
||||
);
|
||||
if (err)
|
||||
printf("DNSServiceRegister failed %d\n", err);
|
||||
else
|
||||
{
|
||||
addDNSServiceRefToRunLoop(dns_client);
|
||||
[registeredDict setObject:[NSNumber numberWithUnsignedInt:(unsigned int)dns_client] forKey:key];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)unregisterService:(id)sender
|
||||
{
|
||||
int selectedRow = [serviceDisplayTable selectedRow];
|
||||
NSString *key = [srvtypeKeys objectAtIndex:selectedRow];
|
||||
|
||||
NSNumber *refPtr = [registeredDict objectForKey:key];
|
||||
DNSServiceRef ref = (DNSServiceRef)[refPtr unsignedIntValue];
|
||||
|
||||
if (ref) {
|
||||
DNSServiceRefDeallocate(ref);
|
||||
[registeredDict removeObjectForKey:key];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)tableView:(NSTableView *)theTableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(int)row
|
||||
{
|
||||
if (row<0) return;
|
||||
}
|
||||
|
||||
- (int)numberOfRowsInTableView:(NSTableView *)theTableView //Begin mandatory TableView methods
|
||||
{
|
||||
return [srvtypeKeys count];
|
||||
}
|
||||
|
||||
- (id)tableView:(NSTableView *)theTableView objectValueForTableColumn:(NSTableColumn *)theColumn row:(int)rowIndex
|
||||
{
|
||||
if (theColumn == typeColumn) {
|
||||
return [srvtypeKeys objectAtIndex:rowIndex];
|
||||
}
|
||||
if (theColumn == nameColumn) {
|
||||
return [srvnameKeys objectAtIndex:rowIndex];
|
||||
}
|
||||
if (theColumn == portColumn) {
|
||||
return [srvportKeys objectAtIndex:rowIndex];
|
||||
}
|
||||
if (theColumn == domainColumn) {
|
||||
return [srvdomainKeys objectAtIndex:rowIndex];
|
||||
}
|
||||
if (theColumn == textColumn) {
|
||||
return [srvtextKeys objectAtIndex:rowIndex];
|
||||
}
|
||||
|
||||
return(0);
|
||||
} //End of mandatory TableView methods
|
||||
|
||||
- (IBAction)removeSelected:(id)sender
|
||||
{
|
||||
// remove the selected row and force a refresh
|
||||
|
||||
int selectedRow = [serviceDisplayTable selectedRow];
|
||||
|
||||
if (selectedRow) {
|
||||
|
||||
[srvtypeKeys removeObjectAtIndex:selectedRow];
|
||||
[srvnameKeys removeObjectAtIndex:selectedRow];
|
||||
[srvportKeys removeObjectAtIndex:selectedRow];
|
||||
[srvdomainKeys removeObjectAtIndex:selectedRow];
|
||||
[srvtextKeys removeObjectAtIndex:selectedRow];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvtypeKeys forKey:@"SrvTypeKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvnameKeys forKey:@"SrvNameKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvportKeys forKey:@"SrvPortKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvdomainKeys forKey:@"SrvDomainKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvtextKeys forKey:@"SrvTextKeys"];
|
||||
|
||||
[serviceDisplayTable reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)addNewService:(id)sender
|
||||
{
|
||||
// add new entries from the edit fields to the arrays for the defaults
|
||||
|
||||
if ([[serviceTypeField stringValue] length] && [[serviceNameField stringValue] length] && [[serviceDomainField stringValue] length]&& [[servicePortField stringValue] length]) {
|
||||
[srvtypeKeys addObject:[serviceTypeField stringValue]];
|
||||
[srvnameKeys addObject:[serviceNameField stringValue]];
|
||||
[srvportKeys addObject:[servicePortField stringValue]];
|
||||
[srvdomainKeys addObject:[serviceDomainField stringValue]];
|
||||
[srvtextKeys addObject:[serviceTextField stringValue]];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvtypeKeys forKey:@"SrvTypeKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvnameKeys forKey:@"SrvNameKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvportKeys forKey:@"SrvPortKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvdomainKeys forKey:@"SrvDomainKeys"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:srvtextKeys forKey:@"SrvTextKeys"];
|
||||
|
||||
[serviceDisplayTable reloadData];
|
||||
} else {
|
||||
NSBeep();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
30
mDNSResponder/Clients/DNSServiceReg.nib/classes.nib
generated
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
addNewService = id;
|
||||
registerService = id;
|
||||
removeSelected = id;
|
||||
unregisterService = id;
|
||||
};
|
||||
CLASS = RegistrationController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
domainColumn = NSTableColumn;
|
||||
nameColumn = NSTableColumn;
|
||||
portColumn = NSTableColumn;
|
||||
serviceDisplayTable = NSTableView;
|
||||
serviceDomainField = NSTextField;
|
||||
serviceNameField = NSTextField;
|
||||
servicePortField = NSTextField;
|
||||
serviceTextField = NSTextField;
|
||||
serviceTypeField = NSTextField;
|
||||
textColumn = NSTableColumn;
|
||||
typeColumn = NSTableColumn;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
22
mDNSResponder/Clients/DNSServiceReg.nib/info.nib
generated
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>32 111 356 240 0 0 1152 746 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
<string>103 609 252 44 0 0 1152 746 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>273.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>243</integer>
|
||||
<integer>21</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>6C30</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
mDNSResponder/Clients/DNSServiceReg.nib/objects.nib
generated
Normal file
90
mDNSResponder/Clients/ExplorerPlugin/About.cpp
Normal file
@ -0,0 +1,90 @@
|
||||
// About.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ExplorerPlugin.h"
|
||||
#include "About.h"
|
||||
#include "WinVersRes.h"
|
||||
#include <DebugServices.h>
|
||||
|
||||
|
||||
// CAbout dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(CAbout, CDialog)
|
||||
CAbout::CAbout(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CAbout::IDD, pParent)
|
||||
{
|
||||
// Initialize brush with the desired background color
|
||||
m_bkBrush.CreateSolidBrush(RGB(255, 255, 255));
|
||||
}
|
||||
|
||||
CAbout::~CAbout()
|
||||
{
|
||||
}
|
||||
|
||||
void CAbout::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_COMPONENT, m_componentCtrl);
|
||||
DDX_Control(pDX, IDC_LEGAL, m_legalCtrl);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAbout, CDialog)
|
||||
ON_WM_CTLCOLOR()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CAbout message handlers
|
||||
BOOL
|
||||
CAbout::OnInitDialog()
|
||||
{
|
||||
BOOL b = CDialog::OnInitDialog();
|
||||
|
||||
CStatic * control = (CStatic*) GetDlgItem( IDC_ABOUT_BACKGROUND );
|
||||
check( control );
|
||||
|
||||
if ( control )
|
||||
{
|
||||
control->SetBitmap( ::LoadBitmap( GetNonLocalizedResources(), MAKEINTRESOURCE( IDB_ABOUT ) ) );
|
||||
}
|
||||
|
||||
control = ( CStatic* ) GetDlgItem( IDC_COMPONENT_VERSION );
|
||||
check( control );
|
||||
|
||||
if ( control )
|
||||
{
|
||||
control->SetWindowText( TEXT( MASTER_PROD_VERS_STR2 ) );
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
HBRUSH CAbout::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
{
|
||||
switch (nCtlColor)
|
||||
{
|
||||
case CTLCOLOR_STATIC:
|
||||
|
||||
if ( pWnd->GetDlgCtrlID() == IDC_COMPONENT )
|
||||
{
|
||||
pDC->SetTextColor(RGB(64, 64, 64));
|
||||
}
|
||||
else
|
||||
{
|
||||
pDC->SetTextColor(RGB(0, 0, 0));
|
||||
}
|
||||
|
||||
pDC->SetBkColor(RGB(255, 255, 255));
|
||||
return (HBRUSH)(m_bkBrush.GetSafeHandle());
|
||||
|
||||
case CTLCOLOR_DLG:
|
||||
|
||||
return (HBRUSH)(m_bkBrush.GetSafeHandle());
|
||||
|
||||
default:
|
||||
|
||||
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
|
||||
}
|
||||
}
|
28
mDNSResponder/Clients/ExplorerPlugin/About.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Resource.h"
|
||||
#include "afxwin.h"
|
||||
|
||||
// CAbout dialog
|
||||
|
||||
class CAbout : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CAbout)
|
||||
|
||||
public:
|
||||
CAbout(CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CAbout();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_ABOUT };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
||||
virtual BOOL OnInitDialog();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
CStatic m_componentCtrl;
|
||||
CStatic m_legalCtrl;
|
||||
CBrush m_bkBrush;
|
||||
};
|
177
mDNSResponder/Clients/ExplorerPlugin/ClassFactory.cpp
Normal file
@ -0,0 +1,177 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 "StdAfx.h"
|
||||
|
||||
#include "DebugServices.h"
|
||||
|
||||
#include "ExplorerBar.h"
|
||||
#include "ExplorerPlugin.h"
|
||||
|
||||
#include "ClassFactory.h"
|
||||
|
||||
// MFC Debugging
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// ClassFactory
|
||||
//===========================================================================================================================
|
||||
|
||||
ClassFactory::ClassFactory( CLSID inCLSID )
|
||||
{
|
||||
mCLSIDObject = inCLSID;
|
||||
mRefCount = 1;
|
||||
++gDLLRefCount;
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// ~ClassFactory
|
||||
//===========================================================================================================================
|
||||
|
||||
ClassFactory::~ClassFactory( void )
|
||||
{
|
||||
check( gDLLRefCount > 0 );
|
||||
|
||||
--gDLLRefCount;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IUnknown methods ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// QueryInterface
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ClassFactory::QueryInterface( REFIID inID, LPVOID *outResult )
|
||||
{
|
||||
HRESULT err;
|
||||
|
||||
check( outResult );
|
||||
|
||||
if( IsEqualIID( inID, IID_IUnknown ) )
|
||||
{
|
||||
*outResult = this;
|
||||
}
|
||||
else if( IsEqualIID( inID, IID_IClassFactory ) )
|
||||
{
|
||||
*outResult = (IClassFactory *) this;
|
||||
}
|
||||
else
|
||||
{
|
||||
*outResult = NULL;
|
||||
err = E_NOINTERFACE;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
( *( (LPUNKNOWN *) outResult ) )->AddRef();
|
||||
err = S_OK;
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// AddRef
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP_( DWORD ) ClassFactory::AddRef( void )
|
||||
{
|
||||
return( ++mRefCount );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// Release
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP_( DWORD ) ClassFactory::Release( void )
|
||||
{
|
||||
DWORD count;
|
||||
|
||||
count = --mRefCount;
|
||||
if( count == 0 )
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
return( count );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IClassFactory methods ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// CreateInstance
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ClassFactory::CreateInstance( LPUNKNOWN inUnknown, REFIID inID, LPVOID *outObject )
|
||||
{
|
||||
HRESULT err;
|
||||
LPVOID obj;
|
||||
|
||||
check( outObject );
|
||||
|
||||
obj = NULL;
|
||||
*outObject = NULL;
|
||||
require_action( !inUnknown, exit, err = CLASS_E_NOAGGREGATION );
|
||||
|
||||
// Create the object based on the CLSID.
|
||||
|
||||
if( IsEqualCLSID( mCLSIDObject, CLSID_ExplorerBar ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
obj = new ExplorerBar();
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
// Don't let exception escape.
|
||||
}
|
||||
require_action( obj, exit, err = E_OUTOFMEMORY );
|
||||
}
|
||||
else
|
||||
{
|
||||
err = E_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// Query for the specified interface. Release the factory since QueryInterface retains it.
|
||||
|
||||
err = ( (LPUNKNOWN ) obj )->QueryInterface( inID, outObject );
|
||||
( (LPUNKNOWN ) obj )->Release();
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// LockServer
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ClassFactory::LockServer( BOOL inLock )
|
||||
{
|
||||
DEBUG_UNUSED( inLock );
|
||||
|
||||
return( E_NOTIMPL );
|
||||
}
|
51
mDNSResponder/Clients/ExplorerPlugin/ClassFactory.h
Normal file
@ -0,0 +1,51 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 __CLASS_FACTORY__
|
||||
#define __CLASS_FACTORY__
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
//===========================================================================================================================
|
||||
// ClassFactory
|
||||
//===========================================================================================================================
|
||||
|
||||
class ClassFactory : public IClassFactory
|
||||
{
|
||||
protected:
|
||||
|
||||
DWORD mRefCount;
|
||||
CLSID mCLSIDObject;
|
||||
|
||||
public:
|
||||
|
||||
ClassFactory( CLSID inCLSID );
|
||||
~ClassFactory( void );
|
||||
|
||||
// IUnknown methods
|
||||
|
||||
STDMETHODIMP QueryInterface( REFIID inID, LPVOID *outResult );
|
||||
STDMETHODIMP_( DWORD ) AddRef( void );
|
||||
STDMETHODIMP_( DWORD ) Release( void );
|
||||
|
||||
// IClassFactory methods
|
||||
|
||||
STDMETHODIMP CreateInstance( LPUNKNOWN inUnknown, REFIID inID, LPVOID *outObject );
|
||||
STDMETHODIMP LockServer( BOOL inLock );
|
||||
};
|
||||
|
||||
#endif // __CLASS_FACTORY__
|
659
mDNSResponder/Clients/ExplorerPlugin/ExplorerBar.cpp
Normal file
@ -0,0 +1,659 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 "StdAfx.h"
|
||||
|
||||
#include "comutil.h"
|
||||
#include "ShObjIdl.h"
|
||||
|
||||
#include "DebugServices.h"
|
||||
|
||||
#include "Resource.h"
|
||||
|
||||
#include "ExplorerBar.h"
|
||||
|
||||
#include "About.h"
|
||||
// MFC Debugging
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// Constants
|
||||
//===========================================================================================================================
|
||||
#define LENGTHOF(a) (sizeof(a) == sizeof(&*a)) ? 0 : (sizeof(a) / sizeof(*a))
|
||||
#define MIN_SIZE_X 10
|
||||
#define MIN_SIZE_Y 10
|
||||
|
||||
//===========================================================================================================================
|
||||
// ExplorerBar
|
||||
//===========================================================================================================================
|
||||
|
||||
ExplorerBar::ExplorerBar( void )
|
||||
{
|
||||
++gDLLRefCount;
|
||||
|
||||
mRefCount = 1;
|
||||
mSite = NULL;
|
||||
mWebBrowser = NULL;
|
||||
mParentWindow = NULL;
|
||||
mFocus = FALSE;
|
||||
mViewMode = 0;
|
||||
mBandID = 0;
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// ~ExplorerBar
|
||||
//===========================================================================================================================
|
||||
|
||||
ExplorerBar::~ExplorerBar( void )
|
||||
{
|
||||
if( mWebBrowser )
|
||||
{
|
||||
mWebBrowser->Release();
|
||||
mWebBrowser = NULL;
|
||||
}
|
||||
if( mSite )
|
||||
{
|
||||
mSite->Release();
|
||||
mSite = NULL;
|
||||
}
|
||||
|
||||
--gDLLRefCount;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IUnknown implementation ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// QueryInterface
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::QueryInterface( REFIID inID, LPVOID *outResult )
|
||||
{
|
||||
HRESULT err;
|
||||
|
||||
if( IsEqualIID( inID, IID_IUnknown ) ) // IUnknown
|
||||
{
|
||||
*outResult = this;
|
||||
}
|
||||
else if( IsEqualIID( inID, IID_IOleWindow ) ) // IOleWindow
|
||||
{
|
||||
*outResult = (IOleWindow *) this;
|
||||
}
|
||||
else if( IsEqualIID( inID, IID_IDockingWindow ) ) // IDockingWindow
|
||||
{
|
||||
*outResult = (IDockingWindow *) this;
|
||||
}
|
||||
else if( IsEqualIID( inID, IID_IDeskBand ) ) // IDeskBand
|
||||
{
|
||||
*outResult = (IDeskBand *) this;
|
||||
}
|
||||
else if( IsEqualIID( inID, IID_IInputObject ) ) // IInputObject
|
||||
{
|
||||
*outResult = (IInputObject *) this;
|
||||
}
|
||||
else if( IsEqualIID( inID, IID_IObjectWithSite ) ) // IObjectWithSite
|
||||
{
|
||||
*outResult = (IObjectWithSite *) this;
|
||||
}
|
||||
else if( IsEqualIID( inID, IID_IPersistStream ) ) // IPersistStream
|
||||
{
|
||||
*outResult = (IPersistStream *) this;
|
||||
}
|
||||
else if( IsEqualIID( inID, IID_IContextMenu ) ) // IContextMenu
|
||||
{
|
||||
*outResult = (IContextMenu *) this;
|
||||
}
|
||||
else
|
||||
{
|
||||
*outResult = NULL;
|
||||
err = E_NOINTERFACE;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
( *( (LPUNKNOWN *) outResult ) )->AddRef();
|
||||
err = S_OK;
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// AddRef
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP_( DWORD ) ExplorerBar::AddRef( void )
|
||||
{
|
||||
return( ++mRefCount );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// Release
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP_( DWORD ) ExplorerBar::Release( void )
|
||||
{
|
||||
DWORD count;
|
||||
|
||||
count = --mRefCount;
|
||||
if( count == 0 )
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
return( count );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IOleWindow implementation ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// GetWindow
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::GetWindow( HWND *outWindow )
|
||||
{
|
||||
*outWindow = mWindow.GetSafeHwnd();
|
||||
return( S_OK );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// ContextSensitiveHelp
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::ContextSensitiveHelp( BOOL inEnterMode )
|
||||
{
|
||||
DEBUG_UNUSED( inEnterMode );
|
||||
|
||||
return( E_NOTIMPL );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IDockingWindow implementation ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// ShowDW
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::ShowDW( BOOL inShow )
|
||||
{
|
||||
if( mWindow.GetSafeHwnd() )
|
||||
{
|
||||
mWindow.ShowWindow( inShow ? SW_SHOW : SW_HIDE );
|
||||
}
|
||||
return( S_OK );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// CloseDW
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::CloseDW( DWORD inReserved )
|
||||
{
|
||||
DEBUG_UNUSED( inReserved );
|
||||
|
||||
ShowDW( FALSE );
|
||||
if( mWindow.GetSafeHwnd() )
|
||||
{
|
||||
mWindow.SendMessage( WM_CLOSE );
|
||||
}
|
||||
return( S_OK );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// ResizeBorderDW
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::ResizeBorderDW( LPCRECT inBorder, IUnknown *inPunkSite, BOOL inReserved )
|
||||
{
|
||||
DEBUG_UNUSED( inBorder );
|
||||
DEBUG_UNUSED( inPunkSite );
|
||||
DEBUG_UNUSED( inReserved );
|
||||
|
||||
return( E_NOTIMPL );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IDeskBand implementation ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// GetBandInfo
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::GetBandInfo( DWORD inBandID, DWORD inViewMode, DESKBANDINFO *outInfo )
|
||||
{
|
||||
HRESULT err;
|
||||
|
||||
require_action( outInfo, exit, err = E_INVALIDARG );
|
||||
|
||||
mBandID = inBandID;
|
||||
mViewMode = inViewMode;
|
||||
|
||||
if( outInfo->dwMask & DBIM_MINSIZE )
|
||||
{
|
||||
outInfo->ptMinSize.x = 100;
|
||||
outInfo->ptMinSize.y = 100;
|
||||
}
|
||||
if( outInfo->dwMask & DBIM_MAXSIZE )
|
||||
{
|
||||
// Unlimited max size.
|
||||
|
||||
outInfo->ptMaxSize.x = -1;
|
||||
outInfo->ptMaxSize.y = -1;
|
||||
}
|
||||
if( outInfo->dwMask & DBIM_INTEGRAL )
|
||||
{
|
||||
outInfo->ptIntegral.x = 1;
|
||||
outInfo->ptIntegral.y = 1;
|
||||
}
|
||||
if( outInfo->dwMask & DBIM_ACTUAL )
|
||||
{
|
||||
outInfo->ptActual.x = 0;
|
||||
outInfo->ptActual.y = 0;
|
||||
}
|
||||
if( outInfo->dwMask & DBIM_TITLE )
|
||||
{
|
||||
CString s;
|
||||
BOOL ok;
|
||||
|
||||
ok = s.LoadString( IDS_NAME );
|
||||
require_action( ok, exit, err = kNoResourcesErr );
|
||||
|
||||
#ifdef UNICODE
|
||||
lstrcpyn( outInfo->wszTitle, s, sizeof_array( outInfo->wszTitle ) );
|
||||
#else
|
||||
DWORD nChars;
|
||||
|
||||
nChars = MultiByteToWideChar( CP_ACP, 0, s, -1, outInfo->wszTitle, sizeof_array( outInfo->wszTitle ) );
|
||||
err = translate_errno( nChars > 0, (OSStatus) GetLastError(), kUnknownErr );
|
||||
require_noerr( err, exit );
|
||||
#endif
|
||||
}
|
||||
if( outInfo->dwMask & DBIM_MODEFLAGS )
|
||||
{
|
||||
outInfo->dwModeFlags = DBIMF_NORMAL | DBIMF_VARIABLEHEIGHT;
|
||||
}
|
||||
|
||||
// Force the default background color.
|
||||
|
||||
outInfo->dwMask &= ~DBIM_BKCOLOR;
|
||||
err = S_OK;
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IInputObject implementation ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// UIActivateIO
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::UIActivateIO( BOOL inActivate, LPMSG inMsg )
|
||||
{
|
||||
DEBUG_UNUSED( inMsg );
|
||||
|
||||
if( inActivate )
|
||||
{
|
||||
mWindow.SetFocus();
|
||||
}
|
||||
return( S_OK );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// HasFocusIO
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::HasFocusIO( void )
|
||||
{
|
||||
if( mWindow.GetFocus()->GetSafeHwnd() == mWindow.GetSafeHwnd() )
|
||||
{
|
||||
return( S_OK );
|
||||
}
|
||||
return( S_FALSE );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// TranslateAcceleratorIO
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::TranslateAcceleratorIO( LPMSG inMsg )
|
||||
{
|
||||
DEBUG_UNUSED( inMsg );
|
||||
|
||||
return( S_FALSE );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IObjectWithSite implementation ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// SetSite
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::SetSite( IUnknown *inPunkSite )
|
||||
{
|
||||
AFX_MANAGE_STATE( AfxGetStaticModuleState() );
|
||||
|
||||
HRESULT err;
|
||||
|
||||
// Release the old interfaces.
|
||||
|
||||
if( mWebBrowser )
|
||||
{
|
||||
mWebBrowser->Release();
|
||||
mWebBrowser = NULL;
|
||||
}
|
||||
if( mSite )
|
||||
{
|
||||
mSite->Release();
|
||||
mSite = NULL;
|
||||
}
|
||||
|
||||
// A non-NULL site means we're setting the site. Otherwise, the site is being released (done above).
|
||||
|
||||
if( !inPunkSite )
|
||||
{
|
||||
err = S_OK;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// Get the parent window.
|
||||
|
||||
IOleWindow * oleWindow;
|
||||
|
||||
mParentWindow = NULL;
|
||||
err = inPunkSite->QueryInterface( IID_IOleWindow, (LPVOID *) &oleWindow );
|
||||
require( SUCCEEDED( err ), exit );
|
||||
|
||||
err = oleWindow->GetWindow( &mParentWindow );
|
||||
oleWindow->Release();
|
||||
require_noerr( err, exit );
|
||||
require_action( mParentWindow, exit, err = E_FAIL );
|
||||
|
||||
// Get the IInputObject interface.
|
||||
|
||||
err = inPunkSite->QueryInterface( IID_IInputObjectSite, (LPVOID *) &mSite );
|
||||
require( SUCCEEDED( err ), exit );
|
||||
check( mSite );
|
||||
|
||||
// Get the IWebBrowser2 interface.
|
||||
|
||||
IOleCommandTarget * oleCommandTarget;
|
||||
|
||||
err = inPunkSite->QueryInterface( IID_IOleCommandTarget, (LPVOID *) &oleCommandTarget );
|
||||
require( SUCCEEDED( err ), exit );
|
||||
|
||||
IServiceProvider * serviceProvider;
|
||||
|
||||
err = oleCommandTarget->QueryInterface( IID_IServiceProvider, (LPVOID *) &serviceProvider );
|
||||
oleCommandTarget->Release();
|
||||
require( SUCCEEDED( err ), exit );
|
||||
|
||||
err = serviceProvider->QueryService( SID_SWebBrowserApp, IID_IWebBrowser2, (LPVOID *) &mWebBrowser );
|
||||
serviceProvider->Release();
|
||||
require( SUCCEEDED( err ), exit );
|
||||
|
||||
// Create the main window.
|
||||
|
||||
err = SetupWindow();
|
||||
require_noerr( err, exit );
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// GetSite
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::GetSite( REFIID inID, LPVOID *outResult )
|
||||
{
|
||||
HRESULT err;
|
||||
|
||||
*outResult = NULL;
|
||||
require_action( mSite, exit, err = E_FAIL );
|
||||
|
||||
err = mSite->QueryInterface( inID, outResult );
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == IPersistStream implementation ==
|
||||
#endif
|
||||
|
||||
//
|
||||
// IPersistStream implementation
|
||||
//
|
||||
// This is only supported to allow the desk band to be dropped on the desktop and to prevent multiple instances of
|
||||
// the desk band from showing up in the context menu. This desk band doesn't actually persist any data.
|
||||
//
|
||||
|
||||
//===========================================================================================================================
|
||||
// GetClassID
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::GetClassID( LPCLSID outClassID )
|
||||
{
|
||||
*outClassID = CLSID_ExplorerBar;
|
||||
return( S_OK );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// IsDirty
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::IsDirty( void )
|
||||
{
|
||||
return( S_FALSE );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// Load
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::Load( LPSTREAM inStream )
|
||||
{
|
||||
DEBUG_UNUSED( inStream );
|
||||
|
||||
return( S_OK );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// Save
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::Save( LPSTREAM inStream, BOOL inClearDirty )
|
||||
{
|
||||
DEBUG_UNUSED( inStream );
|
||||
DEBUG_UNUSED( inClearDirty );
|
||||
|
||||
return( S_OK );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// GetSizeMax
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::GetSizeMax( ULARGE_INTEGER *outSizeMax )
|
||||
{
|
||||
DEBUG_UNUSED( outSizeMax );
|
||||
|
||||
return( E_NOTIMPL );
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// QueryContextMenu
|
||||
//===========================================================================================================================
|
||||
|
||||
STDMETHODIMP ExplorerBar::QueryContextMenu(HMENU hShellContextMenu, UINT iContextMenuFirstItem, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
|
||||
{
|
||||
DEBUG_UNUSED( idCmdLast );
|
||||
DEBUG_UNUSED( uFlags );
|
||||
|
||||
CMenu menubar;
|
||||
|
||||
menubar.LoadMenu(IDR_CONTEXT_MENU);
|
||||
CMenu * menu = menubar.GetSubMenu(0);
|
||||
|
||||
CMenu shellmenu;
|
||||
|
||||
shellmenu.Attach(hShellContextMenu);
|
||||
|
||||
UINT iShellItem = iContextMenuFirstItem; //! remove plus one
|
||||
UINT idShellCmd = idCmdFirst;
|
||||
|
||||
int n = menu->GetMenuItemCount();
|
||||
|
||||
for (int i=0; i<n; ++i)
|
||||
{
|
||||
MENUITEMINFO mii;
|
||||
TCHAR sz[128] = {0};
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.fMask = MIIM_TYPE | MIIM_ID;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.cch = LENGTHOF(sz);
|
||||
mii.dwTypeData = sz;
|
||||
|
||||
menu->GetMenuItemInfo(i, &mii, TRUE);
|
||||
|
||||
mii.wID = idShellCmd++;
|
||||
|
||||
shellmenu.InsertMenuItem(iShellItem++, &mii, TRUE);
|
||||
}
|
||||
|
||||
shellmenu.Detach();
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// GetCommandString
|
||||
//===========================================================================================================================
|
||||
|
||||
// Not called for explorer bars
|
||||
STDMETHODIMP ExplorerBar::GetCommandString(UINT_PTR idCmd, UINT uType, UINT* pwReserved, LPSTR pszName, UINT cchMax)
|
||||
{
|
||||
DEBUG_UNUSED( idCmd );
|
||||
DEBUG_UNUSED( uType );
|
||||
DEBUG_UNUSED( pwReserved );
|
||||
DEBUG_UNUSED( pszName );
|
||||
DEBUG_UNUSED( cchMax );
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// InvokeCommand
|
||||
//===========================================================================================================================
|
||||
|
||||
// The shell sends either strings or indexes
|
||||
// IE never sends strings
|
||||
// The indexes are into an array of my commands
|
||||
// So the verb for the first command I added to the menu is always 0x0000
|
||||
// Here - because I don't have any submenus -
|
||||
// I can treat the 'verb' as an menu item position
|
||||
STDMETHODIMP ExplorerBar::InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
|
||||
{
|
||||
// IE doesn't send string commands
|
||||
if (HIWORD(lpici->lpVerb) != 0) return 0;
|
||||
|
||||
CAbout dlg;
|
||||
|
||||
dlg.DoModal();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == Other ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// SetupWindow
|
||||
//===========================================================================================================================
|
||||
|
||||
OSStatus ExplorerBar::SetupWindow( void )
|
||||
{
|
||||
OSStatus err;
|
||||
CWnd * window;
|
||||
CRect rect;
|
||||
CString s;
|
||||
BOOL ok;
|
||||
|
||||
window = CWnd::FromHandle( mParentWindow );
|
||||
check( window );
|
||||
window->GetClientRect( rect );
|
||||
|
||||
ok = s.LoadString( IDS_NAME );
|
||||
require_action( ok, exit, err = kNoResourcesErr );
|
||||
|
||||
ok = mWindow.Create( NULL, s, WS_CHILD | WS_VISIBLE, rect, window, 100 ) != 0;
|
||||
require_action( ok, exit, err = kNoResourcesErr );
|
||||
|
||||
mWindow.SetOwner( this );
|
||||
err = kNoErr;
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// GoToURL
|
||||
//===========================================================================================================================
|
||||
|
||||
OSStatus ExplorerBar::GoToURL( const CString &inURL )
|
||||
{
|
||||
OSStatus err;
|
||||
BSTR s;
|
||||
VARIANT empty;
|
||||
|
||||
s = inURL.AllocSysString();
|
||||
require_action( s, exit, err = kNoMemoryErr );
|
||||
|
||||
VariantInit( &empty );
|
||||
err = mWebBrowser->Navigate( s, &empty, &empty, &empty, &empty );
|
||||
SysFreeString( s );
|
||||
require_noerr( err, exit );
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
104
mDNSResponder/Clients/ExplorerPlugin/ExplorerBar.h
Normal file
@ -0,0 +1,104 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 __EXPLORER_BAR__
|
||||
#define __EXPLORER_BAR__
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "ExplorerBarWindow.h"
|
||||
#include "ExplorerPlugin.h"
|
||||
|
||||
//===========================================================================================================================
|
||||
// ExplorerBar
|
||||
//===========================================================================================================================
|
||||
|
||||
class ExplorerBar : public IDeskBand,
|
||||
public IInputObject,
|
||||
public IObjectWithSite,
|
||||
public IPersistStream,
|
||||
public IContextMenu
|
||||
{
|
||||
protected:
|
||||
|
||||
DWORD mRefCount;
|
||||
IInputObjectSite * mSite;
|
||||
IWebBrowser2 * mWebBrowser;
|
||||
HWND mParentWindow;
|
||||
BOOL mFocus;
|
||||
DWORD mViewMode;
|
||||
DWORD mBandID;
|
||||
ExplorerBarWindow mWindow;
|
||||
|
||||
public:
|
||||
|
||||
ExplorerBar( void );
|
||||
~ExplorerBar( void );
|
||||
|
||||
// IUnknown methods
|
||||
|
||||
STDMETHODIMP QueryInterface( REFIID inID, LPVOID *outResult );
|
||||
STDMETHODIMP_( DWORD ) AddRef( void );
|
||||
STDMETHODIMP_( DWORD ) Release( void );
|
||||
|
||||
// IOleWindow methods
|
||||
|
||||
STDMETHOD( GetWindow ) ( HWND *outWindow );
|
||||
STDMETHOD( ContextSensitiveHelp ) ( BOOL inEnterMode );
|
||||
|
||||
// IDockingWindow methods
|
||||
|
||||
STDMETHOD( ShowDW ) ( BOOL inShow );
|
||||
STDMETHOD( CloseDW ) ( DWORD inReserved );
|
||||
STDMETHOD( ResizeBorderDW ) ( LPCRECT inBorder, IUnknown *inPunkSite, BOOL inReserved );
|
||||
|
||||
// IDeskBand methods
|
||||
|
||||
STDMETHOD( GetBandInfo ) ( DWORD inBandID, DWORD inViewMode, DESKBANDINFO *outInfo );
|
||||
|
||||
// IInputObject methods
|
||||
|
||||
STDMETHOD( UIActivateIO ) ( BOOL inActivate, LPMSG inMsg );
|
||||
STDMETHOD( HasFocusIO ) ( void );
|
||||
STDMETHOD( TranslateAcceleratorIO ) ( LPMSG inMsg );
|
||||
|
||||
// IObjectWithSite methods
|
||||
|
||||
STDMETHOD( SetSite ) ( IUnknown *inPunkSite );
|
||||
STDMETHOD( GetSite ) ( REFIID inID, LPVOID *outResult );
|
||||
|
||||
// IPersistStream methods
|
||||
|
||||
STDMETHOD( GetClassID ) ( LPCLSID outClassID );
|
||||
STDMETHOD( IsDirty ) ( void );
|
||||
STDMETHOD( Load ) ( LPSTREAM inStream );
|
||||
STDMETHOD( Save ) ( LPSTREAM inStream, BOOL inClearDirty );
|
||||
STDMETHOD( GetSizeMax ) ( ULARGE_INTEGER *outSizeMax );
|
||||
|
||||
// IContextMenu methods
|
||||
|
||||
STDMETHOD( QueryContextMenu ) ( HMENU hContextMenu, UINT iContextMenuFirstItem, UINT idCmdFirst, UINT idCmdLast, UINT uFlags );
|
||||
STDMETHOD( GetCommandString ) ( UINT_PTR idCmd, UINT uType, UINT* pwReserved, LPSTR pszName, UINT cchMax );
|
||||
STDMETHOD( InvokeCommand ) ( LPCMINVOKECOMMANDINFO lpici );
|
||||
|
||||
// Other
|
||||
|
||||
OSStatus SetupWindow( void );
|
||||
OSStatus GoToURL( const CString &inURL );
|
||||
};
|
||||
|
||||
#endif // __EXPLORER_BAR__
|
794
mDNSResponder/Clients/ExplorerPlugin/ExplorerBarWindow.cpp
Normal file
@ -0,0 +1,794 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 "StdAfx.h"
|
||||
|
||||
#include "CommonServices.h"
|
||||
#include "DebugServices.h"
|
||||
#include "WinServices.h"
|
||||
#include "dns_sd.h"
|
||||
|
||||
#include "ExplorerBar.h"
|
||||
#include "LoginDialog.h"
|
||||
#include "Resource.h"
|
||||
|
||||
#include "ExplorerBarWindow.h"
|
||||
#include "ExplorerPlugin.h"
|
||||
|
||||
// MFC Debugging
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#pragma mark == Constants ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// Constants
|
||||
//===========================================================================================================================
|
||||
|
||||
// Control IDs
|
||||
|
||||
#define IDC_EXPLORER_TREE 1234
|
||||
|
||||
// Private Messages
|
||||
|
||||
#define WM_PRIVATE_SERVICE_EVENT ( WM_USER + 0x100 )
|
||||
|
||||
// TXT records
|
||||
|
||||
#define kTXTRecordKeyPath "path"
|
||||
|
||||
// IE Icon resource
|
||||
|
||||
#define kIEIconResource 32529
|
||||
|
||||
|
||||
#if 0
|
||||
#pragma mark == Prototypes ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// Prototypes
|
||||
//===========================================================================================================================
|
||||
|
||||
DEBUG_LOCAL int FindServiceArrayIndex( const ServiceInfoArray &inArray, const ServiceInfo &inService, int &outIndex );
|
||||
|
||||
#if 0
|
||||
#pragma mark == Message Map ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// Message Map
|
||||
//===========================================================================================================================
|
||||
|
||||
BEGIN_MESSAGE_MAP( ExplorerBarWindow, CWnd )
|
||||
ON_WM_CREATE()
|
||||
ON_WM_DESTROY()
|
||||
ON_WM_SIZE()
|
||||
ON_NOTIFY( NM_DBLCLK, IDC_EXPLORER_TREE, OnDoubleClick )
|
||||
ON_MESSAGE( WM_PRIVATE_SERVICE_EVENT, OnServiceEvent )
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// ExplorerBarWindow
|
||||
//===========================================================================================================================
|
||||
|
||||
ExplorerBarWindow::ExplorerBarWindow( void )
|
||||
{
|
||||
mOwner = NULL;
|
||||
mResolveServiceRef = NULL;
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// ~ExplorerBarWindow
|
||||
//===========================================================================================================================
|
||||
|
||||
ExplorerBarWindow::~ExplorerBarWindow( void )
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnCreate
|
||||
//===========================================================================================================================
|
||||
|
||||
int ExplorerBarWindow::OnCreate( LPCREATESTRUCT inCreateStruct )
|
||||
{
|
||||
AFX_MANAGE_STATE( AfxGetStaticModuleState() );
|
||||
|
||||
HINSTANCE module = NULL;
|
||||
OSStatus err;
|
||||
CRect rect;
|
||||
CBitmap bitmap;
|
||||
CString s;
|
||||
|
||||
err = CWnd::OnCreate( inCreateStruct );
|
||||
require_noerr( err, exit );
|
||||
|
||||
GetClientRect( rect );
|
||||
mTree.Create( WS_TABSTOP | WS_VISIBLE | WS_CHILD | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_NOHSCROLL , rect, this,
|
||||
IDC_EXPLORER_TREE );
|
||||
|
||||
ServiceHandlerEntry * e;
|
||||
|
||||
s.LoadString( IDS_ABOUT );
|
||||
m_about = mTree.InsertItem( s, 0, 0 );
|
||||
|
||||
// Web Site Handler
|
||||
|
||||
e = new ServiceHandlerEntry;
|
||||
check( e );
|
||||
e->type = "_http._tcp";
|
||||
e->urlScheme = "http://";
|
||||
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);
|
||||
|
||||
#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 ) ) );
|
||||
m_imageList.Add( &bitmap, (CBitmap*) NULL );
|
||||
bitmap.Detach();
|
||||
|
||||
mTree.SetImageList(&m_imageList, TVSIL_NORMAL);
|
||||
|
||||
exit:
|
||||
|
||||
if ( module )
|
||||
{
|
||||
FreeLibrary( module );
|
||||
module = NULL;
|
||||
}
|
||||
|
||||
// Cannot talk to the mDNSResponder service. Show the error message and exit (with kNoErr so they can see it).
|
||||
if ( err )
|
||||
{
|
||||
if ( err == kDNSServiceErr_Firewall )
|
||||
{
|
||||
s.LoadString( IDS_FIREWALL );
|
||||
}
|
||||
else
|
||||
{
|
||||
s.LoadString( IDS_MDNSRESPONDER_NOT_AVAILABLE );
|
||||
}
|
||||
|
||||
mTree.DeleteAllItems();
|
||||
mTree.InsertItem( s, 0, 0, TVI_ROOT, TVI_LAST );
|
||||
|
||||
err = kNoErr;
|
||||
}
|
||||
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnDestroy
|
||||
//===========================================================================================================================
|
||||
|
||||
void ExplorerBarWindow::OnDestroy( void )
|
||||
{
|
||||
// Stop any resolves that may still be pending (shouldn't be any).
|
||||
|
||||
StopResolve();
|
||||
|
||||
// Clean up the extant browses
|
||||
while (m_serviceRefs.size() > 0)
|
||||
{
|
||||
//
|
||||
// take the head of the list
|
||||
//
|
||||
DNSServiceRef ref = m_serviceRefs.front();
|
||||
|
||||
//
|
||||
// Stop will remove it from the list
|
||||
//
|
||||
Stop( ref );
|
||||
}
|
||||
|
||||
// Clean up the service handlers.
|
||||
|
||||
int i;
|
||||
int n;
|
||||
|
||||
n = (int) mServiceHandlers.GetSize();
|
||||
for( i = 0; i < n; ++i )
|
||||
{
|
||||
delete mServiceHandlers[ i ];
|
||||
}
|
||||
|
||||
CWnd::OnDestroy();
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnSize
|
||||
//===========================================================================================================================
|
||||
|
||||
void ExplorerBarWindow::OnSize( UINT inType, int inX, int inY )
|
||||
{
|
||||
CWnd::OnSize( inType, inX, inY );
|
||||
mTree.MoveWindow( 0, 0, inX, inY );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnDoubleClick
|
||||
//===========================================================================================================================
|
||||
|
||||
void ExplorerBarWindow::OnDoubleClick( NMHDR *inNMHDR, LRESULT *outResult )
|
||||
{
|
||||
HTREEITEM item;
|
||||
ServiceInfo * service;
|
||||
OSStatus err;
|
||||
|
||||
DEBUG_UNUSED( inNMHDR );
|
||||
|
||||
item = mTree.GetSelectedItem();
|
||||
require( item, exit );
|
||||
|
||||
// Tell Internet Explorer to go to the URL if it's about item
|
||||
|
||||
if ( item == m_about )
|
||||
{
|
||||
CString url;
|
||||
|
||||
check( mOwner );
|
||||
|
||||
url.LoadString( IDS_ABOUT_URL );
|
||||
mOwner->GoToURL( url );
|
||||
}
|
||||
else
|
||||
{
|
||||
service = reinterpret_cast < ServiceInfo * > ( mTree.GetItemData( item ) );
|
||||
require_quiet( service, exit );
|
||||
|
||||
err = StartResolve( service );
|
||||
require_noerr( err, exit );
|
||||
}
|
||||
|
||||
exit:
|
||||
*outResult = 0;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnServiceEvent
|
||||
//===========================================================================================================================
|
||||
|
||||
LRESULT
|
||||
ExplorerBarWindow::OnServiceEvent(WPARAM inWParam, LPARAM inLParam)
|
||||
{
|
||||
if (WSAGETSELECTERROR(inLParam) && !(HIWORD(inLParam)))
|
||||
{
|
||||
dlog( kDebugLevelError, "OnServiceEvent: window error\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
SOCKET sock = (SOCKET) inWParam;
|
||||
|
||||
// iterate thru list
|
||||
ServiceRefList::iterator it;
|
||||
|
||||
for (it = m_serviceRefs.begin(); it != m_serviceRefs.end(); it++)
|
||||
{
|
||||
DNSServiceRef ref = *it;
|
||||
|
||||
check(ref != NULL);
|
||||
|
||||
if ((SOCKET) DNSServiceRefSockFD(ref) == sock)
|
||||
{
|
||||
DNSServiceErrorType err;
|
||||
|
||||
err = DNSServiceProcessResult(ref);
|
||||
|
||||
if (err != 0)
|
||||
{
|
||||
CString s;
|
||||
|
||||
s.LoadString( IDS_MDNSRESPONDER_NOT_AVAILABLE );
|
||||
mTree.DeleteAllItems();
|
||||
mTree.InsertItem( s, 0, 0, TVI_ROOT, TVI_LAST );
|
||||
|
||||
Stop(ref);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ( 0 );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// BrowseCallBack
|
||||
//===========================================================================================================================
|
||||
|
||||
void DNSSD_API
|
||||
ExplorerBarWindow::BrowseCallBack(
|
||||
DNSServiceRef inRef,
|
||||
DNSServiceFlags inFlags,
|
||||
uint32_t inInterfaceIndex,
|
||||
DNSServiceErrorType inErrorCode,
|
||||
const char * inName,
|
||||
const char * inType,
|
||||
const char * inDomain,
|
||||
void * inContext )
|
||||
{
|
||||
ServiceHandlerEntry * obj;
|
||||
ServiceInfo * service;
|
||||
OSStatus err;
|
||||
|
||||
DEBUG_UNUSED( inRef );
|
||||
|
||||
obj = NULL;
|
||||
service = NULL;
|
||||
|
||||
require_noerr( inErrorCode, exit );
|
||||
obj = reinterpret_cast < ServiceHandlerEntry * > ( inContext );
|
||||
check( obj );
|
||||
check( obj->obj );
|
||||
|
||||
//
|
||||
// set the UI to hold off on updates
|
||||
//
|
||||
obj->obj->mTree.SetRedraw(FALSE);
|
||||
|
||||
try
|
||||
{
|
||||
service = new ServiceInfo;
|
||||
require_action( service, exit, err = kNoMemoryErr );
|
||||
|
||||
err = UTF8StringToStringObject( inName, service->displayName );
|
||||
check_noerr( err );
|
||||
|
||||
service->name = _strdup( inName );
|
||||
require_action( service->name, exit, err = kNoMemoryErr );
|
||||
|
||||
service->type = _strdup( inType );
|
||||
require_action( service->type, exit, err = kNoMemoryErr );
|
||||
|
||||
service->domain = _strdup( inDomain );
|
||||
require_action( service->domain, exit, err = kNoMemoryErr );
|
||||
|
||||
service->ifi = inInterfaceIndex;
|
||||
service->handler = obj;
|
||||
|
||||
service->refs = 1;
|
||||
|
||||
if (inFlags & kDNSServiceFlagsAdd) obj->obj->OnServiceAdd (service);
|
||||
else obj->obj->OnServiceRemove(service);
|
||||
|
||||
service = NULL;
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
dlog( kDebugLevelError, "BrowseCallBack: exception thrown\n" );
|
||||
}
|
||||
|
||||
exit:
|
||||
//
|
||||
// If no more coming, then update UI
|
||||
//
|
||||
if (obj && obj->obj && ((inFlags & kDNSServiceFlagsMoreComing) == 0))
|
||||
{
|
||||
obj->obj->mTree.SetRedraw(TRUE);
|
||||
obj->obj->mTree.Invalidate();
|
||||
}
|
||||
|
||||
if( service )
|
||||
{
|
||||
delete service;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnServiceAdd
|
||||
//===========================================================================================================================
|
||||
|
||||
LONG ExplorerBarWindow::OnServiceAdd( ServiceInfo * service )
|
||||
{
|
||||
ServiceHandlerEntry * handler;
|
||||
int cmp;
|
||||
int index;
|
||||
|
||||
|
||||
check( service );
|
||||
handler = service->handler;
|
||||
check( handler );
|
||||
|
||||
cmp = FindServiceArrayIndex( handler->array, *service, index );
|
||||
if( cmp == 0 )
|
||||
{
|
||||
// Found a match so update the item. The index is index + 1 so subtract 1.
|
||||
|
||||
index -= 1;
|
||||
check( index < handler->array.GetSize() );
|
||||
|
||||
handler->array[ index ]->refs++;
|
||||
|
||||
delete service;
|
||||
}
|
||||
else
|
||||
{
|
||||
HTREEITEM afterItem;
|
||||
|
||||
// Insert the new item in sorted order.
|
||||
|
||||
afterItem = ( index > 0 ) ? handler->array[ index - 1 ]->item : m_about;
|
||||
handler->array.InsertAt( index, service );
|
||||
service->item = mTree.InsertItem( service->displayName, 0, 0, NULL, afterItem );
|
||||
mTree.SetItemData( service->item, (DWORD_PTR) service );
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnServiceRemove
|
||||
//===========================================================================================================================
|
||||
|
||||
LONG ExplorerBarWindow::OnServiceRemove( ServiceInfo * service )
|
||||
{
|
||||
ServiceHandlerEntry * handler;
|
||||
int cmp;
|
||||
int index;
|
||||
|
||||
|
||||
check( service );
|
||||
handler = service->handler;
|
||||
check( handler );
|
||||
|
||||
// Search to see if we know about this service instance. If so, remove it from the list.
|
||||
|
||||
cmp = FindServiceArrayIndex( handler->array, *service, index );
|
||||
check( cmp == 0 );
|
||||
|
||||
if( cmp == 0 )
|
||||
{
|
||||
// Possibly found a match remove the item. The index
|
||||
// is index + 1 so subtract 1.
|
||||
index -= 1;
|
||||
check( index < handler->array.GetSize() );
|
||||
|
||||
if ( --handler->array[ index ]->refs == 0 )
|
||||
{
|
||||
mTree.DeleteItem( handler->array[ index ]->item );
|
||||
delete handler->array[ index ];
|
||||
handler->array.RemoveAt( index );
|
||||
}
|
||||
}
|
||||
|
||||
delete service;
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// StartResolve
|
||||
//===========================================================================================================================
|
||||
|
||||
OSStatus ExplorerBarWindow::StartResolve( ServiceInfo *inService )
|
||||
{
|
||||
OSStatus err;
|
||||
|
||||
check( inService );
|
||||
|
||||
// Stop any current resolve that may be in progress.
|
||||
|
||||
StopResolve();
|
||||
|
||||
// Resolve the service.
|
||||
err = DNSServiceResolve( &mResolveServiceRef, 0, 0,
|
||||
inService->name, inService->type, inService->domain, (DNSServiceResolveReply) ResolveCallBack, inService->handler );
|
||||
require_noerr( err, exit );
|
||||
|
||||
err = WSAAsyncSelect((SOCKET) DNSServiceRefSockFD(mResolveServiceRef), m_hWnd, WM_PRIVATE_SERVICE_EVENT, FD_READ|FD_CLOSE);
|
||||
require_noerr( err, exit );
|
||||
|
||||
m_serviceRefs.push_back(mResolveServiceRef);
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// StopResolve
|
||||
//===========================================================================================================================
|
||||
|
||||
void ExplorerBarWindow::StopResolve( void )
|
||||
{
|
||||
if( mResolveServiceRef )
|
||||
{
|
||||
Stop( mResolveServiceRef );
|
||||
mResolveServiceRef = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// ResolveCallBack
|
||||
//===========================================================================================================================
|
||||
|
||||
void DNSSD_API
|
||||
ExplorerBarWindow::ResolveCallBack(
|
||||
DNSServiceRef inRef,
|
||||
DNSServiceFlags inFlags,
|
||||
uint32_t inInterfaceIndex,
|
||||
DNSServiceErrorType inErrorCode,
|
||||
const char * inFullName,
|
||||
const char * inHostName,
|
||||
uint16_t inPort,
|
||||
uint16_t inTXTSize,
|
||||
const char * inTXT,
|
||||
void * inContext )
|
||||
{
|
||||
ExplorerBarWindow * obj;
|
||||
ServiceHandlerEntry * handler;
|
||||
OSStatus err;
|
||||
|
||||
DEBUG_UNUSED( inRef );
|
||||
DEBUG_UNUSED( inFlags );
|
||||
DEBUG_UNUSED( inErrorCode );
|
||||
DEBUG_UNUSED( inFullName );
|
||||
|
||||
require_noerr( inErrorCode, exit );
|
||||
handler = (ServiceHandlerEntry *) inContext;
|
||||
check( handler );
|
||||
obj = handler->obj;
|
||||
check( obj );
|
||||
|
||||
try
|
||||
{
|
||||
ResolveInfo * resolve;
|
||||
int idx;
|
||||
|
||||
dlog( kDebugLevelNotice, "resolved %s on ifi %d to %s\n", inFullName, inInterfaceIndex, inHostName );
|
||||
|
||||
// Stop resolving after the first good result.
|
||||
|
||||
obj->StopResolve();
|
||||
|
||||
// Post a message to the main thread so it can handle it since MFC is not thread safe.
|
||||
|
||||
resolve = new ResolveInfo;
|
||||
require_action( resolve, exit, err = kNoMemoryErr );
|
||||
|
||||
UTF8StringToStringObject( inHostName, resolve->host );
|
||||
|
||||
// rdar://problem/3841564
|
||||
//
|
||||
// strip trailing dot from hostname because some flavors of Windows
|
||||
// have trouble parsing it.
|
||||
|
||||
idx = resolve->host.ReverseFind('.');
|
||||
|
||||
if ((idx > 1) && ((resolve->host.GetLength() - 1) == idx))
|
||||
{
|
||||
resolve->host.Delete(idx, 1);
|
||||
}
|
||||
|
||||
resolve->port = ntohs( inPort );
|
||||
resolve->ifi = inInterfaceIndex;
|
||||
resolve->handler = handler;
|
||||
|
||||
err = resolve->txt.SetData( inTXT, inTXTSize );
|
||||
check_noerr( err );
|
||||
|
||||
obj->OnResolve(resolve);
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
dlog( kDebugLevelError, "ResolveCallBack: exception thrown\n" );
|
||||
}
|
||||
|
||||
exit:
|
||||
return;
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnResolve
|
||||
//===========================================================================================================================
|
||||
|
||||
LONG ExplorerBarWindow::OnResolve( ResolveInfo * resolve )
|
||||
{
|
||||
CString url;
|
||||
uint8_t * path;
|
||||
uint8_t pathSize;
|
||||
char * pathPrefix;
|
||||
CString username;
|
||||
CString password;
|
||||
|
||||
|
||||
check( resolve );
|
||||
|
||||
// Get login info if needed.
|
||||
|
||||
if( resolve->handler->needsLogin )
|
||||
{
|
||||
LoginDialog dialog;
|
||||
|
||||
if( !dialog.GetLogin( username, password ) )
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
// If the HTTP TXT record is a "path=" entry, use it as the resource path. Otherwise, use "/".
|
||||
|
||||
pathPrefix = "";
|
||||
if( strcmp( resolve->handler->type, "_http._tcp" ) == 0 )
|
||||
{
|
||||
uint8_t * txtData;
|
||||
uint16_t txtLen;
|
||||
|
||||
resolve->txt.GetData( &txtData, &txtLen );
|
||||
|
||||
path = (uint8_t*) TXTRecordGetValuePtr(txtLen, txtData, kTXTRecordKeyPath, &pathSize);
|
||||
|
||||
if (path == NULL)
|
||||
{
|
||||
path = (uint8_t*) "";
|
||||
pathSize = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
path = (uint8_t *) "";
|
||||
pathSize = 1;
|
||||
}
|
||||
|
||||
// Build the URL in the following format:
|
||||
//
|
||||
// <urlScheme>[<username>[:<password>]@]<name/ip>[<path>]
|
||||
|
||||
url.AppendFormat( TEXT( "%S" ), resolve->handler->urlScheme ); // URL Scheme
|
||||
if( username.GetLength() > 0 )
|
||||
{
|
||||
url.AppendFormat( TEXT( "%s" ), username ); // Username
|
||||
if( password.GetLength() > 0 )
|
||||
{
|
||||
url.AppendFormat( TEXT( ":%s" ), password ); // Password
|
||||
}
|
||||
url.AppendFormat( TEXT( "@" ) );
|
||||
}
|
||||
|
||||
url += resolve->host; // Host
|
||||
url.AppendFormat( TEXT( ":%d" ), resolve->port ); // :Port
|
||||
url.AppendFormat( TEXT( "%S" ), pathPrefix ); // Path Prefix ("/" or empty).
|
||||
url.AppendFormat( TEXT( "%.*S" ), (int) pathSize, (char *) path ); // Path (possibly empty).
|
||||
|
||||
// Tell Internet Explorer to go to the URL.
|
||||
|
||||
check( mOwner );
|
||||
mOwner->GoToURL( url );
|
||||
|
||||
exit:
|
||||
delete resolve;
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// Stop
|
||||
//===========================================================================================================================
|
||||
void ExplorerBarWindow::Stop( DNSServiceRef ref )
|
||||
{
|
||||
m_serviceRefs.remove( ref );
|
||||
|
||||
WSAAsyncSelect(DNSServiceRefSockFD( ref ), m_hWnd, WM_PRIVATE_SERVICE_EVENT, 0);
|
||||
|
||||
DNSServiceRefDeallocate( ref );
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// FindServiceArrayIndex
|
||||
//===========================================================================================================================
|
||||
|
||||
DEBUG_LOCAL int FindServiceArrayIndex( const ServiceInfoArray &inArray, const ServiceInfo &inService, int &outIndex )
|
||||
{
|
||||
int result;
|
||||
int lo;
|
||||
int hi;
|
||||
int mid;
|
||||
|
||||
result = -1;
|
||||
mid = 0;
|
||||
lo = 0;
|
||||
hi = (int)( inArray.GetSize() - 1 );
|
||||
while( lo <= hi )
|
||||
{
|
||||
mid = ( lo + hi ) / 2;
|
||||
result = inService.displayName.CompareNoCase( inArray[ mid ]->displayName );
|
||||
#if 0
|
||||
if( result == 0 )
|
||||
{
|
||||
result = ( (int) inService.ifi ) - ( (int) inArray[ mid ]->ifi );
|
||||
}
|
||||
#endif
|
||||
if( result == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if( result < 0 )
|
||||
{
|
||||
hi = mid - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lo = mid + 1;
|
||||
}
|
||||
}
|
||||
if( result == 0 )
|
||||
{
|
||||
mid += 1; // Bump index so new item is inserted after matching item.
|
||||
}
|
||||
else if( result > 0 )
|
||||
{
|
||||
mid += 1;
|
||||
}
|
||||
outIndex = mid;
|
||||
return( result );
|
||||
}
|
264
mDNSResponder/Clients/ExplorerPlugin/ExplorerBarWindow.h
Normal file
@ -0,0 +1,264 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 __EXPLORER_BAR_WINDOW__
|
||||
#define __EXPLORER_BAR_WINDOW__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "afxtempl.h"
|
||||
|
||||
#include "dns_sd.h"
|
||||
#include <list>
|
||||
|
||||
//===========================================================================================================================
|
||||
// Structures
|
||||
//===========================================================================================================================
|
||||
|
||||
// Forward Declarations
|
||||
|
||||
struct ServiceHandlerEntry;
|
||||
class ExplorerBarWindow;
|
||||
|
||||
// ServiceInfo
|
||||
|
||||
struct ServiceInfo
|
||||
{
|
||||
CString displayName;
|
||||
char * name;
|
||||
char * type;
|
||||
char * domain;
|
||||
uint32_t ifi;
|
||||
HTREEITEM item;
|
||||
ServiceHandlerEntry * handler;
|
||||
DWORD refs;
|
||||
|
||||
ServiceInfo( void )
|
||||
{
|
||||
item = NULL;
|
||||
type = NULL;
|
||||
domain = NULL;
|
||||
handler = NULL;
|
||||
}
|
||||
|
||||
~ServiceInfo( void )
|
||||
{
|
||||
if( name )
|
||||
{
|
||||
free( name );
|
||||
}
|
||||
if( type )
|
||||
{
|
||||
free( type );
|
||||
}
|
||||
if( domain )
|
||||
{
|
||||
free( domain );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
typedef CArray < ServiceInfo *, ServiceInfo * > ServiceInfoArray;
|
||||
|
||||
// TextRecord
|
||||
|
||||
struct TextRecord
|
||||
{
|
||||
uint8_t * mData;
|
||||
uint16_t mSize;
|
||||
|
||||
TextRecord( void )
|
||||
{
|
||||
mData = NULL;
|
||||
mSize = 0;
|
||||
}
|
||||
|
||||
~TextRecord( void )
|
||||
{
|
||||
if( mData )
|
||||
{
|
||||
free( mData );
|
||||
}
|
||||
}
|
||||
|
||||
void GetData( void *outData, uint16_t *outSize )
|
||||
{
|
||||
if( outData )
|
||||
{
|
||||
*( (void **) outData ) = mData;
|
||||
}
|
||||
if( outSize )
|
||||
{
|
||||
*outSize = mSize;
|
||||
}
|
||||
}
|
||||
|
||||
OSStatus SetData( const void *inData, uint16_t inSize )
|
||||
{
|
||||
OSStatus err;
|
||||
uint8_t * newData;
|
||||
|
||||
newData = (uint8_t *) malloc( inSize );
|
||||
require_action( newData, exit, err = kNoMemoryErr );
|
||||
memcpy( newData, inData, inSize );
|
||||
|
||||
if( mData )
|
||||
{
|
||||
free( mData );
|
||||
}
|
||||
mData = newData;
|
||||
mSize = inSize;
|
||||
err = kNoErr;
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
};
|
||||
|
||||
// ResolveInfo
|
||||
|
||||
struct ResolveInfo
|
||||
{
|
||||
CString host;
|
||||
uint16_t port;
|
||||
uint32_t ifi;
|
||||
TextRecord txt;
|
||||
ServiceHandlerEntry * handler;
|
||||
};
|
||||
|
||||
// ServiceHandlerEntry
|
||||
|
||||
struct ServiceHandlerEntry
|
||||
{
|
||||
const char * type;
|
||||
const char * urlScheme;
|
||||
DNSServiceRef ref;
|
||||
ServiceInfoArray array;
|
||||
ExplorerBarWindow * obj;
|
||||
bool needsLogin;
|
||||
|
||||
ServiceHandlerEntry( void )
|
||||
{
|
||||
type = NULL;
|
||||
urlScheme = NULL;
|
||||
ref = NULL;
|
||||
obj = NULL;
|
||||
needsLogin = false;
|
||||
}
|
||||
|
||||
~ServiceHandlerEntry( void )
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
|
||||
n = (int) array.GetSize();
|
||||
for( i = 0; i < n; ++i )
|
||||
{
|
||||
delete array[ i ];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
typedef CArray < ServiceHandlerEntry *, ServiceHandlerEntry * > ServiceHandlerArray;
|
||||
|
||||
//===========================================================================================================================
|
||||
// ExplorerBarWindow
|
||||
//===========================================================================================================================
|
||||
|
||||
class ExplorerBar; // Forward Declaration
|
||||
|
||||
class ExplorerBarWindow : public CWnd
|
||||
{
|
||||
protected:
|
||||
|
||||
ExplorerBar * mOwner;
|
||||
CTreeCtrl mTree;
|
||||
|
||||
ServiceHandlerArray mServiceHandlers;
|
||||
DNSServiceRef mResolveServiceRef;
|
||||
|
||||
public:
|
||||
|
||||
ExplorerBarWindow( void );
|
||||
virtual ~ExplorerBarWindow( void );
|
||||
|
||||
protected:
|
||||
|
||||
// General
|
||||
|
||||
afx_msg int OnCreate( LPCREATESTRUCT inCreateStruct );
|
||||
afx_msg void OnDestroy( void );
|
||||
afx_msg void OnSize( UINT inType, int inX, int inY );
|
||||
afx_msg void OnDoubleClick( NMHDR *inNMHDR, LRESULT *outResult );
|
||||
afx_msg LRESULT OnServiceEvent( WPARAM inWParam, LPARAM inLParam );
|
||||
|
||||
// Browsing
|
||||
|
||||
static void DNSSD_API
|
||||
BrowseCallBack(
|
||||
DNSServiceRef inRef,
|
||||
DNSServiceFlags inFlags,
|
||||
uint32_t inInterfaceIndex,
|
||||
DNSServiceErrorType inErrorCode,
|
||||
const char * inName,
|
||||
const char * inType,
|
||||
const char * inDomain,
|
||||
void * inContext );
|
||||
LONG OnServiceAdd( ServiceInfo * service );
|
||||
LONG OnServiceRemove( ServiceInfo * service );
|
||||
|
||||
// Resolving
|
||||
|
||||
OSStatus StartResolve( ServiceInfo *inService );
|
||||
void StopResolve( void );
|
||||
|
||||
|
||||
void Stop( DNSServiceRef ref );
|
||||
|
||||
|
||||
static void DNSSD_API
|
||||
ResolveCallBack(
|
||||
DNSServiceRef inRef,
|
||||
DNSServiceFlags inFlags,
|
||||
uint32_t inInterfaceIndex,
|
||||
DNSServiceErrorType inErrorCode,
|
||||
const char * inFullName,
|
||||
const char * inHostName,
|
||||
uint16_t inPort,
|
||||
uint16_t inTXTSize,
|
||||
const char * inTXT,
|
||||
void * inContext );
|
||||
LONG OnResolve( ResolveInfo * resolve );
|
||||
|
||||
// Accessors
|
||||
|
||||
public:
|
||||
|
||||
ExplorerBar * GetOwner( void ) const { return( mOwner ); }
|
||||
void SetOwner( ExplorerBar *inOwner ) { mOwner = inOwner; }
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
private:
|
||||
|
||||
typedef std::list< DNSServiceRef > ServiceRefList;
|
||||
|
||||
HTREEITEM m_about;
|
||||
ServiceRefList m_serviceRefs;
|
||||
CImageList m_imageList;
|
||||
};
|
||||
|
||||
#endif // __EXPLORER_BAR_WINDOW__
|
600
mDNSResponder/Clients/ExplorerPlugin/ExplorerPlugin.cpp
Normal file
@ -0,0 +1,600 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 "StdAfx.h"
|
||||
|
||||
// The following 2 includes have to be in this order and INITGUID must be defined here, before including the file
|
||||
// that specifies the GUID(s), and nowhere else. The reason for this is that initguid.h doesn't provide separate
|
||||
// define and declare macros for GUIDs so you have to #define INITGUID in the single file where you want to define
|
||||
// your GUID then in all the other files that just need the GUID declared, INITGUID must not be defined.
|
||||
|
||||
#define INITGUID
|
||||
#include <initguid.h>
|
||||
#include "ExplorerPlugin.h"
|
||||
|
||||
#include <comcat.h>
|
||||
#include <Shlwapi.h>
|
||||
|
||||
#include "CommonServices.h"
|
||||
#include "DebugServices.h"
|
||||
|
||||
#include "ClassFactory.h"
|
||||
#include "Resource.h"
|
||||
|
||||
#include "loclibrary.h"
|
||||
|
||||
// MFC Debugging
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#pragma mark == Prototypes ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// Prototypes
|
||||
//===========================================================================================================================
|
||||
|
||||
// Utilities
|
||||
|
||||
DEBUG_LOCAL OSStatus RegisterServer( HINSTANCE inInstance, CLSID inCLSID, LPCTSTR inName );
|
||||
DEBUG_LOCAL OSStatus RegisterCOMCategory( CLSID inCLSID, CATID inCategoryID, BOOL inRegister );
|
||||
DEBUG_LOCAL OSStatus UnregisterServer( CLSID inCLSID );
|
||||
DEBUG_LOCAL OSStatus MyRegDeleteKey( HKEY hKeyRoot, LPTSTR lpSubKey );
|
||||
|
||||
// Stash away pointers to our resource DLLs
|
||||
|
||||
static HINSTANCE g_nonLocalizedResources = NULL;
|
||||
static CString g_nonLocalizedResourcesName;
|
||||
static HINSTANCE g_localizedResources = NULL;
|
||||
|
||||
HINSTANCE
|
||||
GetNonLocalizedResources()
|
||||
{
|
||||
return g_nonLocalizedResources;
|
||||
}
|
||||
|
||||
HINSTANCE
|
||||
GetLocalizedResources()
|
||||
{
|
||||
return g_localizedResources;
|
||||
}
|
||||
|
||||
// This is the class GUID for an undocumented hook into IE that will allow us to register
|
||||
// and have IE notice our new ExplorerBar without rebooting.
|
||||
// {8C7461EF-2B13-11d2-BE35-3078302C2030}
|
||||
|
||||
DEFINE_GUID(CLSID_CompCatCacheDaemon,
|
||||
0x8C7461EF, 0x2b13, 0x11d2, 0xbe, 0x35, 0x30, 0x78, 0x30, 0x2c, 0x20, 0x30);
|
||||
|
||||
|
||||
#if 0
|
||||
#pragma mark == Globals ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// Globals
|
||||
//===========================================================================================================================
|
||||
|
||||
HINSTANCE gInstance = NULL;
|
||||
int gDLLRefCount = 0;
|
||||
CExplorerPluginApp gApp;
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == DLL Exports ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// CExplorerPluginApp::CExplorerPluginApp
|
||||
//===========================================================================================================================
|
||||
|
||||
IMPLEMENT_DYNAMIC(CExplorerPluginApp, CWinApp);
|
||||
|
||||
CExplorerPluginApp::CExplorerPluginApp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// CExplorerPluginApp::~CExplorerPluginApp
|
||||
//===========================================================================================================================
|
||||
|
||||
CExplorerPluginApp::~CExplorerPluginApp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// CExplorerPluginApp::InitInstance
|
||||
//===========================================================================================================================
|
||||
|
||||
BOOL
|
||||
CExplorerPluginApp::InitInstance()
|
||||
{
|
||||
wchar_t resource[MAX_PATH];
|
||||
OSStatus err;
|
||||
int res;
|
||||
HINSTANCE inInstance;
|
||||
|
||||
inInstance = AfxGetInstanceHandle();
|
||||
gInstance = inInstance;
|
||||
|
||||
debug_initialize( kDebugOutputTypeWindowsEventLog, "DNSServices Bar", inInstance );
|
||||
debug_set_property( kDebugPropertyTagPrintLevel, kDebugLevelTrace );
|
||||
dlog( kDebugLevelTrace, "\nCCPApp::InitInstance\n" );
|
||||
|
||||
res = PathForResource( inInstance, L"ExplorerPluginResources.dll", resource, MAX_PATH );
|
||||
|
||||
err = translate_errno( res != 0, kUnknownErr, kUnknownErr );
|
||||
require_noerr( err, exit );
|
||||
|
||||
g_nonLocalizedResources = LoadLibrary( resource );
|
||||
translate_errno( g_nonLocalizedResources, GetLastError(), kUnknownErr );
|
||||
require_noerr( err, exit );
|
||||
|
||||
g_nonLocalizedResourcesName = resource;
|
||||
|
||||
res = PathForResource( inInstance, L"ExplorerPluginLocalized.dll", resource, MAX_PATH );
|
||||
err = translate_errno( res != 0, kUnknownErr, kUnknownErr );
|
||||
require_noerr( err, exit );
|
||||
|
||||
g_localizedResources = LoadLibrary( resource );
|
||||
translate_errno( g_localizedResources, GetLastError(), kUnknownErr );
|
||||
require_noerr( err, exit );
|
||||
|
||||
AfxSetResourceHandle( g_localizedResources );
|
||||
|
||||
exit:
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// CExplorerPluginApp::ExitInstance
|
||||
//===========================================================================================================================
|
||||
|
||||
int
|
||||
CExplorerPluginApp::ExitInstance()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// DllCanUnloadNow
|
||||
//===========================================================================================================================
|
||||
|
||||
STDAPI DllCanUnloadNow( void )
|
||||
{
|
||||
dlog( kDebugLevelTrace, "DllCanUnloadNow (refCount=%d)\n", gDLLRefCount );
|
||||
|
||||
return( gDLLRefCount == 0 );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// DllGetClassObject
|
||||
//===========================================================================================================================
|
||||
|
||||
STDAPI DllGetClassObject( REFCLSID inCLSID, REFIID inIID, LPVOID *outResult )
|
||||
{
|
||||
HRESULT err;
|
||||
BOOL ok;
|
||||
ClassFactory * factory;
|
||||
|
||||
dlog( kDebugLevelTrace, "DllGetClassObject\n" );
|
||||
|
||||
*outResult = NULL;
|
||||
|
||||
// Check if the class ID is supported.
|
||||
|
||||
ok = IsEqualCLSID( inCLSID, CLSID_ExplorerBar );
|
||||
require_action_quiet( ok, exit, err = CLASS_E_CLASSNOTAVAILABLE );
|
||||
|
||||
// Create the ClassFactory object.
|
||||
|
||||
factory = NULL;
|
||||
try
|
||||
{
|
||||
factory = new ClassFactory( inCLSID );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
// Do not let exception escape.
|
||||
}
|
||||
require_action( factory, exit, err = E_OUTOFMEMORY );
|
||||
|
||||
// Query for the specified interface. Release the factory since QueryInterface retains it.
|
||||
|
||||
err = factory->QueryInterface( inIID, outResult );
|
||||
factory->Release();
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// DllRegisterServer
|
||||
//===========================================================================================================================
|
||||
|
||||
STDAPI DllRegisterServer( void )
|
||||
{
|
||||
IRunnableTask * pTask = NULL;
|
||||
HRESULT err;
|
||||
BOOL ok;
|
||||
CString s;
|
||||
|
||||
dlog( kDebugLevelTrace, "DllRegisterServer\n" );
|
||||
|
||||
ok = s.LoadString( IDS_NAME );
|
||||
require_action( ok, exit, err = E_UNEXPECTED );
|
||||
|
||||
err = RegisterServer( gInstance, CLSID_ExplorerBar, s );
|
||||
require_noerr( err, exit );
|
||||
|
||||
err = RegisterCOMCategory( CLSID_ExplorerBar, CATID_InfoBand, TRUE );
|
||||
require_noerr( err, exit );
|
||||
|
||||
// <rdar://problem/4130635> Clear IE cache so it will rebuild the cache when it runs next. This
|
||||
// will allow us to install and not reboot
|
||||
|
||||
err = CoCreateInstance(CLSID_CompCatCacheDaemon, NULL, CLSCTX_INPROC, IID_IRunnableTask, (void**) &pTask);
|
||||
require_noerr( err, exit );
|
||||
|
||||
pTask->Run();
|
||||
pTask->Release();
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// DllUnregisterServer
|
||||
//===========================================================================================================================
|
||||
|
||||
STDAPI DllUnregisterServer( void )
|
||||
{
|
||||
HRESULT err;
|
||||
|
||||
dlog( kDebugLevelTrace, "DllUnregisterServer\n" );
|
||||
|
||||
err = RegisterCOMCategory( CLSID_ExplorerBar, CATID_InfoBand, FALSE );
|
||||
require_noerr( err, exit );
|
||||
|
||||
err = UnregisterServer( CLSID_ExplorerBar );
|
||||
require_noerr( err, exit );
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark == Utilities ==
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// RegisterServer
|
||||
//===========================================================================================================================
|
||||
|
||||
DEBUG_LOCAL OSStatus RegisterServer( HINSTANCE inInstance, CLSID inCLSID, LPCTSTR inName )
|
||||
{
|
||||
typedef struct RegistryBuilder RegistryBuilder;
|
||||
struct RegistryBuilder
|
||||
{
|
||||
HKEY rootKey;
|
||||
LPCTSTR subKey;
|
||||
LPCTSTR valueName;
|
||||
LPCTSTR data;
|
||||
};
|
||||
|
||||
OSStatus err;
|
||||
LPWSTR clsidWideString;
|
||||
TCHAR clsidString[ 64 ];
|
||||
DWORD nChars;
|
||||
size_t n;
|
||||
size_t i;
|
||||
HKEY key;
|
||||
TCHAR keyName[ MAX_PATH ];
|
||||
TCHAR moduleName[ MAX_PATH ] = TEXT( "" );
|
||||
TCHAR data[ MAX_PATH ];
|
||||
RegistryBuilder entries[] =
|
||||
{
|
||||
{ HKEY_CLASSES_ROOT, TEXT( "CLSID\\%s" ), NULL, inName },
|
||||
{ HKEY_CLASSES_ROOT, TEXT( "CLSID\\%s\\InprocServer32" ), NULL, moduleName },
|
||||
{ HKEY_CLASSES_ROOT, TEXT( "CLSID\\%s\\InprocServer32" ), TEXT( "ThreadingModel" ), TEXT( "Apartment" ) }
|
||||
};
|
||||
DWORD size;
|
||||
OSVERSIONINFO versionInfo;
|
||||
|
||||
// Convert the CLSID to a string based on the encoding of this code (ANSI or Unicode).
|
||||
|
||||
err = StringFromIID( inCLSID, &clsidWideString );
|
||||
require_noerr( err, exit );
|
||||
require_action( clsidWideString, exit, err = kNoMemoryErr );
|
||||
|
||||
#ifdef UNICODE
|
||||
lstrcpyn( clsidString, clsidWideString, sizeof_array( clsidString ) );
|
||||
CoTaskMemFree( clsidWideString );
|
||||
#else
|
||||
nChars = WideCharToMultiByte( CP_ACP, 0, clsidWideString, -1, clsidString, sizeof_array( clsidString ), NULL, NULL );
|
||||
err = translate_errno( nChars > 0, (OSStatus) GetLastError(), kUnknownErr );
|
||||
CoTaskMemFree( clsidWideString );
|
||||
require_noerr( err, exit );
|
||||
#endif
|
||||
|
||||
// Register the CLSID entries.
|
||||
|
||||
nChars = GetModuleFileName( inInstance, moduleName, sizeof_array( moduleName ) );
|
||||
err = translate_errno( nChars > 0, (OSStatus) GetLastError(), kUnknownErr );
|
||||
require_noerr( err, exit );
|
||||
|
||||
n = sizeof_array( entries );
|
||||
for( i = 0; i < n; ++i )
|
||||
{
|
||||
wsprintf( keyName, entries[ i ].subKey, clsidString );
|
||||
err = RegCreateKeyEx( entries[ i ].rootKey, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &key, NULL );
|
||||
require_noerr( err, exit );
|
||||
|
||||
size = (DWORD)( ( lstrlen( entries[ i ].data ) + 1 ) * sizeof( TCHAR ) );
|
||||
err = RegSetValueEx( key, entries[ i ].valueName, 0, REG_SZ, (LPBYTE) entries[ i ].data, size );
|
||||
RegCloseKey( key );
|
||||
require_noerr( err, exit );
|
||||
}
|
||||
|
||||
// If running on NT, register the extension as approved.
|
||||
|
||||
versionInfo.dwOSVersionInfoSize = sizeof( versionInfo );
|
||||
GetVersionEx( &versionInfo );
|
||||
if( versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
|
||||
{
|
||||
lstrcpyn( keyName, TEXT( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved" ), sizeof_array( keyName ) );
|
||||
err = RegCreateKeyEx( HKEY_LOCAL_MACHINE, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &key, NULL );
|
||||
require_noerr( err, exit );
|
||||
|
||||
lstrcpyn( data, inName, sizeof_array( data ) );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
err = RegSetValueEx( key, clsidString, 0, REG_SZ, (LPBYTE) data, size );
|
||||
RegCloseKey( key );
|
||||
}
|
||||
|
||||
// register toolbar button
|
||||
lstrcpyn( keyName, TEXT( "SOFTWARE\\Microsoft\\Internet Explorer\\Extensions\\{7F9DB11C-E358-4ca6-A83D-ACC663939424}"), sizeof_array( keyName ) );
|
||||
err = RegCreateKeyEx( HKEY_LOCAL_MACHINE, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &key, NULL );
|
||||
require_noerr( err, exit );
|
||||
|
||||
lstrcpyn( data, L"Yes", sizeof_array( data ) );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
RegSetValueEx( key, L"Default Visible", 0, REG_SZ, (LPBYTE) data, size );
|
||||
|
||||
lstrcpyn( data, inName, sizeof_array( data ) );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
RegSetValueEx( key, L"ButtonText", 0, REG_SZ, (LPBYTE) data, size );
|
||||
|
||||
lstrcpyn( data, L"{E0DD6CAB-2D10-11D2-8F1A-0000F87ABD16}", sizeof_array( data ) );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
RegSetValueEx( key, L"CLSID", 0, REG_SZ, (LPBYTE) data, size );
|
||||
|
||||
lstrcpyn( data, clsidString, sizeof_array( data ) );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
RegSetValueEx( key, L"BandCLSID", 0, REG_SZ, (LPBYTE) data, size );
|
||||
|
||||
// check if we're running XP or later
|
||||
if ( ( versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) &&
|
||||
( versionInfo.dwMajorVersion == 5 ) &&
|
||||
( versionInfo.dwMinorVersion >= 1 ) )
|
||||
{
|
||||
wsprintf( data, L"%s,%d", (LPCTSTR) g_nonLocalizedResourcesName, IDI_BUTTON_XP );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
RegSetValueEx( key, L"Icon", 0, REG_SZ, (LPBYTE) data, size);
|
||||
|
||||
wsprintf( data, L"%s,%d", (LPCTSTR) g_nonLocalizedResourcesName, IDI_BUTTON_XP );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
RegSetValueEx( key, L"HotIcon", 0, REG_SZ, (LPBYTE) data, size);
|
||||
}
|
||||
else
|
||||
{
|
||||
wsprintf( data, L"%s,%d", (LPCTSTR) g_nonLocalizedResourcesName, IDI_BUTTON_2K );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
RegSetValueEx( key, L"Icon", 0, REG_SZ, (LPBYTE) data, size);
|
||||
|
||||
wsprintf( data, L"%s,%d", (LPCTSTR) g_nonLocalizedResourcesName, IDI_BUTTON_2K );
|
||||
size = (DWORD)( ( lstrlen( data ) + 1 ) * sizeof( TCHAR ) );
|
||||
RegSetValueEx( key, L"HotIcon", 0, REG_SZ, (LPBYTE) data, size);
|
||||
}
|
||||
|
||||
RegCloseKey( key );
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// RegisterCOMCategory
|
||||
//===========================================================================================================================
|
||||
|
||||
DEBUG_LOCAL OSStatus RegisterCOMCategory( CLSID inCLSID, CATID inCategoryID, BOOL inRegister )
|
||||
{
|
||||
HRESULT err;
|
||||
ICatRegister * cat;
|
||||
|
||||
err = CoInitialize( NULL );
|
||||
require( SUCCEEDED( err ), exit );
|
||||
|
||||
err = CoCreateInstance( CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (LPVOID *) &cat );
|
||||
check( SUCCEEDED( err ) );
|
||||
if( SUCCEEDED( err ) )
|
||||
{
|
||||
if( inRegister )
|
||||
{
|
||||
err = cat->RegisterClassImplCategories( inCLSID, 1, &inCategoryID );
|
||||
check_noerr( err );
|
||||
}
|
||||
else
|
||||
{
|
||||
err = cat->UnRegisterClassImplCategories( inCLSID, 1, &inCategoryID );
|
||||
check_noerr( err );
|
||||
}
|
||||
cat->Release();
|
||||
}
|
||||
CoUninitialize();
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// UnregisterServer
|
||||
//===========================================================================================================================
|
||||
|
||||
DEBUG_LOCAL OSStatus UnregisterServer( CLSID inCLSID )
|
||||
{
|
||||
OSStatus err = 0;
|
||||
LPWSTR clsidWideString;
|
||||
TCHAR clsidString[ 64 ];
|
||||
HKEY key;
|
||||
TCHAR keyName[ MAX_PATH * 2 ];
|
||||
OSVERSIONINFO versionInfo;
|
||||
|
||||
// Convert the CLSID to a string based on the encoding of this code (ANSI or Unicode).
|
||||
|
||||
err = StringFromIID( inCLSID, &clsidWideString );
|
||||
require_noerr( err, exit );
|
||||
require_action( clsidWideString, exit, err = kNoMemoryErr );
|
||||
|
||||
#ifdef UNICODE
|
||||
lstrcpyn( clsidString, clsidWideString, sizeof_array( clsidString ) );
|
||||
CoTaskMemFree( clsidWideString );
|
||||
#else
|
||||
nChars = WideCharToMultiByte( CP_ACP, 0, clsidWideString, -1, clsidString, sizeof_array( clsidString ), NULL, NULL );
|
||||
err = translate_errno( nChars > 0, (OSStatus) GetLastError(), kUnknownErr );
|
||||
CoTaskMemFree( clsidWideString );
|
||||
require_noerr( err, exit );
|
||||
#endif
|
||||
|
||||
wsprintf( keyName, L"CLSID\\%s", clsidString );
|
||||
MyRegDeleteKey( HKEY_CLASSES_ROOT, keyName );
|
||||
|
||||
// If running on NT, de-register the extension as approved.
|
||||
|
||||
versionInfo.dwOSVersionInfoSize = sizeof( versionInfo );
|
||||
GetVersionEx( &versionInfo );
|
||||
if( versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
|
||||
{
|
||||
lstrcpyn( keyName, TEXT( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved" ), sizeof_array( keyName ) );
|
||||
err = RegCreateKeyEx( HKEY_LOCAL_MACHINE, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &key, NULL );
|
||||
require_noerr( err, exit );
|
||||
|
||||
RegDeleteValue( key, clsidString );
|
||||
|
||||
err = RegCloseKey( key );
|
||||
require_noerr( err, exit );
|
||||
}
|
||||
|
||||
// de-register toolbar button
|
||||
|
||||
lstrcpyn( keyName, TEXT( "SOFTWARE\\Microsoft\\Internet Explorer\\Extensions\\{7F9DB11C-E358-4ca6-A83D-ACC663939424}"), sizeof_array( keyName ) );
|
||||
MyRegDeleteKey( HKEY_LOCAL_MACHINE, keyName );
|
||||
|
||||
exit:
|
||||
return( err );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//===========================================================================================================================
|
||||
// MyRegDeleteKey
|
||||
//===========================================================================================================================
|
||||
|
||||
DEBUG_LOCAL OSStatus MyRegDeleteKey( HKEY hKeyRoot, LPTSTR lpSubKey )
|
||||
{
|
||||
LPTSTR lpEnd;
|
||||
OSStatus err;
|
||||
DWORD dwSize;
|
||||
TCHAR szName[MAX_PATH];
|
||||
HKEY hKey;
|
||||
FILETIME ftWrite;
|
||||
|
||||
// First, see if we can delete the key without having to recurse.
|
||||
|
||||
err = RegDeleteKey( hKeyRoot, lpSubKey );
|
||||
|
||||
if ( !err )
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
||||
err = RegOpenKeyEx( hKeyRoot, lpSubKey, 0, KEY_READ, &hKey );
|
||||
require_noerr( err, exit );
|
||||
|
||||
// Check for an ending slash and add one if it is missing.
|
||||
|
||||
lpEnd = lpSubKey + lstrlen(lpSubKey);
|
||||
|
||||
if ( *( lpEnd - 1 ) != TEXT( '\\' ) )
|
||||
{
|
||||
*lpEnd = TEXT('\\');
|
||||
lpEnd++;
|
||||
*lpEnd = TEXT('\0');
|
||||
}
|
||||
|
||||
// Enumerate the keys
|
||||
|
||||
dwSize = MAX_PATH;
|
||||
err = RegEnumKeyEx(hKey, 0, szName, &dwSize, NULL, NULL, NULL, &ftWrite);
|
||||
|
||||
if ( !err )
|
||||
{
|
||||
do
|
||||
{
|
||||
lstrcpy (lpEnd, szName);
|
||||
|
||||
if ( !MyRegDeleteKey( hKeyRoot, lpSubKey ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
dwSize = MAX_PATH;
|
||||
|
||||
err = RegEnumKeyEx( hKey, 0, szName, &dwSize, NULL, NULL, NULL, &ftWrite );
|
||||
|
||||
}
|
||||
while ( !err );
|
||||
}
|
||||
|
||||
lpEnd--;
|
||||
*lpEnd = TEXT('\0');
|
||||
|
||||
RegCloseKey( hKey );
|
||||
|
||||
// Try again to delete the key.
|
||||
|
||||
err = RegDeleteKey(hKeyRoot, lpSubKey);
|
||||
require_noerr( err, exit );
|
||||
|
||||
exit:
|
||||
|
||||
return err;
|
||||
}
|
24
mDNSResponder/Clients/ExplorerPlugin/ExplorerPlugin.def
Normal file
@ -0,0 +1,24 @@
|
||||
;
|
||||
;
|
||||
; Copyright (c) 2003-2004 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.
|
||||
;
|
||||
|
||||
LIBRARY ExplorerPlugin
|
||||
|
||||
EXPORTS
|
||||
DllCanUnloadNow PRIVATE
|
||||
DllGetClassObject PRIVATE
|
||||
DllRegisterServer PRIVATE
|
||||
DllUnregisterServer PRIVATE
|
47
mDNSResponder/Clients/ExplorerPlugin/ExplorerPlugin.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//===========================================================================================================================
|
||||
// Globals
|
||||
//===========================================================================================================================
|
||||
|
||||
// {9999A076-A9E2-4c99-8A2B-632FC9429223}
|
||||
DEFINE_GUID(CLSID_ExplorerBar,
|
||||
0x9999a076, 0xa9e2, 0x4c99, 0x8a, 0x2b, 0x63, 0x2f, 0xc9, 0x42, 0x92, 0x23);
|
||||
|
||||
extern HINSTANCE gInstance;
|
||||
extern int gDLLRefCount;
|
||||
extern HINSTANCE GetNonLocalizedResources();
|
||||
extern HINSTANCE GetLocalizedResources();
|
||||
|
||||
|
||||
class CExplorerPluginApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
|
||||
CExplorerPluginApp();
|
||||
virtual ~CExplorerPluginApp();
|
||||
|
||||
protected:
|
||||
|
||||
virtual BOOL InitInstance();
|
||||
virtual int ExitInstance();
|
||||
|
||||
DECLARE_DYNAMIC(CExplorerPluginApp);
|
||||
};
|
122
mDNSResponder/Clients/ExplorerPlugin/ExplorerPlugin.rc
Normal file
@ -0,0 +1,122 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource_dll.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_dll.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"#include ""WinVersRes.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION MASTER_PROD_VERS
|
||||
PRODUCTVERSION MASTER_PROD_VERS
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#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", "Bonjour Explorer Bar"
|
||||
VALUE "FileVersion", MASTER_PROD_VERS_STR
|
||||
VALUE "InternalName", "ExplorerPlugin.dll"
|
||||
VALUE "LegalCopyright", MASTER_LEGAL_COPYRIGHT
|
||||
VALUE "OriginalFilename", "ExplorerPlugin.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.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
595
mDNSResponder/Clients/ExplorerPlugin/ExplorerPlugin.vcproj
Normal file
@ -0,0 +1,595 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="ExplorerPlugin"
|
||||
ProjectGUID="{BB8AC1B5-6587-4163-BDC6-788B157705CA}"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
Outputs=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\mDNSShared;..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="_USRDLL;WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0501;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 /NXCOMPAT /DYNAMICBASE /SAFESEH"
|
||||
AdditionalDependencies="../../mDNSWindows/DLLStub/$(PlatformName)/$(ConfigurationName)/dnssdStatic.lib uafxcwd.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)/ExplorerPlugin.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="uafxcwd.lib"
|
||||
ModuleDefinitionFile="./$(ProjectName).def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/$(ProjectName).lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="res\ExplorerPlugin.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
Outputs=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\mDNSShared;..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="_USRDLL;WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0501;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/IGNORE:4089 /NXCOMPAT /DYNAMICBASE"
|
||||
AdditionalDependencies="../../mDNSWindows/DLLStub/$(PlatformName)/$(ConfigurationName)/dnssdStatic.lib uafxcwd.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)/ExplorerPlugin.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="uafxcwd.lib"
|
||||
ModuleDefinitionFile="./$(ProjectName).def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/$(ProjectName).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="res\ExplorerPlugin64.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\mDNSShared;..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="_USRDLL;WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="true"
|
||||
EnableFunctionLevelLinking="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 /NXCOMPAT /DYNAMICBASE /SAFESEH"
|
||||
AdditionalDependencies="../../mDNSWindows/DLLStub/$(PlatformName)/$(ConfigurationName)/dnssdStatic.lib ws2_32.lib uafxcw.lib"
|
||||
OutputFile="$(OutDir)/$(ProjectName).dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="uafxcw.lib"
|
||||
ModuleDefinitionFile="./$(ProjectName).def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(IntDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
ImportLibrary="$(IntDir)/$(ProjectName).lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="res\ExplorerPlugin.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not "%RC_XBS%" == "YES" goto END
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)"
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)"
:END
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\mDNSShared;..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="_USRDLL;WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="true"
|
||||
EnableFunctionLevelLinking="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/IGNORE:4089 /NXCOMPAT /DYNAMICBASE"
|
||||
AdditionalDependencies="../../mDNSWindows/DLLStub/$(PlatformName)/$(ConfigurationName)/dnssdStatic.lib ws2_32.lib uafxcw.lib"
|
||||
OutputFile="$(OutDir)/$(ProjectName).dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="uafxcw.lib"
|
||||
ModuleDefinitionFile="./$(ProjectName).def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(IntDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
ImportLibrary="$(IntDir)/$(ProjectName).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="res\ExplorerPlugin64.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not "%RC_XBS%" == "YES" goto END
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)"
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)"
:END
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Support"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\mDNSShared\CommonServices.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mDNSShared\DebugServices.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mDNSShared\DebugServices.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mDNSWindows\isocode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mDNSWindows\loclibrary.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mDNSWindows\loclibrary.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mDNSWindows\WinServices.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mDNSWindows\WinServices.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
>
|
||||
<File
|
||||
RelativePath="About.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ClassFactory.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ExplorerBar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ExplorerBarWindow.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ExplorerPlugin.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ExplorerPlugin.def"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="LoginDialog.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\About.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ClassFactory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ExplorerBar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ExplorerBarWindow.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ExplorerPlugin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="LoginDialog.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="resource_dll.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest"
|
||||
>
|
||||
<File
|
||||
RelativePath="ExplorerPlugin.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="ExplorerPlugin.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
402
mDNSResponder/Clients/ExplorerPlugin/ExplorerPlugin.vcxproj
Executable file
@ -0,0 +1,402 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|x64">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{BB8AC1B5-6587-4163-BDC6-788B157705CA}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Template|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Template|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
<Command>
|
||||
</Command>
|
||||
<Outputs>%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSShared;..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_USRDLL;WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0501;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc80.pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 /NXCOMPAT /DYNAMICBASE /SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>../../mDNSWindows/DLLStub/$(Platform)/$(Configuration)/dnssdStatic.lib;uafxcwd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)ExplorerPlugin.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>uafxcwd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>./$(ProjectName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<ImportLibrary>$(OutDir)$(ProjectName).lib</ImportLibrary>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>res\ExplorerPlugin.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
<Command>
|
||||
</Command>
|
||||
<Outputs>%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSShared;..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_USRDLL;WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0501;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc80.pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/IGNORE:4089 /NXCOMPAT /DYNAMICBASE %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>../../mDNSWindows/DLLStub/$(Platform)/$(Configuration)/dnssdStatic.lib;uafxcwd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)ExplorerPlugin.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>uafxcwd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>./$(ProjectName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<ImportLibrary>$(OutDir)$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>res\ExplorerPlugin64.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSShared;..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_USRDLL;WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc80.pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 /NXCOMPAT /DYNAMICBASE /SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>../../mDNSWindows/DLLStub/$(Platform)/$(Configuration)/dnssdStatic.lib;ws2_32.lib;uafxcw.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>uafxcw.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>./$(ProjectName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>
|
||||
</OptimizeReferences>
|
||||
<EnableCOMDATFolding>
|
||||
</EnableCOMDATFolding>
|
||||
<ImportLibrary>$(IntDir)$(ProjectName).lib</ImportLibrary>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>res\ExplorerPlugin.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PostBuildEvent>
|
||||
<Command>if not "%RC_XBS%" == "YES" goto END
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)"
|
||||
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)"
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSShared;..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_USRDLL;WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc80.pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/IGNORE:4089 /NXCOMPAT /DYNAMICBASE %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>../../mDNSWindows/DLLStub/$(Platform)/$(Configuration)/dnssdStatic.lib;ws2_32.lib;uafxcw.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>uafxcw.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>./$(ProjectName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>
|
||||
</OptimizeReferences>
|
||||
<EnableCOMDATFolding>
|
||||
</EnableCOMDATFolding>
|
||||
<ImportLibrary>$(IntDir)$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>res\ExplorerPlugin64.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PostBuildEvent>
|
||||
<Command>if not "%RC_XBS%" == "YES" goto END
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)"
|
||||
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)"
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\mDNSShared\CommonServices.h" />
|
||||
<ClInclude Include="..\..\mDNSShared\DebugServices.h" />
|
||||
<ClInclude Include="..\..\mDNSWindows\isocode.h" />
|
||||
<ClInclude Include="..\..\mDNSWindows\loclibrary.h" />
|
||||
<ClInclude Include="..\..\mDNSWindows\WinServices.h" />
|
||||
<ClInclude Include="About.h" />
|
||||
<ClInclude Include="ClassFactory.h" />
|
||||
<ClInclude Include="ExplorerBar.h" />
|
||||
<ClInclude Include="ExplorerBarWindow.h" />
|
||||
<ClInclude Include="ExplorerPlugin.h" />
|
||||
<ClInclude Include="LoginDialog.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="resource_dll.h" />
|
||||
<ClInclude Include="StdAfx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\mDNSShared\DebugServices.c" />
|
||||
<ClCompile Include="..\..\mDNSWindows\loclibrary.c" />
|
||||
<ClCompile Include="..\..\mDNSWindows\WinServices.cpp" />
|
||||
<ClCompile Include="About.cpp" />
|
||||
<ClCompile Include="ClassFactory.cpp" />
|
||||
<ClCompile Include="ExplorerBar.cpp" />
|
||||
<ClCompile Include="ExplorerBarWindow.cpp" />
|
||||
<ClCompile Include="ExplorerPlugin.cpp" />
|
||||
<ClCompile Include="LoginDialog.cpp" />
|
||||
<ClCompile Include="StdAfx.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ExplorerPlugin.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ExplorerPlugin.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\mDNSWindows\DLLStub\DLLStub.vcxproj">
|
||||
<Project>{3a2b6325-3053-4236-84bd-aa9be2e323e5}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties RESOURCE_FILE="ExplorerPlugin.rc" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
106
mDNSResponder/Clients/ExplorerPlugin/ExplorerPlugin.vcxproj.filters
Executable file
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Support">
|
||||
<UniqueIdentifier>{b3978812-899a-4e8b-9f75-9458141da3b4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{62896a08-c5fd-4a48-8f8b-33f3fc2f8b1f}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{8aded36a-5c99-4074-8892-31cb394d0eed}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{31823db1-cc70-4c1b-990d-ad0e8f840b66}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\mDNSShared\CommonServices.h">
|
||||
<Filter>Support</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\mDNSShared\DebugServices.h">
|
||||
<Filter>Support</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\mDNSWindows\isocode.h">
|
||||
<Filter>Support</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\mDNSWindows\loclibrary.h">
|
||||
<Filter>Support</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\mDNSWindows\WinServices.h">
|
||||
<Filter>Support</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="About.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ClassFactory.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ExplorerBar.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ExplorerBarWindow.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ExplorerPlugin.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LoginDialog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource_dll.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="StdAfx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\mDNSShared\DebugServices.c">
|
||||
<Filter>Support</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\mDNSWindows\loclibrary.c">
|
||||
<Filter>Support</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\mDNSWindows\WinServices.cpp">
|
||||
<Filter>Support</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="About.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ClassFactory.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ExplorerBar.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ExplorerBarWindow.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ExplorerPlugin.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LoginDialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="StdAfx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ExplorerPlugin.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ExplorerPlugin.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
213
mDNSResponder/Clients/ExplorerPlugin/ExplorerPluginLocRes.rc
Executable file
@ -0,0 +1,213 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource_loc_res.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_loc_res.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"#include ""WinVersRes.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION MASTER_PROD_VERS
|
||||
PRODUCTVERSION MASTER_PROD_VERS
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#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", "Bonjour Resource Module"
|
||||
VALUE "FileVersion", MASTER_PROD_VERS_STR
|
||||
VALUE "InternalName", "ExplorerPluginLocalized.dll"
|
||||
VALUE "LegalCopyright", MASTER_LEGAL_COPYRIGHT
|
||||
VALUE "OriginalFilename", "ExplorerPluginLocalized.dll"
|
||||
VALUE "ProductName", MASTER_PROD_NAME
|
||||
VALUE "ProductVersion", MASTER_PROD_VERS_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_LOGIN DIALOGEX 0, 0, 180, 89
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION
|
||||
CAPTION "Login"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Enter a username and password. Leave blank to use the default username and/or password.",
|
||||
IDC_STATIC,8,8,156,16,NOT WS_GROUP
|
||||
RTEXT "Username:",IDC_STATIC,10,34,36,8,NOT WS_GROUP
|
||||
EDITTEXT IDC_LOGIN_USERNAME_TEXT,50,32,118,12,ES_AUTOHSCROLL
|
||||
RTEXT "Password:",IDC_STATIC,10,50,36,8,NOT WS_GROUP
|
||||
EDITTEXT IDC_LOGIN_PASSWORD_TEXT,50,48,118,12,ES_PASSWORD |
|
||||
ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,129,70,44,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,77,70,44,14
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 219, 87
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR
|
||||
CAPTION "About Bonjour"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "",IDC_ABOUT_BACKGROUND,"Static",SS_BITMAP | SS_REALSIZEIMAGE,0,0,
|
||||
220,86
|
||||
CONTROL "Explorer Plugin",IDC_COMPONENT,"Static",
|
||||
SS_SIMPLE | WS_GROUP,92,10,122,8
|
||||
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
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_LOGIN, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 62
|
||||
END
|
||||
|
||||
IDD_ABOUT, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 132
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_CONTEXT_MENU MENU
|
||||
BEGIN
|
||||
POPUP "ContextMenu"
|
||||
BEGIN
|
||||
MENUITEM "About Bonjour...", ID_Menu
|
||||
MENUITEM SEPARATOR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ABOUT "About Bonjour"
|
||||
IDS_ABOUT_URL "http://www.apple.com/macosx/features/bonjour"
|
||||
IDS_NAME "Bonjour"
|
||||
IDS_WEB_SITES "Web Sites"
|
||||
IDS_PRINTERS "Printers"
|
||||
IDS_MDNSRESPONDER_NOT_AVAILABLE "Bonjour Service is not available."
|
||||
IDS_FIREWALL "Check firewall settings"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
487
mDNSResponder/Clients/ExplorerPlugin/ExplorerPluginLocRes.vcproj
Executable file
@ -0,0 +1,487 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="ExplorerPluginLocRes"
|
||||
ProjectGUID="{1643427B-F226-4AD6-B413-97DA64D5C6B4}"
|
||||
RootNamespace="ExplorerPluginLocRes"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0400"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
Description="Building Output Directories"
|
||||
CommandLine="if not exist $(OutDir)\ExplorerPlugin.Resources mkdir $(OutDir)\ExplorerPlugin.Resources
if not exist $(OutDir)\ExplorerPlugin.Resources\en.lproj mkdir $(OutDir)\ExplorerPlugin.Resources\en.lproj
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 "
|
||||
AdditionalDependencies=""
|
||||
OutputFile="$(OutDir)\ExplorerPlugin.Resources\en.lproj\ExplorerPluginLocalized.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
ResourceOnlyDLL="true"
|
||||
ImportLibrary="$(OutDir)/$(ProjectName).lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0400"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
Description="Building Output Directories"
|
||||
CommandLine="if not exist $(OutDir)\ExplorerPlugin.Resources mkdir $(OutDir)\ExplorerPlugin.Resources
if not exist $(OutDir)\ExplorerPlugin.Resources\en.lproj mkdir $(OutDir)\ExplorerPlugin.Resources\en.lproj
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 "
|
||||
AdditionalDependencies=""
|
||||
OutputFile="$(OutDir)\ExplorerPlugin.Resources\en.lproj\ExplorerPluginLocalized.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
ResourceOnlyDLL="true"
|
||||
ImportLibrary="$(OutDir)/$(ProjectName).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0400"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
Description="Building Output Directories"
|
||||
CommandLine="if not exist $(OutDir)\ExplorerPlugin.Resources mkdir $(OutDir)\ExplorerPlugin.Resources
if not exist $(OutDir)\ExplorerPlugin.Resources\en.lproj mkdir $(OutDir)\ExplorerPlugin.Resources\en.lproj
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 "
|
||||
AdditionalDependencies=""
|
||||
OutputFile="$(OutDir)\ExplorerPlugin.Resources\en.lproj\ExplorerPluginLocalized.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=""
|
||||
ProgramDatabaseFile=""
|
||||
SubSystem="2"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
ResourceOnlyDLL="true"
|
||||
ImportLibrary="$(IntDir)/$(ProjectName).lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not "%RC_XBS%" == "YES" goto END
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources\en.lproj" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources\en.lproj"
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources\en.lproj"
:END
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0400"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
Description="Building Output Directories"
|
||||
CommandLine="if not exist $(OutDir)\ExplorerPlugin.Resources mkdir $(OutDir)\ExplorerPlugin.Resources
if not exist $(OutDir)\ExplorerPlugin.Resources\en.lproj mkdir $(OutDir)\ExplorerPlugin.Resources\en.lproj
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 "
|
||||
AdditionalDependencies=""
|
||||
OutputFile="$(OutDir)\ExplorerPlugin.Resources\en.lproj\ExplorerPluginLocalized.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=""
|
||||
ProgramDatabaseFile=""
|
||||
SubSystem="2"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
ResourceOnlyDLL="true"
|
||||
ImportLibrary="$(IntDir)/$(ProjectName).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not "%RC_XBS%" == "YES" goto END
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources\en.lproj" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources\en.lproj"
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources\en.lproj"
:END
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
<File
|
||||
RelativePath="resource_loc_res.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest"
|
||||
>
|
||||
<File
|
||||
RelativePath="ExplorerPluginLocRes.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="ExplorerPluginLocRes.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
397
mDNSResponder/Clients/ExplorerPlugin/ExplorerPluginLocRes.vcxproj
Executable file
@ -0,0 +1,397 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|x64">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{1643427B-F226-4AD6-B413-97DA64D5C6B4}</ProjectGuid>
|
||||
<RootNamespace>ExplorerPluginLocRes</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Template|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Template|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\en.lproj\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\en.lproj\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\en.lproj\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\en.lproj\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ExplorerPluginLocalized</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.dll</TargetExt>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ExplorerPluginLocalized</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.dll</TargetExt>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">ExplorerPluginLocalized</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">.dll</TargetExt>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ExplorerPluginLocalized</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.dll</TargetExt>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ExplorerPluginLocalized</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.dll</TargetExt>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Template|x64'">ExplorerPluginLocalized</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Template|x64'">.dll</TargetExt>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\en.lproj\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Template|x64'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\en.lproj\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Template|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
<Message>Building Output Directories</Message>
|
||||
<Command>if not exist $(OutDir)ExplorerPlugin.Resources mkdir $(OutDir)ExplorerPlugin.Resources
|
||||
if not exist $(OutDir)ExplorerPlugin.Resources\en.lproj mkdir $(OutDir)ExplorerPlugin.Resources\en.lproj
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)ExplorerPluginLocalized.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<NoEntryPoint>true</NoEntryPoint>
|
||||
<ImportLibrary>$(OutDir)$(ProjectName).lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
<Message>Building Output Directories</Message>
|
||||
<Command>if not exist $(OutDir)ExplorerPlugin.Resources mkdir $(OutDir)ExplorerPlugin.Resources
|
||||
if not exist $(OutDir)ExplorerPlugin.Resources\en.lproj mkdir $(OutDir)ExplorerPlugin.Resources\en.lproj
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)ExplorerPluginLocalized.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<NoEntryPoint>true</NoEntryPoint>
|
||||
<ImportLibrary>$(OutDir)$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
<Message>Building Output Directories</Message>
|
||||
<Command>if not exist $(OutDir)ExplorerPlugin.Resources mkdir $(OutDir)ExplorerPlugin.Resources
|
||||
if not exist $(OutDir)ExplorerPlugin.Resources\en.lproj mkdir $(OutDir)ExplorerPlugin.Resources\en.lproj
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)ExplorerPluginLocalized.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<ProgramDatabaseFile>
|
||||
</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>
|
||||
</OptimizeReferences>
|
||||
<EnableCOMDATFolding>
|
||||
</EnableCOMDATFolding>
|
||||
<NoEntryPoint>true</NoEntryPoint>
|
||||
<ImportLibrary>$(IntDir)$(ProjectName).lib</ImportLibrary>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>if not "%RC_XBS%" == "YES" goto END
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources\en.lproj" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources\en.lproj"
|
||||
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources\en.lproj"
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
<Message>Building Output Directories</Message>
|
||||
<Command>if not exist $(OutDir)ExplorerPlugin.Resources mkdir $(OutDir)ExplorerPlugin.Resources
|
||||
if not exist $(OutDir)ExplorerPlugin.Resources\en.lproj mkdir $(OutDir)ExplorerPlugin.Resources\en.lproj
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)ExplorerPluginLocalized.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<ProgramDatabaseFile>
|
||||
</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>
|
||||
</OptimizeReferences>
|
||||
<EnableCOMDATFolding>
|
||||
</EnableCOMDATFolding>
|
||||
<NoEntryPoint>true</NoEntryPoint>
|
||||
<ImportLibrary>$(IntDir)$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>if not "%RC_XBS%" == "YES" goto END
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources\en.lproj" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources\en.lproj"
|
||||
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources\en.lproj"
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)ExplorerPluginLocalized.dll</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Template|x64'">
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)ExplorerPluginLocalized.dll</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource_loc_res.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ExplorerPluginLocRes.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\mDNSWindows\DLL\dnssd.vcxproj">
|
||||
<Project>{ab581101-18f0-46f6-b56a-83a6b1ea657e}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties RESOURCE_FILE="ExplorerPluginLocRes.rc" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
23
mDNSResponder/Clients/ExplorerPlugin/ExplorerPluginLocRes.vcxproj.filters
Executable file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{fdb2f45e-acf9-4bf2-87a1-fb0df2aca928}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{ee265e77-1d8e-4a0c-8c10-27b123ab1232}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource_loc_res.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ExplorerPluginLocRes.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
140
mDNSResponder/Clients/ExplorerPlugin/ExplorerPluginRes.rc
Executable file
@ -0,0 +1,140 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource_res.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_res.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"#include ""WinVersRes.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION MASTER_PROD_VERS
|
||||
PRODUCTVERSION MASTER_PROD_VERS
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#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", "Bonjour Resource Module"
|
||||
VALUE "FileVersion", MASTER_PROD_VERS_STR
|
||||
VALUE "InternalName", "ExplorerPluginResources.dll"
|
||||
VALUE "LegalCopyright", MASTER_LEGAL_COPYRIGHT
|
||||
VALUE "OriginalFilename", "ExplorerPluginResources.dll"
|
||||
VALUE "ProductName", MASTER_PROD_NAME
|
||||
VALUE "ProductVersion", MASTER_PROD_VERS_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_LOGO BITMAP "res\\logo.bmp"
|
||||
IDB_ABOUT BITMAP "res\\about.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_BUTTON_2K ICON "res\\button-2k.ico"
|
||||
IDI_BUTTON_XP ICON "res\\button-xp.ico"
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
518
mDNSResponder/Clients/ExplorerPlugin/ExplorerPluginRes.vcproj
Executable file
@ -0,0 +1,518 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="ExplorerPluginRes"
|
||||
ProjectGUID="{871B1492-B4A4-4B57-9237-FA798484D7D7}"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0400"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
Description="Building Output Directories"
|
||||
CommandLine="if not exist Debug\ExplorerPlugin.Resources mkdir Debug\ExplorerPlugin.Resources"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 "
|
||||
OutputFile="$(OutDir)\ExplorerPlugin.Resources\ExplorerPluginResources.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
ResourceOnlyDLL="true"
|
||||
ImportLibrary="$(OutDir)/$(ProjectName).lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0400"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
Description="Building Output Directories"
|
||||
CommandLine="if not exist Debug\ExplorerPlugin.Resources mkdir Debug\ExplorerPlugin.Resources"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 "
|
||||
OutputFile="$(OutDir)\ExplorerPlugin.Resources\ExplorerPluginResources.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
ResourceOnlyDLL="true"
|
||||
ImportLibrary="$(OutDir)/$(ProjectName).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\mDNSShared;..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0400"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
Description="Building Output Directories"
|
||||
CommandLine="if not exist Release mkdir Release
if not exist "Release\ExplorerPlugin.Resources" mkdir "Release\ExplorerPlugin.Resources"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 "
|
||||
OutputFile="$(OutDir)\ExplorerPlugin.Resources\ExplorerPluginResources.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=""
|
||||
ProgramDatabaseFile=""
|
||||
SubSystem="2"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
ResourceOnlyDLL="true"
|
||||
ImportLibrary="$(IntDir)/$(ProjectName).lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not "%RC_XBS%" == "YES" goto END
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources"
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources"
:END
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName="$(OutDir)/$(ProjectName).tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\mDNSShared;..\..\mDNSWindows"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0400"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
Description="Building Output Directories"
|
||||
CommandLine="if not exist Release mkdir Release
if not exist "Release\ExplorerPlugin.Resources" mkdir "Release\ExplorerPlugin.Resources"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 /IGNORE:4089 "
|
||||
OutputFile="$(OutDir)\ExplorerPlugin.Resources\ExplorerPluginResources.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=""
|
||||
ProgramDatabaseFile=""
|
||||
SubSystem="2"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
ResourceOnlyDLL="true"
|
||||
ImportLibrary="$(IntDir)/$(ProjectName).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not "%RC_XBS%" == "YES" goto END
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources"
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\ExplorerPlugin.Resources"
:END
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
<File
|
||||
RelativePath="resource_res.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\about.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\about.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\button-2k.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\button-xp.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\cold.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ExplorerPluginRes.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hot.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\logo.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\logo.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Web.ico"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="ExplorerPluginRes.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
399
mDNSResponder/Clients/ExplorerPlugin/ExplorerPluginRes.vcxproj
Executable file
@ -0,0 +1,399 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|x64">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{871B1492-B4A4-4B57-9237-FA798484D7D7}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Template|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Template|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ExplorerPluginResources</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.dll</TargetExt>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ExplorerPluginResources</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.dll</TargetExt>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">ExplorerPluginResources</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">.dll</TargetExt>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ExplorerPluginResources</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.dll</TargetExt>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ExplorerPluginResources</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.dll</TargetExt>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Template|x64'">$(Platform)\$(Configuration)\ExplorerPlugin.Resources\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Template|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Template|x64'">ExplorerPluginResources</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Template|x64'">.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
<Message>Building Output Directories</Message>
|
||||
<Command>if not exist Debug\ExplorerPlugin.Resources mkdir Debug\ExplorerPlugin.Resources</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
|
||||
<OutputFile>$(OutDir)ExplorerPluginResources.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<NoEntryPoint>true</NoEntryPoint>
|
||||
<ImportLibrary>$(OutDir)$(ProjectName).lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;DEBUG=1;ENABLE_DOT_LOCAL_NAMES;WINVER=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
<Message>Building Output Directories</Message>
|
||||
<Command>if not exist Debug\ExplorerPlugin.Resources mkdir Debug\ExplorerPlugin.Resources</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
|
||||
<OutputFile>$(OutDir)ExplorerPluginResources.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<NoEntryPoint>true</NoEntryPoint>
|
||||
<ImportLibrary>$(OutDir)$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSShared;..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
<Message>Building Output Directories</Message>
|
||||
<Command>if not exist Release mkdir Release
|
||||
if not exist "Release\ExplorerPlugin.Resources" mkdir "Release\ExplorerPlugin.Resources"
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
|
||||
<OutputFile>$(OutDir)ExplorerPluginResources.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<ProgramDatabaseFile>
|
||||
</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>
|
||||
</OptimizeReferences>
|
||||
<EnableCOMDATFolding>
|
||||
</EnableCOMDATFolding>
|
||||
<NoEntryPoint>true</NoEntryPoint>
|
||||
<ImportLibrary>$(IntDir)$(ProjectName).lib</ImportLibrary>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>if not "%RC_XBS%" == "YES" goto END
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources"
|
||||
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources"
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\mDNSShared;..\..\mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
<Message>Building Output Directories</Message>
|
||||
<Command>if not exist Release mkdir Release
|
||||
if not exist "Release\ExplorerPlugin.Resources" mkdir "Release\ExplorerPlugin.Resources"
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
|
||||
<OutputFile>$(OutDir)ExplorerPluginResources.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<ProgramDatabaseFile>
|
||||
</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>
|
||||
</OptimizeReferences>
|
||||
<EnableCOMDATFolding>
|
||||
</EnableCOMDATFolding>
|
||||
<NoEntryPoint>true</NoEntryPoint>
|
||||
<ImportLibrary>$(IntDir)$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>if not "%RC_XBS%" == "YES" goto END
|
||||
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources"
|
||||
xcopy /I/Y "$(TargetPath)" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(Platform)\ExplorerPlugin.Resources"
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)ExplorerPluginResources.dll</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Template|x64'">
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)ExplorerPluginResources.dll</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource_res.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="about.bmp" />
|
||||
<None Include="res\about.bmp" />
|
||||
<None Include="res\button-2k.ico" />
|
||||
<None Include="res\button-xp.ico" />
|
||||
<None Include="res\cold.ico" />
|
||||
<None Include="hot.ico" />
|
||||
<None Include="logo.bmp" />
|
||||
<None Include="res\logo.bmp" />
|
||||
<None Include="Web.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ExplorerPluginRes.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\mDNSWindows\DLL\dnssd.vcxproj">
|
||||
<Project>{ab581101-18f0-46f6-b56a-83a6b1ea657e}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties RESOURCE_FILE="ExplorerPluginRes.rc" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
52
mDNSResponder/Clients/ExplorerPlugin/ExplorerPluginRes.vcxproj.filters
Executable file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{89aee21a-a42b-4f10-87db-f6d3b27eb612}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{27ad7c9e-deb4-4963-8cf0-adf004ed2437}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource_res.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="about.bmp">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\about.bmp">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\button-2k.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\button-xp.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\cold.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="hot.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="logo.bmp">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\logo.bmp">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="Web.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ExplorerPluginRes.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
111
mDNSResponder/Clients/ExplorerPlugin/LoginDialog.cpp
Normal file
@ -0,0 +1,111 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "LoginDialog.h"
|
||||
|
||||
// MFC Debugging
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
//===========================================================================================================================
|
||||
// Message Map
|
||||
//===========================================================================================================================
|
||||
|
||||
BEGIN_MESSAGE_MAP( LoginDialog, CDialog )
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//===========================================================================================================================
|
||||
// LoginDialog
|
||||
//===========================================================================================================================
|
||||
|
||||
LoginDialog::LoginDialog( CWnd *inParent )
|
||||
: CDialog( LoginDialog::IDD, inParent )
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnInitDialog
|
||||
//===========================================================================================================================
|
||||
|
||||
BOOL LoginDialog::OnInitDialog( void )
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// DoDataExchange
|
||||
//===========================================================================================================================
|
||||
|
||||
void LoginDialog::DoDataExchange( CDataExchange *inDX )
|
||||
{
|
||||
CDialog::DoDataExchange( inDX );
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// OnOK
|
||||
//===========================================================================================================================
|
||||
|
||||
void LoginDialog::OnOK( void )
|
||||
{
|
||||
const CWnd * control;
|
||||
|
||||
// Username
|
||||
|
||||
control = GetDlgItem( IDC_LOGIN_USERNAME_TEXT );
|
||||
assert( control );
|
||||
if( control )
|
||||
{
|
||||
control->GetWindowText( mUsername );
|
||||
}
|
||||
|
||||
// Password
|
||||
|
||||
control = GetDlgItem( IDC_LOGIN_PASSWORD_TEXT );
|
||||
assert( control );
|
||||
if( control )
|
||||
{
|
||||
control->GetWindowText( mPassword );
|
||||
}
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
//===========================================================================================================================
|
||||
// GetLogin
|
||||
//===========================================================================================================================
|
||||
|
||||
BOOL LoginDialog::GetLogin( CString &outUsername, CString &outPassword )
|
||||
{
|
||||
if( DoModal() == IDOK )
|
||||
{
|
||||
outUsername = mUsername;
|
||||
outPassword = mPassword;
|
||||
return( TRUE );
|
||||
}
|
||||
return( FALSE );
|
||||
}
|
53
mDNSResponder/Clients/ExplorerPlugin/LoginDialog.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 __LOGIN_DIALOG__
|
||||
#define __LOGIN_DIALOG__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Resource.h"
|
||||
|
||||
//===========================================================================================================================
|
||||
// LoginDialog
|
||||
//===========================================================================================================================
|
||||
|
||||
class LoginDialog : public CDialog
|
||||
{
|
||||
protected:
|
||||
|
||||
CString mUsername;
|
||||
CString mPassword;
|
||||
|
||||
public:
|
||||
|
||||
enum { IDD = IDD_LOGIN };
|
||||
|
||||
LoginDialog( CWnd *inParent = NULL );
|
||||
|
||||
virtual BOOL GetLogin( CString &outUsername, CString &outPassword );
|
||||
|
||||
protected:
|
||||
|
||||
virtual BOOL OnInitDialog( void );
|
||||
virtual void DoDataExchange( CDataExchange *inDX );
|
||||
virtual void OnOK( void );
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif // __LOGIN_DIALOG__
|
9
mDNSResponder/Clients/ExplorerPlugin/ReadMe.txt
Normal file
@ -0,0 +1,9 @@
|
||||
The DNSServices Explorer Plugin is a vertical Explorer bar. It lets you browse for DNS-SD advertised services directly within Internet Explorer.
|
||||
|
||||
This DLL needs to be registered to work. The Visual Studio project automatically registers the DLL after each successful build. If you need to manually register the DLL for some reason, you can execute the following line from the DOS command line prompt ("<path>" is the actual parent path of the DLL):
|
||||
|
||||
regsvr32.exe /s /c <path>\ExplorerPlugin.dll
|
||||
|
||||
For more information, see the Band Objects topic in the Microsoft Platform SDK documentation and check the following URL:
|
||||
|
||||
<http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/bands.asp>
|
28
mDNSResponder/Clients/ExplorerPlugin/Resource.h
Normal file
@ -0,0 +1,28 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 the core resources
|
||||
|
||||
#include "resource_dll.h"
|
||||
|
||||
// Include the non-localizable resources
|
||||
|
||||
#include "resource_res.h"
|
||||
|
||||
// Include the localizable resources
|
||||
|
||||
#include "resource_loc_res.h"
|
18
mDNSResponder/Clients/ExplorerPlugin/StdAfx.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 "StdAfx.h"
|
41
mDNSResponder/Clients/ExplorerPlugin/StdAfx.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* -*- Mode: C; tab-width: 4 -*-
|
||||
*
|
||||
* Copyright (c) 2003-2004 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 __STDAFX__
|
||||
#define __STDAFX__
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
#endif
|
||||
|
||||
#if !defined(_WSPIAPI_COUNTOF)
|
||||
# define _WSPIAPI_COUNTOF(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
||||
#endif
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <afxsock.h> // MFC socket extensions
|
||||
|
||||
#endif // __STDAFX__
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="Microsoft.Windows.Wiz97_3"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Your app description here</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="amd64"
|
||||
name="Microsoft.Windows.Wiz97_3"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Your app description here</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="amd64"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
BIN
mDNSResponder/Clients/ExplorerPlugin/res/about.bmp
Normal file
After Width: | Height: | Size: 135 KiB |
BIN
mDNSResponder/Clients/ExplorerPlugin/res/button-2k.ico
Executable file
After Width: | Height: | Size: 10 KiB |
BIN
mDNSResponder/Clients/ExplorerPlugin/res/button-xp.ico
Executable file
After Width: | Height: | Size: 5.2 KiB |
BIN
mDNSResponder/Clients/ExplorerPlugin/res/cold.ico
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
mDNSResponder/Clients/ExplorerPlugin/res/hot.ico
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
mDNSResponder/Clients/ExplorerPlugin/res/logo.bmp
Normal file
After Width: | Height: | Size: 822 B |
26
mDNSResponder/Clients/ExplorerPlugin/resource_dll.h
Executable file
@ -0,0 +1,26 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ExplorerPlugin.rc
|
||||
//
|
||||
#define IDS_NAME 106
|
||||
#define IDS_WEB_SITES 107
|
||||
#define IDS_PRINTERS 109
|
||||
#define IDS_MDNSRESPONDER_NOT_AVAILABLE 110
|
||||
#define IDS_FIREWALL 111
|
||||
#define IDC_COMPONENT 1001
|
||||
#define IDC_LEGAL 1002
|
||||
#define IDC_COMPONENT_VERSION 1003
|
||||
#define IDC_LOGIN_USERNAME_TEXT 1182
|
||||
#define IDC_LOGIN_PASSWORD_TEXT 1183
|
||||
#define ID_Menu 40001
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 119
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
32
mDNSResponder/Clients/ExplorerPlugin/resource_loc_res.h
Executable file
@ -0,0 +1,32 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ExplorerPluginLocRes.rc
|
||||
//
|
||||
#define IDS_NAME 106
|
||||
#define IDS_WEB_SITES 107
|
||||
#define IDS_PRINTERS 109
|
||||
#define IDS_MDNSRESPONDER_NOT_AVAILABLE 110
|
||||
#define IDS_FIREWALL 111
|
||||
#define IDD_ABOUT 118
|
||||
#define IDR_CONTEXT_MENU 120
|
||||
#define IDD_LOGIN 145
|
||||
#define IDC_ABOUT_BACKGROUND 146
|
||||
#define IDS_ABOUT 147
|
||||
#define IDS_ABOUT_URL 148
|
||||
#define IDC_COMPONENT 1001
|
||||
#define IDC_LEGAL 1002
|
||||
#define IDC_COMPONENT_VERSION 1003
|
||||
#define IDC_LOGIN_USERNAME_TEXT 1182
|
||||
#define IDC_LOGIN_PASSWORD_TEXT 1183
|
||||
#define ID_Menu 40001
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 119
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
30
mDNSResponder/Clients/ExplorerPlugin/resource_res.h
Executable file
@ -0,0 +1,30 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ExplorerPluginRes.rc
|
||||
//
|
||||
#define IDS_NAME 106
|
||||
#define IDS_WEB_SITES 107
|
||||
#define IDS_PRINTERS 109
|
||||
#define IDS_MDNSRESPONDER_NOT_AVAILABLE 110
|
||||
#define IDS_FIREWALL 111
|
||||
#define IDB_LOGO 115
|
||||
#define IDI_BUTTON_2K 115
|
||||
#define IDI_BUTTON_XP 118
|
||||
#define IDB_ABOUT 119
|
||||
#define IDC_COMPONENT 1001
|
||||
#define IDC_LEGAL 1002
|
||||
#define IDC_COMPONENT_VERSION 1003
|
||||
#define IDC_LOGIN_USERNAME_TEXT 1182
|
||||
#define IDC_LOGIN_PASSWORD_TEXT 1183
|
||||
#define ID_Menu 40001
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 119
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
394
mDNSResponder/Clients/FirefoxExtension/CDNSSDService.cpp
Executable file
@ -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 <string>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
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() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
104
mDNSResponder/Clients/FirefoxExtension/CDNSSDService.h
Executable file
@ -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 <dns_sd.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
#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
|
37
mDNSResponder/Clients/FirefoxExtension/CDNSSDServiceModule.cpp
Executable file
@ -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)
|
||||
|
20
mDNSResponder/Clients/FirefoxExtension/DNSSDService.sln
Executable file
@ -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
|
102
mDNSResponder/Clients/FirefoxExtension/FirefoxExtension.rc
Normal file
@ -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
|
||||
|
282
mDNSResponder/Clients/FirefoxExtension/FirefoxExtension.vcproj
Executable file
@ -0,0 +1,282 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="FirefoxExtension"
|
||||
ProjectGUID="{7826EA27-D4CC-4FAA-AD23-DF813823227B}"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\$(OutDir)\DNSSDService.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\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""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL;DNSSDSERVICE_EXPORTS;XP_WIN;XP_WIN32"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NXCOMPAT /DYNAMICBASE /SAFESEH"
|
||||
AdditionalDependencies="$(SRCROOT)\AppleInternal\XULRunner\lib\nspr4.lib $(SRCROOT)\AppleInternal\XULRunner\lib\xpcom.lib $(SRCROOT)\AppleInternal\XULRunner\lib\xpcomglue_s.lib ws2_32.lib ../../mDNSWindows/DLLStub/$(PlatformName)/$(ConfigurationName)/dnssdStatic.lib"
|
||||
OutputFile="$(OutDir)\DNSSDService.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=""
|
||||
ProgramDatabaseFile=".\$(OutDir)/DNSSDService.pdb"
|
||||
ImportLibrary=".\$(OutDir)/DNSSDService.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\$(OutDir)\DNSSDService.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="xcopy /I/Y $(PlatformName)\$(ConfigurationName)\DNSSDService.dll extension\platform\WINNT\components
if not "%RC_XBS%" == "YES" goto END
if not exist "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\FirefoxExtension" mkdir "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\FirefoxExtension"
xcopy /E/I/Y "extension" "$(DSTROOT)\Program Files\Bonjour SDK\bin\$(PlatformName)\FirefoxExtension"
:END
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\$(OutDir)\DNSSDService.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\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""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DNSSDSERVICE_EXPORTS;XP_WIN;XP_WIN32"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="../../mDNSWindows"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NXCOMPAT /DYNAMICBASE /SAFESEH"
|
||||
AdditionalDependencies="$(SRCROOT)\AppleInternal\XULRunner\lib\nspr4.lib $(SRCROOT)\AppleInternal\XULRunner\lib\xpcom.lib $(SRCROOT)\AppleInternal\XULRunner\lib\xpcomglue_s.lib ws2_32.lib ../../mDNSWindows/DLLStub/$(PlatformName)/$(ConfigurationName)/dnssdStatic.lib"
|
||||
OutputFile="$(OutDir)\DNSSDService.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\$(OutDir)\DNSSDService.pdb"
|
||||
ImportLibrary=".\$(OutDir)/DNSSDService.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\$(OutDir)\DNSSDService.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="xcopy /I/Y $(PlatformName)\$(ConfigurationName)\DNSSDService.dll extension\platform\WINNT\components"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\CDNSSDService.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CDNSSDServiceModule.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\CDNSSDService.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IDNSSDService.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="IDL"
|
||||
Filter="idl"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\IDNSSDService.idl"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\FirefoxExtension.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
179
mDNSResponder/Clients/FirefoxExtension/FirefoxExtension.vcxproj
Executable file
@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7826EA27-D4CC-4FAA-AD23-DF813823227B}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">DNSSDService</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">DNSSDService</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\$(OutDir)DNSSDService.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;DNSSDSERVICE_EXPORTS;XP_WIN;XP_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc80.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/NXCOMPAT /DYNAMICBASE /SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>$(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)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)DNSSDService.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ProgramDatabaseFile>.\$(OutDir)DNSSDService.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\$(OutDir)DNSSDService.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\$(OutDir)DNSSDService.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<PostBuildEvent>
|
||||
<Command>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
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\$(OutDir)DNSSDService.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DNSSDSERVICE_EXPORTS;XP_WIN;XP_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc80.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../../mDNSWindows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/NXCOMPAT /DYNAMICBASE /SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>$(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)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)DNSSDService.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\$(OutDir)DNSSDService.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\$(OutDir)DNSSDService.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\$(OutDir)DNSSDService.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /I/Y $(Platform)\$(Configuration)\DNSSDService.dll extension\platform\WINNT\components</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CDNSSDService.cpp" />
|
||||
<ClCompile Include="CDNSSDServiceModule.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CDNSSDService.h" />
|
||||
<ClInclude Include="IDNSSDService.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuildStep Include="IDNSSDService.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="FirefoxExtension.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\mDNSWindows\DLLStub\DLLStub.vcxproj">
|
||||
<Project>{3a2b6325-3053-4236-84bd-aa9be2e323e5}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
47
mDNSResponder/Clients/FirefoxExtension/FirefoxExtension.vcxproj.filters
Executable file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{89e57cc2-d6b1-4e68-ad57-71223df12d28}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{4d103fe8-9737-47c7-9190-6f7b5666ecf5}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="IDL">
|
||||
<UniqueIdentifier>{4dae44a8-3da8-43c0-a749-2d1e0610c66f}</UniqueIdentifier>
|
||||
<Extensions>idl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{ac7dbdd1-2fe3-416d-9cab-2d663c05f252}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CDNSSDService.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CDNSSDServiceModule.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CDNSSDService.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="IDNSSDService.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="FirefoxExtension.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuildStep Include="IDNSSDService.idl">
|
||||
<Filter>IDL</Filter>
|
||||
</CustomBuildStep>
|
||||
</ItemGroup>
|
||||
</Project>
|
263
mDNSResponder/Clients/FirefoxExtension/IDNSSDService.h
Executable file
@ -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 ®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__ */
|
50
mDNSResponder/Clients/FirefoxExtension/IDNSSDService.idl
Executable file
@ -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();
|
||||
};
|
6
mDNSResponder/Clients/FirefoxExtension/extension/chrome.manifest
Executable file
@ -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
|
BIN
mDNSResponder/Clients/FirefoxExtension/extension/components/IDNSSDService.xpt
Executable file
After Width: | Height: | Size: 1.6 KiB |
BIN
mDNSResponder/Clients/FirefoxExtension/extension/content/_internal_listImage.png
Executable file
After Width: | Height: | Size: 3.3 KiB |
16
mDNSResponder/Clients/FirefoxExtension/extension/content/bonjour4firefox.css
Executable file
@ -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;
|
||||
}
|
||||
|
222
mDNSResponder/Clients/FirefoxExtension/extension/content/bonjour4firefox.xul
Executable file
@ -0,0 +1,222 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
|
||||
<?xml-stylesheet href="browseList.css"?>
|
||||
<!DOCTYPE page SYSTEM "chrome://bonjour4firefox/locale/bonjour4firefox.dtd">
|
||||
<page
|
||||
orient="vertical"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="background-color: transparent !important; -moz-appearance: none !important;"
|
||||
onload="BonjourBrowser.init()"
|
||||
onunload="BonjourBrowser.cleanup()">
|
||||
|
||||
|
||||
<menupopup id="targetmenu">
|
||||
<menuitem label="&bonjour4firefoxSidebarOpenDefault.label;" value="current"/>
|
||||
<menuitem label="&bonjour4firefoxSidebarOpenTab.label;" value="tab"/>
|
||||
<menuitem label="&bonjour4firefoxSidebarOpenWindow.label;" value="window"/>
|
||||
</menupopup>
|
||||
|
||||
<tree id="treeBrowseList" flex="1" class="sidebar-placesTree" hidecolumnpicker="true">
|
||||
<treecols hide="true">
|
||||
<treecol id="title" flex="1" primary="true" hideheader="true"/>
|
||||
</treecols>
|
||||
|
||||
<treechildren class="sidebar-placesTreechildren" context="targetmenu" flex="1" id="treeChildrenBrowseList">
|
||||
<treeitem>
|
||||
<treerow>
|
||||
<treecell src="chrome://bonjour4firefox/content/_internal_bonjour4firefox.png" label="About Bonjour"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</tree>
|
||||
|
||||
<script><![CDATA[
|
||||
|
||||
var BonjourBrowser =
|
||||
{
|
||||
Service: null,
|
||||
Browse: null,
|
||||
BrowseListener: null,
|
||||
Resolve: null,
|
||||
ResolveListener: null,
|
||||
|
||||
init: function()
|
||||
{
|
||||
document.getElementById("treeChildrenBrowseList").addEventListener( "click", this.listListener, false );
|
||||
|
||||
try
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
const cid = "@apple.com/DNSSDService;1";
|
||||
Service = Components.classes[cid].createInstance();
|
||||
Service = Service.QueryInterface(Components.interfaces.IDNSSDService);
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
alert(err);
|
||||
return;
|
||||
}
|
||||
|
||||
BrowseListener = this.browseListener;
|
||||
ResolveListener = this.resolveListener;
|
||||
|
||||
try
|
||||
{
|
||||
Browse = Service.browse(0, "_http._tcp", "", BrowseListener );
|
||||
}
|
||||
catch ( err )
|
||||
{
|
||||
alert( err );
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
cleanup: function()
|
||||
{
|
||||
if ( Browse != null )
|
||||
{
|
||||
Browse.stop();
|
||||
Browse = null;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
browseListener: function( service, add, interfaceIndex, error, serviceName, regtype, domain )
|
||||
{
|
||||
if ( error == 0 )
|
||||
{
|
||||
// First see if we can look this guy up
|
||||
|
||||
var treeView = document.getElementById( 'treeChildrenBrowseList' );
|
||||
var treeItem = null;
|
||||
|
||||
for ( i = 1; i < treeView.childNodes.length; i++ )
|
||||
{
|
||||
var ti = treeView.childNodes[ i ];
|
||||
var tr = ti.childNodes[ 0 ];
|
||||
var tc = tr.childNodes[ 0 ];
|
||||
|
||||
if ( tc.getAttribute( 'label' ) == serviceName )
|
||||
{
|
||||
treeItem = ti;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( add )
|
||||
{
|
||||
// If we've already seen this guy, then bump up his reference count
|
||||
|
||||
if ( treeItem )
|
||||
{
|
||||
var refcnt = treeItem.getUserData( 'refcnt' );
|
||||
refcnt++;
|
||||
}
|
||||
else
|
||||
{
|
||||
var newTreeItem = document.createElement('treeitem');
|
||||
var newTreeRow = document.createElement('treerow');
|
||||
newTreeRow.setAttribute( 'properties', 'bonjourRow' );
|
||||
var newTreeCell = document.createElement('treecell');
|
||||
newTreeCell.setAttribute( 'label', serviceName );
|
||||
newTreeCell.setAttribute( 'src', 'chrome://bonjour4firefox/content/_internal_bonjour4firefox.png' );
|
||||
|
||||
newTreeItem.appendChild( newTreeRow );
|
||||
newTreeRow.appendChild( newTreeCell );
|
||||
newTreeItem.setUserData( 'interfaceIndex', interfaceIndex, null );
|
||||
newTreeItem.setUserData( 'serviceName', serviceName, null );
|
||||
newTreeItem.setUserData( 'regtype', regtype, null );
|
||||
newTreeItem.setUserData( 'domain', domain, null );
|
||||
newTreeItem.setUserData( 'refcnt', 1, null );
|
||||
|
||||
// Insert in alphabetical order
|
||||
|
||||
var insertBefore = null;
|
||||
|
||||
for ( i = 1; i < treeView.childNodes.length; i++ )
|
||||
{
|
||||
var ti = treeView.childNodes[ i ];
|
||||
var tr = ti.childNodes[ 0 ];
|
||||
var tc = tr.childNodes[ 0 ];
|
||||
|
||||
if ( serviceName.toLowerCase() < tc.getAttribute( 'label' ).toLowerCase() )
|
||||
{
|
||||
insertBefore = ti;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( insertBefore != null )
|
||||
{
|
||||
treeView.insertBefore( newTreeItem, insertBefore );
|
||||
}
|
||||
else
|
||||
{
|
||||
treeView.appendChild( newTreeItem );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( treeItem )
|
||||
{
|
||||
var refcnt = treeItem.getUserData( 'refcnt' );
|
||||
|
||||
if ( --refcnt == 0 )
|
||||
{
|
||||
treeView.removeChild( treeItem );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( 'There was an error browsing for websites: ' + error );
|
||||
}
|
||||
},
|
||||
|
||||
listListener: function( event )
|
||||
{
|
||||
var treeBrowseList = document.getElementById( 'treeBrowseList' );
|
||||
|
||||
if ( treeBrowseList.currentIndex == 0 )
|
||||
{
|
||||
window._content.location="http://www.apple.com/macosx/features/bonjour";
|
||||
}
|
||||
else
|
||||
{
|
||||
var item = treeBrowseList.view.getItemAtIndex(treeBrowseList.currentIndex);
|
||||
|
||||
var interfaceIndex = item.getUserData("interfaceIndex");
|
||||
var serviceName = item.getUserData("serviceName");
|
||||
var regtype = item.getUserData("regtype");
|
||||
var domain = item.getUserData("domain");
|
||||
|
||||
try
|
||||
{
|
||||
Resolve = Service.resolve( interfaceIndex, serviceName, regtype, domain, ResolveListener );
|
||||
}
|
||||
catch ( err )
|
||||
{
|
||||
alert( err );
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
resolveListener: function( service, interfaceIndex, error, fullname, host, port, path )
|
||||
{
|
||||
if ( error == 0 )
|
||||
{
|
||||
window._content.location='http://' + host + ':' + port + path;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( 'There was an error resolving ' + fullname );
|
||||
}
|
||||
|
||||
Resolve.stop();
|
||||
},
|
||||
};
|
||||
|
||||
]]></script>
|
||||
</page>
|
32
mDNSResponder/Clients/FirefoxExtension/extension/content/browserOverlay.xul
Executable file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet href="chrome://bonjour4firefox/skin/overlay.css" type="text/css"?>
|
||||
<!DOCTYPE overlay SYSTEM "chrome://bonjour4firefox/locale/bonjour4firefox.dtd">
|
||||
<overlay id="bonjour4firefox-overlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script src="overlay.js"/>
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="bonjour4firefox-strings" src="chrome://bonjour4firefox/locale/bonjour4firefox.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<menupopup id="viewSidebarMenu">
|
||||
<menuitem observes="viewBonjour4FirefoxSidebar"/>
|
||||
</menupopup>
|
||||
|
||||
<toolbarpalette id="BrowserToolbarPalette">
|
||||
<toolbarbutton id="bonjour4firefox-toolbar-button"
|
||||
label="&bonjour4firefoxToolbar.label;"
|
||||
tooltiptext="&bonjour4firefoxToolbar.tooltip;"
|
||||
oncommand="toggleSidebar('viewBonjour4FirefoxSidebar');"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"/>
|
||||
</toolbarpalette>
|
||||
|
||||
<broadcasterset id="mainBroadcasterSet">
|
||||
<broadcaster id="viewBonjour4FirefoxSidebar"
|
||||
autoCheck="false"
|
||||
label="Bonjour"
|
||||
type="checkbox" group="sidebar"
|
||||
sidebarurl="chrome://bonjour4firefox/content/bonjour4firefox.xul"
|
||||
sidebartitle="&bonjour4firefox.label;"
|
||||
oncommand="toggleSidebar('viewBonjour4FirefoxSidebar');"/>
|
||||
</broadcasterset>
|
||||
</overlay>
|