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 | #define WIRRemoteAutomationEnabledNotification "com.apple.webinspectord.remote_automation_enabled" |
41 | #define WIRRemoteAutomationDisabledNotification "com.apple.webinspectord.remote_automation_disabled" |
42 | |
43 | #define WIRApplicationIdentifierKey @"WIRApplicationIdentifierKey" |
44 | #define WIRApplicationBundleIdentifierKey @"WIRApplicationBundleIdentifierKey" |
45 | #define WIRApplicationNameKey @"WIRApplicationNameKey" |
46 | #define WIRIsApplicationProxyKey @"WIRIsApplicationProxyKey" |
47 | #define WIRIsApplicationActiveKey @"WIRIsApplicationActiveKey" |
48 | #define WIRHostApplicationIdentifierKey @"WIRHostApplicationIdentifierKey" |
49 | #define WIRHostApplicationNameKey @"WIRHostApplicationNameKey" |
50 | #define WIRConnectionIdentifierKey @"WIRConnectionIdentifierKey" |
51 | // COMPATABILITY(iOS 9): The key string is intentionally mismatched to support old relays. |
52 | #define WIRTargetIdentifierKey @"WIRPageIdentifierKey" |
53 | #define WIRHasLocalDebuggerKey @"WIRHasLocalDebuggerKey" |
54 | #define WIRTitleKey @"WIRTitleKey" |
55 | #define WIRURLKey @"WIRURLKey" |
56 | #define WIRUserInfoKey @"WIRUserInfoKey" |
57 | #define WIRApplicationDictionaryKey @"WIRApplicationDictionaryKey" |
58 | #define WIRMessageDataKey @"WIRMessageDataKey" |
59 | #define WIRApplicationGetListingMessage @"WIRApplicationGetListingMessage" |
60 | #define WIRIndicateMessage @"WIRIndicateMessage" |
61 | #define WIRIndicateEnabledKey @"WIRIndicateEnabledKey" |
62 | #define WIRSenderKey @"WIRSenderKey" |
63 | #define WIRSocketDataKey @"WIRSocketDataKey" |
64 | #define WIRSocketDataMessage @"WIRSocketDataMessage" |
65 | #define WIRSocketSetupMessage @"WIRSocketSetupMessage" |
66 | #define WIRWebPageCloseMessage @"WIRWebPageCloseMessage" |
67 | #define WIRRawDataMessage @"WIRRawDataMessage" |
68 | #define WIRRawDataKey @"WIRRawDataKey" |
69 | #define WIRListingMessage @"WIRListingMessage" |
70 | #define WIRListingKey @"WIRListingKey" |
71 | #define WIRRemoteAutomationEnabledKey @"WIRRemoteAutomationEnabledKey" |
72 | #define WIRAutomationAvailabilityKey @"WIRAutomationAvailabilityKey" |
73 | #define WIRDestinationKey @"WIRDestinationKey" |
74 | #define WIRConnectionDiedMessage @"WIRConnectionDiedMessage" |
75 | #define WIRTypeKey @"WIRTypeKey" |
76 | #define WIRTypeJavaScript @"WIRTypeJavaScript" |
77 | #define WIRTypeServiceWorker @"WIRTypeServiceWorker" |
78 | #define WIRTypeWeb @"WIRTypeWeb" |
79 | #define WIRTypeAutomation @"WIRTypeAutomation" |
80 | #define WIRAutomaticallyPause @"WIRAutomaticallyPause" |
81 | |
82 | // Allowed values for WIRAutomationAvailabilityKey. |
83 | #define WIRAutomationAvailabilityNotAvailable @"WIRAutomationAvailabilityNotAvailable" |
84 | #define WIRAutomationAvailabilityAvailable @"WIRAutomationAvailabilityAvailable" |
85 | #define WIRAutomationAvailabilityUnknown @"WIRAutomationAvailabilityUnknown" |
86 | |
87 | #define WIRAutomaticInspectionEnabledKey @"WIRAutomaticInspectionEnabledKey" |
88 | #define WIRAutomaticInspectionSessionIdentifierKey @"WIRAutomaticInspectionSessionIdentifierKey" |
89 | #define WIRAutomaticInspectionConfigurationMessage @"WIRAutomaticInspectionConfigurationMessage" |
90 | #define WIRAutomaticInspectionRejectMessage @"WIRAutomaticInspectionRejectMessage" |
91 | #define WIRAutomaticInspectionCandidateMessage @"WIRAutomaticInspectionCandidateMessage" |
92 | |
93 | #define WIRAutomationTargetIsPairedKey @"WIRAutomationTargetIsPairedKey" |
94 | #define WIRAutomationTargetNameKey @"WIRAutomationTargetNameKey" |
95 | #define WIRAutomationTargetVersionKey @"WIRAutomationTargetVersionKey" |
96 | #define WIRSessionIdentifierKey @"WIRSessionIdentifierKey" |
97 | #define WIRSessionCapabilitiesKey @"WIRSessionCapabilitiesKey" |
98 | #define WIRAutomationSessionRequestMessage @"WIRAutomationSessionRequestMessage" |
99 | |
100 | // The value for WIRSessionCapabilitiesKey is a dictionary that holds these capability key-value pairs. |
101 | |
102 | #define WIRAllowInsecureMediaCaptureCapabilityKey @"org.webkit.webdriver.webrtc.allow-insecure-media-capture" |
103 | #define WIRSuppressICECandidateFilteringCapabilityKey @"org.webkit.webdriver.webrtc.suppress-ice-candidate-filtering" |
104 | |
105 | // These definitions are shared with a Simulator webinspectord and |
106 | // OS X process communicating with it. |
107 | |
108 | #define WIRSimulatorBuildKey @"WIRSimulatorBuildKey" |
109 | #define WIRSimulatorProductVersionKey @"WIRSimulatorProductVersionKey" |
110 | #define WIRSimulatorNameKey @"WIRSimulatorNameKey" |
111 | |
112 | // These definitions are shared between webinspectord and WebKit. |
113 | |
114 | #define WIRPermissionDenied @"WIRPermissionDenied" |
115 | #define WIRProxyApplicationParentPIDKey @"WIRProxyApplicationParentPID" |
116 | #define WIRProxyApplicationParentAuditDataKey @"WIRProxyApplicationParentAuditData" |
117 | #define WIRProxyApplicationSetupMessage @"WIRProxyApplicationSetupMessage" |
118 | #define WIRProxyApplicationSetupResponseMessage @"WIRProxyApplicationSetupResponseMessage" |
119 | |