1/*
2 * Copyright (C) 2011, 2016 Apple Inc. All Rights Reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#pragma once
27
28// WIRConstants are "Web Inspector Relay" constants shared between
29// the WebInspector framework on the OS X side, webinspectord, and
30// iOS WebKit on the device side.
31
32#define WIRSimulatorTCPPortNumber 27753
33#define WIRXPCMachPortName "com.apple.webinspector"
34#define WIRXPCDebuggerServiceName "com.apple.webinspector.debugger"
35#define WIRServiceAvailableNotification "com.apple.webinspectord.available"
36#define WIRServiceAvailabilityCheckNotification "com.apple.webinspectord.availability_check"
37#define WIRServiceEnabledNotification "com.apple.webinspectord.enabled"
38#define WIRServiceDisabledNotification "com.apple.webinspectord.disabled"
39#define WIRAutomaticInspectionEnabledState "com.apple.webinspectord.automatic_inspection_enabled"
40
41
42#define WIRApplicationIdentifierKey @"WIRApplicationIdentifierKey"
43#define WIRApplicationBundleIdentifierKey @"WIRApplicationBundleIdentifierKey"
44#define WIRApplicationNameKey @"WIRApplicationNameKey"
45#define WIRIsApplicationProxyKey @"WIRIsApplicationProxyKey"
46#define WIRIsApplicationActiveKey @"WIRIsApplicationActiveKey"
47#define WIRHostApplicationIdentifierKey @"WIRHostApplicationIdentifierKey"
48#define WIRHostApplicationNameKey @"WIRHostApplicationNameKey"
49#define WIRConnectionIdentifierKey @"WIRConnectionIdentifierKey"
50// COMPATABILITY(iOS 9): The key string is intentionally mismatched to support old relays.
51#define WIRTargetIdentifierKey @"WIRPageIdentifierKey"
52#define WIRHasLocalDebuggerKey @"WIRHasLocalDebuggerKey"
53#define WIRTitleKey @"WIRTitleKey"
54#define WIRURLKey @"WIRURLKey"
55#define WIRUserInfoKey @"WIRUserInfoKey"
56#define WIRApplicationDictionaryKey @"WIRApplicationDictionaryKey"
57#define WIRMessageDataKey @"WIRMessageDataKey"
58#define WIRApplicationGetListingMessage @"WIRApplicationGetListingMessage"
59#define WIRIndicateMessage @"WIRIndicateMessage"
60#define WIRIndicateEnabledKey @"WIRIndicateEnabledKey"
61#define WIRSenderKey @"WIRSenderKey"
62#define WIRSocketDataKey @"WIRSocketDataKey"
63#define WIRSocketDataMessage @"WIRSocketDataMessage"
64#define WIRSocketSetupMessage @"WIRSocketSetupMessage"
65#define WIRWebPageCloseMessage @"WIRWebPageCloseMessage"
66#define WIRRawDataMessage @"WIRRawDataMessage"
67#define WIRRawDataKey @"WIRRawDataKey"
68#define WIRListingMessage @"WIRListingMessage"
69#define WIRListingKey @"WIRListingKey"
70#define WIRRemoteAutomationEnabledKey @"WIRRemoteAutomationEnabledKey"
71#define WIRAutomationAvailabilityKey @"WIRAutomationAvailabilityKey"
72#define WIRDestinationKey @"WIRDestinationKey"
73#define WIRConnectionDiedMessage @"WIRConnectionDiedMessage"
74#define WIRTypeKey @"WIRTypeKey"
75#define WIRTypeJavaScript @"WIRTypeJavaScript"
76#define WIRTypeServiceWorker @"WIRTypeServiceWorker"
77#define WIRTypeWeb @"WIRTypeWeb"
78#define WIRTypeAutomation @"WIRTypeAutomation"
79#define WIRAutomaticallyPause @"WIRAutomaticallyPause"
80
81// Allowed values for WIRAutomationAvailabilityKey.
82#define WIRAutomationAvailabilityNotAvailable @"WIRAutomationAvailabilityNotAvailable"
83#define WIRAutomationAvailabilityAvailable @"WIRAutomationAvailabilityAvailable"
84#define WIRAutomationAvailabilityUnknown @"WIRAutomationAvailabilityUnknown"
85
86#define WIRAutomaticInspectionEnabledKey @"WIRAutomaticInspectionEnabledKey"
87#define WIRAutomaticInspectionSessionIdentifierKey @"WIRAutomaticInspectionSessionIdentifierKey"
88#define WIRAutomaticInspectionConfigurationMessage @"WIRAutomaticInspectionConfigurationMessage"
89#define WIRAutomaticInspectionRejectMessage @"WIRAutomaticInspectionRejectMessage"
90#define WIRAutomaticInspectionCandidateMessage @"WIRAutomaticInspectionCandidateMessage"
91
92#define WIRAutomationTargetIsPairedKey @"WIRAutomationTargetIsPairedKey"
93#define WIRAutomationTargetNameKey @"WIRAutomationTargetNameKey"
94#define WIRAutomationTargetVersionKey @"WIRAutomationTargetVersionKey"
95#define WIRSessionIdentifierKey @"WIRSessionIdentifierKey"
96#define WIRSessionCapabilitiesKey @"WIRSessionCapabilitiesKey"
97#define WIRAutomationSessionRequestMessage @"WIRAutomationSessionRequestMessage"
98
99// The value for WIRSessionCapabilitiesKey is a dictionary that holds these capability key-value pairs.
100
101#define WIRAllowInsecureMediaCaptureCapabilityKey @"org.webkit.webdriver.webrtc.allow-insecure-media-capture"
102#define WIRSuppressICECandidateFilteringCapabilityKey @"org.webkit.webdriver.webrtc.suppress-ice-candidate-filtering"
103
104// These definitions are shared with a Simulator webinspectord and
105// OS X process communicating with it.
106
107#define WIRSimulatorBuildKey @"WIRSimulatorBuildKey"
108#define WIRSimulatorProductVersionKey @"WIRSimulatorProductVersionKey"
109#define WIRSimulatorNameKey @"WIRSimulatorNameKey"
110
111// These definitions are shared between webinspectord and WebKit.
112
113#define WIRPermissionDenied @"WIRPermissionDenied"
114#define WIRProxyApplicationParentPIDKey @"WIRProxyApplicationParentPID"
115#define WIRProxyApplicationParentAuditDataKey @"WIRProxyApplicationParentAuditData"
116#define WIRProxyApplicationSetupMessage @"WIRProxyApplicationSetupMessage"
117#define WIRProxyApplicationSetupResponseMessage @"WIRProxyApplicationSetupResponseMessage"
118